Compare commits
No commits in common. "master" and "toKotlin" have entirely different histories.
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="app">
|
||||
<State />
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
</project>
|
||||
@ -4,18 +4,16 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/keybordlib" />
|
||||
<option value="$PROJECT_DIR$/mylibrary" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.7.22" />
|
||||
</component>
|
||||
</project>
|
||||
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
@ -25,37 +26,11 @@
|
||||
<entry key="..\:/2022work2/dhhy-cargo/app/src/main/res/layout/order_details_loading_all.xml" value="0.2171875" />
|
||||
<entry key="..\:/2022work2/dhhy-cargo/app/src/main/res/layout/order_item.xml" value="0.2682291666666667" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_address_switch.xml" value="0.18125" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_anohter_order.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_choice_address.xml" value="0.25" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_dis_car.xml" value="0.19947916666666668" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_goods_add.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_main.xml" value="0.225" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_node_info.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_order_details_all.xml" value="0.2203125" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_order_list.xml" value="0.32916666666666666" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_search_address.xml" value="0.159375" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/activity_weclome.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/assembly_title_block.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/fragment_huoyuan.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/fragment_order_list.xml" value="0.1" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/fragment_wallet.xml" value="0.25416666666666665" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/fragment_waybill_list.xml" value="0.225" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/huoyuan_bottom.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/huoyuan_centent_loading_info.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/huoyuan_content.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/huoyuan_input_car.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/item_address.xml" value="0.23385416666666667" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/item_cargo.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/item_node_dis.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/item_node_pretend.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/item_null.xml" value="0.23385416666666667" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/my.xml" value="0.33" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/order_details_all.xml" value="0.23385416666666667" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/order_details_loading_all.xml" value="0.2203125" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/order_item.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/order_list_top.xml" value="0.25416666666666665" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/app/src/main/res/layout/order_time.xml" value="0.24739583333333334" />
|
||||
<entry key="..\:/goodluckapp/dhhy-cargo/mylibrary/src/main/res/layout/common_toolbar.xml" value="0.36614583333333334" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-kapt'
|
||||
id 'kotlin-android-extensions'
|
||||
}
|
||||
|
||||
android {
|
||||
@ -34,10 +31,8 @@ android {
|
||||
applicationId "com.oneclouds.cargo"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
versionCode 34
|
||||
versionName "3.1.4"
|
||||
|
||||
flavorDimensions "CHANNEL_VALUE"
|
||||
versionCode 27
|
||||
versionName "3.0.7"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@ -73,60 +68,11 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
|
||||
dev {
|
||||
applicationId "com.oneclouds.cargo"
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "货主端(测试)",
|
||||
// app_icon : "@drawable/head_defaut",
|
||||
JPUSH_PKGNAME: applicationId,
|
||||
//JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191",
|
||||
//暂时填写默认值即可.
|
||||
JPUSH_CHANNEL: "developer-n"]
|
||||
// buildConfigField("String", "BASE_URL", "\"https://app.test.dahehuoyun.com/api/\"")
|
||||
buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8080/api/\"")
|
||||
buildConfigField "boolean", "isTest", "true"
|
||||
//APP名称,可以在androidMainfest中引用
|
||||
resValue "string", "appName", "货主端测试"
|
||||
}
|
||||
prod {
|
||||
applicationId "com.oneclouds.cargo"
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "货主端",
|
||||
// app_icon : "@drawable/ysxy",
|
||||
JPUSH_PKGNAME: applicationId,
|
||||
//JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191",
|
||||
//暂时填写默认值即可.
|
||||
JPUSH_CHANNEL: "developer-default"]
|
||||
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
||||
buildConfigField "boolean", "isTest", "false"
|
||||
resValue "string", "appName", "货主端"
|
||||
}
|
||||
}
|
||||
|
||||
// android.applicationVariants.all { variant ->
|
||||
// variant.outputs.all {
|
||||
// def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
||||
// if(variant.buildType.name.equals('release')){
|
||||
// outputFileName = "dhhy-cargo-"+date+"-${versionName}.apk"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
//获取渠道名称
|
||||
def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value")
|
||||
def appName = null
|
||||
if (isText == "true") {
|
||||
appName = '货主端测试_'
|
||||
} else {
|
||||
appName = '货主端正式_'
|
||||
}
|
||||
def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
||||
variant.outputs.all {
|
||||
outputFileName = appName+date+"_${variant.buildType.name}_v${defaultConfig.versionName}.apk"
|
||||
if(variant.buildType.name.equals('release')){
|
||||
outputFileName = "dhhy-cargo-"+date+"-${versionName}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -144,8 +90,6 @@ dependencies {
|
||||
//加载
|
||||
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
|
||||
implementation 'com.scwang.smart:refresh-header-material:2.0.1'
|
||||
implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载
|
||||
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
|
||||
implementation 'com.alibaba:fastjson:1.2.61'
|
||||
//更新版本
|
||||
implementation 'com.github.jenly1314.AppUpdater:app-updater:1.1.0'
|
||||
@ -177,5 +121,4 @@ dependencies {
|
||||
|
||||
|
||||
implementation project(path: ':mylibrary')
|
||||
implementation project(':keybordlib')
|
||||
}
|
||||
BIN
app/release/dhhy-cargo-0830_17-18-3.0.7.apk
Normal file
@ -10,9 +10,9 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 30,
|
||||
"versionName": "3.1.0",
|
||||
"outputFile": "dhhy-cargo-0814_15-58-3.1.0.apk"
|
||||
"versionCode": 27,
|
||||
"versionName": "3.0.7",
|
||||
"outputFile": "dhhy-cargo-0830_17-18-3.0.7.apk"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -5,12 +5,12 @@
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<!--如果您的应用需要后台定位权限,且有可能运行在Android Q设备上,并且设置了target>28,必须增加这个权限声明-->
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.EACCES" />
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.EACCES"/>
|
||||
<!--用于申请调用A-GPS模块-->
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"></uses-permission>
|
||||
<!--用于写入缓存数据到扩展存储卡-->
|
||||
@ -27,11 +27,11 @@
|
||||
<!-- 判断相机是否 可以使用 如果不加以下配置 那么captureIntent.resolveActivity(context.getPackageManager())==null -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.media.action.IMAGE_CAPTURE" />
|
||||
<action android:name="android.media.action.IMAGE_CAPTURE"/>
|
||||
</intent>
|
||||
|
||||
<intent>
|
||||
<action android:name="android.media.action.VIDEO_CAPTURE" />
|
||||
<action android:name="android.media.action.VIDEO_CAPTURE"/>
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
@ -39,160 +39,67 @@
|
||||
<application
|
||||
android:name=".ui.App"
|
||||
android:allowBackup="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:icon="@drawable/logo_cargo"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<meta-data
|
||||
android:name="CHANNEL"
|
||||
android:value="${CHANNEL_VALUE}" />
|
||||
android:usesCleartextTraffic="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:largeHeap="true">
|
||||
|
||||
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="6009d63caedb3fead6f003cc5fd191ca" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.map.WebMapActivity"
|
||||
android:screenOrientation="portrait">
|
||||
<activity android:name=".ui.map.WebMapActivity" android:screenOrientation="portrait">
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.WelcomeActivity"
|
||||
android:screenOrientation="portrait">
|
||||
<activity android:name=".ui.WelcomeActivity" android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.home.OrderListActivity"
|
||||
<activity android:name=".ui.home.OrderListActivity"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan"></activity>
|
||||
<activity
|
||||
android:name=".ui.LoginActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.ForgetPwdActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.AddressActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.CheckCarLocActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.AddressAddActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.GoodsActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.WebActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.news.NewsActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.wallet.UpBankActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.SetupActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.OrderAllActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.auth.MyAuthActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.auth.BusinesslicenseAuthActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.GoodsSourceActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.OrderDetailsActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.OrderComplaintActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.GetUploadImageActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.auth.CertificatesAuthActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.auth.CompanyAuthActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.invoice.InvoiceActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.invoice.InvoiceHaederActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.invoice.InvoiceHaederAddActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.invoice.InvoiceHistoryActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.invoice.InvoiceDetailsActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.invoice.InvoiceCreateActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.OrderDetailsAllActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.my.auth.DangAuthActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.GoodsDischargeActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.InformationActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.NodeInfoActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.SearchAddressActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.ChoiceAddressActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.home.DisCarActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.news.NewsXActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.waybill.activity.AnotherOrderActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"></activity>
|
||||
<activity
|
||||
android:name=".ui.waybill.activity.SearchWaybillActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"></activity>
|
||||
|
||||
<activity android:name=".ui.MainActivity" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan">
|
||||
</activity>
|
||||
<activity android:name=".ui.LoginActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.ForgetPwdActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.AddressActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.AddressAddActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.GoodsActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.WebActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.news.NewsActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.wallet.UpBankActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.SetupActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.OrderAllActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.auth.MyAuthActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.auth.BusinesslicenseAuthActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.GoodsSourceActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.OrderDetailsActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.OrderComplaintActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.GetUploadImageActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.auth.CertificatesAuthActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.auth.CompanyAuthActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.invoice.InvoiceActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.invoice.InvoiceHaederActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.invoice.InvoiceHaederAddActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.invoice.InvoiceHistoryActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.invoice.InvoiceDetailsActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.invoice.InvoiceCreateActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.OrderDetailsAllActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.my.auth.DangAuthActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.GoodsDischargeActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.InformationActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.NodeInfoActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.SearchAddressActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.ChoiceAddressActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.home.DisCarActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".ui.news.NewsXActivity" android:screenOrientation="portrait"/>
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.oneclouds.cargo.fileprovider"
|
||||
|
||||
@ -151,28 +151,10 @@ public class AddressListBean {
|
||||
private String createTime;
|
||||
private String updateTime;
|
||||
private String companyName;
|
||||
private String latitude;
|
||||
private String longitude;
|
||||
private String companyCode;
|
||||
private Object idCard;
|
||||
private int userType;
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode;
|
||||
}
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
package com.oneclouds.cargo.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/9/15 15:41
|
||||
* @description:
|
||||
*/
|
||||
public class CarShortTypeBean {
|
||||
|
||||
private int res;
|
||||
private int code;
|
||||
private boolean success;
|
||||
private String msg;
|
||||
private List<DataDTO> data;
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public List<DataDTO> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DataDTO> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private int value;
|
||||
private String alctName;
|
||||
private String label;
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getAlctName() {
|
||||
return alctName;
|
||||
}
|
||||
|
||||
public void setAlctName(String alctName) {
|
||||
this.alctName = alctName;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package com.oneclouds.cargo.bean;
|
||||
|
||||
/**
|
||||
* @ClassName CodeBean
|
||||
* @Author john
|
||||
* @Date 2025/1/16 09:18
|
||||
* @Description TODO
|
||||
*/
|
||||
public class CodeBean {
|
||||
|
||||
|
||||
private String msg;
|
||||
private String img;
|
||||
private int code;
|
||||
private boolean success;
|
||||
private boolean captchaOnOff;
|
||||
private String uuid;
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public boolean isCaptchaOnOff() {
|
||||
return captchaOnOff;
|
||||
}
|
||||
|
||||
public void setCaptchaOnOff(boolean captchaOnOff) {
|
||||
this.captchaOnOff = captchaOnOff;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
}
|
||||
@ -1,108 +0,0 @@
|
||||
package com.oneclouds.cargo.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/9/15 15:41
|
||||
* @description:
|
||||
*/
|
||||
public class GoodsTypeBean {
|
||||
|
||||
private int res;
|
||||
private int code;
|
||||
private boolean success;
|
||||
private String msg;
|
||||
private List<DataDTO> data;
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public List<DataDTO> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DataDTO> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
|
||||
private String cateName;
|
||||
private int alctGoodsTypeId;
|
||||
private int id;
|
||||
private String shipperId;
|
||||
private String remarks;
|
||||
|
||||
|
||||
public String getCateName() {
|
||||
return cateName;
|
||||
}
|
||||
|
||||
public void setCateName(String cateName) {
|
||||
this.cateName = cateName;
|
||||
}
|
||||
|
||||
public int getAlctGoodsTypeId() {
|
||||
return alctGoodsTypeId;
|
||||
}
|
||||
|
||||
public void setAlctGoodsTypeId(int alctGoodsTypeId) {
|
||||
this.alctGoodsTypeId = alctGoodsTypeId;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getShipperId() {
|
||||
return shipperId;
|
||||
}
|
||||
|
||||
public void setShipperId(String shipperId) {
|
||||
this.shipperId = shipperId;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -56,7 +56,6 @@ public class LoginBean {
|
||||
|
||||
public static class DataDTO {
|
||||
private String token;
|
||||
private String access_token;
|
||||
private int id;
|
||||
private int roleId;
|
||||
private String uname;
|
||||
@ -81,14 +80,6 @@ public class LoginBean {
|
||||
private Object isCar;
|
||||
private Object qrcodeUrl;
|
||||
|
||||
public String getAccess_token() {
|
||||
return access_token;
|
||||
}
|
||||
|
||||
public void setAccess_token(String access_token) {
|
||||
this.access_token = access_token;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
@ -1,955 +0,0 @@
|
||||
package com.oneclouds.cargo.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName OrderBean2
|
||||
* @Author 用户
|
||||
* @Date 2022/9/1 17:06
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OrderBean2 {
|
||||
|
||||
|
||||
private int alctGoodsType;
|
||||
private String allowSplitting;
|
||||
private int businessType;
|
||||
private String carId;
|
||||
private String carNumber;
|
||||
private String contactName;
|
||||
private String contactPhone;
|
||||
private String contractTemplateUrl;
|
||||
private String distance;
|
||||
private String driverTax;
|
||||
private String effectiveTime;
|
||||
private String etcCost;
|
||||
private String failedReason;
|
||||
private int goodsBigCate;
|
||||
private String goodsValue;
|
||||
private long id;
|
||||
private String insureAmount;
|
||||
private String isInsure;
|
||||
private String loadingAddress;
|
||||
private String loadingDeadline;
|
||||
private String loadingName;
|
||||
private String loadingPhone;
|
||||
private String loadingProvinceCityArea;
|
||||
private String namedDrivers;
|
||||
private String oliCost;
|
||||
private String orderNum;
|
||||
private String otherCost;
|
||||
private String platformTotalFreight;
|
||||
private List<PutInfoDTO> putInfo;
|
||||
private String receiverAddress;
|
||||
private String receiverDeadline;
|
||||
private String receiverName;
|
||||
private String receiverPhone;
|
||||
private String receiverProvinceCityArea;
|
||||
private String report;
|
||||
private String requirement;
|
||||
private List<SendInfoDTO> sendInfo;
|
||||
private String sendPutString;
|
||||
private String shipperId;
|
||||
private long status;
|
||||
private String statusOver;
|
||||
private String totalFreight;
|
||||
private int vehicleLength;
|
||||
private String vehicleLengthName;
|
||||
private int vehicleType;
|
||||
private String vehicleTypeName;
|
||||
private long waybillId;
|
||||
|
||||
public int getAlctGoodsType() {
|
||||
return alctGoodsType;
|
||||
}
|
||||
|
||||
public void setAlctGoodsType(int alctGoodsType) {
|
||||
this.alctGoodsType = alctGoodsType;
|
||||
}
|
||||
|
||||
public String getAllowSplitting() {
|
||||
return allowSplitting;
|
||||
}
|
||||
|
||||
public void setAllowSplitting(String allowSplitting) {
|
||||
this.allowSplitting = allowSplitting;
|
||||
}
|
||||
|
||||
public int getBusinessType() {
|
||||
return businessType;
|
||||
}
|
||||
|
||||
public void setBusinessType(int businessType) {
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public void setCarId(String carId) {
|
||||
this.carId = carId;
|
||||
}
|
||||
|
||||
public String getCarNumber() {
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber) {
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getContactName() {
|
||||
return contactName;
|
||||
}
|
||||
|
||||
public void setContactName(String contactName) {
|
||||
this.contactName = contactName;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContractTemplateUrl() {
|
||||
return contractTemplateUrl;
|
||||
}
|
||||
|
||||
public void setContractTemplateUrl(String contractTemplateUrl) {
|
||||
this.contractTemplateUrl = contractTemplateUrl;
|
||||
}
|
||||
|
||||
public String getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(String distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getDriverTax() {
|
||||
return driverTax;
|
||||
}
|
||||
|
||||
public void setDriverTax(String driverTax) {
|
||||
this.driverTax = driverTax;
|
||||
}
|
||||
|
||||
public String getEffectiveTime() {
|
||||
return effectiveTime;
|
||||
}
|
||||
|
||||
public void setEffectiveTime(String effectiveTime) {
|
||||
this.effectiveTime = effectiveTime;
|
||||
}
|
||||
|
||||
public String getEtcCost() {
|
||||
return etcCost;
|
||||
}
|
||||
|
||||
public void setEtcCost(String etcCost) {
|
||||
this.etcCost = etcCost;
|
||||
}
|
||||
|
||||
public String getFailedReason() {
|
||||
return failedReason;
|
||||
}
|
||||
|
||||
public void setFailedReason(String failedReason) {
|
||||
this.failedReason = failedReason;
|
||||
}
|
||||
|
||||
public int getGoodsBigCate() {
|
||||
return goodsBigCate;
|
||||
}
|
||||
|
||||
public void setGoodsBigCate(int goodsBigCate) {
|
||||
this.goodsBigCate = goodsBigCate;
|
||||
}
|
||||
|
||||
public String getGoodsValue() {
|
||||
return goodsValue;
|
||||
}
|
||||
|
||||
public void setGoodsValue(String goodsValue) {
|
||||
this.goodsValue = goodsValue;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getInsureAmount() {
|
||||
return insureAmount;
|
||||
}
|
||||
|
||||
public void setInsureAmount(String insureAmount) {
|
||||
this.insureAmount = insureAmount;
|
||||
}
|
||||
|
||||
public String getIsInsure() {
|
||||
return isInsure;
|
||||
}
|
||||
|
||||
public void setIsInsure(String isInsure) {
|
||||
this.isInsure = isInsure;
|
||||
}
|
||||
|
||||
public String getLoadingAddress() {
|
||||
return loadingAddress;
|
||||
}
|
||||
|
||||
public void setLoadingAddress(String loadingAddress) {
|
||||
this.loadingAddress = loadingAddress;
|
||||
}
|
||||
|
||||
public String getLoadingDeadline() {
|
||||
return loadingDeadline;
|
||||
}
|
||||
|
||||
public void setLoadingDeadline(String loadingDeadline) {
|
||||
this.loadingDeadline = loadingDeadline;
|
||||
}
|
||||
|
||||
public String getLoadingName() {
|
||||
return loadingName;
|
||||
}
|
||||
|
||||
public void setLoadingName(String loadingName) {
|
||||
this.loadingName = loadingName;
|
||||
}
|
||||
|
||||
public String getLoadingPhone() {
|
||||
return loadingPhone;
|
||||
}
|
||||
|
||||
public void setLoadingPhone(String loadingPhone) {
|
||||
this.loadingPhone = loadingPhone;
|
||||
}
|
||||
|
||||
public String getLoadingProvinceCityArea() {
|
||||
return loadingProvinceCityArea;
|
||||
}
|
||||
|
||||
public void setLoadingProvinceCityArea(String loadingProvinceCityArea) {
|
||||
this.loadingProvinceCityArea = loadingProvinceCityArea;
|
||||
}
|
||||
|
||||
public String getNamedDrivers() {
|
||||
return namedDrivers;
|
||||
}
|
||||
|
||||
public void setNamedDrivers(String namedDrivers) {
|
||||
this.namedDrivers = namedDrivers;
|
||||
}
|
||||
|
||||
public String getOliCost() {
|
||||
return oliCost;
|
||||
}
|
||||
|
||||
public void setOliCost(String oliCost) {
|
||||
this.oliCost = oliCost;
|
||||
}
|
||||
|
||||
public String getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(String orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getOtherCost() {
|
||||
return otherCost;
|
||||
}
|
||||
|
||||
public void setOtherCost(String otherCost) {
|
||||
this.otherCost = otherCost;
|
||||
}
|
||||
|
||||
public String getPlatformTotalFreight() {
|
||||
return platformTotalFreight;
|
||||
}
|
||||
|
||||
public void setPlatformTotalFreight(String platformTotalFreight) {
|
||||
this.platformTotalFreight = platformTotalFreight;
|
||||
}
|
||||
|
||||
public List<PutInfoDTO> getPutInfo() {
|
||||
return putInfo;
|
||||
}
|
||||
|
||||
public void setPutInfo(List<PutInfoDTO> putInfo) {
|
||||
this.putInfo = putInfo;
|
||||
}
|
||||
|
||||
public String getReceiverAddress() {
|
||||
return receiverAddress;
|
||||
}
|
||||
|
||||
public void setReceiverAddress(String receiverAddress) {
|
||||
this.receiverAddress = receiverAddress;
|
||||
}
|
||||
|
||||
public String getReceiverDeadline() {
|
||||
return receiverDeadline;
|
||||
}
|
||||
|
||||
public void setReceiverDeadline(String receiverDeadline) {
|
||||
this.receiverDeadline = receiverDeadline;
|
||||
}
|
||||
|
||||
public String getReceiverName() {
|
||||
return receiverName;
|
||||
}
|
||||
|
||||
public void setReceiverName(String receiverName) {
|
||||
this.receiverName = receiverName;
|
||||
}
|
||||
|
||||
public String getReceiverPhone() {
|
||||
return receiverPhone;
|
||||
}
|
||||
|
||||
public void setReceiverPhone(String receiverPhone) {
|
||||
this.receiverPhone = receiverPhone;
|
||||
}
|
||||
|
||||
public String getReceiverProvinceCityArea() {
|
||||
return receiverProvinceCityArea;
|
||||
}
|
||||
|
||||
public void setReceiverProvinceCityArea(String receiverProvinceCityArea) {
|
||||
this.receiverProvinceCityArea = receiverProvinceCityArea;
|
||||
}
|
||||
|
||||
public String getReport() {
|
||||
return report;
|
||||
}
|
||||
|
||||
public void setReport(String report) {
|
||||
this.report = report;
|
||||
}
|
||||
|
||||
public String getRequirement() {
|
||||
return requirement;
|
||||
}
|
||||
|
||||
public void setRequirement(String requirement) {
|
||||
this.requirement = requirement;
|
||||
}
|
||||
|
||||
public List<SendInfoDTO> getSendInfo() {
|
||||
return sendInfo;
|
||||
}
|
||||
|
||||
public void setSendInfo(List<SendInfoDTO> sendInfo) {
|
||||
this.sendInfo = sendInfo;
|
||||
}
|
||||
|
||||
public String getSendPutString() {
|
||||
return sendPutString;
|
||||
}
|
||||
|
||||
public void setSendPutString(String sendPutString) {
|
||||
this.sendPutString = sendPutString;
|
||||
}
|
||||
|
||||
public String getShipperId() {
|
||||
return shipperId;
|
||||
}
|
||||
|
||||
public void setShipperId(String shipperId) {
|
||||
this.shipperId = shipperId;
|
||||
}
|
||||
|
||||
public long getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(long status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatusOver() {
|
||||
return statusOver;
|
||||
}
|
||||
|
||||
public void setStatusOver(String statusOver) {
|
||||
this.statusOver = statusOver;
|
||||
}
|
||||
|
||||
public String getTotalFreight() {
|
||||
return totalFreight;
|
||||
}
|
||||
|
||||
public void setTotalFreight(String totalFreight) {
|
||||
this.totalFreight = totalFreight;
|
||||
}
|
||||
|
||||
public int getVehicleLength() {
|
||||
return vehicleLength;
|
||||
}
|
||||
|
||||
public void setVehicleLength(int vehicleLength) {
|
||||
this.vehicleLength = vehicleLength;
|
||||
}
|
||||
|
||||
public String getVehicleLengthName() {
|
||||
return vehicleLengthName;
|
||||
}
|
||||
|
||||
public void setVehicleLengthName(String vehicleLengthName) {
|
||||
this.vehicleLengthName = vehicleLengthName;
|
||||
}
|
||||
|
||||
public int getVehicleType() {
|
||||
return vehicleType;
|
||||
}
|
||||
|
||||
public void setVehicleType(int vehicleType) {
|
||||
this.vehicleType = vehicleType;
|
||||
}
|
||||
|
||||
public String getVehicleTypeName() {
|
||||
return vehicleTypeName;
|
||||
}
|
||||
|
||||
public void setVehicleTypeName(String vehicleTypeName) {
|
||||
this.vehicleTypeName = vehicleTypeName;
|
||||
}
|
||||
|
||||
public long getWaybillId() {
|
||||
return waybillId;
|
||||
}
|
||||
|
||||
public void setWaybillId(long waybillId) {
|
||||
this.waybillId = waybillId;
|
||||
}
|
||||
|
||||
public static class PutInfoDTO {
|
||||
private String address;
|
||||
private long area;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private Long childNumber;
|
||||
private long city;
|
||||
private String createTime;
|
||||
private String deadline;
|
||||
private long displayOrder;
|
||||
private List<GoodsDTO> goods;
|
||||
private String latitude;
|
||||
private String longitude;
|
||||
private String name;
|
||||
private String phone;
|
||||
private long pid;
|
||||
private long province;
|
||||
private String provinceCityArea;
|
||||
private long status;
|
||||
private String totalAmount;
|
||||
private long type;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public long getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(long area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode;
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public Long getChildNumber() {
|
||||
return childNumber;
|
||||
}
|
||||
|
||||
public void setChildNumber(Long childNumber) {
|
||||
this.childNumber = childNumber;
|
||||
}
|
||||
|
||||
public long getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(long city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getDeadline() {
|
||||
return deadline;
|
||||
}
|
||||
|
||||
public void setDeadline(String deadline) {
|
||||
this.deadline = deadline;
|
||||
}
|
||||
|
||||
public long getDisplayOrder() {
|
||||
return displayOrder;
|
||||
}
|
||||
|
||||
public void setDisplayOrder(long displayOrder) {
|
||||
this.displayOrder = displayOrder;
|
||||
}
|
||||
|
||||
public List<GoodsDTO> getGoods() {
|
||||
return goods;
|
||||
}
|
||||
|
||||
public void setGoods(List<GoodsDTO> goods) {
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public long getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(long pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public long getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(long province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getProvinceCityArea() {
|
||||
return provinceCityArea;
|
||||
}
|
||||
|
||||
public void setProvinceCityArea(String provinceCityArea) {
|
||||
this.provinceCityArea = provinceCityArea;
|
||||
}
|
||||
|
||||
public long getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(long status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(String totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public long getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(long type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static class GoodsDTO {
|
||||
private Long childrenId;
|
||||
private String createTime;
|
||||
private String goodName;
|
||||
private String goodNum;
|
||||
private String goodPrice;
|
||||
private String goodUnit;
|
||||
private Long id;
|
||||
private String packName;
|
||||
|
||||
public Long getChildrenId() {
|
||||
return childrenId;
|
||||
}
|
||||
|
||||
public void setChildrenId(Long childrenId) {
|
||||
this.childrenId = childrenId;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getGoodName() {
|
||||
return goodName;
|
||||
}
|
||||
|
||||
public void setGoodName(String goodName) {
|
||||
this.goodName = goodName;
|
||||
}
|
||||
|
||||
public String getGoodNum() {
|
||||
return goodNum;
|
||||
}
|
||||
|
||||
public void setGoodNum(String goodNum) {
|
||||
this.goodNum = goodNum;
|
||||
}
|
||||
|
||||
public String getGoodPrice() {
|
||||
return goodPrice;
|
||||
}
|
||||
|
||||
public void setGoodPrice(String goodPrice) {
|
||||
this.goodPrice = goodPrice;
|
||||
}
|
||||
|
||||
public String getGoodUnit() {
|
||||
return goodUnit;
|
||||
}
|
||||
|
||||
public void setGoodUnit(String goodUnit) {
|
||||
this.goodUnit = goodUnit;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPackName() {
|
||||
return packName;
|
||||
}
|
||||
|
||||
public void setPackName(String packName) {
|
||||
this.packName = packName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class SendInfoDTO {
|
||||
private String address;
|
||||
private long area;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private Long childNumber;
|
||||
private long city;
|
||||
private String createTime;
|
||||
private String deadline;
|
||||
private long displayOrder;
|
||||
private List<GoodsDTO> goods;
|
||||
private String latitude;
|
||||
private String longitude;
|
||||
private String name;
|
||||
private String phone;
|
||||
private long pid;
|
||||
private long province;
|
||||
private String provinceCityArea;
|
||||
private long status;
|
||||
private String totalAmount;
|
||||
private long type;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public long getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(long area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode;
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public Long getChildNumber() {
|
||||
return childNumber;
|
||||
}
|
||||
|
||||
public void setChildNumber(Long childNumber) {
|
||||
this.childNumber = childNumber;
|
||||
}
|
||||
|
||||
public long getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(long city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getDeadline() {
|
||||
return deadline;
|
||||
}
|
||||
|
||||
public void setDeadline(String deadline) {
|
||||
this.deadline = deadline;
|
||||
}
|
||||
|
||||
public long getDisplayOrder() {
|
||||
return displayOrder;
|
||||
}
|
||||
|
||||
public void setDisplayOrder(long displayOrder) {
|
||||
this.displayOrder = displayOrder;
|
||||
}
|
||||
|
||||
public List<GoodsDTO> getGoods() {
|
||||
return goods;
|
||||
}
|
||||
|
||||
public void setGoods(List<GoodsDTO> goods) {
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public long getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(long pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public long getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(long province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getProvinceCityArea() {
|
||||
return provinceCityArea;
|
||||
}
|
||||
|
||||
public void setProvinceCityArea(String provinceCityArea) {
|
||||
this.provinceCityArea = provinceCityArea;
|
||||
}
|
||||
|
||||
public long getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(long status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(String totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public long getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(long type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static class GoodsDTO {
|
||||
private Long childrenId;
|
||||
private String createTime;
|
||||
private String goodName;
|
||||
private String goodNum;
|
||||
private String goodPrice;
|
||||
private String goodUnit;
|
||||
private Long id;
|
||||
private String packName;
|
||||
|
||||
public Long getChildrenId() {
|
||||
return childrenId;
|
||||
}
|
||||
|
||||
public void setChildrenId(Long childrenId) {
|
||||
this.childrenId = childrenId;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getGoodName() {
|
||||
return goodName;
|
||||
}
|
||||
|
||||
public void setGoodName(String goodName) {
|
||||
this.goodName = goodName;
|
||||
}
|
||||
|
||||
public String getGoodNum() {
|
||||
return goodNum;
|
||||
}
|
||||
|
||||
public void setGoodNum(String goodNum) {
|
||||
this.goodNum = goodNum;
|
||||
}
|
||||
|
||||
public String getGoodPrice() {
|
||||
return goodPrice;
|
||||
}
|
||||
|
||||
public void setGoodPrice(String goodPrice) {
|
||||
this.goodPrice = goodPrice;
|
||||
}
|
||||
|
||||
public String getGoodUnit() {
|
||||
return goodUnit;
|
||||
}
|
||||
|
||||
public void setGoodUnit(String goodUnit) {
|
||||
this.goodUnit = goodUnit;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPackName() {
|
||||
return packName;
|
||||
}
|
||||
|
||||
public void setPackName(String packName) {
|
||||
this.packName = packName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,130 +0,0 @@
|
||||
package com.oneclouds.cargo.bean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @ClassName OrderRouterBean
|
||||
* @Author john
|
||||
* @Date 2024/9/23 16:28
|
||||
* @Description TODO
|
||||
*/
|
||||
public class OrderRouterBean {
|
||||
|
||||
private int code;
|
||||
private DataDTO data;
|
||||
private String msg;
|
||||
private int res;
|
||||
private boolean success;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public DataDTO getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(DataDTO data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getRes() {
|
||||
return res;
|
||||
}
|
||||
|
||||
public void setRes(int res) {
|
||||
this.res = res;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public static class DataDTO {
|
||||
private String endLat;
|
||||
private String endLon;
|
||||
private String startLat;
|
||||
private String startLon;
|
||||
|
||||
private ArrayList<PositionDao> vo;
|
||||
|
||||
|
||||
public ArrayList<PositionDao> getVo() {
|
||||
return vo;
|
||||
}
|
||||
|
||||
public void setVo(ArrayList<PositionDao> vo) {
|
||||
this.vo = vo;
|
||||
}
|
||||
|
||||
public String getEndLat() {
|
||||
return endLat;
|
||||
}
|
||||
|
||||
public void setEndLat(String endLat) {
|
||||
this.endLat = endLat;
|
||||
}
|
||||
|
||||
public String getEndLon() {
|
||||
return endLon;
|
||||
}
|
||||
|
||||
public void setEndLon(String endLon) {
|
||||
this.endLon = endLon;
|
||||
}
|
||||
|
||||
public String getStartLat() {
|
||||
return startLat;
|
||||
}
|
||||
|
||||
public void setStartLat(String startLat) {
|
||||
this.startLat = startLat;
|
||||
}
|
||||
|
||||
public String getStartLon() {
|
||||
return startLon;
|
||||
}
|
||||
|
||||
public void setStartLon(String startLon) {
|
||||
this.startLon = startLon;
|
||||
}
|
||||
|
||||
public static class PositionDao{
|
||||
private String name;
|
||||
private ArrayList<ArrayList<String>> path;
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ArrayList<ArrayList<String>> getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(ArrayList<ArrayList<String>> path) {
|
||||
this.path = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class UserBean {
|
||||
private int auditStatus;
|
||||
private String distance;
|
||||
private int waybillNum;
|
||||
private String orderNum;
|
||||
private Object orderNum;
|
||||
private String idCardValidity;
|
||||
private String driverValidity;
|
||||
private String qualificationValidity;
|
||||
@ -255,11 +255,11 @@ public class UserBean {
|
||||
this.waybillNum = waybillNum;
|
||||
}
|
||||
|
||||
public String getOrderNum() {
|
||||
public Object getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(String orderNum) {
|
||||
public void setOrderNum(Object orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
package com.oneclouds.cargo.event;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/9/14 15:37
|
||||
* @description:
|
||||
*/
|
||||
public class ChangeTabEvent {
|
||||
|
||||
private int type;
|
||||
|
||||
public ChangeTabEvent(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package com.oneclouds.cargo.event;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/9/14 15:37
|
||||
* @description:
|
||||
*/
|
||||
public class RefreshEvent {
|
||||
|
||||
private String message;
|
||||
private int type;
|
||||
|
||||
public RefreshEvent(String message, int type) {
|
||||
this.message = message;
|
||||
this.type = type;
|
||||
}
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@ -93,13 +93,9 @@ public class AddressRequest {
|
||||
|
||||
//地址信息保存
|
||||
public void getComInfo(){
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getCompanyInfo(), "post", ""),getToken(con),con);
|
||||
Request re = OkHttpUtil.get(new OkDate(UrlManager.getCompanyInfo(), "get", ""),getToken(con),con);
|
||||
RequestTest.test(1,COMPANY_SAVE,re,con,hd);
|
||||
}
|
||||
|
||||
//获取车辆地址
|
||||
public void getCarLoca(String carNum){
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getCarLocation()+carNum, "post", ""),getToken(con),con);
|
||||
RequestTest.test(1,"getcarlocation",re,con,hd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -43,8 +43,6 @@ public class OrderRequest {
|
||||
|
||||
//车型车长
|
||||
public static final String ORDER_CAR_TYPE_AND_CAR_LONG="order_CarTypeAndCarLong";
|
||||
public static final String ORDER_CAR_TYPE_AND_CAR="order_CarTypeAndCar";
|
||||
public static final String ORDER_CAR_TYPE_AND_GOODS_TYPE="ORDER_CAR_TYPE_AND_GOODS_TYPE";
|
||||
//业务类型
|
||||
public static final String ORDER_BUSINESS_TYPE_LIST="order_businessTypeList";
|
||||
|
||||
@ -66,25 +64,6 @@ public class OrderRequest {
|
||||
//货源保存/提交
|
||||
public static final String ORDER_PULIST_ORDER="publishOrder";
|
||||
|
||||
//车辆类型
|
||||
public static String CAR_TYPE ="/common/dic/carTypeSimpleList";
|
||||
|
||||
//货物大类
|
||||
public static String GOODS_TYPE ="/shipperWeb/goodsCate/nplist";
|
||||
|
||||
|
||||
//货物大类-汇总版
|
||||
public void goodType(){
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getGoodType(), "post",""),getToken(con),con);
|
||||
RequestTest.test(1,ORDER_CAR_TYPE_AND_GOODS_TYPE,re,con,hd);
|
||||
}
|
||||
|
||||
//车型车长-汇总版
|
||||
public void carType(){
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getCarType(), "post",""),getToken(con),con);
|
||||
RequestTest.test(1,ORDER_CAR_TYPE_AND_CAR,re,con,hd);
|
||||
}
|
||||
|
||||
//车型车长
|
||||
public void carTypeLongList(){
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getOrderCarTypeAndCarLong(), "post",""),getToken(con),con);
|
||||
@ -138,17 +117,8 @@ public class OrderRequest {
|
||||
public void orderRevoke(int id){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("isPlatDispatch",0);
|
||||
map.put("orderId",id);
|
||||
map.put("remark","取消运单");
|
||||
map.put("order_id",id);
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getOrderRevoke(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,ORDER_REVOKE,re,con,hd);
|
||||
}
|
||||
|
||||
//货主货源签收
|
||||
public void orderSigin(int waybillId){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
// map.put("isPlatDispatch",0);
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getOrderSigin()+"?waybillId="+waybillId, "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,"order_sign",re,con,hd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.oneclouds.cargo.request;
|
||||
|
||||
import static com.oneclouds.cargo.request.manager.UrlManager.BASE_URL;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Handler;
|
||||
@ -10,7 +8,6 @@ import com.google.gson.Gson;
|
||||
import com.oneclouds.cargo.constant.SPConstant;
|
||||
import com.oneclouds.cargo.request.bean.InsBankInputBean;
|
||||
import com.oneclouds.cargo.request.bean.LoginRegInputBean;
|
||||
import com.oneclouds.cargo.request.bean.NewLogBean;
|
||||
import com.oneclouds.cargo.request.manager.UrlManager;
|
||||
import com.oneclouds.cargo.util.MapUtil;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
@ -105,22 +102,12 @@ public class PublicRequest {
|
||||
Request re = OkHttpUtil.post(new OkDate(UrlManager.forgetPwd(), "post", MapUtil.mapJson(map)),con);
|
||||
RequestTest.test(1,FORGETPWD,re,con,hd);
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
public void getCode(){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
Request re = OkHttpUtil.get(new OkDate(UrlManager.getCode(), "get", MapUtil.mapJson(map)),"get",con);
|
||||
RequestTest.test(1,"getCode",re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//账户登录
|
||||
public void userLogin(LoginRegInputBean lrib){
|
||||
Request re = OkHttpUtil.post(new OkDate(UrlManager.getLOGIN(), "post", gson.toJson(lrib)),con);
|
||||
RequestTest.test(1,LOGIN,re,con,hd);
|
||||
}//账户登录
|
||||
public void userLogin2(NewLogBean lrib){
|
||||
public void userLogin2(LoginRegInputBean lrib){
|
||||
Request re = OkHttpUtil.post(new OkDate(UrlManager.getLOGIN2(), "post", gson.toJson(lrib)),con);
|
||||
RequestTest.test(1,LOGIN,re,con,hd);
|
||||
}
|
||||
@ -137,18 +124,6 @@ public class PublicRequest {
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getUserInfo(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,USER_DATA,re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取钱包信息
|
||||
*/
|
||||
public void getWalletInfo(){
|
||||
Map<String,Object> map=new HashMap();
|
||||
Request re = OkHttpUtil.posts(new OkDate(BASE_URL+"shipperWeb/account/getUserInfo", "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,USER_DATA,re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
//银行卡列表
|
||||
public void getBankCardList(){
|
||||
Map<String,Object> map=new HashMap();
|
||||
|
||||
@ -73,23 +73,8 @@ public class WaybillRequest {
|
||||
map.put("orderStatus",orderStatus);
|
||||
}
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getWaybillListV2(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,WAYBILL_LIST_V2+orderStatus,re,con,hd);
|
||||
RequestTest.test(1,WAYBILL_LIST_V2,re,con,hd);
|
||||
}
|
||||
|
||||
|
||||
//搜索运单列表
|
||||
public void searchOrderList(int page,int limit,String receiverAddress){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("page",page);
|
||||
map.put("limit",limit);
|
||||
map.put("searchValue",receiverAddress);
|
||||
// if(orderStatus!=0){
|
||||
map.put("orderStatus",200004);
|
||||
// }
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getWaybillListV2(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,"searchOrderList",re,con,hd);
|
||||
}
|
||||
|
||||
//运单详情
|
||||
public void orderDetail(int waybillId){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
@ -97,19 +82,6 @@ public class WaybillRequest {
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getWaybillGetExecuteWatbill(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,WAYBILL_GET_EXECUTE_WATBILL,re,con,hd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运单车辆 司机轨迹
|
||||
* @param waybillId
|
||||
*/
|
||||
public void getCarRouter(int waybillId){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
// map.put("waybillId","2535");
|
||||
// map.put("waybillId",waybillId);
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getCarRouter()+"?waybillId="+waybillId, "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,"CAR_ROUTER",re,con,hd);
|
||||
}
|
||||
|
||||
//货源详情
|
||||
public void orderDetailAll(int id){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
|
||||
@ -10,7 +10,6 @@ public class AddressInputBean{
|
||||
|
||||
private String addressDetail;
|
||||
private String businessCode;
|
||||
private String businessName;
|
||||
private int addressType;
|
||||
private int area;
|
||||
private String areaS;
|
||||
@ -19,8 +18,6 @@ public class AddressInputBean{
|
||||
private String companyCode;
|
||||
private String companyName;
|
||||
private String contactNumber;
|
||||
private String longitude;
|
||||
private String latitude;
|
||||
private String contactPerson;
|
||||
private String createTime;
|
||||
private int id;
|
||||
@ -34,31 +31,6 @@ public class AddressInputBean{
|
||||
private int userId;
|
||||
private int userType;
|
||||
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getAreaS() {
|
||||
return areaS;
|
||||
}
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
package com.oneclouds.cargo.request.bean
|
||||
|
||||
/**
|
||||
* @ClassName GridBean
|
||||
* @Author 用户
|
||||
* @Date 2024/1/23 10:37
|
||||
* @Description TODO
|
||||
*/
|
||||
data class CarLocaBean(
|
||||
var adr:String,
|
||||
var carNumber:String,
|
||||
var utc : String,
|
||||
var lat : String,
|
||||
var lon : String,
|
||||
)
|
||||
@ -1,19 +0,0 @@
|
||||
package com.oneclouds.cargo.request.bean;
|
||||
|
||||
/**
|
||||
* @ClassName CommonBodyBean
|
||||
* @Author 用户
|
||||
* @Date 2022/9/1 11:42
|
||||
* @Description TODO
|
||||
*/
|
||||
public class CommonBodyBean {
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.oneclouds.cargo.request.bean;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/8/2 9:45
|
||||
* @description:登录和注册的入参实体
|
||||
*/
|
||||
public class NewLogBean {
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
private String code;
|
||||
private String uuid;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
}
|
||||
@ -16,15 +16,6 @@ public class OrderInputBean {
|
||||
private List<PutTableDataDTO> putTableData;
|
||||
private List<SendTableDataDTO> sendTableData;
|
||||
|
||||
public OrderInputBean() {
|
||||
}
|
||||
|
||||
public OrderInputBean(FormDataDTO formData, List<PutTableDataDTO> putTableData, List<SendTableDataDTO> sendTableData) {
|
||||
this.formData = formData;
|
||||
this.putTableData = putTableData;
|
||||
this.sendTableData = sendTableData;
|
||||
}
|
||||
|
||||
public FormDataDTO getFormData() {
|
||||
return formData;
|
||||
}
|
||||
@ -197,26 +188,8 @@ public class OrderInputBean {
|
||||
private String loadingPhone;
|
||||
private String companyName;
|
||||
private String companyCode;
|
||||
private String lat;
|
||||
private String lng;
|
||||
private int sort;
|
||||
|
||||
public String getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(String lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public String getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLng(String lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
@ -309,7 +282,7 @@ public class OrderInputBean {
|
||||
private String name;
|
||||
private String num;
|
||||
private String packName;
|
||||
private String price;
|
||||
private int price;
|
||||
private String unit;
|
||||
|
||||
public String getName() {
|
||||
@ -336,11 +309,11 @@ public class OrderInputBean {
|
||||
this.packName = packName;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
public void setPrice(int price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
@ -361,8 +334,6 @@ public class OrderInputBean {
|
||||
private List<GoodsDTO> goods;
|
||||
private List<Integer> loadingAddress;
|
||||
private String loadingDeadline;
|
||||
private String lat;
|
||||
private String lng;
|
||||
private String loadingName;
|
||||
private String loadingPhone;
|
||||
private String companyName;
|
||||
@ -370,22 +341,6 @@ public class OrderInputBean {
|
||||
private int sort;
|
||||
private double totalPrice;
|
||||
|
||||
public String getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(String lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public String getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLng(String lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
@ -486,7 +441,7 @@ public class OrderInputBean {
|
||||
private String name;
|
||||
private String num;
|
||||
private String packName;
|
||||
private String price;
|
||||
private int price;
|
||||
private String unit;
|
||||
|
||||
public String getName() {
|
||||
@ -513,11 +468,11 @@ public class OrderInputBean {
|
||||
this.packName = packName;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
public void setPrice(int price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
package com.oneclouds.cargo.request.manager;
|
||||
|
||||
import static com.oneclouds.cargo.request.OrderRequest.CAR_TYPE;
|
||||
import static com.oneclouds.cargo.request.OrderRequest.GOODS_TYPE;
|
||||
|
||||
import com.oneclouds.cargo.BuildConfig;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
@ -14,185 +9,180 @@ import com.oneclouds.cargo.BuildConfig;
|
||||
public class UrlManager {
|
||||
|
||||
//域名地址
|
||||
public static final String BASE_URL = BuildConfig.BASE_URL;
|
||||
public static final String BASE_URL ="http://app.dahehuoyun.com/api";
|
||||
//http://request.one-clouds.com/api
|
||||
/*--货物小类管理--*/
|
||||
|
||||
//货物小类添加
|
||||
private static final String CATE_ADD = "/app/shipper/cate/add";
|
||||
private static final String CATE_ADD="/app/shipper/cate/add";
|
||||
//货物小类删除
|
||||
private static final String CATE_DELETE = "/app/shipper/cate/delete";
|
||||
private static final String CATE_DELETE="/app/shipper/cate/delete";
|
||||
//货物小类修改
|
||||
private static final String CATE_UPDATE = "/app/shipper/cate/update";
|
||||
private static final String CATE_UPDATE="/app/shipper/cate/update";
|
||||
//货物小类列表
|
||||
private static final String CATE_LIST = "/app/shipper/cate/list";
|
||||
private static final String CATE_LIST="/app/shipper/cate/list";
|
||||
//无分页小类列表
|
||||
private static final String CATE_NLIST = "/app/shipper/cate/nlist";
|
||||
private static final String CATE_NLIST="/app/shipper/cate/nlist";
|
||||
//无分页大类列表
|
||||
private static final String CATE_NPLIST = "/app/shipper/cate/nplist";
|
||||
private static final String CATE_NPLIST="/app/shipper/cate/nplist";
|
||||
//安联货物分类
|
||||
private static final String CATE_NPLIST_AL = "/app/shipper/cate/nplistAl";
|
||||
private static final String CATE_NPLIST_AL="/app/shipper/cate/nplistAl";
|
||||
|
||||
//搜索车辆
|
||||
private static final String CATE_CAR_LIST = "/app/shipperCar/shipperCarList";
|
||||
private static final String CATE_CAR_LIST="/app/shipperCar/shipperCarList";
|
||||
|
||||
/*--发票管理--*/
|
||||
|
||||
//可申请发票的订单
|
||||
private static final String INVOICE_CAN_APPLY_ORDER = "/app/shipper/invoice/canApplyOrder";
|
||||
private static final String INVOICE_CAN_APPLY_ORDER="/app/shipper/invoice/canApplyOrder";
|
||||
//已申请开票详情
|
||||
private static final String INVOICE_DETAILS_BY_ID = "/app/shipper/invoice/detailsById";
|
||||
private static final String INVOICE_DETAILS_BY_ID="/app/shipper/invoice/detailsById";
|
||||
//发票申请记录
|
||||
private static final String INVOICE_FIND_PAGE = "/app/shipper/invoice/findPage";
|
||||
private static final String INVOICE_FIND_PAGE="/app/shipper/invoice/findPage";
|
||||
//申请发票保存
|
||||
private static final String INVOICE_SAVE = "/app/shipper/invoice/save";
|
||||
private static final String INVOICE_SAVE="/app/shipper/invoice/save";
|
||||
//发票抬头信息删除
|
||||
private static final String INVOICE_DELETE = "/app/shipper/invoice/title/delete";
|
||||
private static final String INVOICE_DELETE="/app/shipper/invoice/title/delete";
|
||||
//通过id查询发票抬头信息
|
||||
private static final String INVOICE_FIND_BY_ID = "/app/shipper/invoice/title/findById";
|
||||
private static final String INVOICE_FIND_BY_ID="/app/shipper/invoice/title/findById";
|
||||
//查询当前用户最新发票抬头信息
|
||||
private static final String INVOICE_FIND_SHIPPER_INVOICE_TITLE = "/app/shipper/invoice/title/findShipperInvoiceTitle";
|
||||
private static final String INVOICE_FIND_SHIPPER_INVOICE_TITLE="/app/shipper/invoice/title/findShipperInvoiceTitle";
|
||||
//发票抬头信息保存
|
||||
private static final String INVOICE_TITLE_SAVE = "/app/shipper/invoice/title/save";
|
||||
private static final String INVOICE_TITLE_SAVE="/app/shipper/invoice/title/save";
|
||||
|
||||
/*--地址管理--*/
|
||||
|
||||
//地址信息删除
|
||||
private static final String ADDRESS_DELETE = "/app/shipper/address/delete";
|
||||
private static final String ADDRESS_DELETE="/app/shipper/address/delete";
|
||||
//地址信息查询
|
||||
private static final String ADDRESS_FIND_BY_ID = "/app/shipper/address/findById";
|
||||
private static final String ADDRESS_FIND_BY_ID="/app/shipper/address/findById";
|
||||
//地址信息列表
|
||||
private static final String ADDRESS_FIND_PAGE = "/app/shipper/address/findPage";
|
||||
private static final String ADDRESS_FIND_PAGE="/app/shipper/address/findPage";
|
||||
//查询登录用户地址信息列表
|
||||
private static final String ADDRESS_FIND_PAGE_MY_SELF = "/app/shipper/address/findPageMySelf";
|
||||
private static final String ADDRESS_FIND_PAGE_MY_SELF="/app/shipper/address/findPageMySelf";
|
||||
//地址信息保存
|
||||
private static final String ADDRESS_SAVE = "/app/shipper/address/save";
|
||||
private static final String CAR_LOCAION = "waybill/getCarPositioning?carNumber=";
|
||||
// private static final String COMPANY_SAVE = "/app/shipper/auth/companyInfo";
|
||||
private static final String COMPANY_SAVE = "/shipper/web/auth/authInfo";
|
||||
private static final String ADDRESS_SAVE="/app/shipper/address/save";
|
||||
private static final String COMPANY_SAVE="/app/shipper/auth/companyInfo";
|
||||
|
||||
/*--货主认证--*/
|
||||
|
||||
//货主认证信息查看
|
||||
private static final String AUTH_INFO = "/app/shipper/auth/authInfo";
|
||||
private static final String AUTH_INFO="/app/shipper/auth/authInfo";
|
||||
//货主企业公司信息认证保存
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_COMPANY = "/app/shipper/auth/enterpriseAuthCompanyNew";
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_COMPANY="/app/shipper/auth/enterpriseAuthCompanyNew";
|
||||
//货主企业法人信息保存
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_CORPORATION = "/app/shipper/auth/enterpriseAuthCorporationNew";
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_CORPORATION="/app/shipper/auth/enterpriseAuthCorporationNew";
|
||||
//货主企业认证保存
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_SAVE = "/app/shipper/auth/enterpriseAuthSave";
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_SAVE="/app/shipper/auth/enterpriseAuthSave";
|
||||
//货主企业委托授权书信息保存
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_WARRANT = "/app/shipper/auth/enterpriseAuthWarrant";
|
||||
private static final String AUTH_ENTER_PRISE_AUTH_WARRANT="/app/shipper/auth/enterpriseAuthWarrant";
|
||||
//货主信息是否已认证
|
||||
private static final String AUTH_IS_AUTH = "/app/shipper/auth/isAuth";
|
||||
private static final String AUTH_IS_AUTH="/app/shipper/auth/isAuth";
|
||||
//货主个人认证保存
|
||||
private static final String AUTH_PERSON_AUTH_SAVE = "/app/shipper/auth/personAuthSave";
|
||||
private static final String AUTH_PERSON_AUTH_SAVE="/app/shipper/auth/personAuthSave";
|
||||
//党员认证保存
|
||||
private static final String AUTH_PARTY_MEMBER = "/app/user/partyMember";
|
||||
private static final String AUTH_PARTY_MEMBER="/app/user/partyMember";
|
||||
|
||||
/*--货主运单管理--*/
|
||||
|
||||
//投诉信息保存
|
||||
private static final String WAYBILL_COMPLAINT_V3 = "/app/shipper/waybill/complaintV3";
|
||||
private static final String WAYBILL_COMPLAINT_V3="/app/shipper/waybill/complaintV3";
|
||||
//确认装货
|
||||
private static final String WAYBILL_CONFIRM_LOADING = "/app/shipper/waybill/confirmLoading";
|
||||
private static final String WAYBILL_CONFIRM_LOADING="/app/shipper/waybill/confirmLoading";
|
||||
//确认卸货
|
||||
private static final String WAYBILL_CONFIRM_UNLOAD = "/app/shipper/waybill/confirmUnload";
|
||||
private static final String WAYBILL_CONFIRM_UNLOAD="/app/shipper/waybill/confirmUnload";
|
||||
//评价信息保存
|
||||
private static final String WAYBILL_EVALUATION_V3 = "/app/shipper/waybill/evaluationV3";
|
||||
private static final String WAYBILL_EVALUATION_V3="/app/shipper/waybill/evaluationV3";
|
||||
//运单详情
|
||||
private static final String WAYBILL_GET_EXECUTE_WATBILL = "/app/shipper/waybill/getExecuteWaybill";
|
||||
private static final String CAR_ROUTER = "waybill/getLoc";
|
||||
private static final String WAYBILL_GET_EXECUTE_WATBILL="/app/shipper/waybill/getExecuteWaybill";
|
||||
//获取双轨迹
|
||||
private static final String WAYBILL_GET_LOC = "/app/shipper/waybill/getLoc";
|
||||
private static final String WAYBILL_GET_LOC="/app/shipper/waybill/getLoc";
|
||||
//货源详情
|
||||
private static final String WAYBILL_GET_ORDER_DETAIL = "/app/shipper/waybill/getOrderDetail";
|
||||
private static final String WAYBILL_GET_ORDER_DETAIL="/app/shipper/waybill/getOrderDetail";
|
||||
//获取评价信息
|
||||
private static final String WAYBILL_LIST_APPAISES = "/app/shipper/waybill/listAppraises";
|
||||
private static final String WAYBILL_LIST_APPAISES="/app/shipper/waybill/listAppraises";
|
||||
//获取投诉信息
|
||||
private static final String WAYBILL_LIST_COMPLAINT = "/app/shipper/waybill/listComplaint";
|
||||
private static final String WAYBILL_LIST_COMPLAINT="/app/shipper/waybill/listComplaint";
|
||||
//货源列表
|
||||
private static final String WAYBILL_LIST_V2 = "/app/shipper/waybill/listV2";
|
||||
private static final String WAYBILL_LIST_V2="/app/shipper/waybill/listV2";
|
||||
//运单列表数量
|
||||
private static final String WAYBILL_LIST_NUM = "/app/shipper/waybill/listnum";
|
||||
private static final String WAYBILL_LIST_NUM="/app/shipper/waybill/listnum";
|
||||
|
||||
/*--货物管理--*/
|
||||
|
||||
//货物添加
|
||||
private static final String GOODS_ADD = "/app/shipper/goods/add";
|
||||
private static final String GOODS_ADD="/app/shipper/goods/add";
|
||||
//货物删除
|
||||
private static final String GOODS_DELETE = "/app/shipper/goods/delete";
|
||||
private static final String GOODS_DELETE="/app/shipper/goods/delete";
|
||||
//货物列表
|
||||
private static final String GOODS_LIST = "/app/shipper/goods/list";
|
||||
private static final String GOODS_LIST="/app/shipper/goods/list";
|
||||
//货物修改
|
||||
private static final String GOODS_UPDATE = "/app/shipper/goods/update";
|
||||
private static final String GOODS_UPDATE="/app/shipper/goods/update";
|
||||
|
||||
/*--货物计量单位管理--*/
|
||||
|
||||
//货物计量单位添加
|
||||
private static final String UNIT_ADD = "/app/shipper/goods/add";
|
||||
private static final String UNIT_ADD="/app/shipper/goods/add";
|
||||
//货物计量单位删除
|
||||
private static final String UNIT_DELETE = "/app/shipper/unit/delete";
|
||||
private static final String UNIT_DELETE="/app/shipper/unit/delete";
|
||||
//货物计量单位列表
|
||||
private static final String UNIT_LIST = "/app/shipper/unit/list";
|
||||
private static final String UNIT_LIST="/app/shipper/unit/list";
|
||||
//无分页货物单位列表
|
||||
private static final String UNIT_NLIST = "/app/shipper/unit/nlist";
|
||||
private static final String UNIT_NLIST="/app/shipper/unit/nlist";
|
||||
//货物计量单位修改
|
||||
private static final String UNIT_UPDATE = "/app/shipper/unit/update";
|
||||
private static final String UNIT_UPDATE="/app/shipper/unit/update";
|
||||
|
||||
/*--货源管理--*/
|
||||
|
||||
//车型车长
|
||||
private static final String ORDER_CAR_TYPE_AND_CAR_LONG = "/app/shipper/order/CarTypeAndCarLong";
|
||||
private static final String ORDER_CAR_TYPE_AND_CAR_LONG="/app/shipper/order/CarTypeAndCarLong";
|
||||
//业务类型
|
||||
private static final String ORDER_BUSINESS_TYPE_LIST = "/app/shipper/order/businessTypeList";
|
||||
private static final String ORDER_BUSINESS_TYPE_LIST="/app/shipper/order/businessTypeList";
|
||||
//业务类型交通厅
|
||||
private static final String ORDER_BUSINESS_TYPE_LIST_JTT = "/app/shipper/order/nplist";
|
||||
private static final String ORDER_BUSINESS_TYPE_LIST_JTT="/app/shipper/order/nplist";
|
||||
//业务类型安联
|
||||
private static final String ORDER_BUSINESS_TYPE_LIST_AL = "/app/shipper/order/nplistAl";
|
||||
private static final String ORDER_BUSINESS_TYPE_LIST_AL="/app/shipper/order/nplistAl";
|
||||
//运单轨迹
|
||||
private static final String ORDER_FIND_LOCUS_LIST = "/app/shipper/order/findLocusList";
|
||||
private static final String ORDER_FIND_LOCUS_LIST="/app/shipper/order/findLocusList";
|
||||
//货源列表
|
||||
private static final String ORDER_FIND_ORDER_LIST = "/app/shipper/order/findOrderList";
|
||||
private static final String ORDER_FIND_ORDER_LIST="/app/shipper/order/findOrderList";
|
||||
//货源删除
|
||||
private static final String ORDER_DEL = "/app/shipper/order/orderDel";
|
||||
private static final String ORDER_DEL="/app/shipper/order/orderDel";
|
||||
//货源撤销
|
||||
private static final String ORDER_REVOKE = "/cost/cancelOrder";
|
||||
private static final String ORDER_SIGIN = "/waybill/confirmUnload";
|
||||
// private static final String ORDER_REVOKE = "/app/shipper/order/orderRevoke";
|
||||
private static final String ORDER_REVOKE="/app/shipper/order/orderRevoke";
|
||||
//货源查询状态列表
|
||||
private static final String ORDER_STATELIST = "/app/shipper/order/orderStateList";
|
||||
private static final String ORDER_STATELIST="/app/shipper/order/orderStateList";
|
||||
//包装方式
|
||||
private static final String ORDER_PACK_NAME_LIST = "/app/shipper/order/packNameList";
|
||||
private static final String ORDER_PACK_NAME_LIST="/app/shipper/order/packNameList";
|
||||
//货源保存/提交
|
||||
private static final String ORDER_PULIST_ORDER = "/app/shipper/order/publishOrder";
|
||||
private static final String ORDER_PULIST_ORDER="/app/shipper/order/publishOrder";
|
||||
|
||||
/*--货主评价管理--*/
|
||||
|
||||
//评价信息查询
|
||||
private static final String SA_FIND_BY_ID = "/app/shipperAppraises/findById";
|
||||
private static final String SA_FIND_BY_ID="/app/shipperAppraises/findById";
|
||||
//查询登录用户评价信息数量
|
||||
private static final String SA_FIND_CURRENT_USER_APPRAISES_COUNT = "/app/shipperAppraises/findCurrentUserAppraisesCount";
|
||||
private static final String SA_FIND_CURRENT_USER_APPRAISES_COUNT="/app/shipperAppraises/findCurrentUserAppraisesCount";
|
||||
//评价信息列表
|
||||
private static final String SA_FIND_PAGE = "/app/shipperAppraises/findPage";
|
||||
private static final String SA_FIND_PAGE="/app/shipperAppraises/findPage";
|
||||
|
||||
/*--司机管理--*/
|
||||
|
||||
//发布货源-选择司机
|
||||
private static final String DRIVER_CHOOSE = "/app/shipper/driver/chooseDriver";
|
||||
private static final String DRIVER_CHOOSE="/app/shipper/driver/chooseDriver";
|
||||
//发布货源-选择司机
|
||||
private static final String DRIVER_CHOOSE_V2 = "/app/shipper/driver/chooseDriverV2";
|
||||
private static final String DRIVER_CHOOSE_V2="/app/shipper/driver/chooseDriverV2";
|
||||
|
||||
/*--OCR识别--*/
|
||||
|
||||
//银行卡
|
||||
private static final String OCR_BANK = "/common/ocr/bank";
|
||||
private static final String OCR_BANK="/common/ocr/bank";
|
||||
//营业执照
|
||||
private static final String OCR_BUSINESS_LICENSE = "/common/ocr/businessLicense";
|
||||
private static final String OCR_BUSINESS_LICENSE="/common/ocr/businessLicense";
|
||||
//身份证正面
|
||||
private static final String OCR_ID_CARD_FRONT = "/common/ocr/idCardFront";
|
||||
private static final String OCR_ID_CARD_FRONT="/common/ocr/idCardFront";
|
||||
//身份证识别反面
|
||||
private static final String OCR_ID_CARD_BACK = "/common/ocr/idCardBack";
|
||||
private static final String OCR_ID_CARD_BACK="/common/ocr/idCardBack";
|
||||
|
||||
/*--公共接口--*/
|
||||
|
||||
@ -201,431 +191,397 @@ public class UrlManager {
|
||||
//忘记密码
|
||||
private static final String FORGETPWD = "/common/forgetPwd";
|
||||
//账户登录
|
||||
private static final String LOGIN = "/common/register";
|
||||
// private static final String LOGIN2 = "/common/login";
|
||||
private static final String LOGIN2 = "auth/login";
|
||||
private static final String CODE = "code";
|
||||
private static final String LOGIN="/common/register";
|
||||
private static final String LOGIN2="/common/login";
|
||||
//账户信息
|
||||
private static final String USER_INFO = "/app/user/getUserInfo";
|
||||
private static final String USER_INFO="/app/user/getUserInfo";
|
||||
//银行卡列表
|
||||
private static final String BANK_CARD_LIST = "/app/bankCard/findPage";
|
||||
private static final String BANK_CARD_LIST="/app/bankCard/findPage";
|
||||
//绑定银行卡
|
||||
private static final String BANK_CARD_ADD = "/app/bankCard/save";
|
||||
private static final String BANK_CARD_ADD="/app/bankCard/save";
|
||||
//删除银行卡
|
||||
private static final String BANK_CARD_DELETE = "/app/bankCard/deleteCard";
|
||||
private static final String BANK_CARD_DELETE="/app/bankCard/deleteCard";
|
||||
//账户提现
|
||||
private static final String BANK_CASH_APPLY = "/app/account/cashApply/bank";
|
||||
private static final String BANK_CASH_APPLY="/app/account/cashApply/bank";
|
||||
//生成电子账户
|
||||
private static final String CONTRACTS_ADD = "/app/bank/addContracts";
|
||||
private static final String CONTRACTS_ADD="/app/bank/addContracts";
|
||||
//获取电子账户
|
||||
private static final String CONTRACTS_GET = "/app/bank/getContracts";
|
||||
private static final String CONTRACTS_GET="/app/bank/getContracts";
|
||||
//获取账户未读消息
|
||||
private static final String MESSAGE_FIND_NOT_READ_COUNT = "/app/message/findCurrentUserNotReadCount";
|
||||
private static final String MESSAGE_FIND_NOT_READ_COUNT="/app/message/findCurrentUserNotReadCount";
|
||||
//获取账户消息
|
||||
private static final String MESSAGE_FIND_PAGE = "/app/message/findPage";
|
||||
private static final String MESSAGE_FIND_PAGE="/app/message/findPage";
|
||||
//已读消息
|
||||
private static final String MESSAGE_SET_READ_BY_ID = "/app/message/setReadById";
|
||||
private static final String MESSAGE_SET_READ_BY_ID="/app/message/setReadById";
|
||||
//已读全部消息
|
||||
private static final String MESSAGE_SET_READ_ALL = "/app/message/setReadAll";
|
||||
private static final String MESSAGE_SET_READ_ALL="/app/message/setReadAll";
|
||||
//上传文件
|
||||
private static final String UPLOAD = "/common/resource/upload";
|
||||
private static final String UPLOAD="/common/resource/upload";
|
||||
//上传头像
|
||||
private static final String UPLOAD_HEAD = "/app/user/uploadHeadportrait";
|
||||
private static final String UPLOAD_HEAD="/app/user/uploadHeadportrait";
|
||||
//版本更新
|
||||
public static String VERSION = "/app/check/version";
|
||||
public static String VERSION ="/app/check/version";
|
||||
//配置项信息
|
||||
public static String CONFIG = "/common/config/list";
|
||||
public static String CONFIG ="/common/config/list";
|
||||
|
||||
//获取大屏的url
|
||||
public static String GET_URL = "/app/shipper/data/url";
|
||||
public static String GET_URL ="/app/shipper/data/url";
|
||||
|
||||
public static String getBaseUrl() {
|
||||
return BASE_URL;
|
||||
}
|
||||
|
||||
public static String getCarType() {
|
||||
return BASE_URL + CAR_TYPE;
|
||||
}
|
||||
|
||||
public static String getGoodType() {
|
||||
return BASE_URL + GOODS_TYPE;
|
||||
}
|
||||
|
||||
public static String getCateAdd() {
|
||||
return BASE_URL + CATE_ADD;
|
||||
return BASE_URL+CATE_ADD;
|
||||
}
|
||||
|
||||
public static String getCateDelete() {
|
||||
return BASE_URL + CATE_DELETE;
|
||||
return BASE_URL+CATE_DELETE;
|
||||
}
|
||||
|
||||
public static String getCateUpdate() {
|
||||
return BASE_URL + CATE_UPDATE;
|
||||
return BASE_URL+CATE_UPDATE;
|
||||
}
|
||||
|
||||
public static String getCateList() {
|
||||
return BASE_URL + CATE_LIST;
|
||||
return BASE_URL+CATE_LIST;
|
||||
}
|
||||
|
||||
public static String getCateNlist() {
|
||||
return BASE_URL + CATE_NLIST;
|
||||
return BASE_URL+CATE_NLIST;
|
||||
}
|
||||
|
||||
public static String getCateNplist() {
|
||||
return BASE_URL + CATE_NPLIST;
|
||||
return BASE_URL+CATE_NPLIST;
|
||||
}
|
||||
|
||||
public static String getCateNplistAl() {
|
||||
return BASE_URL + CATE_NPLIST_AL;
|
||||
return BASE_URL+CATE_NPLIST_AL;
|
||||
}
|
||||
|
||||
public static String getCarList() {
|
||||
return BASE_URL + CATE_CAR_LIST;
|
||||
return BASE_URL+CATE_CAR_LIST;
|
||||
}
|
||||
|
||||
|
||||
public static String getInvoiceCanApplyOrder() {
|
||||
return BASE_URL + INVOICE_CAN_APPLY_ORDER;
|
||||
return BASE_URL+INVOICE_CAN_APPLY_ORDER;
|
||||
}
|
||||
|
||||
public static String getInvoiceDetailsById() {
|
||||
return BASE_URL + INVOICE_DETAILS_BY_ID;
|
||||
return BASE_URL+INVOICE_DETAILS_BY_ID;
|
||||
}
|
||||
|
||||
public static String getInvoiceFindPage() {
|
||||
return BASE_URL + INVOICE_FIND_PAGE;
|
||||
return BASE_URL+INVOICE_FIND_PAGE;
|
||||
}
|
||||
|
||||
public static String getInvoiceSave() {
|
||||
return BASE_URL + INVOICE_SAVE;
|
||||
return BASE_URL+INVOICE_SAVE;
|
||||
}
|
||||
|
||||
public static String getInvoiceDelete() {
|
||||
return BASE_URL + INVOICE_DELETE;
|
||||
return BASE_URL+INVOICE_DELETE;
|
||||
}
|
||||
|
||||
public static String getInvoiceFindById() {
|
||||
return BASE_URL + INVOICE_FIND_BY_ID;
|
||||
return BASE_URL+INVOICE_FIND_BY_ID;
|
||||
}
|
||||
|
||||
public static String getInvoiceFindShipperInvoiceTitle() {
|
||||
return BASE_URL + INVOICE_FIND_SHIPPER_INVOICE_TITLE;
|
||||
return BASE_URL+INVOICE_FIND_SHIPPER_INVOICE_TITLE;
|
||||
}
|
||||
|
||||
public static String getInvoiceTitleSave() {
|
||||
return BASE_URL + INVOICE_TITLE_SAVE;
|
||||
return BASE_URL+INVOICE_TITLE_SAVE;
|
||||
}
|
||||
|
||||
public static String getAddressDelete() {
|
||||
return BASE_URL + ADDRESS_DELETE;
|
||||
return BASE_URL+ADDRESS_DELETE;
|
||||
}
|
||||
|
||||
public static String getAddressFindById() {
|
||||
return BASE_URL + ADDRESS_FIND_BY_ID;
|
||||
return BASE_URL+ADDRESS_FIND_BY_ID;
|
||||
}
|
||||
|
||||
public static String getAddressFindPage() {
|
||||
return BASE_URL + ADDRESS_FIND_PAGE;
|
||||
return BASE_URL+ADDRESS_FIND_PAGE;
|
||||
}
|
||||
|
||||
public static String getAddressFindPageMySelf() {
|
||||
return BASE_URL + ADDRESS_FIND_PAGE_MY_SELF;
|
||||
return BASE_URL+ADDRESS_FIND_PAGE_MY_SELF;
|
||||
}
|
||||
|
||||
public static String getAddressSave() {
|
||||
return BASE_URL + ADDRESS_SAVE;
|
||||
}
|
||||
|
||||
public static String getCarLocation() {
|
||||
return BASE_URL + CAR_LOCAION;
|
||||
return BASE_URL+ADDRESS_SAVE;
|
||||
}
|
||||
|
||||
public static String getCompanyInfo() {
|
||||
return BASE_URL + COMPANY_SAVE;
|
||||
return BASE_URL+COMPANY_SAVE;
|
||||
}
|
||||
|
||||
public static String getAuthInfo() {
|
||||
return BASE_URL + AUTH_INFO;
|
||||
return BASE_URL+AUTH_INFO;
|
||||
}
|
||||
|
||||
public static String getAuthEnterPriseAuthCompany() {
|
||||
return BASE_URL + AUTH_ENTER_PRISE_AUTH_COMPANY;
|
||||
return BASE_URL+AUTH_ENTER_PRISE_AUTH_COMPANY;
|
||||
}
|
||||
|
||||
public static String getAuthEnterPriseAuthCorporation() {
|
||||
return BASE_URL + AUTH_ENTER_PRISE_AUTH_CORPORATION;
|
||||
return BASE_URL+AUTH_ENTER_PRISE_AUTH_CORPORATION;
|
||||
}
|
||||
|
||||
public static String getAuthEnterPriseAuthSave() {
|
||||
return BASE_URL + AUTH_ENTER_PRISE_AUTH_SAVE;
|
||||
return BASE_URL+AUTH_ENTER_PRISE_AUTH_SAVE;
|
||||
}
|
||||
|
||||
public static String getAuthEnterPriseAuthWarrant() {
|
||||
return BASE_URL + AUTH_ENTER_PRISE_AUTH_WARRANT;
|
||||
return BASE_URL+AUTH_ENTER_PRISE_AUTH_WARRANT;
|
||||
}
|
||||
|
||||
public static String getAuthIsAuth() {
|
||||
return BASE_URL + AUTH_IS_AUTH;
|
||||
return BASE_URL+AUTH_IS_AUTH;
|
||||
}
|
||||
|
||||
public static String getAuthPersonAuthSave() {
|
||||
return BASE_URL + AUTH_PERSON_AUTH_SAVE;
|
||||
return BASE_URL+AUTH_PERSON_AUTH_SAVE;
|
||||
}
|
||||
|
||||
public static String getWaybillComplaintV3() {
|
||||
return BASE_URL + WAYBILL_COMPLAINT_V3;
|
||||
return BASE_URL+WAYBILL_COMPLAINT_V3;
|
||||
}
|
||||
|
||||
public static String getWaybillConfirmLoading() {
|
||||
return BASE_URL + WAYBILL_CONFIRM_LOADING;
|
||||
return BASE_URL+WAYBILL_CONFIRM_LOADING;
|
||||
}
|
||||
|
||||
public static String getWaybillConfirmUnload() {
|
||||
return BASE_URL + WAYBILL_CONFIRM_UNLOAD;
|
||||
return BASE_URL+WAYBILL_CONFIRM_UNLOAD;
|
||||
}
|
||||
|
||||
public static String getWaybillEvaluationV3() {
|
||||
return BASE_URL + WAYBILL_EVALUATION_V3;
|
||||
return BASE_URL+WAYBILL_EVALUATION_V3;
|
||||
}
|
||||
|
||||
public static String getWaybillGetExecuteWatbill() {
|
||||
return BASE_URL + WAYBILL_GET_EXECUTE_WATBILL;
|
||||
}
|
||||
|
||||
public static String getCarRouter() {
|
||||
return BASE_URL + CAR_ROUTER;
|
||||
return BASE_URL+WAYBILL_GET_EXECUTE_WATBILL;
|
||||
}
|
||||
|
||||
public static String getWaybillGetLoc() {
|
||||
return BASE_URL + WAYBILL_GET_LOC;
|
||||
return BASE_URL+WAYBILL_GET_LOC;
|
||||
}
|
||||
|
||||
public static String getWaybillGetOrderDetail() {
|
||||
return BASE_URL + WAYBILL_GET_ORDER_DETAIL;
|
||||
return BASE_URL+WAYBILL_GET_ORDER_DETAIL;
|
||||
}
|
||||
|
||||
public static String getWaybillListAppaises() {
|
||||
return BASE_URL + WAYBILL_LIST_APPAISES;
|
||||
return BASE_URL+WAYBILL_LIST_APPAISES;
|
||||
}
|
||||
|
||||
public static String getWaybillListComplaint() {
|
||||
return BASE_URL + WAYBILL_LIST_COMPLAINT;
|
||||
return BASE_URL+WAYBILL_LIST_COMPLAINT;
|
||||
}
|
||||
|
||||
public static String getWaybillListV2() {
|
||||
return BASE_URL + WAYBILL_LIST_V2;
|
||||
return BASE_URL+WAYBILL_LIST_V2;
|
||||
}
|
||||
|
||||
public static String getWaybillListNum() {
|
||||
return BASE_URL + WAYBILL_LIST_NUM;
|
||||
return BASE_URL+WAYBILL_LIST_NUM;
|
||||
}
|
||||
|
||||
public static String getGoodsAdd() {
|
||||
return BASE_URL + GOODS_ADD;
|
||||
return BASE_URL+GOODS_ADD;
|
||||
}
|
||||
|
||||
public static String getGoodsDelete() {
|
||||
return BASE_URL + GOODS_DELETE;
|
||||
return BASE_URL+GOODS_DELETE;
|
||||
}
|
||||
|
||||
public static String getGoodsList() {
|
||||
return BASE_URL + GOODS_LIST;
|
||||
return BASE_URL+GOODS_LIST;
|
||||
}
|
||||
|
||||
public static String getGoodsUpdate() {
|
||||
return BASE_URL + GOODS_UPDATE;
|
||||
return BASE_URL+GOODS_UPDATE;
|
||||
}
|
||||
|
||||
public static String getUnitAdd() {
|
||||
return BASE_URL + UNIT_ADD;
|
||||
return BASE_URL+UNIT_ADD;
|
||||
}
|
||||
|
||||
public static String getUnitDelete() {
|
||||
return BASE_URL + UNIT_DELETE;
|
||||
return BASE_URL+UNIT_DELETE;
|
||||
}
|
||||
|
||||
public static String getUnitList() {
|
||||
return BASE_URL + UNIT_LIST;
|
||||
return BASE_URL+UNIT_LIST;
|
||||
}
|
||||
|
||||
public static String getUnitNlist() {
|
||||
return BASE_URL + UNIT_NLIST;
|
||||
return BASE_URL+UNIT_NLIST;
|
||||
}
|
||||
|
||||
public static String getUnitUpdate() {
|
||||
return BASE_URL + UNIT_UPDATE;
|
||||
return BASE_URL+UNIT_UPDATE;
|
||||
}
|
||||
|
||||
public static String getOrderCarTypeAndCarLong() {
|
||||
return BASE_URL + ORDER_CAR_TYPE_AND_CAR_LONG;
|
||||
return BASE_URL+ORDER_CAR_TYPE_AND_CAR_LONG;
|
||||
}
|
||||
|
||||
public static String getOrderBusinessTypeList() {
|
||||
return BASE_URL + ORDER_BUSINESS_TYPE_LIST;
|
||||
return BASE_URL+ORDER_BUSINESS_TYPE_LIST;
|
||||
}
|
||||
|
||||
public static String getOrderBusinessTypeListJtt() {
|
||||
return BASE_URL + ORDER_BUSINESS_TYPE_LIST_JTT;
|
||||
return BASE_URL+ORDER_BUSINESS_TYPE_LIST_JTT;
|
||||
}
|
||||
|
||||
public static String getOrderBusinessTypeListAl() {
|
||||
return BASE_URL + ORDER_BUSINESS_TYPE_LIST_AL;
|
||||
return BASE_URL+ORDER_BUSINESS_TYPE_LIST_AL;
|
||||
}
|
||||
|
||||
public static String getOrderFindLocusList() {
|
||||
return BASE_URL + ORDER_FIND_LOCUS_LIST;
|
||||
return BASE_URL+ORDER_FIND_LOCUS_LIST;
|
||||
}
|
||||
|
||||
public static String getOrderFindOrderList() {
|
||||
return BASE_URL + ORDER_FIND_ORDER_LIST;
|
||||
return BASE_URL+ORDER_FIND_ORDER_LIST;
|
||||
}
|
||||
|
||||
public static String getOrderDel() {
|
||||
return BASE_URL + ORDER_DEL;
|
||||
return BASE_URL+ORDER_DEL;
|
||||
}
|
||||
|
||||
public static String getOrderRevoke() {
|
||||
return BASE_URL + ORDER_REVOKE;
|
||||
}
|
||||
|
||||
public static String getOrderSigin() {
|
||||
return BASE_URL + ORDER_SIGIN;
|
||||
return BASE_URL+ORDER_REVOKE;
|
||||
}
|
||||
|
||||
public static String getOrderStatelist() {
|
||||
return BASE_URL + ORDER_STATELIST;
|
||||
return BASE_URL+ORDER_STATELIST;
|
||||
}
|
||||
|
||||
public static String getOrderPackNameList() {
|
||||
return BASE_URL + ORDER_PACK_NAME_LIST;
|
||||
return BASE_URL+ORDER_PACK_NAME_LIST;
|
||||
}
|
||||
|
||||
public static String getOrderPulistOrder() {
|
||||
return BASE_URL + ORDER_PULIST_ORDER;
|
||||
return BASE_URL+ORDER_PULIST_ORDER;
|
||||
}
|
||||
|
||||
public static String getSaFindById() {
|
||||
return BASE_URL + SA_FIND_BY_ID;
|
||||
return BASE_URL+SA_FIND_BY_ID;
|
||||
}
|
||||
|
||||
public static String getSaFindCurrentUserAppraisesCount() {
|
||||
return BASE_URL + SA_FIND_CURRENT_USER_APPRAISES_COUNT;
|
||||
return BASE_URL+SA_FIND_CURRENT_USER_APPRAISES_COUNT;
|
||||
}
|
||||
|
||||
public static String getSaFindPage() {
|
||||
return BASE_URL + SA_FIND_PAGE;
|
||||
return BASE_URL+SA_FIND_PAGE;
|
||||
}
|
||||
|
||||
public static String getDriverChoose() {
|
||||
return BASE_URL + DRIVER_CHOOSE;
|
||||
return BASE_URL+DRIVER_CHOOSE;
|
||||
}
|
||||
|
||||
public static String getDriverChooseV2() {
|
||||
return BASE_URL + DRIVER_CHOOSE_V2;
|
||||
return BASE_URL+DRIVER_CHOOSE_V2;
|
||||
}
|
||||
|
||||
public static String getOcrBank() {
|
||||
return BASE_URL + OCR_BANK;
|
||||
return BASE_URL+OCR_BANK;
|
||||
}
|
||||
|
||||
public static String getOcrBusinessLicense() {
|
||||
return BASE_URL + OCR_BUSINESS_LICENSE;
|
||||
return BASE_URL+OCR_BUSINESS_LICENSE;
|
||||
}
|
||||
|
||||
public static String getOcrIdCardFront() {
|
||||
return BASE_URL + OCR_ID_CARD_FRONT;
|
||||
return BASE_URL+OCR_ID_CARD_FRONT;
|
||||
}
|
||||
|
||||
public static String getOcrIdCardBack() {
|
||||
return BASE_URL + OCR_ID_CARD_BACK;
|
||||
return BASE_URL+OCR_ID_CARD_BACK;
|
||||
}
|
||||
|
||||
public static String getSendCode() {
|
||||
return BASE_URL + SEND_CODE;
|
||||
return BASE_URL+SEND_CODE;
|
||||
}
|
||||
|
||||
public static String forgetPwd() {
|
||||
return BASE_URL + FORGETPWD;
|
||||
return BASE_URL+FORGETPWD;
|
||||
}
|
||||
|
||||
public static String getLOGIN() {
|
||||
return BASE_URL + LOGIN;
|
||||
}
|
||||
public static String getLOGIN() { return BASE_URL+LOGIN; }
|
||||
public static String getLOGIN2() { return BASE_URL+LOGIN2; }
|
||||
|
||||
public static String getLOGIN2() {
|
||||
return BASE_URL.substring(0, BASE_URL.lastIndexOf("api/")) + LOGIN2;
|
||||
}
|
||||
|
||||
public static String getCode() {
|
||||
return BASE_URL.substring(0, BASE_URL.lastIndexOf("api/")) + CODE;
|
||||
}
|
||||
|
||||
public static String getUserInfo() {
|
||||
return BASE_URL + USER_INFO;
|
||||
}
|
||||
public static String getUserInfo() { return BASE_URL+USER_INFO; }
|
||||
|
||||
public static String getBankCardList() {
|
||||
return BASE_URL + BANK_CARD_LIST;
|
||||
return BASE_URL+BANK_CARD_LIST;
|
||||
}
|
||||
|
||||
public static String getBankCardAdd() {
|
||||
return BASE_URL + BANK_CARD_ADD;
|
||||
return BASE_URL+BANK_CARD_ADD;
|
||||
}
|
||||
|
||||
public static String getBankCardDelete() {
|
||||
return BASE_URL + BANK_CARD_DELETE;
|
||||
return BASE_URL+BANK_CARD_DELETE;
|
||||
}
|
||||
|
||||
public static String getBankCashApply() {
|
||||
return BASE_URL + BANK_CASH_APPLY;
|
||||
return BASE_URL+BANK_CASH_APPLY;
|
||||
}
|
||||
|
||||
public static String getContractsAdd() {
|
||||
return BASE_URL + CONTRACTS_ADD;
|
||||
return BASE_URL+CONTRACTS_ADD;
|
||||
}
|
||||
|
||||
public static String getContractsGet() {
|
||||
return BASE_URL + CONTRACTS_GET;
|
||||
return BASE_URL+CONTRACTS_GET;
|
||||
}
|
||||
|
||||
public static String getMessageFindNotReadCount() {
|
||||
return BASE_URL + MESSAGE_FIND_NOT_READ_COUNT;
|
||||
return BASE_URL+MESSAGE_FIND_NOT_READ_COUNT;
|
||||
}
|
||||
|
||||
public static String getMessageFindPage() {
|
||||
return BASE_URL + MESSAGE_FIND_PAGE;
|
||||
return BASE_URL+MESSAGE_FIND_PAGE;
|
||||
}
|
||||
|
||||
public static String getMessageSetReadById() {
|
||||
return BASE_URL + MESSAGE_SET_READ_BY_ID;
|
||||
return BASE_URL+MESSAGE_SET_READ_BY_ID;
|
||||
}
|
||||
|
||||
public static String getMessageSetReadAll() {
|
||||
return BASE_URL + MESSAGE_SET_READ_ALL;
|
||||
return BASE_URL+MESSAGE_SET_READ_ALL;
|
||||
}
|
||||
|
||||
public static String getUPLOAD() {
|
||||
return BASE_URL + UPLOAD;
|
||||
return BASE_URL+UPLOAD;
|
||||
}
|
||||
|
||||
public static String getUploadHead() {
|
||||
return BASE_URL + UPLOAD_HEAD;
|
||||
return BASE_URL+UPLOAD_HEAD;
|
||||
}
|
||||
|
||||
public static String getVERSION() {
|
||||
return BASE_URL + VERSION;
|
||||
return BASE_URL+VERSION;
|
||||
}
|
||||
|
||||
public static String getCONFIG() {
|
||||
return BASE_URL + CONFIG;
|
||||
return BASE_URL+CONFIG;
|
||||
}
|
||||
|
||||
public static String getAuthPartyMember() {
|
||||
return BASE_URL + AUTH_PARTY_MEMBER;
|
||||
return BASE_URL+AUTH_PARTY_MEMBER;
|
||||
}
|
||||
|
||||
public static String getGetUrl() {
|
||||
return BASE_URL + GET_URL;
|
||||
return BASE_URL+GET_URL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,17 +2,11 @@ package com.oneclouds.cargo.request.net;
|
||||
|
||||
|
||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||
import com.oneclouds.cargo.BuildConfig;
|
||||
import com.oneclouds.cargo.bean.OrderBean2;
|
||||
import com.oneclouds.cargo.request.bean.CarLocaBean;
|
||||
import com.oneclouds.cargo.request.bean.CommonBodyBean;
|
||||
import com.oneclouds.cargo.request.bean.OrderInputBean;
|
||||
import com.oneclouds.cargo.request.bean.LoginRegInputBean;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import kotlin.ParameterName;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/8/8 0008.
|
||||
@ -20,29 +14,14 @@ import retrofit2.http.Query;
|
||||
|
||||
public interface Api {
|
||||
|
||||
String BASE_URL = BuildConfig.BASE_URL;
|
||||
String BASE_URL = "http://app.dahehuoyun.com/api/";
|
||||
|
||||
|
||||
//获取版本
|
||||
String VERSION = BASE_URL + "app/version";
|
||||
|
||||
//运单详情
|
||||
// @HTTP(method = "post",path = BASE_URL+"app/shipper/waybill/getExecuteWaybill", hasBody = true) waybillId
|
||||
// Observable<CommonResponseBean> waybillDetail(@Field("waybillId") String bean);
|
||||
@POST(BASE_URL+"app/shipper/waybill/getOrderDetail")
|
||||
Observable<CommonResponseBean<OrderBean2>> waybillDetail(@Body CommonBodyBean bean);
|
||||
|
||||
@POST(BASE_URL+"/app/shipper/waybill/app/getOrderDetail")
|
||||
Observable<CommonResponseBean<OrderInputBean>> waybillDetail2(@Body CommonBodyBean bean);
|
||||
|
||||
@POST(BASE_URL+"app/shipper/order/publishOrder")
|
||||
Observable<CommonResponseBean> againOrder(@Body OrderInputBean bean);
|
||||
|
||||
@POST(BASE_URL+"waybill/getCarPositioning")
|
||||
Observable<CommonResponseBean<CarLocaBean>> getCarPositioning(@Query("carNumber") String carNumber);
|
||||
// Observable<CommonResponseBean<CarLocaBean>> getCarPositioning(@Body CarLocaBean carLocaBean);
|
||||
|
||||
@POST(BASE_URL+"waybill/getLoc")
|
||||
Observable<CommonResponseBean<CarLocaBean>> getCarRouter(@Query("waybillId") String waybillId);
|
||||
@POST(BASE_URL+"app/bank/getContracts")
|
||||
Observable<CommonResponseBean> log(@Body String bean);
|
||||
}
|
||||
|
||||
|
||||
@ -51,8 +51,8 @@ public class DataManager {
|
||||
.connectTimeout(30, TimeUnit.SECONDS)
|
||||
.readTimeout(30, TimeUnit.SECONDS)
|
||||
.writeTimeout(30, TimeUnit.SECONDS)
|
||||
.addInterceptor(new RequestHeadInterceptor())
|
||||
.addInterceptor(new JsonInterceptor())
|
||||
.addInterceptor(new RequestHeadInterceptor())
|
||||
.build())
|
||||
// .addNetworkInterceptor(new TokenInterceptor())
|
||||
.build().create(Api.class);
|
||||
|
||||
@ -5,11 +5,9 @@ import android.util.Log;
|
||||
|
||||
import com.dahe.mylibrary.utils.AppUtils;
|
||||
import com.dahe.mylibrary.utils.BaseUtils;
|
||||
import com.oneclouds.cargo.constant.SPConstant;
|
||||
import com.oneclouds.cargo.ui.App;
|
||||
import com.oneclouds.cargo.ui.LoginActivity;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
import com.oneclouds.cargo.util.http.GetUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -27,18 +25,16 @@ public class RequestHeadInterceptor implements Interceptor {
|
||||
@Override
|
||||
public Response intercept(Chain chain) throws IOException {
|
||||
Request.Builder builder = chain.request().newBuilder();
|
||||
if (!TextUtils.isEmpty(SPUtil.getSP(App.getApp(), SPConstant.DATA,SPConstant.DATA_TOKEN))) {
|
||||
if (!TextUtils.isEmpty(SPUtil.getSP(App.getApp(), LoginActivity.USER,LoginActivity.USER_TOKEN))) {
|
||||
// builder.addHeader("Authorization", SPUtils.getUserInfo(App.getApp()).getToken());
|
||||
builder.addHeader("Authorization", SPUtil.getSP(App.getApp(), SPConstant.DATA,SPConstant.DATA_TOKEN));
|
||||
builder.addHeader("Authorization", SPUtil.getSP(App.getApp(), LoginActivity.USER,LoginActivity.USER_TOKEN));
|
||||
}
|
||||
Request request = builder
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.addHeader("versionCode", AppUtils.getAppVersionCode() + "")
|
||||
.addHeader("versionValue", AppUtils.getAppVersionName() + "")
|
||||
.addHeader("deviceType", "ANDROID")
|
||||
.addHeader("language", BaseUtils.getLanguage(App.getApp())+"")
|
||||
.build();
|
||||
// .addHeader("Content-Type", "application/json")
|
||||
Log.i(TAG, "intercept: " + request.headers());
|
||||
return chain.proceed(request);
|
||||
}
|
||||
|
||||
@ -6,50 +6,35 @@ import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.dahe.mylibrary.utils.Base64Utils;
|
||||
import com.google.gson.Gson;
|
||||
import com.oneclouds.cargo.BuildConfig;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.CodeBean;
|
||||
import com.oneclouds.cargo.bean.ConfigBean;
|
||||
import com.oneclouds.cargo.bean.LoginBean;
|
||||
import com.oneclouds.cargo.constant.SPConstant;
|
||||
import com.oneclouds.cargo.request.PublicRequest;
|
||||
import com.oneclouds.cargo.request.bean.LoginRegInputBean;
|
||||
import com.oneclouds.cargo.request.bean.NewLogBean;
|
||||
import com.oneclouds.cargo.request.manager.UrlManager;
|
||||
import com.oneclouds.cargo.ui.parts.ConfigParts;
|
||||
import com.oneclouds.cargo.util.MapUtil;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
import com.oneclouds.cargo.util.cache.CacheGroup;
|
||||
import com.oneclouds.cargo.util.http.OkDate;
|
||||
import com.oneclouds.cargo.util.http.OkHttpUtil;
|
||||
import com.oneclouds.cargo.util.http.RequestTest;
|
||||
import com.oneclouds.cargo.util.http.RequsetCodeConstants;
|
||||
import com.oneclouds.cargo.util.titleutil.StatusBarUtil;
|
||||
import com.oneclouds.cargo.util.view.BaseActivity;
|
||||
|
||||
import java.util.TimerTask;
|
||||
|
||||
import okhttp3.Request;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
@ -62,24 +47,17 @@ public class LoginActivity extends BaseActivity {
|
||||
public static final String USER = "user";
|
||||
public static final String USER_TOKEN = "token";
|
||||
public static final String USER_UNAME = "uname";
|
||||
public static final String USER_PHONE = "USER_PHONE";
|
||||
public static final String USER_RNAME = "rname";
|
||||
public static final String USER_ID = "id";
|
||||
|
||||
private Button btn_login;
|
||||
private TextView auto_login;
|
||||
private EditText input_phone, input_code, etCode;
|
||||
private ImageView ivCode;
|
||||
private EditText input_phone, input_code;
|
||||
private TextView getCode, tvForget;
|
||||
private LoginBean loginBean;
|
||||
|
||||
private CodeBean codeBean;
|
||||
|
||||
private TimerTask tt;
|
||||
private int timer_sum = 60;
|
||||
private ImageButton agree_btn;
|
||||
private LinearLayout llCheck;
|
||||
private CheckBox cbLog;
|
||||
private CardView no_btn;
|
||||
|
||||
private PublicRequest pr;
|
||||
@ -105,32 +83,16 @@ public class LoginActivity extends BaseActivity {
|
||||
loginBean = new Gson().fromJson(CacheGroup.cacheList.get(PublicRequest.LOGIN), LoginBean.class);
|
||||
Log.e("--登录信息--", new Gson().toJson(loginBean));
|
||||
if (loginBean.getCode() == 200) {
|
||||
SPUtil.insSP(con, SPConstant.DATA, SPConstant.DATA_TOKEN, loginBean.getData().getAccess_token());
|
||||
// SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
||||
SPUtil.insSP(con, USER, USER_PHONE, input_phone.getText().toString().trim());
|
||||
// SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
||||
// SPUtil.insSP(con, USER, USER_ID, loginBean.getData().getId() + "");
|
||||
SPUtil.insSP(con, SPConstant.DATA, SPConstant.DATA_TOKEN, loginBean.getData().getToken());
|
||||
SPUtil.insSP(con, USER, USER_UNAME, loginBean.getData().getUname());
|
||||
SPUtil.insSP(con, USER, USER_RNAME, loginBean.getData().getRname());
|
||||
SPUtil.insSP(con, USER, USER_ID, loginBean.getData().getId() + "");
|
||||
finish();
|
||||
} else {
|
||||
//重新获取验证码
|
||||
etCode.setText("");
|
||||
pr.getCode();
|
||||
Toast.makeText(con, loginBean.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(PublicRequest.LOGIN);
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("getCode") != null) {
|
||||
//存储登录记录
|
||||
codeBean = new Gson().fromJson(CacheGroup.cacheList.get("getCode"), CodeBean.class);
|
||||
Log.e("--登录信息--", new Gson().toJson(loginBean));
|
||||
if (codeBean != null && codeBean.getCode() == 200 && codeBean.isCaptchaOnOff()) {
|
||||
ivCode.setImageBitmap(Base64Utils.base64ToBitmap(codeBean.getImg()));
|
||||
} else {
|
||||
Toast.makeText(con, loginBean.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("getCode");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -150,18 +112,8 @@ public class LoginActivity extends BaseActivity {
|
||||
getCode = findViewById(R.id.getCode);
|
||||
tvForget = findViewById(R.id.tvForget);
|
||||
agree_btn = findViewById(R.id.agree_btn);
|
||||
llCheck = findViewById(R.id.ll_check);
|
||||
cbLog = findViewById(R.id.cb);
|
||||
no_btn = findViewById(R.id.no_btn);
|
||||
etCode = findViewById(R.id.etCode);
|
||||
ivCode = findViewById(R.id.ivCode);
|
||||
pr = new PublicRequest(con, hd);
|
||||
String phone = SPUtil.getSP(con, USER, USER_PHONE);
|
||||
if (!TextUtils.isEmpty(phone)) {
|
||||
input_phone.setText(phone);
|
||||
}
|
||||
|
||||
pr.getCode();
|
||||
initView(null);
|
||||
}
|
||||
|
||||
@ -173,29 +125,17 @@ public class LoginActivity extends BaseActivity {
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
llCheck.setOnClickListener(v -> {
|
||||
if (cbLog.isChecked()) {
|
||||
cbLog.setChecked(false);
|
||||
} else {
|
||||
cbLog.setChecked(true);
|
||||
}
|
||||
agree_btn.setOnClickListener(v -> {
|
||||
agree_btn.setVisibility(View.GONE);
|
||||
no_btn.setVisibility(View.VISIBLE);
|
||||
key = false;
|
||||
});
|
||||
no_btn.setOnClickListener(v -> {
|
||||
agree_btn.setVisibility(View.VISIBLE);
|
||||
no_btn.setVisibility(View.GONE);
|
||||
key = true;
|
||||
|
||||
ivCode.setOnClickListener(v -> {
|
||||
pr.getCode();
|
||||
});
|
||||
|
||||
// agree_btn.setOnClickListener(v -> {
|
||||
// agree_btn.setVisibility(View.GONE);
|
||||
// no_btn.setVisibility(View.VISIBLE);
|
||||
// key = false;
|
||||
// });
|
||||
// no_btn.setOnClickListener(v -> {
|
||||
// agree_btn.setVisibility(View.VISIBLE);
|
||||
// no_btn.setVisibility(View.GONE);
|
||||
// key = true;
|
||||
//
|
||||
// });
|
||||
ConfigBean cb = ConfigParts.getConfigParts(con);
|
||||
if (cb != null) {
|
||||
url1 = cb.getData().getUserUrl();
|
||||
@ -270,18 +210,15 @@ public class LoginActivity extends BaseActivity {
|
||||
});
|
||||
btn_login.setOnClickListener(v -> {
|
||||
String phone = String.valueOf(input_phone.getText());
|
||||
String pwd = String.valueOf(input_code.getText());
|
||||
String code = String.valueOf(etCode.getText());
|
||||
String code = String.valueOf(input_code.getText());
|
||||
Log.e("--code--", code);
|
||||
if (judgeFormat(phone, pwd,code)) {
|
||||
if (cbLog.isChecked()) {
|
||||
NewLogBean newLogBean = new NewLogBean();
|
||||
newLogBean.setUsername(phone);
|
||||
newLogBean.setPassword(pwd);
|
||||
newLogBean.setCode(code);
|
||||
newLogBean.setUuid(codeBean.getUuid());
|
||||
|
||||
pr.userLogin2(newLogBean);
|
||||
if (judgeFormat(phone, code)) {
|
||||
if (key) {
|
||||
LoginRegInputBean lb = new LoginRegInputBean();
|
||||
lb.setRoleId(2);
|
||||
lb.setUserName(phone);
|
||||
lb.setPassword(code);
|
||||
pr.userLogin2(lb);
|
||||
|
||||
// lb.setRoleId(2);
|
||||
// lb.setUname(phone);
|
||||
@ -319,9 +256,9 @@ public class LoginActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
//验证用户输入的是否符合格式
|
||||
public boolean judgeFormat(String phone, String pwd, String code) {
|
||||
if (phone.equals("") || pwd.equals("")|| code.equals("")) {
|
||||
Toast.makeText(con, "手机号,密码和验证码不得为空", Toast.LENGTH_SHORT).show();
|
||||
public boolean judgeFormat(String phone, String code) {
|
||||
if (phone.equals("") || code.equals("")) {
|
||||
Toast.makeText(con, "手机号和验证码不得为空", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
||||
@ -13,26 +13,22 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.constant.SPConstant;
|
||||
import com.oneclouds.cargo.event.ChangeTabEvent;
|
||||
import com.oneclouds.cargo.ui.home.HomeFragment;
|
||||
import com.oneclouds.cargo.ui.my.MyFragment;
|
||||
import com.oneclouds.cargo.ui.news.NewsFragment;
|
||||
import com.oneclouds.cargo.ui.wallet.WalletFragment;
|
||||
import com.oneclouds.cargo.ui.waybill.WayBillsFragment;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
import com.oneclouds.cargo.util.titleutil.StateStyleUtil;
|
||||
import com.oneclouds.cargo.util.view.BaseAppCompatActivity;
|
||||
import com.oneclouds.cargo.util.view.BottomTabUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
public class MainActivity extends BaseAppCompatActivity {
|
||||
|
||||
private LinearLayout[] rs=new LinearLayout[4];
|
||||
private ImageView[] ibs=new ImageView[4];
|
||||
private TextView[] title_view=new TextView[4];
|
||||
private int[] img0={R.mipmap.tab1, R.mipmap.waybill, R.mipmap.tab2, R.mipmap.tab3};
|
||||
private int[] img1={R.mipmap.tab1_s, R.mipmap.waybill_s, R.mipmap.tab2_s, R.mipmap.tab3_s};
|
||||
private int[] img0={R.mipmap.tab1, R.mipmap.tab2, R.mipmap.xiaoxi0, R.mipmap.tab3};
|
||||
private int[] img1={R.mipmap.tab1_s, R.mipmap.tab2_s, R.mipmap.xiaoxi1, R.mipmap.tab3_s};
|
||||
private Fragment[] fs=new Fragment[4];
|
||||
private BottomTabUtil bt;
|
||||
|
||||
@ -41,12 +37,11 @@ public class MainActivity extends BaseAppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_main);
|
||||
EventBus.getDefault().register(this);
|
||||
con=this;
|
||||
act=this;
|
||||
fs[0]=new HomeFragment();
|
||||
fs[1]=new WayBillsFragment();
|
||||
fs[2]=new WalletFragment();
|
||||
fs[1]=new WalletFragment();
|
||||
fs[2]=new NewsFragment();
|
||||
fs[3]=new MyFragment();
|
||||
initfindId();
|
||||
initswitch();
|
||||
@ -148,22 +143,4 @@ public class MainActivity extends BaseAppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void ChangeTabEvent(ChangeTabEvent event){
|
||||
switch_box(1);
|
||||
// switch_image(bt.getIndex(),1);
|
||||
// if (!fs[1].isAdded()) {
|
||||
//// bt.hide(fs[bt.getIndex()]);
|
||||
// getSupportFragmentManager().beginTransaction().hide(fs[bt.getIndex()]).add(R.id.body,fs[1],"").commitAllowingStateLoss();
|
||||
// }else{
|
||||
// getSupportFragmentManager().beginTransaction().hide(fs[0]).show(fs[1]).commitAllowingStateLoss();
|
||||
// }
|
||||
// bt.setIndex(2);
|
||||
|
||||
// bt.hide(fs[0]);
|
||||
// bt.selectItem(fs[2]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -29,7 +29,6 @@ import com.oneclouds.cargo.request.manager.UrlManager;
|
||||
import com.oneclouds.cargo.ui.parts.ConfigParts;
|
||||
import com.oneclouds.cargo.util.MsgUtil;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
import com.oneclouds.cargo.util.SPUtils;
|
||||
import com.oneclouds.cargo.util.titleutil.StatusBarUtil;
|
||||
import com.oneclouds.cargo.util.view.BaseAppCompatActivity;
|
||||
import com.umeng.commonsdk.UMConfigure;
|
||||
@ -108,11 +107,13 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
"http://agreement.dahehuoyun.com/#/user",hd))
|
||||
.show();
|
||||
}
|
||||
Glide.with(con)
|
||||
.load(SPUtils.getPreWelPic(this))
|
||||
.placeholder(startImageUrl.getDrawable())
|
||||
.error(R.drawable.welcome_bg_default)
|
||||
.into(startImageUrl);
|
||||
// {"code":200,"data":{"contractUrl":"http://agreement.dahehuoyun.com/#/transport",
|
||||
// "privateUrl":"http://agreement.dahehuoyun.com/#/private",
|
||||
// "securityUrl":"http://agreement.dahehuoyun.com/#/security",
|
||||
// "serviceMobile":"18638298513","shipperPrivateUrl":
|
||||
// "http://agreement.dahehuoyun.com/#/shipper/private",
|
||||
// "startImageUrl":"","userUrl":"http://agreement.dahehuoyun.com/#/user"},
|
||||
// "msg":"","res":0,"success":true}
|
||||
}
|
||||
|
||||
public void initRermission(){
|
||||
@ -178,15 +179,11 @@ public class WelcomeActivity extends BaseAppCompatActivity {
|
||||
|
||||
public void cdWelcome(String url){
|
||||
if(!url.equals("")){
|
||||
Glide.with(con).load(url)
|
||||
.placeholder(startImageUrl.getDrawable())
|
||||
.error(R.drawable.welcome_bg_default)
|
||||
.into(startImageUrl);
|
||||
Glide.with(con).load(url).into(startImageUrl);
|
||||
}else{
|
||||
Log.e("图片加载失败","获取动态启动页图片为空");
|
||||
//Toast.makeText(con,"配置项信息加载失败",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
SPUtils.setPreWelPic(this, url);
|
||||
cd_view.setVisibility(View.VISIBLE);
|
||||
new CountDownTimer(3000,1000){
|
||||
@Override
|
||||
|
||||
@ -113,10 +113,10 @@ public class ChoiceAddressActivity extends BaseActivity implements View.OnClickL
|
||||
}
|
||||
finish();
|
||||
} else {
|
||||
// tvAddress.setText("");
|
||||
// aib.setProvinceS("");
|
||||
// aib.setCityS("");
|
||||
// aib.setAreaS("");
|
||||
tvAddress.setText("");
|
||||
aib.setProvinceS("");
|
||||
aib.setCityS("");
|
||||
aib.setAreaS("");
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(AddressRequest.ADDRESS_SAVE);
|
||||
@ -272,7 +272,6 @@ public class ChoiceAddressActivity extends BaseActivity implements View.OnClickL
|
||||
|
||||
|
||||
etAddressDetail.setText(o.getAddress() + o.getName());
|
||||
// etAddressDetail.setText(o.getDistrict() + o.getAddress());
|
||||
adapter.setList(null);
|
||||
});
|
||||
|
||||
@ -285,22 +284,23 @@ public class ChoiceAddressActivity extends BaseActivity implements View.OnClickL
|
||||
private void submint() {
|
||||
String name = etName.getText().toString();
|
||||
String phone = etPhone.getText().toString();
|
||||
// String num = tvNum.getText().toString();
|
||||
String num = tvNum.getText().toString();
|
||||
String address = tvAddress.getText().toString();
|
||||
String addressDetail = etAddressDetail.getText().toString();
|
||||
String tvNum2 = tvNum.getText().toString();
|
||||
String comName2 = etName2.getText().toString();
|
||||
|
||||
if (TextUtils.isEmpty(name) || TextUtils.isEmpty(phone) || TextUtils.isEmpty(address) ||
|
||||
if (TextUtils.isEmpty(name) || TextUtils.isEmpty(phone) ||
|
||||
TextUtils.isEmpty(num) || TextUtils.isEmpty(address) ||
|
||||
TextUtils.isEmpty(addressDetail)||TextUtils.isEmpty(comName2)) {
|
||||
ToastUtil.show(con, "请完善信息");
|
||||
return;
|
||||
}
|
||||
|
||||
// if (type!=300001&&(num.length()!=15&&num.length()!=18&&num.length()!=20)){
|
||||
// ToastUtil.show(con, "税号/身份证号长度不正确");
|
||||
// return;
|
||||
// }
|
||||
if (type!=300001&&(num.length()!=15&&num.length()!=18&&num.length()!=20)){
|
||||
ToastUtil.show(con, "税号/身份证号长度不正确");
|
||||
return;
|
||||
}
|
||||
|
||||
if (phone.startsWith("1") && phone.length() == 11) {
|
||||
aib.setAddressDetail(addressDetail);
|
||||
@ -310,8 +310,6 @@ public class ChoiceAddressActivity extends BaseActivity implements View.OnClickL
|
||||
aib.setAddressType(type);
|
||||
aib.setCompanyCode(tvNum2);
|
||||
aib.setCompanyName(comName2);
|
||||
aib.setBusinessCode(tvNum2);
|
||||
aib.setBusinessName(comName2);
|
||||
ar.addressSave(aib);
|
||||
} else {
|
||||
Toast.makeText(con, "手机号格式不正确", Toast.LENGTH_SHORT).show();
|
||||
@ -412,8 +410,6 @@ public class ChoiceAddressActivity extends BaseActivity implements View.OnClickL
|
||||
|
||||
tvAddress.setText(province + "-" + city + "-" + district);
|
||||
|
||||
aib.setLatitude(regeocodeResult.getRegeocodeQuery().getPoint().getLatitude()+"");
|
||||
aib.setLongitude(regeocodeResult.getRegeocodeQuery().getPoint().getLongitude()+"");
|
||||
aib.setProvinceS(province);
|
||||
aib.setCityS(city);
|
||||
aib.setAreaS(district);
|
||||
|
||||
@ -110,9 +110,9 @@ public class DisCarActivity extends BaseActivity {
|
||||
etInput = findViewById(R.id.etInput);
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
|
||||
// String string = getIntent().getExtras().getString(AppConfig.STRING);
|
||||
String string = getIntent().getExtras().getString(AppConfig.STRING);
|
||||
title.setText("分配车辆");
|
||||
// etInput.setText(string);
|
||||
etInput.setText(string);
|
||||
|
||||
recyclerView.addItemDecoration(new RecyclerViewDecoration(con,RecyclerViewDecoration.VERTICAL_LIST));
|
||||
adapterAll = recyclerView.createV(con, datas, R.layout.item_dis_car);
|
||||
@ -121,7 +121,7 @@ public class DisCarActivity extends BaseActivity {
|
||||
TextView tvContent = v.findViewById(R.id.tvName);
|
||||
LinearLayout llDisCar = v.findViewById(R.id.invoice_address);
|
||||
|
||||
tvContent.setText(o1.getDriverName()+" "+o1.getCarNum()+" "+o1.getDriverPhone());
|
||||
tvContent.setText(o1.getCarNum()+" "+o1.getDriverPhone());
|
||||
llDisCar.setOnClickListener(V->{
|
||||
tvContent.setText("");
|
||||
BaseEvent<CarBean> event = new BaseEvent<>();
|
||||
|
||||
@ -32,7 +32,7 @@ import java.util.List;
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/9/13 20:49
|
||||
* @description:装货货物信息
|
||||
* @description:
|
||||
*/
|
||||
|
||||
public class GoodsActivity extends BaseActivity {
|
||||
@ -137,7 +137,7 @@ public class GoodsActivity extends BaseActivity {
|
||||
osg.setUnit("方");
|
||||
osg.setNum(unitStr2);
|
||||
}
|
||||
osg.setPrice(priceStr);
|
||||
osg.setPrice((int) Double.parseDouble(priceStr));
|
||||
GoodsEvent msg = new GoodsEvent(new Gson().toJson(osg));
|
||||
EventBus.getDefault().post(msg);
|
||||
finish();
|
||||
|
||||
@ -29,7 +29,7 @@ import java.util.List;
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
* @date 2021/9/28 18:07
|
||||
* @description:卸货货物信息
|
||||
* @description:
|
||||
*/
|
||||
public class GoodsDischargeActivity extends BaseActivity {
|
||||
|
||||
@ -161,7 +161,7 @@ public class GoodsDischargeActivity extends BaseActivity {
|
||||
osg.setUnit("方");
|
||||
osg.setNum(unitStr2);
|
||||
}
|
||||
osg.setPrice(priceStr);
|
||||
osg.setPrice((int) Double.parseDouble(priceStr));
|
||||
GoodsEvent msg = new GoodsEvent(new Gson().toJson(osg));
|
||||
EventBus.getDefault().post(msg);
|
||||
finish();
|
||||
@ -188,13 +188,9 @@ public class GoodsDischargeActivity extends BaseActivity {
|
||||
price.setText(o.getPrice() + "");
|
||||
if (o.getUnit().equals("吨")) {
|
||||
num1.setText(o.getNum());
|
||||
num2.setText("");
|
||||
num2.setEnabled(false);
|
||||
num1.setEnabled(true);
|
||||
} else {
|
||||
num2.setText(o.getNum());
|
||||
num1.setText("");
|
||||
num2.setEnabled(true);
|
||||
num1.setEnabled(false);
|
||||
key = false;
|
||||
}
|
||||
|
||||
@ -26,8 +26,6 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.dahe.mylibrary.utils.TimeConstants;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatimePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.OptionPicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||
@ -47,9 +45,7 @@ import com.oneclouds.cargo.bean.AlGoodsTypeListBean;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.BusinssTypeBean;
|
||||
import com.oneclouds.cargo.bean.CarBean;
|
||||
import com.oneclouds.cargo.bean.CarShortTypeBean;
|
||||
import com.oneclouds.cargo.bean.CarTypeLongBean;
|
||||
import com.oneclouds.cargo.bean.GoodsTypeBean;
|
||||
import com.oneclouds.cargo.bean.NpListBean;
|
||||
import com.oneclouds.cargo.bean.OptionBaseBean;
|
||||
import com.oneclouds.cargo.bean.UpAppBean;
|
||||
@ -81,11 +77,9 @@ import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -112,11 +106,6 @@ public class HomeFragment extends BaseFragment {
|
||||
private TextView money_view;
|
||||
private String url = "";
|
||||
private TextView etCar;
|
||||
private EditText requirement;
|
||||
private TextView effectiveTime;
|
||||
private TextView vehicle_type;
|
||||
private TextView vehicle_length;
|
||||
private TextView tvHwdlJt;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@ -124,8 +113,6 @@ public class HomeFragment extends BaseFragment {
|
||||
switch (m.what) {
|
||||
case 200:
|
||||
insData(OrderRequest.ORDER_CAR_TYPE_AND_CAR_LONG);
|
||||
insData(OrderRequest.ORDER_CAR_TYPE_AND_CAR);
|
||||
insData(OrderRequest.ORDER_CAR_TYPE_AND_GOODS_TYPE);
|
||||
insData(OrderRequest.ORDER_BUSINESS_TYPE_LIST);
|
||||
insData(OrderRequest.ORDER_BUSINESS_TYPE_LIST_JTT);
|
||||
insData(OrderRequest.ORDER_BUSINESS_TYPE_LIST_AL);
|
||||
@ -145,7 +132,6 @@ public class HomeFragment extends BaseFragment {
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_PULIST_ORDER) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_PULIST_ORDER), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
clearData();
|
||||
Toast.makeText(con, "创建订单成功", Toast.LENGTH_SHORT).show();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("expenditure", money);
|
||||
@ -188,6 +174,7 @@ public class HomeFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -237,8 +224,6 @@ public class HomeFragment extends BaseFragment {
|
||||
pr.getUserInfo();
|
||||
or.carTypeLongList();
|
||||
or.businssTypeList();
|
||||
or.carType();
|
||||
or.goodType();
|
||||
or.packNameList();
|
||||
cr.cateNPList();
|
||||
cr.cateNPListAl();
|
||||
@ -281,9 +266,9 @@ public class HomeFragment extends BaseFragment {
|
||||
*/
|
||||
private void initInputCar(View v) {
|
||||
etCar = v.findViewById(R.id.etCar);
|
||||
etCar.setOnClickListener(V -> {
|
||||
etCar.setOnClickListener(V->{
|
||||
Intent intent = new Intent(con, DisCarActivity.class);
|
||||
intent.putExtra(AppConfig.STRING, etCar.getText().toString());
|
||||
intent.putExtra(AppConfig.STRING,etCar.getText().toString());
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
@ -365,18 +350,18 @@ public class HomeFragment extends BaseFragment {
|
||||
//车型车长
|
||||
RelativeLayout r3 = v.findViewById(R.id.r3);
|
||||
RelativeLayout r31 = v.findViewById(R.id.r31);
|
||||
vehicle_type = v.findViewById(R.id.vehicle_type);
|
||||
vehicle_length = v.findViewById(R.id.vehicle_length);
|
||||
TextView vehicle_type = v.findViewById(R.id.vehicle_type);
|
||||
TextView vehicle_length = v.findViewById(R.id.vehicle_length);
|
||||
//业务类型
|
||||
RelativeLayout r4 = v.findViewById(R.id.r4);
|
||||
TextView businessType = v.findViewById(R.id.businessType);
|
||||
//订单有效期
|
||||
RelativeLayout r5 = v.findViewById(R.id.r5);
|
||||
effectiveTime = v.findViewById(R.id.effectiveTime);
|
||||
TextView effectiveTime = v.findViewById(R.id.effectiveTime);
|
||||
|
||||
//货物大类 交通厅
|
||||
RelativeLayout r7 = v.findViewById(R.id.r7);
|
||||
tvHwdlJt = v.findViewById(R.id.tvHwdlJt);
|
||||
TextView tvHwdlJt = v.findViewById(R.id.tvHwdlJt);
|
||||
|
||||
//货物大类 安联
|
||||
RelativeLayout r8 = v.findViewById(R.id.r8);
|
||||
@ -384,20 +369,13 @@ public class HomeFragment extends BaseFragment {
|
||||
//是否购买运费险
|
||||
ImageButton isGoods = v.findViewById(R.id.isGoods);
|
||||
money_view = v.findViewById(R.id.money);
|
||||
//备注
|
||||
requirement = v.findViewById(R.id.requirement);
|
||||
|
||||
|
||||
//业务类型-默认值
|
||||
businessType.setText("干线普货运输");
|
||||
oib.getFormData().setBusinessType(1002996);
|
||||
|
||||
r7.setOnClickListener(v14 -> {
|
||||
if (isLogin()) {
|
||||
GoodsTypeBean ctb = TypeParts.getGoodsTypeShort(con);
|
||||
NpListBean al = TypeParts.getNpType(con);
|
||||
List<OptionBaseBean> data = new ArrayList<>();
|
||||
for (GoodsTypeBean.DataDTO typeDTO : ctb.getData()) {
|
||||
data.add(new OptionBaseBean(typeDTO.getId(), typeDTO.getCateName()));
|
||||
for (NpListBean.DataDTO datum : al.getData()) {
|
||||
data.add(new OptionBaseBean(datum.getId(), datum.getCateName()));
|
||||
}
|
||||
OptionPicker picker = new OptionPicker(act);
|
||||
picker.setBodyWidth(140);
|
||||
@ -405,41 +383,10 @@ public class HomeFragment extends BaseFragment {
|
||||
OptionBaseBean obb = (OptionBaseBean) item;
|
||||
tvHwdlJt.setText(obb.getName());
|
||||
oib.getFormData().setGoodsBigCate(obb.getId());
|
||||
|
||||
//匹配安联货物大类
|
||||
oib.getFormData().setAlctGoodsType(ctb.getData().get(position).getAlctGoodsTypeId());
|
||||
|
||||
// int alctGoodsTypeId = ctb.getData().get(position).getAlctGoodsTypeId();
|
||||
// AlGoodsTypeListBean al = TypeParts.getAlType(con);
|
||||
// for (AlGoodsTypeListBean.DataDTO datum : al.getData()) {
|
||||
// if (alctGoodsTypeId==datum.getId()){
|
||||
// tvHwdlAl.setText(obb.getName());
|
||||
// oib.getFormData().setAlctGoodsType(obb.getId());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
});
|
||||
picker.setData(data);
|
||||
picker.setDefaultPosition(2);
|
||||
picker.show();
|
||||
|
||||
// NpListBean al = TypeParts.getNpType(con);
|
||||
// List<OptionBaseBean> data = new ArrayList<>();
|
||||
// for (NpListBean.DataDTO datum : al.getData()) {
|
||||
// data.add(new OptionBaseBean(datum.getId(), datum.getCateName()));
|
||||
// }
|
||||
// OptionPicker picker = new OptionPicker(act);
|
||||
// picker.setBodyWidth(140);
|
||||
// picker.setOnOptionPickedListener((position, item) -> {
|
||||
// OptionBaseBean obb = (OptionBaseBean) item;
|
||||
// tvHwdlJt.setText(obb.getName());
|
||||
// oib.getFormData().setGoodsBigCate(obb.getId());
|
||||
// });
|
||||
// picker.setData(data);
|
||||
// picker.setDefaultPosition(2);
|
||||
// picker.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -522,10 +469,10 @@ public class HomeFragment extends BaseFragment {
|
||||
});
|
||||
r3.setOnClickListener(v1 -> {
|
||||
if (isLogin()) {
|
||||
CarShortTypeBean ctb = TypeParts.getCarTypeShort(con);
|
||||
CarTypeLongBean ctb = TypeParts.getCarTypeLong(con);
|
||||
List<OptionBaseBean> data = new ArrayList<>();
|
||||
for (CarShortTypeBean.DataDTO typeDTO : ctb.getData()) {
|
||||
data.add(new OptionBaseBean(typeDTO.getValue(), typeDTO.getLabel()));
|
||||
for (CarTypeLongBean.DataDTO.TypeDTO typeDTO : ctb.getData().getType()) {
|
||||
data.add(new OptionBaseBean(typeDTO.getValue(), typeDTO.getName()));
|
||||
}
|
||||
OptionPicker picker = new OptionPicker(act);
|
||||
picker.setBodyWidth(140);
|
||||
@ -598,29 +545,23 @@ public class HomeFragment extends BaseFragment {
|
||||
submit.setOnClickListener(v12 -> {
|
||||
if (isLogin()) {
|
||||
if (!TypeParts.isEntrust(con)) {
|
||||
// for (OrderInputBean.SendTableDataDTO sendTableDatum : oib.getSendTableData()) {
|
||||
// if (ub != null) {
|
||||
// if (StringUtil.isNull(ub.getData().getCompanyName(), "").equals("")) {
|
||||
// sendTableDatum.setBusinessName(StringUtil.isNull(ub.getData().getRname(), ""));
|
||||
// } else {
|
||||
// sendTableDatum.setBusinessName(ub.getData().getCompanyName());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//货主名称改为 businessName
|
||||
for (OrderInputBean.SendTableDataDTO sendTableDatum : oib.getSendTableData()) {
|
||||
sendTableDatum.setBusinessCode(StringUtil.isNull(sendTableDatum.getCompanyCode(), ""));
|
||||
sendTableDatum.setBusinessName(StringUtil.isNull(sendTableDatum.getCompanyName(), ""));
|
||||
if (ub != null) {
|
||||
if (StringUtil.isNull(ub.getData().getCompanyName(), "").equals("")) {
|
||||
sendTableDatum.setBusinessName(StringUtil.isNull(ub.getData().getRname(), ""));
|
||||
} else {
|
||||
sendTableDatum.setBusinessName(ub.getData().getCompanyName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null != oib.getSendTableData().get(0).getGoods()
|
||||
&& null != oib.getPutTableData().get(0).getGoods()
|
||||
&& 0 != oib.getFormData().getVehicleType()
|
||||
&& 0 != oib.getFormData().getVehicleLength()
|
||||
&& 0 != oib.getFormData().getBusinessType()
|
||||
&& 0 != oib.getFormData().getGoodsBigCate()
|
||||
&& !TextUtils.isEmpty(oib.getFormData().getEffectiveTime())
|
||||
&&0!=oib.getFormData().getVehicleType()
|
||||
&&0!=oib.getFormData().getVehicleLength()
|
||||
&&0!=oib.getFormData().getBusinessType()
|
||||
&&0!=oib.getFormData().getGoodsBigCate()
|
||||
&&0!=oib.getFormData().getAlctGoodsType()
|
||||
&&!TextUtils.isEmpty(oib.getFormData().getEffectiveTime())
|
||||
) {
|
||||
new XPopup.Builder(act)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
@ -629,7 +570,6 @@ public class HomeFragment extends BaseFragment {
|
||||
() -> {
|
||||
oib.setIsSubmit(1);
|
||||
oib.getFormData().setIsSubmit(1);
|
||||
oib.getFormData().setRequirement(requirement.getText().toString());
|
||||
// oib.getFormData().setGoodsBigCate(4);//150
|
||||
// oib.getFormData().setAlctGoodsType(150);
|
||||
//oib.getFormData()
|
||||
@ -805,21 +745,15 @@ public class HomeFragment extends BaseFragment {
|
||||
oib.getPutTableData().set(data_index, op);
|
||||
brv_discharge.updateItemV(data_index, op);
|
||||
// }
|
||||
|
||||
//订单有效期根据装货截止时间延长15天
|
||||
String loadingDeadline = os.getLoadingDeadline();
|
||||
String text = TimeUtil.getString(loadingDeadline, new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()), 21600, TimeConstants.MIN);
|
||||
effectiveTime.setText(text);
|
||||
oib.getFormData().setEffectiveTime(text);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void disCarEvent(BaseEvent baseEvent) {
|
||||
if (baseEvent.getData() instanceof CarBean) {
|
||||
public void disCarEvent(BaseEvent baseEvent){
|
||||
if (baseEvent.getData() instanceof CarBean){
|
||||
CarBean data = (CarBean) baseEvent.getData();
|
||||
etCar.setText(data.getCarNum() + " " + data.getDriverPhone());
|
||||
oib.getFormData().setShipperCarId(data.getCarId() + "");
|
||||
oib.getFormData().setShipperDriverId(data.getDriverId() + "");
|
||||
etCar.setText(data.getCarNum()+" "+data.getDriverPhone());
|
||||
oib.getFormData().setShipperCarId(data.getCarId()+"");
|
||||
oib.getFormData().setShipperDriverId(data.getDriverId()+"");
|
||||
}
|
||||
}
|
||||
|
||||
@ -858,29 +792,4 @@ public class HomeFragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
|
||||
private void clearData() {
|
||||
OrderInputBean.PutTableDataDTO op = new OrderInputBean.PutTableDataDTO();
|
||||
OrderInputBean.SendTableDataDTO os = new OrderInputBean.SendTableDataDTO();
|
||||
oib.getPutTableData().set(0, op);
|
||||
oib.getSendTableData().set(0, os);
|
||||
brv_loading.createV(con, oib.getSendTableData(), R.layout.huoyuan_centent_loading_info).
|
||||
setOnItemViewListener((position, o, v1) -> {
|
||||
OrderInputBean.SendTableDataDTO oss = (OrderInputBean.SendTableDataDTO) o;
|
||||
oss.setSort(position + 1);
|
||||
initLoadingInfo(o, v1, 0, position);
|
||||
});
|
||||
brv_discharge.createV(con, oib.getPutTableData(), R.layout.huoyuan_centent_discharge_info).
|
||||
setOnItemViewListener((position, o, v2) -> {
|
||||
OrderInputBean.PutTableDataDTO ops = (OrderInputBean.PutTableDataDTO) o;
|
||||
ops.setSort(position + 1);
|
||||
initLoadingInfo(o, v2, 1, position);
|
||||
});
|
||||
|
||||
etCar.setText("");
|
||||
vehicle_type.setText("");
|
||||
vehicle_length.setText("");
|
||||
tvHwdlJt.setText("");
|
||||
requirement.setText("");
|
||||
money_view.setText("¥ 0");
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,16 +18,10 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.dahe.mylibrary.utils.TimeConstants;
|
||||
import com.dahe.mylibrary.utils.TimeUtil;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.DatimePicker;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode;
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.TimeMode;
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity;
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DatimeEntity;
|
||||
import com.github.gzuliyujiang.wheelpicker.widget.DateWheelLayout;
|
||||
import com.github.gzuliyujiang.wheelpicker.widget.DatimeWheelLayout;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
@ -37,7 +31,6 @@ import com.oneclouds.cargo.bean.AddressBean;
|
||||
import com.oneclouds.cargo.bean.AddressListBean;
|
||||
import com.oneclouds.cargo.bean.AuthInfoBean;
|
||||
import com.oneclouds.cargo.event.AddressEvent;
|
||||
import com.oneclouds.cargo.event.ChangeTabEvent;
|
||||
import com.oneclouds.cargo.event.GoodsEvent;
|
||||
import com.oneclouds.cargo.event.InformationEvent;
|
||||
import com.oneclouds.cargo.event.InformationEventTwo;
|
||||
@ -58,10 +51,8 @@ import com.umeng.vt.diff.V;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @ClassName NodeInfoActivity
|
||||
@ -86,7 +77,7 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
private TextView tvName, tvNameDis;
|
||||
private TextView tvPhone, tvPhoneDis;
|
||||
private TextView tvAddress, tvAddressDis;
|
||||
private TextView tvStartTime, tvRight;
|
||||
private TextView tvStartTime;
|
||||
private EditText etMoney;
|
||||
private TextView tvEndTimeDis;
|
||||
private Button submit;
|
||||
@ -109,7 +100,6 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
title_view = findViewById(R.id.title_view);
|
||||
recycleView = findViewById(R.id.rv);
|
||||
submit = findViewById(R.id.submit);
|
||||
tvRight = findViewById(R.id.tvRight);
|
||||
data = getIntent().getExtras().getString("data");
|
||||
submit.setOnClickListener(V -> {
|
||||
submint();
|
||||
@ -124,14 +114,6 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
oib = gson.fromJson(data, OrderInputBean.class);
|
||||
os = oib.getSendTableData().get(0);
|
||||
op = oib.getPutTableData().get(0);
|
||||
tvRight.setVisibility(View.VISIBLE);
|
||||
tvRight.setText("再来一单");
|
||||
tvRight.setOnClickListener(v -> {
|
||||
|
||||
ChangeTabEvent changeTabEvent = new ChangeTabEvent(2);
|
||||
EventBus.getDefault().post(changeTabEvent);
|
||||
finish();
|
||||
});
|
||||
|
||||
|
||||
title_view.setText("发货信息");
|
||||
@ -176,7 +158,7 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
ryDis = v.findViewById(R.id.ryDis);
|
||||
|
||||
|
||||
ryDis.addItemDecoration(new RecyclerViewDecoration(con, RecyclerViewDecoration.VERTICAL_LIST));
|
||||
ryDis.addItemDecoration(new RecyclerViewDecoration(con,RecyclerViewDecoration.VERTICAL_LIST));
|
||||
ryDis.createV(con, new ArrayList<OrderInputBean.PutTableDataDTO.GoodsDTO>(), R.layout.item_cargo).setOnItemViewListener((position1, o1, v1) -> {
|
||||
TextView tvHWName = v1.findViewById(R.id.tvHWName);
|
||||
TextView tvCount = v1.findViewById(R.id.tvCount);
|
||||
@ -216,7 +198,6 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
ryDis.notifyDatas(op.getGoods());
|
||||
} else {
|
||||
op.setGoods(new ArrayList<>());
|
||||
// tvEndTimeDis.setText(this.op.getLoadingDeadline());
|
||||
}
|
||||
|
||||
rlTopDis.setOnClickListener(v12 -> {
|
||||
@ -237,21 +218,20 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
});
|
||||
|
||||
tvEndTimeDis.setOnClickListener(V -> {
|
||||
ToastUtils.showToast(con,"选择装货时间自动计算");
|
||||
// DatimePicker ap = new DatimePicker(act);
|
||||
// final DatimeWheelLayout wheelLayout = ap.getWheelLayout();
|
||||
// ap.setOnDatimePickedListener((year, month, day, hour, minute, second) -> {
|
||||
// String text = year + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(minute);
|
||||
// this.op.setLoadingDeadline(text);
|
||||
// tvEndTimeDis.setText(text);
|
||||
// timeKey = true;
|
||||
// });
|
||||
// wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY);
|
||||
// wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND);
|
||||
// wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10));
|
||||
// wheelLayout.setDateLabel("年", "月", "日");
|
||||
// wheelLayout.setTimeLabel("时", "分", "");
|
||||
// ap.show();
|
||||
DatimePicker ap = new DatimePicker(act);
|
||||
final DatimeWheelLayout wheelLayout = ap.getWheelLayout();
|
||||
ap.setOnDatimePickedListener((year, month, day, hour, minute, second) -> {
|
||||
String text = year + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(minute);
|
||||
this.op.setLoadingDeadline(text);
|
||||
tvEndTimeDis.setText(text);
|
||||
timeKey = true;
|
||||
});
|
||||
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY);
|
||||
wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND);
|
||||
wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10));
|
||||
wheelLayout.setDateLabel("年", "月", "日");
|
||||
wheelLayout.setTimeLabel("时", "分", "");
|
||||
ap.show();
|
||||
});
|
||||
|
||||
|
||||
@ -283,17 +263,6 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
etMoney.setText(os.getTotalPrice() + "");
|
||||
} else {
|
||||
os.setGoods(new ArrayList<>());
|
||||
|
||||
String nowString = TimeUtil.getNowString("yyyy-MM-dd")+ " " + getRead(23) + ":" + getRead(59);
|
||||
this.os.setLoadingDeadline(nowString);
|
||||
tvStartTime.setText(nowString);
|
||||
timeKey = true;
|
||||
|
||||
String endDate = TimeUtil.getString(nowString, new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),14400, TimeConstants.MIN);
|
||||
this.op.setLoadingDeadline(endDate);
|
||||
// tvEndTimeDis.setText(endDate);
|
||||
// timeKey = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -309,25 +278,22 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
});
|
||||
|
||||
tvStartTime.setOnClickListener(V -> {
|
||||
DatePicker ap = new DatePicker(act);
|
||||
final DateWheelLayout wheelLayout = ap.getWheelLayout();
|
||||
ap.setOnDatePickedListener((year, month, day) -> {
|
||||
String text = year + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(23) + ":" + getRead(59);
|
||||
DatimePicker ap = new DatimePicker(act);
|
||||
final DatimeWheelLayout wheelLayout = ap.getWheelLayout();
|
||||
ap.setOnDatimePickedListener((year, month, day, hour, minute, second) -> {
|
||||
String text = year + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(minute);
|
||||
this.os.setLoadingDeadline(text);
|
||||
tvStartTime.setText(text);
|
||||
timeKey = true;
|
||||
|
||||
String endDate = TimeUtil.getString(text, new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),14400, TimeConstants.MIN);
|
||||
this.op.setLoadingDeadline(endDate);
|
||||
tvEndTimeDis.setText(endDate);
|
||||
timeKey = true;
|
||||
});
|
||||
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY);
|
||||
wheelLayout.setRange(DateEntity.today(), DateEntity.yearOnFuture(10));
|
||||
wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND);
|
||||
wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10));
|
||||
wheelLayout.setDateLabel("年", "月", "日");
|
||||
wheelLayout.setTimeLabel("时", "分", "");
|
||||
ap.show();
|
||||
});
|
||||
ryPretend.addItemDecoration(new RecyclerViewDecoration(con, RecyclerViewDecoration.VERTICAL_LIST));
|
||||
ryPretend.addItemDecoration(new RecyclerViewDecoration(con,RecyclerViewDecoration.VERTICAL_LIST));
|
||||
ryPretend.createV(con, os.getGoods(), R.layout.item_cargo).setOnItemViewListener((position1, o1, v1) -> {
|
||||
TextView tvHWName = v1.findViewById(R.id.tvHWName);
|
||||
TextView tvCount = v1.findViewById(R.id.tvCount);
|
||||
@ -349,7 +315,7 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
startActivity(in);
|
||||
});
|
||||
tvDel.setOnClickListener(v22 -> {
|
||||
if (op.getGoods().size() > 0) {
|
||||
if (op.getGoods().size()>0){
|
||||
new XPopup.Builder(con)
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "删除装货货物,需重新添加卸货地址货物?",
|
||||
@ -360,7 +326,7 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
ryDis.delAllDatas();
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {
|
||||
}else{
|
||||
ryPretend.delItemV(position1);
|
||||
}
|
||||
|
||||
@ -381,30 +347,26 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
list.add(ad.getCity());
|
||||
list.add(ad.getArea());
|
||||
if (event.getType() == 0) {
|
||||
os.setDetailAddress(ad.getPathName()+ad.getAddressDetail());
|
||||
os.setDetailAddress(ad.getAddressDetail());
|
||||
os.setLoadingName(ad.getContactPerson());
|
||||
os.setLoadingPhone(ad.getContactNumber());
|
||||
os.setCompanyCode(ad.getCompanyCode());
|
||||
os.setCompanyName(ad.getCompanyName());
|
||||
os.setLat(ad.getLatitude());
|
||||
os.setLng(ad.getLongitude());
|
||||
os.setLoadingAddress(list);
|
||||
tvName.setText(ad.getContactPerson());
|
||||
tvPhone.setText(ad.getContactNumber());
|
||||
tvAddress.setText(ad.getPathName()+ad.getAddressDetail());
|
||||
tvAddress.setText(ad.getAddressDetail());
|
||||
// GetObjectName.ZIModel(address_box,os,con);
|
||||
} else {
|
||||
op.setDetailAddress(ad.getPathName()+ad.getAddressDetail());
|
||||
op.setDetailAddress(ad.getAddressDetail());
|
||||
op.setLoadingName(ad.getContactPerson());
|
||||
op.setLoadingPhone(ad.getContactNumber());
|
||||
op.setCompanyCode(ad.getCompanyCode());
|
||||
op.setCompanyName(ad.getCompanyName());
|
||||
op.setLat(ad.getLatitude());
|
||||
op.setLng(ad.getLongitude());
|
||||
op.setLoadingAddress(list);
|
||||
tvNameDis.setText(ad.getContactPerson());
|
||||
tvPhoneDis.setText(ad.getContactNumber());
|
||||
tvAddressDis.setText(ad.getPathName()+ad.getAddressDetail());
|
||||
tvAddressDis.setText(ad.getAddressDetail());
|
||||
// GetObjectName.ZIModel(address_box,op,con);
|
||||
}
|
||||
|
||||
@ -468,14 +430,9 @@ public class NodeInfoActivity extends BaseActivity {
|
||||
String money = etMoney.getText().toString();
|
||||
String startTim = tvStartTime.getText().toString();
|
||||
String endTimeDis = tvEndTimeDis.getText().toString();
|
||||
|
||||
if (TextUtils.isEmpty(money)){
|
||||
ToastUtil.show(con, "请填写运费");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(name) || TextUtils.isEmpty(nameDis) ||
|
||||
TextUtils.isEmpty(money) || TextUtils.isEmpty(startTim)) {
|
||||
TextUtils.isEmpty(money) || TextUtils.isEmpty(startTim) ||
|
||||
TextUtils.isEmpty(endTimeDis)) {
|
||||
ToastUtil.show(con, "请完善装卸货信息");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
package com.oneclouds.cargo.ui.home;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
@ -22,7 +20,6 @@ import androidx.annotation.Nullable;
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.amap.api.maps.CameraUpdate;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.maps.CoordinateConverter;
|
||||
import com.amap.api.maps.MapView;
|
||||
import com.amap.api.maps.UiSettings;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
@ -40,21 +37,13 @@ import com.amap.api.services.route.RideRouteResult;
|
||||
import com.amap.api.services.route.RouteSearch;
|
||||
import com.amap.api.services.route.WalkRouteResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.EvaluateBean;
|
||||
import com.oneclouds.cargo.bean.OrderDetailsBean;
|
||||
import com.oneclouds.cargo.bean.OrderRouterBean;
|
||||
import com.oneclouds.cargo.bean.UserBean;
|
||||
import com.oneclouds.cargo.request.AddressRequest;
|
||||
import com.oneclouds.cargo.request.WaybillRequest;
|
||||
import com.oneclouds.cargo.request.bean.CarLocaBean;
|
||||
import com.oneclouds.cargo.request.net.BaseObserver;
|
||||
import com.oneclouds.cargo.request.net.DataManager;
|
||||
import com.oneclouds.cargo.request.net.RxHttpCallBack;
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
import com.oneclouds.cargo.util.StringUtil;
|
||||
@ -67,9 +56,6 @@ import com.oneclouds.cargo.util.view.BaseActivity;
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import com.oneclouds.cargo.util.view.ScoreView;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -93,14 +79,10 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
private OrderDetailsBean sob;
|
||||
private EvaluateBean wnb;
|
||||
private WaybillRequest wr;
|
||||
|
||||
private AddressRequest addressRequest;
|
||||
private AMap aMap;
|
||||
//是否处于展开状态
|
||||
private boolean key = false;
|
||||
private int id = 0;
|
||||
private ArrayList<LatLng> carPoints = new ArrayList<>();
|
||||
private ArrayList<LatLng> driverPoints = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
@ -114,7 +96,7 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
sob = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_GET_EXECUTE_WATBILL), OrderDetailsBean.class);
|
||||
wnb = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_APPAISES), EvaluateBean.class);
|
||||
if (sob.getCode() == 200 && sob.getData() != null) {
|
||||
if (TypeParts.isEntrust(con)) {
|
||||
if(TypeParts.isEntrust(con)){
|
||||
sob.getData().setTotalAmount(" ");
|
||||
}
|
||||
initView(null);
|
||||
@ -139,109 +121,6 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_EVALUATION_V3);
|
||||
}
|
||||
|
||||
if (CacheGroup.cacheList.get("getcarlocation") != null) {
|
||||
Type type = new TypeToken<CommonResponseBean<CarLocaBean>>() {
|
||||
}.getType();
|
||||
CommonResponseBean<CarLocaBean> getcarlocation = gson.fromJson(CacheGroup.cacheList.get("getcarlocation"), type);
|
||||
if (getcarlocation != null && getcarlocation.getData() != null) {
|
||||
CarLocaBean data = getcarlocation.getData();
|
||||
double lat = new BigDecimal(data.getLat()).setScale(5, RoundingMode.HALF_UP)
|
||||
.divide(new BigDecimal(600000), RoundingMode.HALF_UP).doubleValue();
|
||||
|
||||
double lon = new BigDecimal(data.getLon()).setScale(5, RoundingMode.HALF_UP)
|
||||
.divide(new BigDecimal(600000), RoundingMode.HALF_UP).doubleValue();
|
||||
//gws84转高德经纬度
|
||||
CoordinateConverter converter = new CoordinateConverter(con);
|
||||
converter.from(CoordinateConverter.CoordType.GPS);
|
||||
converter.coord(new LatLng(lat, lon));
|
||||
LatLng desLatLng = converter.convert();
|
||||
aMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.icon_gua))
|
||||
.position(desLatLng));
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(desLatLng, 6));
|
||||
}
|
||||
CacheGroup.cacheList.remove("getcarlocation");
|
||||
}
|
||||
|
||||
//车辆轨迹
|
||||
if (CacheGroup.cacheList.get("CAR_ROUTER") != null) {
|
||||
OrderRouterBean bb = gson.fromJson(CacheGroup.cacheList.get("CAR_ROUTER"), OrderRouterBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
new Thread(() -> {
|
||||
carPoints.clear();
|
||||
driverPoints.clear();
|
||||
ArrayList<ArrayList<String>> pathDriver = bb.getData().getVo().get(0).getPath();
|
||||
ArrayList<ArrayList<String>> path = bb.getData().getVo().get(1).getPath();
|
||||
for (int i = 0; i < path.size(); i++) {
|
||||
if (path.get(i).size() > 1) {
|
||||
double lon = Double.parseDouble(path.get(i).get(0));
|
||||
double lat = Double.parseDouble(path.get(i).get(1));
|
||||
//gws84转高德经纬度
|
||||
// CoordinateConverter converter = new CoordinateConverter(con);
|
||||
// converter.from(CoordinateConverter.CoordType.GPS);
|
||||
// converter.coord(new LatLng(lat, lon));
|
||||
// LatLng convert = converter.convert();
|
||||
// carPoints.add(convert);
|
||||
carPoints.add(new LatLng(lat, lon));
|
||||
}
|
||||
}
|
||||
|
||||
//司机轨迹
|
||||
if (pathDriver.size() > 0) {
|
||||
for (int i = 0; i < pathDriver.size(); i++) {
|
||||
if (pathDriver.get(i).size() > 1) {
|
||||
double lon = Double.parseDouble(pathDriver.get(i).get(0));
|
||||
double lat = Double.parseDouble(pathDriver.get(i).get(1));
|
||||
driverPoints.add(new LatLng(lat, lon));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
runOnUiThread(() -> {
|
||||
//绘制起始位置和目的地marker
|
||||
aMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.qi))
|
||||
.position(new LatLng(Double.parseDouble(bb.getData().getStartLat()),
|
||||
Double.parseDouble(bb.getData().getStartLon()))));
|
||||
|
||||
aMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.zhong))
|
||||
.position(new LatLng(Double.parseDouble(bb.getData().getEndLat()),
|
||||
Double.parseDouble(bb.getData().getEndLon()))));
|
||||
|
||||
//添加车辆轨迹
|
||||
aMap.addPolyline((new PolylineOptions())
|
||||
.addAll(carPoints)
|
||||
//线的宽度
|
||||
.width(20f)
|
||||
.setCustomTexture(BitmapDescriptorFactory.fromResource(R.drawable.icon_roud_type)));
|
||||
|
||||
|
||||
if (driverPoints.size() > 0) {
|
||||
//添加司机轨迹
|
||||
aMap.addPolyline((new PolylineOptions())
|
||||
.addAll(driverPoints)
|
||||
//线的宽度
|
||||
.width(20f)
|
||||
.setCustomTexture(BitmapDescriptorFactory.fromResource(R.drawable.icon_roud_red)));
|
||||
}
|
||||
|
||||
LatLngBounds.Builder builder = LatLngBounds.builder();
|
||||
for (int i = 0; i < carPoints.size(); i++) {
|
||||
builder.include(carPoints.get(i));
|
||||
}
|
||||
//显示全部marker,第二个参数是四周留空宽度
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(builder.build(), 100, 100, 0, 400));
|
||||
|
||||
});
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove("CAR_ROUTER");
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
break;
|
||||
@ -269,7 +148,6 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
map.onCreate(savedInstanceState);
|
||||
if (aMap == null) {
|
||||
aMap = map.getMap();
|
||||
aMap.clear();
|
||||
}
|
||||
//initLoaction();
|
||||
Log.e("--id--", "" + id);
|
||||
@ -277,18 +155,7 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
if (!userdata.equals("")) {
|
||||
ub = gson.fromJson(userdata, UserBean.class);
|
||||
}
|
||||
addressRequest = new AddressRequest(con, hd);
|
||||
// DataManager.getInstance().getCarRouter("2535")
|
||||
// .compose(DataManager.setThread())
|
||||
// .subscribe(new BaseObserver(con, new RxHttpCallBack<CommonResponseBean<CarLocaBean>>() {
|
||||
// @Override
|
||||
// public void onSuccess(CommonResponseBean<CommonResponseBean<CarLocaBean>> t) {
|
||||
// super.onSuccess(t);
|
||||
// }
|
||||
// }));
|
||||
|
||||
wr = new WaybillRequest(con, hd);
|
||||
wr.getCarRouter(id);
|
||||
wr=new WaybillRequest(con,hd);
|
||||
wr.orderDetail(id);
|
||||
wr.orderEvaluate(id);
|
||||
}
|
||||
@ -297,11 +164,6 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
String waybillStatus = sob.getData().getWaybillStatus();
|
||||
if (waybillStatus.equals("已装货") || waybillStatus.equals("待调度")) {
|
||||
addressRequest.getCarLoca(sob.getData().getCarNumber());
|
||||
}
|
||||
// addressRequest.getCarLoca("冀AAH822");
|
||||
//up_traffic();
|
||||
brv.setNestedScrollingEnabled(false);
|
||||
//控件显示的动画
|
||||
@ -373,7 +235,7 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
if (id != 0) {
|
||||
if (evaluate.length() >= 5) {
|
||||
Log.e("星星", "" + sv1.getScore());
|
||||
wr.evaluate(id, m_pl_value.getText() + "", sv1.getScore());
|
||||
wr.evaluate(id,m_pl_value.getText()+"",sv1.getScore());
|
||||
//new HuoYuanRequset().keepEvaluate(con,hd,sv1.getScore(),m_pl_value.getText()+"",id);
|
||||
} else {
|
||||
Toast.makeText(con, "写够5个字才是好司机~", Toast.LENGTH_SHORT).show();
|
||||
@ -422,7 +284,7 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
initZX(upkey, v, position, o, 1);
|
||||
}
|
||||
});
|
||||
// initSearch();
|
||||
initSearch();
|
||||
}
|
||||
|
||||
public void initZX(boolean key, View v, int position, Object o, int type) {
|
||||
@ -613,7 +475,7 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
//先清除一下,避免重复显示
|
||||
// aMap.clear();
|
||||
aMap.clear();
|
||||
//绘制起始位置和目的地marker
|
||||
aMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.qi))
|
||||
@ -652,11 +514,10 @@ public class OrderDetailsActivity extends BaseActivity {
|
||||
builder.include(latLngs.get(i));
|
||||
}
|
||||
//显示全部marker,第二个参数是四周留空宽度
|
||||
// aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 200));
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngBoundsRect(builder.build(), 100, 100, 0, 400));
|
||||
// LatLng latLng = new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||
// Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));//构造一个位置
|
||||
// aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 6));
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 200));
|
||||
LatLng latLng = new LatLng(Double.parseDouble(sob.getData().getWayChildren().get(0).getLatitude()),
|
||||
Double.parseDouble(sob.getData().getWayChildren().get((0)).getLongitude()));//构造一个位置
|
||||
aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 6));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ public class OrderListActivity extends BaseAppCompatActivity {
|
||||
|
||||
private UserBean user;
|
||||
private TabSegment ts;
|
||||
private String[] titles={"全部","待调度","已装货","已卸货","待结算","草稿箱"};
|
||||
private String[] titles={"全部","待调度","已装货","已卸货","已结算","草稿箱"};
|
||||
private ViewPager vp;
|
||||
|
||||
@Override
|
||||
@ -58,7 +58,7 @@ public class OrderListActivity extends BaseAppCompatActivity {
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
RelativeLayout re=findViewById(R.id.order_list_top);
|
||||
// user.getData().setFreight("");
|
||||
user.getData().setFreight("");
|
||||
GetObjectName.ZIModel(re,user.getData(),con);
|
||||
list.add(new OrderList1Fragment());
|
||||
list.add(new OrderList2Fragment());
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.home.typelist;
|
||||
|
||||
import static androidx.core.content.ContextCompat.getSystemService;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@ -26,15 +21,12 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.WaybillListBean;
|
||||
import com.oneclouds.cargo.event.RefreshEvent;
|
||||
import com.oneclouds.cargo.request.OrderRequest;
|
||||
import com.oneclouds.cargo.request.WaybillRequest;
|
||||
import com.oneclouds.cargo.ui.home.NodeInfoActivity;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsActivity;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsAllActivity;
|
||||
import com.oneclouds.cargo.ui.my.invoice.InvoiceCreateActivity;
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts;
|
||||
import com.oneclouds.cargo.ui.waybill.activity.AnotherOrderActivity;
|
||||
import com.oneclouds.cargo.util.ToastUtil;
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls;
|
||||
import com.oneclouds.cargo.util.adapter.ManyBean;
|
||||
@ -45,9 +37,6 @@ import com.oneclouds.cargo.util.view.BaseFragment;
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -61,202 +50,185 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList1Fragment extends BaseFragment {
|
||||
|
||||
private int type = 0;
|
||||
private int type=0;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
private Gson gson = new Gson();
|
||||
private Gson gson=new Gson();
|
||||
private LinearLayout select_type;
|
||||
private List<Boolean> keys = new ArrayList<>();
|
||||
private Map<Integer, String> submit_map = new HashMap<>();
|
||||
private List<Boolean> keys=new ArrayList<>();
|
||||
private Map<Integer,String> submit_map=new HashMap<>();
|
||||
|
||||
private BaseRecyclerView order_brv;
|
||||
private int index = 1;
|
||||
private int num = 0;
|
||||
private boolean dataKey = true;
|
||||
private String timer = "";
|
||||
private int index=1;
|
||||
private int num=0;
|
||||
private boolean dataKey=true;
|
||||
private String timer="";
|
||||
private SmartRefreshLayout sr;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
switch (m.what){
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
sr.finishRefresh();
|
||||
sr.finishLoadMore();
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type) != null) {
|
||||
Log.e("-list-", CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type), WaybillListBean.class);
|
||||
if (olb.getCode() == 200) {
|
||||
if (index == 1) {
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2),WaybillListBean.class);
|
||||
if(olb.getCode()==200){
|
||||
if(index==1){
|
||||
initData();
|
||||
} else {
|
||||
if (olb.getData().getList().size() == 0) {
|
||||
dataKey = false;
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
}else{
|
||||
addData();
|
||||
}
|
||||
|
||||
}else{
|
||||
ToastUtil.show(con,"加载失败");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(con, "加载失败");
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2 + type);
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2);
|
||||
}
|
||||
//撤销
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "撤销成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"撤销成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_REVOKE);
|
||||
}
|
||||
//删除
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "删除成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"删除成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_DEL);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
//处理修改类型
|
||||
if (m.obj.equals("1")) {
|
||||
ToastUtil.show(con, "派单");
|
||||
} else {
|
||||
ToastUtil.show(con, "抢单");
|
||||
if(m.obj.equals("1")){
|
||||
ToastUtil.show(con,"派单");
|
||||
}else{
|
||||
ToastUtil.show(con,"抢单");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
// private Button submit;
|
||||
private Button submit;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
root = inflater.inflate(R.layout.fragment_order_list, container, false);
|
||||
con = getContext();
|
||||
act = getActivity();
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
root=inflater.inflate(R.layout.fragment_order_list,container,false);
|
||||
con=getContext();
|
||||
act=getActivity();
|
||||
Log.e("type","-"+type+"-");
|
||||
wr=new WaybillRequest(con,hd);
|
||||
or=new OrderRequest(con,hd);
|
||||
order_brv=root.findViewById(R.id.order_brv);
|
||||
submit=root.findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
if(submit_map.size()>0){
|
||||
Intent in=new Intent(con, InvoiceCreateActivity.class);
|
||||
in.putExtra("list",gson.toJson(submit_map));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"请先选择需要开票的订单",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if(type==0 || type==102005){
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
}
|
||||
Log.e("type", "-" + type + "-");
|
||||
wr = new WaybillRequest(con, hd);
|
||||
or = new OrderRequest(con, hd);
|
||||
order_brv = root.findViewById(R.id.order_brv);
|
||||
initRefreshLoad();
|
||||
// initView(null);
|
||||
initView(null);
|
||||
return root;
|
||||
}
|
||||
|
||||
private AdapterAlls aas;
|
||||
private List<ManyBean> list = new ArrayList<>();
|
||||
private List<ManyBean> list=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
}
|
||||
|
||||
int sum = 0;
|
||||
|
||||
public void initData() {
|
||||
list.clear();
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
for (int i = 0; i < olb.getData().getList().size(); i++) {
|
||||
String str = olb.getData().getList().get(i).getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
}
|
||||
if (TypeParts.isEntrust(con)) {
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i), R.layout.order_item));
|
||||
}
|
||||
if (lists.size() == 0 && sum == 0) {
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""), R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
|
||||
|
||||
aas = order_brv.creates(con, list);
|
||||
aas=order_brv.creates(con,list);
|
||||
aas.setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
switch (layout){
|
||||
case R.layout.order_item:
|
||||
WaybillListBean.DataDTO.ListDTO ld = (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
Button btnAgain = v.findViewById(R.id.btnAgain);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
WaybillListBean.DataDTO.ListDTO ld= (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn=v.findViewById(R.id.btn);
|
||||
ImageView state_img=v.findViewById(R.id.state_img);
|
||||
ImageButton xuan=v.findViewById(R.id.xuan);
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in = new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
Intent in=new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
startActivity(in);
|
||||
});
|
||||
v.setOnLongClickListener(v13 -> {
|
||||
// 获取TextView中的文本
|
||||
String text = ld.getOrderNum();
|
||||
|
||||
// 获取剪切板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) con.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text+"已复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (ld.getMakeStatus() == 107001) {
|
||||
if (ld.getStatus()!=102005) {
|
||||
xuan.setVisibility(View.GONE);
|
||||
}else{
|
||||
if(ld.getMakeStatus()==107001){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_state);
|
||||
} else if (ld.getMakeStatus() == 107002) {
|
||||
}else if(ld.getMakeStatus()==107002){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing);
|
||||
} else if (ld.getMakeStatus() == 107003) {
|
||||
}else if(ld.getMakeStatus()==107003){
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_no);
|
||||
} else {
|
||||
}else{
|
||||
|
||||
}
|
||||
btnAgain.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in = new Intent(con, AnotherOrderActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
in.putExtra("type", type);
|
||||
startActivity(in);
|
||||
}
|
||||
xuan.setOnClickListener(v1 -> {
|
||||
if(ld.getStatus()==102005){
|
||||
if (keys.get(position)) {
|
||||
xuan.setImageResource(R.mipmap.no_xuan);
|
||||
keys.set(position,false);
|
||||
num--;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.remove(position);
|
||||
}else{
|
||||
xuan.setImageResource(R.mipmap.xuan);
|
||||
keys.set(position,true);
|
||||
num++;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.put(position,gson.toJson(o));
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"订单尚未完成无法开票",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||
if (ld.getStatus() > 102002) {
|
||||
if (ld.getStatus()>102002) {
|
||||
btn.setText("查看运单");
|
||||
}
|
||||
if (ld.getStatus() == 102001) {
|
||||
if(ld.getStatus()==102001){
|
||||
btn.setText("删除");
|
||||
}
|
||||
btn.setOnClickListener(v1 -> {
|
||||
if (ld.getStatus() > 102002) {
|
||||
Log.e("查看", "查看");
|
||||
Intent in = new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id", ld.getWaybillId());
|
||||
if(ld.getStatus()>102002){
|
||||
Log.e("查看","查看");
|
||||
Intent in=new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id",ld.getWaybillId());
|
||||
startActivity(in);
|
||||
} else {
|
||||
if (ld.getStatus() == 102002) {
|
||||
}else{
|
||||
if(ld.getStatus()==102002){
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否撤销此订单?",
|
||||
@ -265,66 +237,90 @@ public class OrderList1Fragment extends BaseFragment {
|
||||
or.orderRevoke(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {
|
||||
}else{
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否删除此订单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("删除", "删除");
|
||||
Log.e("删除","删除");
|
||||
or.orderDelete(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
case R.layout.order_time:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addData() {
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void addData(){
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for (WaybillListBean.DataDTO.ListDTO listDTO : olb.getData().getList()) {
|
||||
String str = listDTO.getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
String str=listDTO.getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
lists.add(new ManyBean(listDTO, R.layout.order_item));
|
||||
lists.add(new ManyBean(listDTO,R.layout.order_item));
|
||||
}
|
||||
order_brv.adds(lists);
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//加载和刷新
|
||||
public void initRefreshLoad() {
|
||||
sr = root.findViewById(R.id.refreshLayout);
|
||||
public void initRefreshLoad(){
|
||||
sr =root.findViewById(R.id.refreshLayout);
|
||||
sr.setOnRefreshListener(refreshLayout -> {
|
||||
Log.e("下拉刷新", "pps");
|
||||
index = 1;
|
||||
dataKey = true;
|
||||
timer = "";
|
||||
wr.orderList(index, 10, type);
|
||||
index=1;
|
||||
dataKey=true;
|
||||
timer="";
|
||||
wr.orderList(index,10,type);
|
||||
});
|
||||
sr.setOnLoadMoreListener(refreshLayout -> {
|
||||
Log.e("上拉加载", "次数" + index);
|
||||
if (dataKey) {
|
||||
Log.e("上拉加载", "次数"+index);
|
||||
if(dataKey){
|
||||
index++;
|
||||
wr.orderList(index, 10, type);
|
||||
} else {
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
wr.orderList(index,10,type);
|
||||
}else{
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
refreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
});
|
||||
sr.autoRefresh();
|
||||
}
|
||||
|
||||
class time {
|
||||
class time{
|
||||
|
||||
private String timer;
|
||||
|
||||
@ -342,17 +338,4 @@ public class OrderList1Fragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void refreshList(RefreshEvent event) {
|
||||
if (event.getType() == type) {
|
||||
sr.autoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.home.typelist;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@ -25,14 +22,12 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.WaybillListBean;
|
||||
import com.oneclouds.cargo.event.RefreshEvent;
|
||||
import com.oneclouds.cargo.request.OrderRequest;
|
||||
import com.oneclouds.cargo.request.WaybillRequest;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsActivity;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsAllActivity;
|
||||
import com.oneclouds.cargo.ui.my.invoice.InvoiceCreateActivity;
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts;
|
||||
import com.oneclouds.cargo.ui.waybill.activity.AnotherOrderActivity;
|
||||
import com.oneclouds.cargo.util.StringUtil;
|
||||
import com.oneclouds.cargo.util.ToastUtil;
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls;
|
||||
@ -44,9 +39,6 @@ import com.oneclouds.cargo.util.view.BaseFragment;
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -60,199 +52,185 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList2Fragment extends BaseFragment {
|
||||
|
||||
private int type = 200001;
|
||||
private int type=200001;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
private Gson gson = new Gson();
|
||||
private Gson gson=new Gson();
|
||||
private LinearLayout select_type;
|
||||
private List<Boolean> keys = new ArrayList<>();
|
||||
private Map<Integer, String> submit_map = new HashMap<>();
|
||||
private List<Boolean> keys=new ArrayList<>();
|
||||
private Map<Integer,String> submit_map=new HashMap<>();
|
||||
|
||||
private BaseRecyclerView order_brv;
|
||||
private int index = 1;
|
||||
private int num = 0;
|
||||
private boolean dataKey = true;
|
||||
private String timer = "";
|
||||
private int index=1;
|
||||
private int num=0;
|
||||
private boolean dataKey=true;
|
||||
private String timer="";
|
||||
private SmartRefreshLayout sr;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
switch (m.what){
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
sr.finishRefresh();
|
||||
sr.finishLoadMore();
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type) != null) {
|
||||
Log.e("-list-", CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type), WaybillListBean.class);
|
||||
if (olb.getCode() == 200) {
|
||||
if (index == 1) {
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2),WaybillListBean.class);
|
||||
if(olb.getCode()==200){
|
||||
if(index==1){
|
||||
initData();
|
||||
} else {
|
||||
if(olb.getData().getList().size()==0){
|
||||
dataKey=false;
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
}else{
|
||||
addData();
|
||||
}
|
||||
}else{
|
||||
ToastUtil.show(con,"加载失败");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(con, "加载失败");
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2 + type);
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2);
|
||||
}
|
||||
//撤销
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "撤销成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"撤销成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_REVOKE);
|
||||
}
|
||||
//删除
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "删除成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"删除成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_DEL);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
//处理修改类型
|
||||
if (m.obj.equals("1")) {
|
||||
ToastUtil.show(con, "派单");
|
||||
} else {
|
||||
ToastUtil.show(con, "抢单");
|
||||
if(m.obj.equals("1")){
|
||||
ToastUtil.show(con,"派单");
|
||||
}else{
|
||||
ToastUtil.show(con,"抢单");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
// private Button submit;
|
||||
private Button submit;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
root = inflater.inflate(R.layout.fragment_order_list, container, false);
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
root=inflater.inflate(R.layout.fragment_order_list,container,false);
|
||||
con=getContext();
|
||||
act=getActivity();
|
||||
Log.e("type","-"+type+"-");
|
||||
wr=new WaybillRequest(con,hd);
|
||||
or=new OrderRequest(con,hd);
|
||||
order_brv=root.findViewById(R.id.order_brv);
|
||||
submit=root.findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
if(submit_map.size()>0){
|
||||
Intent in=new Intent(con, InvoiceCreateActivity.class);
|
||||
in.putExtra("list",gson.toJson(submit_map));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"请先选择需要开票的订单",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if(type==0 || type==102005){
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
}
|
||||
con = getContext();
|
||||
act = getActivity();
|
||||
Log.e("type", "-" + type + "-");
|
||||
wr = new WaybillRequest(con, hd);
|
||||
or = new OrderRequest(con, hd);
|
||||
order_brv = root.findViewById(R.id.order_brv);
|
||||
initRefreshLoad();
|
||||
initView(null);
|
||||
return root;
|
||||
}
|
||||
|
||||
private AdapterAlls aas;
|
||||
private List<ManyBean> list = new ArrayList<>();
|
||||
private List<ManyBean> list=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
}
|
||||
|
||||
int sum = 0;
|
||||
|
||||
public void initData() {
|
||||
list.clear();
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
for (int i = 0; i < olb.getData().getList().size(); i++) {
|
||||
String str = olb.getData().getList().get(i).getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
}
|
||||
if (TypeParts.isEntrust(con)) {
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i), R.layout.order_item));
|
||||
}
|
||||
if (lists.size() == 0 && sum == 0) {
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""), R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas = order_brv.creates(con, list);
|
||||
aas=order_brv.creates(con,list);
|
||||
aas.setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
switch (layout){
|
||||
case R.layout.order_item:
|
||||
WaybillListBean.DataDTO.ListDTO ld = (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
WaybillListBean.DataDTO.ListDTO ld= (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn=v.findViewById(R.id.btn);
|
||||
ImageView state_img=v.findViewById(R.id.state_img);
|
||||
ImageButton xuan=v.findViewById(R.id.xuan);
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in = new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
Intent in=new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
startActivity(in);
|
||||
});
|
||||
v.setOnLongClickListener(v13 -> {
|
||||
// 获取TextView中的文本
|
||||
String text = ld.getOrderNum();
|
||||
|
||||
// 获取剪切板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) con.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text+"已复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
Button btnAgain = v.findViewById(R.id.btnAgain);
|
||||
btnAgain.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in = new Intent(con, AnotherOrderActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
in.putExtra("type", type);
|
||||
startActivity(in);
|
||||
});
|
||||
if (ld.getMakeStatus() == 107001) {
|
||||
if (ld.getStatus()!=102005) {
|
||||
xuan.setVisibility(View.GONE);
|
||||
}else{
|
||||
if(ld.getMakeStatus()==107001){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_state);
|
||||
} else if (ld.getMakeStatus() == 107002) {
|
||||
}else if(ld.getMakeStatus()==107002){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing);
|
||||
} else if (ld.getMakeStatus() == 107003) {
|
||||
}else if(ld.getMakeStatus()==107003){
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_no);
|
||||
} else {
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
xuan.setOnClickListener(v1 -> {
|
||||
if(ld.getStatus()==102005){
|
||||
if (keys.get(position)) {
|
||||
xuan.setImageResource(R.mipmap.no_xuan);
|
||||
keys.set(position,false);
|
||||
num--;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.remove(position);
|
||||
}else{
|
||||
xuan.setImageResource(R.mipmap.xuan);
|
||||
keys.set(position,true);
|
||||
num++;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.put(position,gson.toJson(o));
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"订单尚未完成无法开票",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||
if (ld.getStatus() > 102002) {
|
||||
if (ld.getStatus()>102002) {
|
||||
btn.setText("查看运单");
|
||||
}
|
||||
if (ld.getStatus() == 102001) {
|
||||
if(ld.getStatus()==102001){
|
||||
btn.setText("删除");
|
||||
}
|
||||
btn.setOnClickListener(v1 -> {
|
||||
if (ld.getStatus() > 102002) {
|
||||
Log.e("查看", "查看");
|
||||
Intent in = new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id", ld.getWaybillId());
|
||||
if(ld.getStatus()>102002){
|
||||
Log.e("查看","查看");
|
||||
Intent in=new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id",ld.getWaybillId());
|
||||
startActivity(in);
|
||||
} else {
|
||||
if (ld.getStatus() == 102002) {
|
||||
}else{
|
||||
if(ld.getStatus()==102002){
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否撤销此订单?",
|
||||
@ -261,64 +239,90 @@ public class OrderList2Fragment extends BaseFragment {
|
||||
or.orderRevoke(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {
|
||||
}else{
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否删除此订单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("删除", "删除");
|
||||
Log.e("删除","删除");
|
||||
or.orderDelete(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addData() {
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void addData(){
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for (WaybillListBean.DataDTO.ListDTO listDTO : olb.getData().getList()) {
|
||||
String str = listDTO.getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
String str=listDTO.getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
lists.add(new ManyBean(listDTO, R.layout.order_item));
|
||||
lists.add(new ManyBean(listDTO,R.layout.order_item));
|
||||
}
|
||||
order_brv.adds(lists);
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//加载和刷新
|
||||
public void initRefreshLoad() {
|
||||
sr = root.findViewById(R.id.refreshLayout);
|
||||
public void initRefreshLoad(){
|
||||
sr =root.findViewById(R.id.refreshLayout);
|
||||
sr.setOnRefreshListener(refreshLayout -> {
|
||||
Log.e("下拉刷新", "pps");
|
||||
index = 1;
|
||||
dataKey = true;
|
||||
timer = "";
|
||||
wr.orderList(index, 10, type);
|
||||
index=1;
|
||||
dataKey=true;
|
||||
timer="";
|
||||
wr.orderList(index,10,type);
|
||||
});
|
||||
sr.setOnLoadMoreListener(refreshLayout -> {
|
||||
Log.e("上拉加载", "次数" + index);
|
||||
if (dataKey) {
|
||||
Log.e("上拉加载", "次数"+index);
|
||||
if(dataKey){
|
||||
index++;
|
||||
wr.orderList(index, 10, type);
|
||||
} else {
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
wr.orderList(index,10,type);
|
||||
}else{
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
refreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
});
|
||||
sr.autoRefresh();
|
||||
}
|
||||
|
||||
class time {
|
||||
class time{
|
||||
|
||||
private String timer;
|
||||
|
||||
@ -336,16 +340,4 @@ public class OrderList2Fragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void refreshList(RefreshEvent event) {
|
||||
if (event.getType() == type) {
|
||||
sr.autoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.home.typelist;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@ -25,14 +22,12 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.WaybillListBean;
|
||||
import com.oneclouds.cargo.event.RefreshEvent;
|
||||
import com.oneclouds.cargo.request.OrderRequest;
|
||||
import com.oneclouds.cargo.request.WaybillRequest;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsActivity;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsAllActivity;
|
||||
import com.oneclouds.cargo.ui.my.invoice.InvoiceCreateActivity;
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts;
|
||||
import com.oneclouds.cargo.ui.waybill.activity.AnotherOrderActivity;
|
||||
import com.oneclouds.cargo.util.StringUtil;
|
||||
import com.oneclouds.cargo.util.ToastUtil;
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls;
|
||||
@ -44,9 +39,6 @@ import com.oneclouds.cargo.util.view.BaseFragment;
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -60,202 +52,185 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList3Fragment extends BaseFragment {
|
||||
|
||||
private int type = 200003;
|
||||
private int type=200003;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
private Gson gson = new Gson();
|
||||
private Gson gson=new Gson();
|
||||
private LinearLayout select_type;
|
||||
private List<Boolean> keys = new ArrayList<>();
|
||||
private Map<Integer, String> submit_map = new HashMap<>();
|
||||
private List<Boolean> keys=new ArrayList<>();
|
||||
private Map<Integer,String> submit_map=new HashMap<>();
|
||||
|
||||
private BaseRecyclerView order_brv;
|
||||
private int index = 1;
|
||||
private int num = 0;
|
||||
private boolean dataKey = true;
|
||||
private String timer = "";
|
||||
private int index=1;
|
||||
private int num=0;
|
||||
private boolean dataKey=true;
|
||||
private String timer="";
|
||||
private SmartRefreshLayout sr;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
switch (m.what){
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
sr.finishRefresh();
|
||||
sr.finishLoadMore();
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type) != null) {
|
||||
Log.e("-list-", CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type), WaybillListBean.class);
|
||||
if (olb.getCode() == 200) {
|
||||
if (index == 1) {
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2),WaybillListBean.class);
|
||||
if(olb.getCode()==200){
|
||||
if(index==1){
|
||||
initData();
|
||||
} else {
|
||||
if(olb.getData().getList().size()==0){
|
||||
dataKey=false;
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
}else{
|
||||
addData();
|
||||
}
|
||||
}else{
|
||||
ToastUtil.show(con,"加载失败");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(con, "加载失败");
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2 + type);
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2);
|
||||
}
|
||||
//撤销
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "撤销成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"撤销成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_REVOKE);
|
||||
}
|
||||
//删除
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "删除成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"删除成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_DEL);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
//处理修改类型
|
||||
if (m.obj.equals("1")) {
|
||||
ToastUtil.show(con, "派单");
|
||||
} else {
|
||||
ToastUtil.show(con, "抢单");
|
||||
if(m.obj.equals("1")){
|
||||
ToastUtil.show(con,"派单");
|
||||
}else{
|
||||
ToastUtil.show(con,"抢单");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
// private Button submit;
|
||||
private Button submit;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
root = inflater.inflate(R.layout.fragment_order_list, container, false);
|
||||
con = getContext();
|
||||
act = getActivity();
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
root=inflater.inflate(R.layout.fragment_order_list,container,false);
|
||||
con=getContext();
|
||||
act=getActivity();
|
||||
Log.e("type","-"+type+"-");
|
||||
wr=new WaybillRequest(con,hd);
|
||||
or=new OrderRequest(con,hd);
|
||||
order_brv=root.findViewById(R.id.order_brv);
|
||||
submit=root.findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
if(submit_map.size()>0){
|
||||
Intent in=new Intent(con, InvoiceCreateActivity.class);
|
||||
in.putExtra("list",gson.toJson(submit_map));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"请先选择需要开票的订单",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if(type==0 || type==102005){
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
Log.e("type", "-" + type + "-");
|
||||
wr = new WaybillRequest(con, hd);
|
||||
or = new OrderRequest(con, hd);
|
||||
order_brv = root.findViewById(R.id.order_brv);
|
||||
initRefreshLoad();
|
||||
initView(null);
|
||||
return root;
|
||||
}
|
||||
|
||||
private AdapterAlls aas;
|
||||
private List<ManyBean> list = new ArrayList<>();
|
||||
private List<ManyBean> list=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
|
||||
}
|
||||
|
||||
int sum = 0;
|
||||
|
||||
public void initData() {
|
||||
list.clear();
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
for (int i = 0; i < olb.getData().getList().size(); i++) {
|
||||
String str = olb.getData().getList().get(i).getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
}
|
||||
if (TypeParts.isEntrust(con)) {
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i), R.layout.order_item));
|
||||
}
|
||||
if (lists.size() == 0 && sum == 0) {
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""), R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas = order_brv.creates(con, list);
|
||||
aas=order_brv.creates(con,list);
|
||||
aas.setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
switch (layout){
|
||||
case R.layout.order_item:
|
||||
WaybillListBean.DataDTO.ListDTO ld = (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
Button btnAgain = v.findViewById(R.id.btnAgain);
|
||||
btnAgain.setText("确认卸货");
|
||||
btnAgain.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in = new Intent(con, AnotherOrderActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
in.putExtra("type", type);
|
||||
startActivity(in);
|
||||
});
|
||||
WaybillListBean.DataDTO.ListDTO ld= (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn=v.findViewById(R.id.btn);
|
||||
ImageView state_img=v.findViewById(R.id.state_img);
|
||||
ImageButton xuan=v.findViewById(R.id.xuan);
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in = new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
Intent in=new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
startActivity(in);
|
||||
});
|
||||
v.setOnLongClickListener(v13 -> {
|
||||
// 获取TextView中的文本
|
||||
String text = ld.getOrderNum();
|
||||
|
||||
// 获取剪切板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) con.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text+"复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (ld.getMakeStatus() == 107001) {
|
||||
if (ld.getStatus()!=102005) {
|
||||
xuan.setVisibility(View.GONE);
|
||||
}else{
|
||||
if(ld.getMakeStatus()==107001){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_state);
|
||||
} else if (ld.getMakeStatus() == 107002) {
|
||||
}else if(ld.getMakeStatus()==107002){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing);
|
||||
} else if (ld.getMakeStatus() == 107003) {
|
||||
}else if(ld.getMakeStatus()==107003){
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_no);
|
||||
} else {
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
xuan.setOnClickListener(v1 -> {
|
||||
if(ld.getStatus()==102005){
|
||||
if (keys.get(position)) {
|
||||
xuan.setImageResource(R.mipmap.no_xuan);
|
||||
keys.set(position,false);
|
||||
num--;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.remove(position);
|
||||
}else{
|
||||
xuan.setImageResource(R.mipmap.xuan);
|
||||
keys.set(position,true);
|
||||
num++;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.put(position,gson.toJson(o));
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"订单尚未完成无法开票",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||
if (ld.getStatus() > 102002) {
|
||||
if (ld.getStatus()>102002) {
|
||||
btn.setText("查看运单");
|
||||
}
|
||||
if (ld.getStatus() == 102001) {
|
||||
if(ld.getStatus()==102001){
|
||||
btn.setText("删除");
|
||||
}
|
||||
btn.setOnClickListener(v1 -> {
|
||||
if (ld.getStatus() > 102002) {
|
||||
Log.e("查看", "查看");
|
||||
Intent in = new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id", ld.getWaybillId());
|
||||
if(ld.getStatus()>102002){
|
||||
Log.e("查看","查看");
|
||||
Intent in=new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id",ld.getWaybillId());
|
||||
startActivity(in);
|
||||
} else {
|
||||
if (ld.getStatus() == 102002) {
|
||||
}else{
|
||||
if(ld.getStatus()==102002){
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否撤销此订单?",
|
||||
@ -264,64 +239,90 @@ public class OrderList3Fragment extends BaseFragment {
|
||||
or.orderRevoke(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {
|
||||
}else{
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否删除此订单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("删除", "删除");
|
||||
Log.e("删除","删除");
|
||||
or.orderDelete(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addData() {
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void addData(){
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for (WaybillListBean.DataDTO.ListDTO listDTO : olb.getData().getList()) {
|
||||
String str = listDTO.getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
String str=listDTO.getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
lists.add(new ManyBean(listDTO, R.layout.order_item));
|
||||
lists.add(new ManyBean(listDTO,R.layout.order_item));
|
||||
}
|
||||
order_brv.adds(lists);
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//加载和刷新
|
||||
public void initRefreshLoad() {
|
||||
sr = root.findViewById(R.id.refreshLayout);
|
||||
public void initRefreshLoad(){
|
||||
sr =root.findViewById(R.id.refreshLayout);
|
||||
sr.setOnRefreshListener(refreshLayout -> {
|
||||
Log.e("下拉刷新", "pps");
|
||||
index = 1;
|
||||
dataKey = true;
|
||||
timer = "";
|
||||
wr.orderList(index, 10, type);
|
||||
index=1;
|
||||
dataKey=true;
|
||||
timer="";
|
||||
wr.orderList(index,10,type);
|
||||
});
|
||||
sr.setOnLoadMoreListener(refreshLayout -> {
|
||||
Log.e("上拉加载", "次数" + index);
|
||||
if (dataKey) {
|
||||
Log.e("上拉加载", "次数"+index);
|
||||
if(dataKey){
|
||||
index++;
|
||||
wr.orderList(index, 10, type);
|
||||
} else {
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
wr.orderList(index,10,type);
|
||||
}else{
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
refreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
});
|
||||
sr.autoRefresh();
|
||||
}
|
||||
|
||||
class time {
|
||||
class time{
|
||||
|
||||
private String timer;
|
||||
|
||||
@ -339,16 +340,4 @@ public class OrderList3Fragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void refreshList(RefreshEvent event) {
|
||||
if (event.getType() == type) {
|
||||
sr.autoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.home.typelist;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@ -25,14 +22,12 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.WaybillListBean;
|
||||
import com.oneclouds.cargo.event.RefreshEvent;
|
||||
import com.oneclouds.cargo.request.OrderRequest;
|
||||
import com.oneclouds.cargo.request.WaybillRequest;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsActivity;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsAllActivity;
|
||||
import com.oneclouds.cargo.ui.my.invoice.InvoiceCreateActivity;
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts;
|
||||
import com.oneclouds.cargo.ui.waybill.activity.AnotherOrderActivity;
|
||||
import com.oneclouds.cargo.util.StringUtil;
|
||||
import com.oneclouds.cargo.util.ToastUtil;
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls;
|
||||
@ -44,9 +39,6 @@ import com.oneclouds.cargo.util.view.BaseFragment;
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -60,225 +52,185 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList4Fragment extends BaseFragment {
|
||||
|
||||
private int type = 200004;
|
||||
private int type=200004;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
private Gson gson = new Gson();
|
||||
private Gson gson=new Gson();
|
||||
private LinearLayout select_type;
|
||||
private List<Boolean> keys = new ArrayList<>();
|
||||
private Map<Integer, String> submit_map = new HashMap<>();
|
||||
private List<Boolean> keys=new ArrayList<>();
|
||||
private Map<Integer,String> submit_map=new HashMap<>();
|
||||
|
||||
private BaseRecyclerView order_brv;
|
||||
private int index = 1;
|
||||
private int num = 0;
|
||||
private boolean dataKey = true;
|
||||
private String timer = "";
|
||||
private int index=1;
|
||||
private int num=0;
|
||||
private boolean dataKey=true;
|
||||
private String timer="";
|
||||
private SmartRefreshLayout sr;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
switch (m.what){
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
sr.finishRefresh();
|
||||
sr.finishLoadMore();
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type) != null) {
|
||||
Log.e("-list-", CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type), WaybillListBean.class);
|
||||
if (olb.getCode() == 200) {
|
||||
if (index == 1) {
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2),WaybillListBean.class);
|
||||
if(olb.getCode()==200){
|
||||
if(index==1){
|
||||
initData();
|
||||
} else {
|
||||
if (olb.getData().getList().size() == 0) {
|
||||
dataKey = false;
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
}else{
|
||||
addData();
|
||||
}
|
||||
}else{
|
||||
ToastUtil.show(con,"加载失败");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(con, "加载失败");
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2 + type);
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2);
|
||||
}
|
||||
//撤销
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "撤销成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"撤销成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_REVOKE);
|
||||
}
|
||||
|
||||
//签收
|
||||
if (CacheGroup.cacheList.get("order_sign") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("order_sign"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "收货成功");
|
||||
} else {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("order_sign");
|
||||
}
|
||||
//删除
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "删除成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"删除成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_DEL);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
//处理修改类型
|
||||
if (m.obj.equals("1")) {
|
||||
ToastUtil.show(con, "派单");
|
||||
} else {
|
||||
ToastUtil.show(con, "抢单");
|
||||
if(m.obj.equals("1")){
|
||||
ToastUtil.show(con,"派单");
|
||||
}else{
|
||||
ToastUtil.show(con,"抢单");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
// private Button submit;
|
||||
private Button submit;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
root = inflater.inflate(R.layout.fragment_order_list, container, false);
|
||||
con = getContext();
|
||||
act = getActivity();
|
||||
Log.e("type", "-" + type + "-");
|
||||
wr = new WaybillRequest(con, hd);
|
||||
or = new OrderRequest(con, hd);
|
||||
order_brv = root.findViewById(R.id.order_brv);
|
||||
root=inflater.inflate(R.layout.fragment_order_list,container,false);
|
||||
con=getContext();
|
||||
act=getActivity();
|
||||
Log.e("type","-"+type+"-");
|
||||
wr=new WaybillRequest(con,hd);
|
||||
or=new OrderRequest(con,hd);
|
||||
order_brv=root.findViewById(R.id.order_brv);
|
||||
submit=root.findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
if(submit_map.size()>0){
|
||||
Intent in=new Intent(con, InvoiceCreateActivity.class);
|
||||
in.putExtra("list",gson.toJson(submit_map));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"请先选择需要开票的订单",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if(type==0 || type==102005){
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
}
|
||||
initRefreshLoad();
|
||||
initView(null);
|
||||
return root;
|
||||
}
|
||||
|
||||
private AdapterAlls aas;
|
||||
private List<ManyBean> list = new ArrayList<>();
|
||||
private List<ManyBean> list=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int sum = 0;
|
||||
|
||||
public void initData() {
|
||||
list.clear();
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
for (int i = 0; i < olb.getData().getList().size(); i++) {
|
||||
String str = olb.getData().getList().get(i).getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
}
|
||||
if (TypeParts.isEntrust(con)) {
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i), R.layout.order_item));
|
||||
}
|
||||
if (lists.size() == 0 && sum == 0) {
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""), R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas = order_brv.creates(con, list);
|
||||
aas=order_brv.creates(con,list);
|
||||
aas.setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
switch (layout){
|
||||
case R.layout.order_item:
|
||||
WaybillListBean.DataDTO.ListDTO ld = (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
LinearLayout llQrsh = v.findViewById(R.id.llQrsh);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
Button btnQrsh = v.findViewById(R.id.btnQrsh);
|
||||
Button btnAgain = v.findViewById(R.id.btnAgain);
|
||||
llQrsh.setVisibility(View.VISIBLE);
|
||||
btnQrsh.setOnClickListener(v1 -> {
|
||||
new XPopup.Builder(con)
|
||||
.asConfirm("确认收货", "确认 " + ld.getOrderNum() + "收货么?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
or.orderSigin(ld.getWaybillId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
});
|
||||
btnAgain.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in = new Intent(con, AnotherOrderActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
in.putExtra("type", type);
|
||||
startActivity(in);
|
||||
});
|
||||
WaybillListBean.DataDTO.ListDTO ld= (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn=v.findViewById(R.id.btn);
|
||||
ImageView state_img=v.findViewById(R.id.state_img);
|
||||
ImageButton xuan=v.findViewById(R.id.xuan);
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in = new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
Intent in=new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
startActivity(in);
|
||||
});
|
||||
v.setOnLongClickListener(v13 -> {
|
||||
// 获取TextView中的文本
|
||||
String text = ld.getOrderNum();
|
||||
|
||||
// 获取剪切板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) con.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text + "复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (ld.getMakeStatus() == 107001) {
|
||||
if (ld.getStatus()!=102005) {
|
||||
xuan.setVisibility(View.GONE);
|
||||
}else{
|
||||
if(ld.getMakeStatus()==107001){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_state);
|
||||
} else if (ld.getMakeStatus() == 107002) {
|
||||
}else if(ld.getMakeStatus()==107002){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing);
|
||||
} else if (ld.getMakeStatus() == 107003) {
|
||||
}else if(ld.getMakeStatus()==107003){
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_no);
|
||||
} else {
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
xuan.setOnClickListener(v1 -> {
|
||||
if(ld.getStatus()==102005){
|
||||
if (keys.get(position)) {
|
||||
xuan.setImageResource(R.mipmap.no_xuan);
|
||||
keys.set(position,false);
|
||||
num--;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.remove(position);
|
||||
}else{
|
||||
xuan.setImageResource(R.mipmap.xuan);
|
||||
keys.set(position,true);
|
||||
num++;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.put(position,gson.toJson(o));
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"订单尚未完成无法开票",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||
if (ld.getStatus() > 102002) {
|
||||
if (ld.getStatus()>102002) {
|
||||
btn.setText("查看运单");
|
||||
}
|
||||
if (ld.getStatus() == 102001) {
|
||||
if(ld.getStatus()==102001){
|
||||
btn.setText("删除");
|
||||
}
|
||||
btn.setOnClickListener(v1 -> {
|
||||
if (ld.getStatus() > 102002) {
|
||||
Log.e("查看", "查看");
|
||||
Intent in = new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id", ld.getWaybillId());
|
||||
if(ld.getStatus()>102002){
|
||||
Log.e("查看","查看");
|
||||
Intent in=new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id",ld.getWaybillId());
|
||||
startActivity(in);
|
||||
} else {
|
||||
if (ld.getStatus() == 102002) {
|
||||
}else{
|
||||
if(ld.getStatus()==102002){
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否撤销此订单?",
|
||||
@ -287,64 +239,90 @@ public class OrderList4Fragment extends BaseFragment {
|
||||
or.orderRevoke(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {
|
||||
}else{
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否删除此订单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("删除", "删除");
|
||||
Log.e("删除","删除");
|
||||
or.orderDelete(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addData() {
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void addData(){
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for (WaybillListBean.DataDTO.ListDTO listDTO : olb.getData().getList()) {
|
||||
String str = listDTO.getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
String str=listDTO.getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
lists.add(new ManyBean(listDTO, R.layout.order_item));
|
||||
lists.add(new ManyBean(listDTO,R.layout.order_item));
|
||||
}
|
||||
order_brv.adds(lists);
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//加载和刷新
|
||||
public void initRefreshLoad() {
|
||||
sr = root.findViewById(R.id.refreshLayout);
|
||||
public void initRefreshLoad(){
|
||||
sr =root.findViewById(R.id.refreshLayout);
|
||||
sr.setOnRefreshListener(refreshLayout -> {
|
||||
Log.e("下拉刷新", "pps");
|
||||
index = 1;
|
||||
dataKey = true;
|
||||
timer = "";
|
||||
wr.orderList(index, 10, type);
|
||||
index=1;
|
||||
dataKey=true;
|
||||
timer="";
|
||||
wr.orderList(index,10,type);
|
||||
});
|
||||
sr.setOnLoadMoreListener(refreshLayout -> {
|
||||
Log.e("上拉加载", "次数" + index);
|
||||
if (dataKey) {
|
||||
Log.e("上拉加载", "次数"+index);
|
||||
if(dataKey){
|
||||
index++;
|
||||
wr.orderList(index, 10, type);
|
||||
} else {
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
wr.orderList(index,10,type);
|
||||
}else{
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
refreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
});
|
||||
sr.autoRefresh();
|
||||
}
|
||||
|
||||
class time {
|
||||
class time{
|
||||
|
||||
private String timer;
|
||||
|
||||
@ -362,16 +340,4 @@ public class OrderList4Fragment extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void refreshList(RefreshEvent event) {
|
||||
if (event.getType() == type) {
|
||||
sr.autoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.home.typelist;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@ -24,14 +21,12 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.BaseBean;
|
||||
import com.oneclouds.cargo.bean.WaybillListBean;
|
||||
import com.oneclouds.cargo.event.RefreshEvent;
|
||||
import com.oneclouds.cargo.request.OrderRequest;
|
||||
import com.oneclouds.cargo.request.WaybillRequest;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsActivity;
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsAllActivity;
|
||||
import com.oneclouds.cargo.ui.my.invoice.InvoiceCreateActivity;
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts;
|
||||
import com.oneclouds.cargo.ui.waybill.activity.AnotherOrderActivity;
|
||||
import com.oneclouds.cargo.util.ToastUtil;
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls;
|
||||
import com.oneclouds.cargo.util.adapter.ManyBean;
|
||||
@ -42,9 +37,6 @@ import com.oneclouds.cargo.util.view.BaseFragment;
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -58,8 +50,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList5Fragment extends BaseFragment {
|
||||
|
||||
// private int type=102005;
|
||||
private int type=200005;
|
||||
private int type=102005;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
@ -83,30 +74,24 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
sr.finishRefresh();
|
||||
sr.finishLoadMore();
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2+type)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2+type));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2+type),WaybillListBean.class);
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2),WaybillListBean.class);
|
||||
if(olb.getCode()==200){
|
||||
if(index==1){
|
||||
initData();
|
||||
}else{
|
||||
if(olb.getData().getList().size()==0){
|
||||
dataKey=false;
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
}else{
|
||||
addData();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ToastUtil.show(con,"加载失败");
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2+type);
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2);
|
||||
}
|
||||
//撤销
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con,"撤销成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
@ -117,7 +102,6 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con,"删除成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
@ -137,20 +121,30 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
|
||||
// private Button submit;
|
||||
private Button submit;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
root=inflater.inflate(R.layout.fragment_order_list,container,false);
|
||||
con=getContext();
|
||||
act=getActivity();
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
Log.e("type","-"+type+"-");
|
||||
wr=new WaybillRequest(con,hd);
|
||||
or=new OrderRequest(con,hd);
|
||||
order_brv=root.findViewById(R.id.order_brv);
|
||||
submit=root.findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
if(submit_map.size()>0){
|
||||
Intent in=new Intent(con, InvoiceCreateActivity.class);
|
||||
in.putExtra("list",gson.toJson(submit_map));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"请先选择需要开票的订单",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if(type==0 || type==102005){
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
}
|
||||
initRefreshLoad();
|
||||
initView(null);
|
||||
return root;
|
||||
@ -162,34 +156,6 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas=order_brv.creates(con,list);
|
||||
aas.setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout){
|
||||
@ -197,38 +163,21 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
WaybillListBean.DataDTO.ListDTO ld= (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn=v.findViewById(R.id.btn);
|
||||
ImageView state_img=v.findViewById(R.id.state_img);
|
||||
Button btnAgain=v.findViewById(R.id.btnAgain);
|
||||
btnAgain.setOnClickListener(v1->{
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in=new Intent(con, AnotherOrderActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
in.putExtra("type",type);
|
||||
startActivity(in);
|
||||
});
|
||||
ImageButton xuan=v.findViewById(R.id.xuan);
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in=new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
startActivity(in);
|
||||
});
|
||||
v.setOnLongClickListener(v13 -> {
|
||||
// 获取TextView中的文本
|
||||
String text = ld.getOrderNum();
|
||||
|
||||
// 获取剪切板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) con.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text+"复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (ld.getStatus()!=102005) {
|
||||
xuan.setVisibility(View.GONE);
|
||||
}else{
|
||||
if(ld.getMakeStatus()==107001){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_state);
|
||||
}else if(ld.getMakeStatus()==107002){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing);
|
||||
}else if(ld.getMakeStatus()==107003){
|
||||
@ -237,6 +186,34 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
xuan.setOnClickListener(v1 -> {
|
||||
if(ld.getStatus()==102005){
|
||||
if (keys.get(position)) {
|
||||
xuan.setImageResource(R.mipmap.no_xuan);
|
||||
keys.set(position,false);
|
||||
num--;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.remove(position);
|
||||
}else{
|
||||
xuan.setImageResource(R.mipmap.xuan);
|
||||
keys.set(position,true);
|
||||
num++;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.put(position,gson.toJson(o));
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"订单尚未完成无法开票",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||
if (ld.getStatus()>102002) {
|
||||
btn.setText("查看运单");
|
||||
@ -278,6 +255,33 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
});
|
||||
}
|
||||
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void addData(){
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for (WaybillListBean.DataDTO.ListDTO listDTO : olb.getData().getList()) {
|
||||
@ -289,7 +293,8 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
}
|
||||
lists.add(new ManyBean(listDTO,R.layout.order_item));
|
||||
}
|
||||
order_brv.adds(lists);
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//加载和刷新
|
||||
@ -332,16 +337,5 @@ public class OrderList5Fragment extends BaseFragment {
|
||||
}
|
||||
|
||||
}
|
||||
@Subscribe
|
||||
public void refreshList(RefreshEvent event){
|
||||
if (event.getType()==type){
|
||||
sr.autoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.home.typelist;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
@ -55,191 +52,185 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList6Fragment extends BaseFragment {
|
||||
|
||||
private int type = 102001;
|
||||
private int type=102001;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
private Gson gson = new Gson();
|
||||
private Gson gson=new Gson();
|
||||
private LinearLayout select_type;
|
||||
private List<Boolean> keys = new ArrayList<>();
|
||||
private Map<Integer, String> submit_map = new HashMap<>();
|
||||
private List<Boolean> keys=new ArrayList<>();
|
||||
private Map<Integer,String> submit_map=new HashMap<>();
|
||||
|
||||
private BaseRecyclerView order_brv;
|
||||
private int index = 1;
|
||||
private int num = 0;
|
||||
private boolean dataKey = true;
|
||||
private String timer = "";
|
||||
private int index=1;
|
||||
private int num=0;
|
||||
private boolean dataKey=true;
|
||||
private String timer="";
|
||||
private SmartRefreshLayout sr;
|
||||
|
||||
@Override
|
||||
public void msgMethod(Message m) {
|
||||
super.msgMethod(m);
|
||||
switch (m.what) {
|
||||
switch (m.what){
|
||||
case RequsetCodeConstants.SUCCESS:
|
||||
sr.finishRefresh();
|
||||
sr.finishLoadMore();
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type) != null) {
|
||||
Log.e("-list-", CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type));
|
||||
olb = gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2 + type), WaybillListBean.class);
|
||||
if (olb.getCode() == 200) {
|
||||
if (index == 1) {
|
||||
if (CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2)!=null) {
|
||||
Log.e("-list-",CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2));
|
||||
olb=gson.fromJson(CacheGroup.cacheList.get(WaybillRequest.WAYBILL_LIST_V2),WaybillListBean.class);
|
||||
if(olb.getCode()==200){
|
||||
if(index==1){
|
||||
initData();
|
||||
} else {
|
||||
if(olb.getData().getList().size()==0){
|
||||
dataKey=false;
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
}else{
|
||||
addData();
|
||||
}
|
||||
}else{
|
||||
ToastUtil.show(con,"加载失败");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(con, "加载失败");
|
||||
}
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2 + type);
|
||||
CacheGroup.cacheList.remove(WaybillRequest.WAYBILL_LIST_V2);
|
||||
}
|
||||
//撤销
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "撤销成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_REVOKE),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"撤销成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_REVOKE);
|
||||
}
|
||||
//删除
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "删除成功");
|
||||
} else {
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL)!=null) {
|
||||
BaseBean bb=gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL),BaseBean.class);
|
||||
if(bb.getCode()==200){
|
||||
ToastUtil.show(con,"删除成功");
|
||||
}else{
|
||||
ToastUtil.show(con,bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_DEL);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
//处理修改类型
|
||||
if (m.obj.equals("1")) {
|
||||
ToastUtil.show(con, "派单");
|
||||
} else {
|
||||
ToastUtil.show(con, "抢单");
|
||||
if(m.obj.equals("1")){
|
||||
ToastUtil.show(con,"派单");
|
||||
}else{
|
||||
ToastUtil.show(con,"抢单");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
||||
// private Button submit;
|
||||
private Button submit;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
root = inflater.inflate(R.layout.fragment_order_list, container, false);
|
||||
con = getContext();
|
||||
act = getActivity();
|
||||
Log.e("type", "-" + type + "-");
|
||||
wr = new WaybillRequest(con, hd);
|
||||
or = new OrderRequest(con, hd);
|
||||
order_brv = root.findViewById(R.id.order_brv);
|
||||
root=inflater.inflate(R.layout.fragment_order_list,container,false);
|
||||
con=getContext();
|
||||
act=getActivity();
|
||||
Log.e("type","-"+type+"-");
|
||||
wr=new WaybillRequest(con,hd);
|
||||
or=new OrderRequest(con,hd);
|
||||
order_brv=root.findViewById(R.id.order_brv);
|
||||
submit=root.findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
if(submit_map.size()>0){
|
||||
Intent in=new Intent(con, InvoiceCreateActivity.class);
|
||||
in.putExtra("list",gson.toJson(submit_map));
|
||||
startActivity(in);
|
||||
}else{
|
||||
Toast.makeText(con,"请先选择需要开票的订单",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if(type==0 || type==102005){
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
}
|
||||
initRefreshLoad();
|
||||
initView(null);
|
||||
return root;
|
||||
}
|
||||
|
||||
private AdapterAlls aas;
|
||||
private List<ManyBean> list = new ArrayList<>();
|
||||
private List<ManyBean> list=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void initView(Object obj) {
|
||||
super.initView(obj);
|
||||
|
||||
}
|
||||
|
||||
int sum = 0;
|
||||
|
||||
public void initData() {
|
||||
list.clear();
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
for (int i = 0; i < olb.getData().getList().size(); i++) {
|
||||
String str = olb.getData().getList().get(i).getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
}
|
||||
if (TypeParts.isEntrust(con)) {
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i), R.layout.order_item));
|
||||
}
|
||||
if (lists.size() == 0 && sum == 0) {
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""), R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas = order_brv.creates(con, list);
|
||||
aas=order_brv.creates(con,list);
|
||||
aas.setOnItemViewListener((position, o, v, layout) -> {
|
||||
switch (layout) {
|
||||
switch (layout){
|
||||
case R.layout.order_item:
|
||||
WaybillListBean.DataDTO.ListDTO ld = (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
LinearLayout llAgain = v.findViewById(R.id.llAgain);
|
||||
llAgain.setVisibility(View.GONE);
|
||||
WaybillListBean.DataDTO.ListDTO ld= (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn=v.findViewById(R.id.btn);
|
||||
ImageView state_img=v.findViewById(R.id.state_img);
|
||||
ImageButton xuan=v.findViewById(R.id.xuan);
|
||||
v.setOnClickListener(v12 -> {
|
||||
Intent in = new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id", ld.getOrderId());
|
||||
Intent in=new Intent(con, OrderDetailsAllActivity.class);
|
||||
in.putExtra("id",ld.getOrderId());
|
||||
startActivity(in);
|
||||
});
|
||||
v.setOnLongClickListener(v13 -> {
|
||||
// 获取TextView中的文本
|
||||
String text = ld.getOrderNum();
|
||||
|
||||
// 获取剪切板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) con.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text+"复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (ld.getMakeStatus() == 107001) {
|
||||
if (ld.getStatus()!=102005) {
|
||||
xuan.setVisibility(View.GONE);
|
||||
}else{
|
||||
if(ld.getMakeStatus()==107001){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_state);
|
||||
} else if (ld.getMakeStatus() == 107002) {
|
||||
}else if(ld.getMakeStatus()==107002){
|
||||
xuan.setVisibility(View.GONE);
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing);
|
||||
} else if (ld.getMakeStatus() == 107003) {
|
||||
}else if(ld.getMakeStatus()==107003){
|
||||
state_img.setVisibility(View.VISIBLE);
|
||||
state_img.setImageResource(R.mipmap.invoicing_no);
|
||||
} else {
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
xuan.setOnClickListener(v1 -> {
|
||||
if(ld.getStatus()==102005){
|
||||
if (keys.get(position)) {
|
||||
xuan.setImageResource(R.mipmap.no_xuan);
|
||||
keys.set(position,false);
|
||||
num--;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.remove(position);
|
||||
}else{
|
||||
xuan.setImageResource(R.mipmap.xuan);
|
||||
keys.set(position,true);
|
||||
num++;
|
||||
if(num>0){
|
||||
submit.setText("提交开票申请("+num+")");
|
||||
}else{
|
||||
submit.setText("提交开票申请");
|
||||
}
|
||||
submit_map.put(position,gson.toJson(o));
|
||||
}
|
||||
}else{
|
||||
Toast.makeText(con,"订单尚未完成无法开票",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
v.setTop(getResources().getDimensionPixelOffset(R.dimen.dp_10));
|
||||
if (ld.getStatus() > 102002) {
|
||||
if (ld.getStatus()>102002) {
|
||||
btn.setText("查看运单");
|
||||
}
|
||||
if (ld.getStatus() == 102001) {
|
||||
if(ld.getStatus()==102001){
|
||||
btn.setText("删除");
|
||||
}
|
||||
btn.setOnClickListener(v1 -> {
|
||||
if (ld.getStatus() > 102002) {
|
||||
Log.e("查看", "查看");
|
||||
Intent in = new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id", ld.getWaybillId());
|
||||
if(ld.getStatus()>102002){
|
||||
Log.e("查看","查看");
|
||||
Intent in=new Intent(con, OrderDetailsActivity.class);
|
||||
in.putExtra("id",ld.getWaybillId());
|
||||
startActivity(in);
|
||||
} else {
|
||||
if (ld.getStatus() == 102002) {
|
||||
}else{
|
||||
if(ld.getStatus()==102002){
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否撤销此订单?",
|
||||
@ -248,64 +239,90 @@ public class OrderList6Fragment extends BaseFragment {
|
||||
or.orderRevoke(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
} else {
|
||||
}else{
|
||||
new XPopup.Builder(getActivity())
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否删除此订单?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
Log.e("删除", "删除");
|
||||
Log.e("删除","删除");
|
||||
or.orderDelete(ld.getOrderId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addData() {
|
||||
List<ManyBean> lists = new ArrayList<>();
|
||||
int sum=0;
|
||||
public void initData(){
|
||||
list.clear();
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for(int i=0;i<olb.getData().getList().size();i++){
|
||||
String str=olb.getData().getList().get(i).getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
if(TypeParts.isEntrust(con)){
|
||||
olb.getData().getList().get(i).setTotalFreight("");
|
||||
}
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(olb.getData().getList().get(i),R.layout.order_item));
|
||||
}
|
||||
if(lists.size()==0 && sum==0){
|
||||
sum++;
|
||||
keys.add(false);
|
||||
lists.add(new ManyBean(new time(""),R.layout.item_null));
|
||||
}
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void addData(){
|
||||
List<ManyBean> lists=new ArrayList<>();
|
||||
for (WaybillListBean.DataDTO.ListDTO listDTO : olb.getData().getList()) {
|
||||
String str = listDTO.getCreateTime();
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM");
|
||||
if (!str.equals(timer)) {
|
||||
timer = str;
|
||||
lists.add(new ManyBean(new time(timer), R.layout.order_time));
|
||||
String str=listDTO.getCreateTime();
|
||||
str=Timer.formatChange(str,"yyyy-MM-dd HH:mm:ss","yyyy-MM");
|
||||
if(!str.equals(timer)){
|
||||
timer=str;
|
||||
lists.add(new ManyBean(new time(timer),R.layout.order_time));
|
||||
}
|
||||
lists.add(new ManyBean(listDTO, R.layout.order_item));
|
||||
lists.add(new ManyBean(listDTO,R.layout.order_item));
|
||||
}
|
||||
order_brv.adds(lists);
|
||||
list.addAll(lists);
|
||||
aas.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
//加载和刷新
|
||||
public void initRefreshLoad() {
|
||||
sr = root.findViewById(R.id.refreshLayout);
|
||||
public void initRefreshLoad(){
|
||||
sr =root.findViewById(R.id.refreshLayout);
|
||||
sr.setOnRefreshListener(refreshLayout -> {
|
||||
Log.e("下拉刷新", "pps");
|
||||
index = 1;
|
||||
dataKey = true;
|
||||
timer = "";
|
||||
wr.orderList(index, 10, type);
|
||||
index=1;
|
||||
dataKey=true;
|
||||
timer="";
|
||||
wr.orderList(index,10,type);
|
||||
});
|
||||
sr.setOnLoadMoreListener(refreshLayout -> {
|
||||
Log.e("上拉加载", "次数" + index);
|
||||
if (dataKey) {
|
||||
Log.e("上拉加载", "次数"+index);
|
||||
if(dataKey){
|
||||
index++;
|
||||
wr.orderList(index, 10, type);
|
||||
} else {
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
wr.orderList(index,10,type);
|
||||
}else{
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
refreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
});
|
||||
sr.autoRefresh();
|
||||
}
|
||||
|
||||
class time {
|
||||
class time{
|
||||
|
||||
private String timer;
|
||||
|
||||
|
||||
@ -1,229 +0,0 @@
|
||||
package com.oneclouds.cargo.ui.my
|
||||
|
||||
import android.os.Bundle
|
||||
import android.os.Message
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
import com.amap.api.maps.AMap
|
||||
import com.amap.api.maps.CameraUpdate
|
||||
import com.amap.api.maps.CameraUpdateFactory
|
||||
import com.amap.api.maps.CoordinateConverter
|
||||
import com.amap.api.maps.MapView
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory
|
||||
import com.amap.api.maps.model.CameraPosition
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.amap.api.maps.model.MarkerOptions
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.king.keyboard.KingKeyboard
|
||||
import com.oneclouds.cargo.R
|
||||
import com.oneclouds.cargo.request.AddressRequest
|
||||
import com.oneclouds.cargo.request.bean.CarLocaBean
|
||||
import com.oneclouds.cargo.util.cache.CacheGroup
|
||||
import com.oneclouds.cargo.util.titleutil.StateStyleUtil
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.btnSearch
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.etCar
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.keyboardParent
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.llContent
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.map
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.tvCarDate
|
||||
import kotlinx.android.synthetic.main.activity_check_car_loca.tvCarLoca
|
||||
import kotlinx.android.synthetic.main.assembly_title_block.return_btn
|
||||
import kotlinx.android.synthetic.main.assembly_title_block.title_view
|
||||
import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
|
||||
/**
|
||||
* @ClassName CheckCarLocActivity
|
||||
* @Author john
|
||||
* @Date 2024/8/21 08:40
|
||||
* @Description TODO
|
||||
*/
|
||||
class CheckCarLocActivity : BaseActivity() {
|
||||
|
||||
private lateinit var kingKeyboard: KingKeyboard
|
||||
private lateinit var addressRequest: AddressRequest
|
||||
|
||||
|
||||
override fun msgMethod(m: Message) {
|
||||
super.msgMethod(m)
|
||||
when (m.what) {
|
||||
200 -> if (CacheGroup.cacheList["getcarlocation"] != null) {
|
||||
val type = object : TypeToken<CommonResponseBean<CarLocaBean?>?>() {}.type
|
||||
val u: CommonResponseBean<CarLocaBean> =
|
||||
Gson().fromJson<CommonResponseBean<CarLocaBean>>(
|
||||
CacheGroup.cacheList["getcarlocation"],
|
||||
type
|
||||
)
|
||||
val data = u.data
|
||||
dealData(data)
|
||||
CacheGroup.cacheList.remove(CacheGroup.cacheList["getcarlocation"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var ZHONGGUANCUN = LatLng(39.983456, 116.3154950) // 北京市中关村经纬度
|
||||
|
||||
|
||||
private var aMap: AMap? = null
|
||||
override fun getLayout() = R.layout.activity_check_car_loca
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
StateStyleUtil.stateTextColor(this)
|
||||
addressRequest = AddressRequest(mContext, hd)
|
||||
title_view.text = "查看位置"
|
||||
return_btn.setOnClickListener { finish() }
|
||||
map.onCreate(savedInstanceState)
|
||||
init(map)
|
||||
|
||||
kingKeyboard = KingKeyboard(this, keyboardParent)
|
||||
kingKeyboard.register(etCar, KingKeyboard.KeyboardType.LICENSE_PLATE_PROVINCE)
|
||||
|
||||
|
||||
btnSearch.setOnClickListener {
|
||||
val toString = etCar.text.toString()
|
||||
if (TextUtils.isEmpty(toString)) {
|
||||
ToastUtils.showToast(mContext, "请输入车牌号")
|
||||
return@setOnClickListener
|
||||
}
|
||||
addressRequest.getCarLoca(toString)
|
||||
// DataManager.getInstance().getCarPositioning("豫RWC376")
|
||||
// .compose(DataManager.setThread())
|
||||
// .subscribe(BaseObserver(mContext,object : RxHttpCallBack<CarLocaBean>(){
|
||||
// override fun onSuccess(t: CommonResponseBean<CarLocaBean>?) {
|
||||
// super.onSuccess(t)
|
||||
// }
|
||||
// }))
|
||||
|
||||
// XPopup.Builder(mContext)
|
||||
// .hasShadowBg(false)
|
||||
//// .moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面
|
||||
//// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
// // .isThreeDrag(true) //是否开启三阶拖拽,如果设置enableDrag(false)则无效
|
||||
// .asCustom(ZhihuCommentPopup(mContext,CarLocaBean("安徽省滁州市明光市夏桥,西南方向,463.9米","豫RWC376","2024-08-21 10:33:38",0.0,0.0)))
|
||||
// .show()
|
||||
|
||||
|
||||
// changeCamera(
|
||||
// CameraUpdateFactory.newCameraPosition(
|
||||
// CameraPosition(
|
||||
// ZHONGGUANCUN, 16f, 30f, 30f
|
||||
// )
|
||||
// )
|
||||
// )
|
||||
// Handler().postDelayed({
|
||||
// changeCamera(CameraUpdateFactory.scrollBy(0f , 150f))
|
||||
// }, 2000)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
|
||||
}
|
||||
|
||||
private fun dealData(data: CarLocaBean?) {
|
||||
kingKeyboard.hide()
|
||||
if (data == null) {
|
||||
ToastUtils.showToast(mContext, "未查到该车辆位置信息,请确认车牌号是否正确")
|
||||
return
|
||||
}
|
||||
|
||||
val lat = BigDecimal(data.lat).setScale(5, RoundingMode.HALF_UP)
|
||||
.divide(BigDecimal(600000), RoundingMode.HALF_UP).toDouble()
|
||||
|
||||
val lon = BigDecimal(data.lon).setScale(5, RoundingMode.HALF_UP)
|
||||
.divide(BigDecimal(600000), RoundingMode.HALF_UP).toDouble()
|
||||
|
||||
//gws84转高德经纬度
|
||||
val converter = CoordinateConverter(mContext)
|
||||
converter.from(CoordinateConverter.CoordType.GPS)
|
||||
converter.coord(LatLng(lat, lon))
|
||||
val desLatLng: LatLng = converter.convert()
|
||||
|
||||
ZHONGGUANCUN = desLatLng
|
||||
changeCamera(
|
||||
CameraUpdateFactory.newCameraPosition(
|
||||
CameraPosition(
|
||||
ZHONGGUANCUN, 16f, 0f, 0f
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
llContent.visibility = View.VISIBLE
|
||||
tvCarLoca.text = data.adr
|
||||
tvCarDate.text = data.utc
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化AMap对象
|
||||
*/
|
||||
private fun init(mapView: MapView) {
|
||||
if (aMap == null) {
|
||||
aMap = mapView.map
|
||||
val uiSettings = aMap?.uiSettings
|
||||
uiSettings?.run {
|
||||
isCompassEnabled = true
|
||||
isRotateGesturesEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法必须重写
|
||||
*/
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
map.onResume()
|
||||
kingKeyboard.onResume()
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法必须重写
|
||||
*/
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
map.onPause()
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法必须重写
|
||||
*/
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
map.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法必须重写
|
||||
*/
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
map.onDestroy()
|
||||
kingKeyboard.onDestroy()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据动画按钮状态,调用函数animateCamera或moveCamera来改变可视区域
|
||||
*/
|
||||
private fun changeCamera(update: CameraUpdate) {
|
||||
aMap?.run {
|
||||
animateCamera(update, 1000, null);
|
||||
//添加mark
|
||||
clear()
|
||||
addMarker(
|
||||
MarkerOptions().position(ZHONGGUANCUN)
|
||||
.icon(
|
||||
BitmapDescriptorFactory.fromResource(R.drawable.icon_gua)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,5 @@
|
||||
package com.oneclouds.cargo.ui.my;
|
||||
|
||||
import static com.oneclouds.cargo.request.AddressRequest.COMPANY_SAVE;
|
||||
import static com.oneclouds.cargo.request.PublicRequest.USER_DATA;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
@ -20,15 +16,11 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
import com.dahe.mylibrary.utils.ToastUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.bean.UserBean;
|
||||
import com.oneclouds.cargo.constant.SPConstant;
|
||||
import com.oneclouds.cargo.request.PublicRequest;
|
||||
import com.oneclouds.cargo.request.manager.UrlManager;
|
||||
import com.oneclouds.cargo.ui.WebActivity;
|
||||
|
||||
import com.oneclouds.cargo.ui.home.OrderListActivity;
|
||||
@ -36,21 +28,11 @@ import com.oneclouds.cargo.ui.my.auth.MyAuthActivity;
|
||||
import com.oneclouds.cargo.ui.my.invoice.InvoiceActivity;
|
||||
import com.oneclouds.cargo.ui.parts.ConfigParts;
|
||||
import com.oneclouds.cargo.ui.parts.UserParts;
|
||||
import com.oneclouds.cargo.util.MapUtil;
|
||||
import com.oneclouds.cargo.util.SPUtil;
|
||||
import com.oneclouds.cargo.util.StringUtil;
|
||||
|
||||
import com.oneclouds.cargo.util.cache.CacheGroup;
|
||||
import com.oneclouds.cargo.util.http.OkDate;
|
||||
import com.oneclouds.cargo.util.http.OkHttpUtil;
|
||||
import com.oneclouds.cargo.util.http.RequestTest;
|
||||
import com.oneclouds.cargo.util.view.BaseFragment;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.Request;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
@ -69,15 +51,15 @@ public class MyFragment extends BaseFragment {
|
||||
super.msgMethod(m);
|
||||
switch (m.what){
|
||||
case 200:
|
||||
if(CacheGroup.cacheList.get(USER_DATA)!=null){
|
||||
if(CacheGroup.cacheList.get(PublicRequest.USER_DATA)!=null){
|
||||
refreshLayout.finishRefresh();
|
||||
UserBean u=gson.fromJson(CacheGroup.cacheList.get(USER_DATA),UserBean.class);
|
||||
UserBean u=gson.fromJson(CacheGroup.cacheList.get(PublicRequest.USER_DATA),UserBean.class);
|
||||
if (ub.getCode()==200) {
|
||||
ub=u;
|
||||
UserParts.setUser(con,ub);
|
||||
initAuth();
|
||||
}
|
||||
CacheGroup.cacheList.remove(CacheGroup.cacheList.get(USER_DATA));
|
||||
CacheGroup.cacheList.remove(CacheGroup.cacheList.get(PublicRequest.USER_DATA));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -112,7 +94,7 @@ public class MyFragment extends BaseFragment {
|
||||
|
||||
|
||||
private LinearLayout onGetUser,onAllOrder,onAuth,onDriverHome;
|
||||
private ImageView onContact,onOpinion,onUpdate,onSetUp,onSeeLocation;
|
||||
private ImageView onContact,onOpinion,onUpdate,onSetUp;
|
||||
private TextView name,phone;
|
||||
private ImageView dang_auth,no_auth,name_auth;
|
||||
private LinearLayout auth_box;
|
||||
@ -135,7 +117,6 @@ public class MyFragment extends BaseFragment {
|
||||
onOpinion=root.findViewById(R.id.onOpinion);
|
||||
onUpdate=root.findViewById(R.id.onUpdate);
|
||||
onSetUp=root.findViewById(R.id.onSetUp);
|
||||
onSeeLocation=root.findViewById(R.id.onSeeLocation);
|
||||
img_head=root.findViewById(R.id.img_head);
|
||||
//
|
||||
ll_type_1=root.findViewById(R.id.ll_type_1);
|
||||
@ -186,8 +167,8 @@ public class MyFragment extends BaseFragment {
|
||||
serviceMobile=ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
||||
serviceMobile=StringUtil.isNull(serviceMobile,"");
|
||||
}
|
||||
String[] title={"平台客服:"+serviceMobile};
|
||||
String[] value={serviceMobile};
|
||||
String[] title={"平台客服:"+serviceMobile,"银行客服:95528","技术咨询:13460042961"};
|
||||
String[] value={serviceMobile,"95528","13460042961"};
|
||||
new XPopup.Builder(con)
|
||||
.isDarkTheme(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
@ -216,14 +197,6 @@ public class MyFragment extends BaseFragment {
|
||||
in.putExtra("url",url);
|
||||
startActivity(in);
|
||||
});
|
||||
|
||||
onSeeLocation.setOnClickListener(v->{
|
||||
ActivityUtils.startActivity(con,CheckCarLocActivity.class);
|
||||
});
|
||||
}
|
||||
|
||||
public String getToken(Context con) {
|
||||
return SPUtil.getSP(con, SPConstant.DATA,SPConstant.DATA_TOKEN);
|
||||
}
|
||||
|
||||
public void initAuth(){
|
||||
|
||||
@ -120,8 +120,8 @@ public class SetupActivity extends BaseActivity {
|
||||
startActivity(in);
|
||||
});
|
||||
r6.setOnClickListener(v12 -> {
|
||||
String[] title={"平台客服:"+kefu};
|
||||
String[] value={kefu};
|
||||
String[] title={"平台客服:"+kefu,"银行客服:02195528","技术咨询:13460042961"};
|
||||
String[] value={kefu,"02195528","13460042961"};
|
||||
new XPopup.Builder(con)
|
||||
.isDarkTheme(false)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
|
||||
@ -5,9 +5,7 @@ import android.content.Context;
|
||||
import com.google.gson.Gson;
|
||||
import com.oneclouds.cargo.bean.AlGoodsTypeListBean;
|
||||
import com.oneclouds.cargo.bean.BusinssTypeBean;
|
||||
import com.oneclouds.cargo.bean.CarShortTypeBean;
|
||||
import com.oneclouds.cargo.bean.CarTypeLongBean;
|
||||
import com.oneclouds.cargo.bean.GoodsTypeBean;
|
||||
import com.oneclouds.cargo.bean.NpListBean;
|
||||
import com.oneclouds.cargo.bean.PackNameBean;
|
||||
import com.oneclouds.cargo.constant.SPConstant;
|
||||
@ -64,35 +62,6 @@ public class TypeParts {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//车型车长
|
||||
public static CarShortTypeBean getCarTypeShort(Context con){
|
||||
String str=SPUtil.getSP(con,"chacheData", OrderRequest.ORDER_CAR_TYPE_AND_CAR);
|
||||
if(!str.equals("")){
|
||||
CarShortTypeBean ctlb=gson.fromJson(str, CarShortTypeBean.class);
|
||||
if(ctlb.getCode()==200){
|
||||
return ctlb;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//货物大类-汇总(交通厅安联)
|
||||
public static GoodsTypeBean getGoodsTypeShort(Context con){
|
||||
String str=SPUtil.getSP(con,"chacheData", OrderRequest.ORDER_CAR_TYPE_AND_GOODS_TYPE);
|
||||
if(!str.equals("")){
|
||||
GoodsTypeBean ctlb=gson.fromJson(str, GoodsTypeBean.class);
|
||||
if(ctlb.getCode()==200){
|
||||
return ctlb;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//业务类型
|
||||
public static BusinssTypeBean getBusType(Context con){
|
||||
String str=SPUtil.getSP(con,"chacheData", OrderRequest.ORDER_BUSINESS_TYPE_LIST);
|
||||
|
||||
@ -45,7 +45,7 @@ public class WalletFragment extends BaseFragment {
|
||||
private BankCardListBean bcb;
|
||||
private PublicRequest pr;
|
||||
private ContractsBean cb;
|
||||
private TextView account,waybillNum,freight;
|
||||
private TextView account;
|
||||
private Gson gson=new Gson();
|
||||
private boolean iscon=false;
|
||||
public static UserBean userBean;
|
||||
@ -143,8 +143,7 @@ public class WalletFragment extends BaseFragment {
|
||||
Log.e("下拉刷新","pps");
|
||||
pr.getBankCardList();
|
||||
pr.getContracts();
|
||||
// pr.getUserInfo();
|
||||
pr.getWalletInfo();
|
||||
pr.getUserInfo();
|
||||
});
|
||||
refreshLayout.autoRefresh();
|
||||
}
|
||||
@ -165,8 +164,6 @@ public class WalletFragment extends BaseFragment {
|
||||
bank_number=root.findViewById(R.id.bank_number);
|
||||
bank2_number=root.findViewById(R.id.bank2_number);
|
||||
tixian=root.findViewById(R.id.tixian);
|
||||
freight=root.findViewById(R.id.freight);
|
||||
waybillNum=root.findViewById(R.id.waybillNum);
|
||||
explain=root.findViewById(R.id.explain);
|
||||
orderAll=root.findViewById(R.id.orderAll);
|
||||
bank_remove=root.findViewById(R.id.bank_remove);
|
||||
@ -216,8 +213,6 @@ public class WalletFragment extends BaseFragment {
|
||||
public void initUser(){
|
||||
if(userBean.getData()!=null){
|
||||
account.setText(StringUtil.isNull(userBean.getData().getAccount(),"0"));
|
||||
waybillNum.setText(StringUtil.isNull(userBean.getData().getOrderNum()+"","0"));;
|
||||
freight.setText(StringUtil.isNull(userBean.getData().getFreight(),"0"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
package com.oneclouds.cargo.ui.waybill
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import com.dahe.mylibrary.base.BaseFragment
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.oneclouds.cargo.R
|
||||
import com.oneclouds.cargo.ui.home.OrderListActivity
|
||||
import com.oneclouds.cargo.ui.home.typelist.*
|
||||
import com.oneclouds.cargo.ui.parts.UserParts
|
||||
import com.oneclouds.cargo.ui.waybill.activity.SearchWaybillActivity
|
||||
import com.xuexiang.xui.widget.tabbar.TabSegment
|
||||
import kotlinx.android.synthetic.main.fragment_waybill_list.*
|
||||
import kotlinx.android.synthetic.main.order_list_top.*
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
|
||||
/**
|
||||
* @ClassName WayBillsFragment
|
||||
* @Author 用户
|
||||
* @Date 2022/9/1 9:26
|
||||
* @Description TODO
|
||||
*/
|
||||
class WayBillsFragment : BaseFragment() {
|
||||
var list = mutableListOf<Fragment>()
|
||||
private val titles = arrayOf("全部", "待调度", "已装货", "已卸货", "待结算")
|
||||
|
||||
override fun getContentViewLayoutID() = R.layout.fragment_waybill_list
|
||||
|
||||
override fun onFragmentVisibleChange(isVisible: Boolean) {
|
||||
|
||||
}
|
||||
|
||||
override fun onFragmentFirstVisible() {
|
||||
val user = UserParts.getUser(activity)
|
||||
waybillNum.text = user.data.waybillNum.toString()
|
||||
distance.text = user.data.distance.toString()
|
||||
freight.text = user.data.freight.toString()
|
||||
|
||||
|
||||
list.add(OrderList1Fragment())
|
||||
list.add(OrderList2Fragment())
|
||||
list.add(OrderList3Fragment())
|
||||
list.add(OrderList4Fragment())
|
||||
list.add(OrderList5Fragment())
|
||||
for (page in titles) {
|
||||
tabSegment.addTab(TabSegment.Tab(page))
|
||||
}
|
||||
|
||||
vp.adapter = MyAdapter(this.fragmentManager)
|
||||
tabSegment.setupWithViewPager(vp, false)
|
||||
tabSegment.setMode(TabSegment.MODE_FIXED)
|
||||
|
||||
tvSearch.setOnClickListener {
|
||||
ActivityUtils.startActivity(mContext, SearchWaybillActivity::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
inner class MyAdapter(fm: FragmentManager?) :
|
||||
FragmentPagerAdapter(fm!!) {
|
||||
override fun getItem(position: Int): Fragment {
|
||||
return list.get(position)
|
||||
}
|
||||
|
||||
override fun getCount(): Int {
|
||||
return list.size
|
||||
}
|
||||
|
||||
//重写这个方法,将设置每个Tab的标题
|
||||
override fun getPageTitle(position: Int): CharSequence? {
|
||||
return titles.get(position)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,756 +0,0 @@
|
||||
package com.oneclouds.cargo.ui.waybill.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.TimeConstants
|
||||
import com.dahe.mylibrary.utils.TimeUtil
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker
|
||||
import com.github.gzuliyujiang.wheelpicker.DatimePicker
|
||||
import com.github.gzuliyujiang.wheelpicker.OptionPicker
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode
|
||||
import com.github.gzuliyujiang.wheelpicker.annotation.TimeMode
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DatimeEntity
|
||||
import com.google.gson.Gson
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.oneclouds.cargo.R
|
||||
import com.oneclouds.cargo.base.AppConfig
|
||||
import com.oneclouds.cargo.bean.*
|
||||
import com.oneclouds.cargo.event.AddressEvent
|
||||
import com.oneclouds.cargo.event.BaseEvent
|
||||
import com.oneclouds.cargo.event.GoodsEvent
|
||||
import com.oneclouds.cargo.event.RefreshEvent
|
||||
import com.oneclouds.cargo.request.bean.CommonBodyBean
|
||||
import com.oneclouds.cargo.request.bean.OrderInputBean
|
||||
import com.oneclouds.cargo.request.bean.OrderInputBean.PutTableDataDTO
|
||||
import com.oneclouds.cargo.request.bean.OrderInputBean.SendTableDataDTO
|
||||
import com.oneclouds.cargo.request.net.BaseObserver
|
||||
import com.oneclouds.cargo.request.net.DataManager
|
||||
import com.oneclouds.cargo.request.net.RxHttpCallBack
|
||||
import com.oneclouds.cargo.ui.LoginActivity
|
||||
import com.oneclouds.cargo.ui.UiAuxiliary
|
||||
import com.oneclouds.cargo.ui.home.DisCarActivity
|
||||
import com.oneclouds.cargo.ui.home.GoodsActivity
|
||||
import com.oneclouds.cargo.ui.home.GoodsDischargeActivity
|
||||
import com.oneclouds.cargo.ui.my.AddressActivity
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts
|
||||
import com.oneclouds.cargo.ui.parts.UserParts
|
||||
import com.oneclouds.cargo.util.StringUtil
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAll
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls
|
||||
import com.oneclouds.cargo.util.adapter.ManyBean
|
||||
import com.oneclouds.cargo.util.view.BaseRecyclerView
|
||||
import com.oneclouds.cargo.weight.RecyclerViewDecoration
|
||||
import kotlinx.android.synthetic.main.activity_anohter_order.*
|
||||
import kotlinx.android.synthetic.main.item_node_pretend.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* @ClassName AnotherOrderActivity
|
||||
* @Author 用户
|
||||
* @Date 2022/9/1 10:34
|
||||
* @Description TODO
|
||||
*/
|
||||
class AnotherOrderActivity : BaseActivity() {
|
||||
lateinit var tvName: TextView
|
||||
lateinit var tvNameDis: TextView
|
||||
lateinit var tvPhone: TextView
|
||||
lateinit var tvPhoneDis: TextView
|
||||
lateinit var tvAddress: TextView
|
||||
lateinit var tvAddressDis: TextView
|
||||
lateinit var tvStartTime: TextView //装货有效期
|
||||
lateinit var etMoney: EditText
|
||||
lateinit var tvEndTimeDis: TextView//卸货有效期
|
||||
lateinit var ryPretend: BaseRecyclerView
|
||||
lateinit var ryDis: BaseRecyclerView
|
||||
|
||||
private var goodsType = 0 //0装 1卸
|
||||
private var updatePosGoods = -1
|
||||
private var updatePosGoodsDis = -1
|
||||
var gson = Gson()
|
||||
|
||||
|
||||
private var oib = OrderInputBean(OrderInputBean.FormDataDTO(),
|
||||
mutableListOf<PutTableDataDTO>(),
|
||||
mutableListOf<SendTableDataDTO>())
|
||||
|
||||
|
||||
override fun getLayout() = R.layout.activity_anohter_order
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.color_theme)
|
||||
setTitleBar("再来一单") { finish() }
|
||||
EventBus.getDefault().register(this)
|
||||
initRe()
|
||||
initListener()
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
val waybillId = getIntent().getExtras()?.getInt("id")
|
||||
waybillId?.let {
|
||||
DataManager.getInstance()
|
||||
.waybillDetail2(CommonBodyBean().apply { id = waybillId.toString() })
|
||||
.compose(DataManager.setThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<OrderInputBean>() {
|
||||
override fun onSuccess(t: CommonResponseBean<OrderInputBean>) {
|
||||
super.onSuccess(t)
|
||||
oib = t.data
|
||||
initRe()
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
fun initRe() {
|
||||
val list: MutableList<ManyBean> = ArrayList()
|
||||
list.add(ManyBean(AddressBean(), R.layout.item_node_pretend))
|
||||
list.add(ManyBean(AddressBean(), R.layout.item_node_dis))
|
||||
rv.creates(this, list)
|
||||
.setOnItemViewListener(AdapterAlls.onItemViewListenter { position: Int, o: Any, v: View, layout: Int ->
|
||||
when (layout) {
|
||||
R.layout.item_node_pretend -> initPretend(position, v)
|
||||
R.layout.item_node_dis -> initDis(position, v)
|
||||
}
|
||||
})
|
||||
if (!TextUtils.isEmpty(oib.formData.effectiveTime)) {
|
||||
val ctb = TypeParts.getCarTypeLong(this)//车辆类型
|
||||
val bb = TypeParts.getBusType(this)//车长
|
||||
val nb = TypeParts.getNpType(this)//货物大类-交通厅
|
||||
val ab = TypeParts.getAlType(this)//货物大类-安联
|
||||
vehicle_type.text = ctb.data.type.find { it.value == oib.formData.vehicleType }?.name
|
||||
vehicle_length.text =
|
||||
ctb.data.length.find { it.value == oib.formData.vehicleLength }?.name
|
||||
businessType.text = bb.data.find { it.value == oib.formData.businessType }?.name
|
||||
tvHwdlJt.text = nb.data.find { it.id == oib.formData.goodsBigCate }?.cateName
|
||||
tvHwdlAl.text = ab.data.find { it.id == oib.formData.alctGoodsType }?.name
|
||||
effectiveTime.text = oib.formData.effectiveTime
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化卸货
|
||||
*
|
||||
* @param position
|
||||
* @param o
|
||||
* @param v
|
||||
* @param layout
|
||||
*/
|
||||
private fun initDis(position: Int, v: View) {
|
||||
if (oib.putTableData.size == 0) {
|
||||
return
|
||||
}
|
||||
val rlTopDis = v.findViewById<RelativeLayout>(R.id.rlTopDis)
|
||||
tvNameDis = v.findViewById<TextView>(R.id.tvName)
|
||||
tvPhoneDis = v.findViewById<TextView>(R.id.tvPhone)
|
||||
tvAddressDis = v.findViewById<TextView>(R.id.tvAddress)
|
||||
val tvAddDis = v.findViewById<TextView>(R.id.tvAddDis)
|
||||
tvEndTimeDis = v.findViewById<TextView>(R.id.tvEndTime)
|
||||
ryDis = v.findViewById<BaseRecyclerView>(R.id.ryDis)
|
||||
ryDis.addItemDecoration(RecyclerViewDecoration(this, RecyclerViewDecoration.VERTICAL_LIST))
|
||||
ryDis.createV(this,
|
||||
ArrayList<OrderInputBean.PutTableDataDTO.GoodsDTO>(),
|
||||
R.layout.item_cargo)
|
||||
.setOnItemViewListener(
|
||||
AdapterAll.onItemViewListenter { position1: Int, o1: Any?, v1: View ->
|
||||
val tvHWName = v1.findViewById<TextView>(R.id.tvHWName)
|
||||
val tvCount = v1.findViewById<TextView>(R.id.tvCount)
|
||||
val tvDw = v1.findViewById<TextView>(R.id.tvDw)
|
||||
val tvBzfs = v1.findViewById<TextView>(R.id.tvBzfs)
|
||||
val tvDel = v1.findViewById<TextView>(R.id.tvDel)
|
||||
// OrderInputBean.PutTableDataDTO.GoodsDTO osg1 = (OrderInputBean.PutTableDataDTO.GoodsDTO) o1;
|
||||
val osg1: OrderInputBean.PutTableDataDTO.GoodsDTO =
|
||||
oib.putTableData.get(0).getGoods().get(position1)
|
||||
tvHWName.text = osg1.name
|
||||
tvCount.text = osg1.num
|
||||
tvDw.text = osg1.unit
|
||||
tvBzfs.text = osg1.packName
|
||||
v1.setOnClickListener { v2: View? ->
|
||||
goodsType = 1
|
||||
updatePosGoodsDis = position1
|
||||
val `in` = Intent(this, GoodsDischargeActivity::class.java)
|
||||
`in`.putExtra("goodData", gson.toJson(oib))
|
||||
`in`.putExtra("choiceData",
|
||||
gson.toJson(oib.putTableData.get(0).goods.get(position1)))
|
||||
startActivity(`in`)
|
||||
}
|
||||
tvDel.setOnClickListener { v22: View? ->
|
||||
oib.putTableData.get(0).goods.remove(osg1)
|
||||
ryDis.delItemV(position1)
|
||||
}
|
||||
})
|
||||
|
||||
val putTableDataDTO = oib.putTableData.get(0)
|
||||
tvNameDis.text = putTableDataDTO.loadingName
|
||||
tvPhoneDis.text = putTableDataDTO.loadingPhone
|
||||
tvAddressDis.text = putTableDataDTO.detailAddress
|
||||
// tvEndTimeDis.text = putTableDataDTO.loadingDeadline
|
||||
ryDis.notifyDatas(putTableDataDTO.getGoods())
|
||||
|
||||
rlTopDis.setOnClickListener { v12: View? ->
|
||||
val `in` = Intent(this, AddressActivity::class.java)
|
||||
`in`.putExtra("type", 1)
|
||||
startActivity(`in`)
|
||||
}
|
||||
tvAddDis.setOnClickListener { V: View? ->
|
||||
if (oib.getSendTableData().get(0).getGoods() != null && oib.getSendTableData().get(0)
|
||||
.getGoods().size > 0
|
||||
) {
|
||||
goodsType = 1
|
||||
val `in` = Intent(this, GoodsDischargeActivity::class.java)
|
||||
`in`.putExtra("goodData", gson.toJson(oib))
|
||||
startActivity(`in`)
|
||||
} else {
|
||||
Toast.makeText(this, "请先添加装货信息", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
tvEndTimeDis.setOnClickListener(View.OnClickListener { V: View? ->
|
||||
val ap = DatimePicker(this)
|
||||
val wheelLayout = ap.wheelLayout
|
||||
ap.setOnDatimePickedListener { year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int ->
|
||||
val text =
|
||||
year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(
|
||||
minute)
|
||||
oib.putTableData.get(0).setLoadingDeadline(text)
|
||||
tvEndTimeDis.setText(text)
|
||||
}
|
||||
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
||||
wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND)
|
||||
wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10))
|
||||
wheelLayout.setDateLabel("年", "月", "日")
|
||||
wheelLayout.setTimeLabel("时", "分", "")
|
||||
ap.show()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 装货初始化
|
||||
*
|
||||
* @param position
|
||||
* @param o
|
||||
* @param v
|
||||
* @param layout
|
||||
*/
|
||||
private fun initPretend(position: Int, v: View) {
|
||||
if (oib.sendTableData.size == 0) {
|
||||
return
|
||||
}
|
||||
|
||||
tvName = v.findViewById<TextView>(R.id.tvName)
|
||||
tvPhone = v.findViewById<TextView>(R.id.tvPhone)
|
||||
tvAddress = v.findViewById<TextView>(R.id.tvAddress)
|
||||
etMoney = v.findViewById<EditText>(R.id.etMoney)
|
||||
tvStartTime = v.findViewById<TextView>(R.id.tvStartTime)
|
||||
val tvAddPre = v.findViewById<TextView>(R.id.tvAddPre)
|
||||
val rlTop = v.findViewById<RelativeLayout>(R.id.rlTop)
|
||||
ryPretend = v.findViewById<BaseRecyclerView>(R.id.ryPretend)
|
||||
|
||||
|
||||
val sendTableDataDTO = oib.sendTableData.get(0)
|
||||
tvName.text = sendTableDataDTO.loadingName
|
||||
tvPhone.text = sendTableDataDTO.loadingPhone
|
||||
tvAddress.text = sendTableDataDTO.detailAddress
|
||||
// tvStartTime.text = sendTableDataDTO.loadingDeadline
|
||||
// etMoney.setText(sendTableDataDTO.totalFreight)
|
||||
|
||||
|
||||
val nowString = TimeUtil.getNowString("yyyy-MM-dd") + " " + getRead(23) + ":" + getRead(59)
|
||||
oib.sendTableData[0].loadingDeadline = nowString
|
||||
tvStartTime.text = nowString
|
||||
|
||||
|
||||
//卸货截止日期
|
||||
val endDate = TimeUtil.getString(
|
||||
nowString,
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),
|
||||
14400,
|
||||
TimeConstants.MIN
|
||||
)
|
||||
oib.putTableData[0].loadingDeadline = endDate
|
||||
|
||||
|
||||
//订单有效期根据装货截止时间延长15天
|
||||
val waybillEndDate = TimeUtil.getString(
|
||||
nowString,
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),
|
||||
21600,
|
||||
TimeConstants.MIN
|
||||
)
|
||||
effectiveTime.text = waybillEndDate
|
||||
oib.formData.effectiveTime = waybillEndDate
|
||||
|
||||
|
||||
rlTop.setOnClickListener { v12: View? ->
|
||||
val `in` = Intent(this, AddressActivity::class.java)
|
||||
`in`.putExtra("type", 0)
|
||||
startActivity(`in`)
|
||||
}
|
||||
tvAddPre.setOnClickListener { V: View? ->
|
||||
goodsType = 0
|
||||
val `in` = Intent(this, GoodsActivity::class.java)
|
||||
startActivity(`in`)
|
||||
}
|
||||
tvStartTime.setOnClickListener(View.OnClickListener { V: View? ->
|
||||
// val ap = DatimePicker(this)
|
||||
// val wheelLayout = ap.wheelLayout
|
||||
// ap.setOnDatimePickedListener { year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int ->
|
||||
// val text =
|
||||
// year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(hour) + ":" + getRead(
|
||||
// minute)
|
||||
// oib.sendTableData.get(0).setLoadingDeadline(text)
|
||||
// tvStartTime.setText(text)
|
||||
// }
|
||||
// wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
||||
// wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND)
|
||||
// wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10))
|
||||
// wheelLayout.setDateLabel("年", "月", "日")
|
||||
// wheelLayout.setTimeLabel("时", "分", "")
|
||||
// ap.show()
|
||||
|
||||
val ap = DatePicker(this)
|
||||
val wheelLayout = ap.wheelLayout
|
||||
ap.setOnDatePickedListener { year: Int, month: Int, day: Int ->
|
||||
val text =
|
||||
year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(23) + ":" + getRead(
|
||||
59
|
||||
)
|
||||
oib.sendTableData[0].loadingDeadline = text
|
||||
tvStartTime.text = text
|
||||
|
||||
//卸货截止日期
|
||||
val endDate = TimeUtil.getString(
|
||||
text,
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),
|
||||
14400,
|
||||
TimeConstants.MIN
|
||||
)
|
||||
oib.putTableData[0].loadingDeadline = endDate
|
||||
tvEndTimeDis.text = endDate
|
||||
|
||||
//订单有效期根据装货截止时间延长15天
|
||||
val waybillEndDate = TimeUtil.getString(
|
||||
text,
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()),
|
||||
21600,
|
||||
TimeConstants.MIN
|
||||
)
|
||||
effectiveTime.text = waybillEndDate
|
||||
oib.formData.effectiveTime = waybillEndDate
|
||||
}
|
||||
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
||||
wheelLayout.setRange(DateEntity.today(), DateEntity.yearOnFuture(10))
|
||||
wheelLayout.setDateLabel("年", "月", "日")
|
||||
ap.show()
|
||||
|
||||
})
|
||||
ryPretend.addItemDecoration(RecyclerViewDecoration(this,
|
||||
RecyclerViewDecoration.VERTICAL_LIST))
|
||||
ryPretend.createV(this, oib.sendTableData.get(0).goods, R.layout.item_cargo)
|
||||
.setOnItemViewListener(AdapterAll.onItemViewListenter { position1: Int, o1: Any, v1: View ->
|
||||
val tvHWName = v1.findViewById<TextView>(R.id.tvHWName)
|
||||
val tvCount = v1.findViewById<TextView>(R.id.tvCount)
|
||||
val tvDw = v1.findViewById<TextView>(R.id.tvDw)
|
||||
val tvBzfs = v1.findViewById<TextView>(R.id.tvBzfs)
|
||||
val tvDel = v1.findViewById<TextView>(R.id.tvDel)
|
||||
if (oib.sendTableData.size > 0) {
|
||||
val osg1 = o1 as OrderInputBean.SendTableDataDTO.GoodsDTO
|
||||
tvHWName.text = osg1.name
|
||||
tvCount.text = osg1.num
|
||||
tvDw.text = osg1.unit
|
||||
tvBzfs.text = osg1.packName
|
||||
v1.setOnClickListener { v2: View? ->
|
||||
goodsType = 0
|
||||
updatePosGoods = position1
|
||||
val `in` = Intent(this, GoodsActivity::class.java)
|
||||
`in`.putExtra("goodData", Gson().toJson(osg1))
|
||||
startActivity(`in`)
|
||||
}
|
||||
tvDel.setOnClickListener { v22: View? ->
|
||||
if (oib.sendTableData.get(0).getGoods().size > 0) {
|
||||
XPopup.Builder(this) // .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "删除装货货物,需重新添加卸货地址货物?",
|
||||
"取消", "确认",
|
||||
{
|
||||
|
||||
ryPretend.delItemV(position1)
|
||||
oib.putTableData.get(0).goods =
|
||||
oib.putTableData.get(0).getGoods()
|
||||
.filter { it.name != osg1.name }
|
||||
ryDis.delAllDatas()
|
||||
ryDis.notifyDatas(oib.putTableData.get(0).goods)
|
||||
// ryDis.notifyDatas(oib.putTableData.get(0).goods)
|
||||
// oib.putTableData.get(0).getGoods().clear()
|
||||
// ryDis.delAllDatas()
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show()
|
||||
} else {
|
||||
ryPretend.delItemV(position1)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
//车型
|
||||
r3.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
etMoney.clearFocus()
|
||||
val ctb = TypeParts.getCarTypeShort(this)
|
||||
val data: MutableList<OptionBaseBean?> = ArrayList()
|
||||
for (typeDTO in ctb.data) {
|
||||
data.add(OptionBaseBean(typeDTO.value, typeDTO.label))
|
||||
}
|
||||
val picker = OptionPicker(this)
|
||||
picker.setBodyWidth(140)
|
||||
picker.setOnOptionPickedListener { position: Int, item: Any ->
|
||||
val obb = item as OptionBaseBean
|
||||
vehicle_type.text = obb.name
|
||||
oib.formData.vehicleType = obb.id
|
||||
}
|
||||
picker.setData(data)
|
||||
picker.setDefaultPosition(2)
|
||||
picker.show()
|
||||
}
|
||||
}
|
||||
//车长
|
||||
r31.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
etMoney.clearFocus()
|
||||
val ctb = TypeParts.getCarTypeLong(this)
|
||||
val data: MutableList<OptionBaseBean?> = java.util.ArrayList()
|
||||
for (lengthDTO in ctb.data.length) {
|
||||
data.add(OptionBaseBean(lengthDTO.value, lengthDTO.name))
|
||||
}
|
||||
val picker = OptionPicker(this)
|
||||
picker.setBodyWidth(140)
|
||||
picker.setOnOptionPickedListener { position: Int, item: Any ->
|
||||
val obb = item as OptionBaseBean
|
||||
vehicle_length.text = obb.name
|
||||
oib.formData.vehicleLength = obb.id
|
||||
}
|
||||
picker.setData(data)
|
||||
picker.setDefaultPosition(2)
|
||||
picker.show()
|
||||
}
|
||||
}
|
||||
//业务类型
|
||||
r4.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
etMoney.clearFocus()
|
||||
val btb = TypeParts.getBusType(this)
|
||||
val data: MutableList<OptionBaseBean?> = java.util.ArrayList()
|
||||
for (datum in btb.data) {
|
||||
data.add(OptionBaseBean(datum.value, datum.name))
|
||||
}
|
||||
val picker = OptionPicker(this)
|
||||
picker.setBodyWidth(140)
|
||||
picker.setOnOptionPickedListener { position: Int, item: Any ->
|
||||
val obb = item as OptionBaseBean
|
||||
businessType.text = obb.name
|
||||
oib.formData.businessType = obb.id
|
||||
}
|
||||
picker.setData(data)
|
||||
picker.setDefaultPosition(2)
|
||||
picker.show()
|
||||
}
|
||||
}
|
||||
//货物大类(交通厅)
|
||||
r7.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
etMoney.clearFocus()
|
||||
|
||||
val ctb = TypeParts.getGoodsTypeShort(this)
|
||||
val data: MutableList<OptionBaseBean?> = ArrayList()
|
||||
for (typeDTO in ctb.data) {
|
||||
data.add(OptionBaseBean(typeDTO.id, typeDTO.cateName))
|
||||
}
|
||||
val picker = OptionPicker(this)
|
||||
picker.setBodyWidth(140)
|
||||
picker.setOnOptionPickedListener { position: Int, item: Any ->
|
||||
val obb = item as OptionBaseBean
|
||||
tvHwdlJt.text = obb.name
|
||||
oib.formData.goodsBigCate = obb.id
|
||||
//匹配安联货物大类
|
||||
|
||||
//匹配安联货物大类
|
||||
oib.formData.alctGoodsType = ctb.data[position].alctGoodsTypeId
|
||||
}
|
||||
picker.setData(data)
|
||||
picker.setDefaultPosition(2)
|
||||
picker.show()
|
||||
}
|
||||
}
|
||||
//货物大类(安联)
|
||||
r8.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
etMoney.clearFocus()
|
||||
val al = TypeParts.getAlType(this)
|
||||
val data: MutableList<OptionBaseBean?> = java.util.ArrayList()
|
||||
for (datum in al.data) {
|
||||
data.add(OptionBaseBean(datum.id, datum.name))
|
||||
}
|
||||
val picker = OptionPicker(this)
|
||||
picker.setBodyWidth(140)
|
||||
picker.setOnOptionPickedListener { position: Int, item: Any ->
|
||||
val obb = item as OptionBaseBean
|
||||
tvHwdlAl.text = obb.name
|
||||
oib.formData.alctGoodsType = obb.id
|
||||
}
|
||||
picker.setData(data)
|
||||
picker.setDefaultPosition(14)
|
||||
picker.show()
|
||||
}
|
||||
}
|
||||
//订单有效期
|
||||
r5.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
etMoney.clearFocus()
|
||||
val ap = DatimePicker(this)
|
||||
val wheelLayout = ap.wheelLayout
|
||||
ap.setOnDatimePickedListener { year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Int ->
|
||||
val text =
|
||||
year.toString() + "-" + getRead(month) + "-" + getRead(day) + " " + getRead(
|
||||
hour) + ":" + getRead(
|
||||
minute)
|
||||
effectiveTime.text = text
|
||||
oib.formData.effectiveTime = text
|
||||
}
|
||||
wheelLayout.setDateMode(DateMode.YEAR_MONTH_DAY)
|
||||
wheelLayout.setTimeMode(TimeMode.HOUR_24_NO_SECOND)
|
||||
wheelLayout.setRange(DatimeEntity.now(), DatimeEntity.yearOnFuture(10))
|
||||
wheelLayout.setDateLabel("年", "月", "日")
|
||||
wheelLayout.setTimeLabel("时", "分", "")
|
||||
ap.show()
|
||||
}
|
||||
}
|
||||
|
||||
//分配车辆
|
||||
etCar.setOnClickListener { V: View? ->
|
||||
etMoney.clearFocus()
|
||||
val intent = Intent(this, DisCarActivity::class.java)
|
||||
intent.putExtra(AppConfig.STRING, etCar.text.toString())
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
submit.setOnClickListener {
|
||||
if (isLogin()) {
|
||||
if (!TypeParts.isEntrust(this)) {
|
||||
// for (sendTableDatum in oib.sendTableData) {
|
||||
// var ub = UserParts.getUser(this)
|
||||
// Log.e("货源信息", Gson().toJson(ub))
|
||||
// if (ub != null) {
|
||||
// if (StringUtil.isNull(ub.getData().getCompanyName(), "") == "") {
|
||||
// sendTableDatum.businessName =
|
||||
// StringUtil.isNull(ub.getData().getRname(), "")
|
||||
// } else {
|
||||
// sendTableDatum.businessName = ub.getData().getCompanyName()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!TimeUtil.compareDate(tvStartTime.text.toString(),
|
||||
TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||
Locale.getDefault())),
|
||||
SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||
Locale.getDefault()))
|
||||
) {
|
||||
showToast("装货截止时间不能小于当前时间")
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
// if (!TimeUtil.compareDate(tvEndTimeDis.text.toString(),
|
||||
// TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||
// Locale.getDefault())),
|
||||
// SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||
// Locale.getDefault()))
|
||||
// ) {
|
||||
// showToast("卸货截止时间不能小于当前时间")
|
||||
// return@setOnClickListener
|
||||
// }
|
||||
|
||||
// if (!TimeUtil.compareDate(effectiveTime.text.toString(),
|
||||
// TimeUtil.getNowString(SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||
// Locale.getDefault())),
|
||||
// SimpleDateFormat("yyyy-MM-dd HH:mm",
|
||||
// Locale.getDefault()))
|
||||
// ) {
|
||||
// showToast("订单有效期不能小于当前时间")
|
||||
// return@setOnClickListener
|
||||
// }
|
||||
if (etMoney.text.toString().isEmpty()) {
|
||||
showToast("请输入运费信息")
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
if (oib.sendTableData[0].goods.size > 0 && oib.putTableData[0].goods.size > 0 && !TextUtils.isEmpty(
|
||||
oib.formData.shipperCarId)
|
||||
) {
|
||||
XPopup.Builder(this)
|
||||
.isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
.asConfirm("请确认", "是否确定提交此订单?",
|
||||
"取消", "确认",
|
||||
{
|
||||
oib.isSubmit = 1
|
||||
oib.formData.isSubmit = 1
|
||||
oib.putTableData.forEachIndexed { index, putTableDataDTO ->
|
||||
putTableDataDTO.sort = index+1
|
||||
}
|
||||
oib.sendTableData.forEachIndexed { index, putTableDataDTO ->
|
||||
putTableDataDTO.sort = index+1
|
||||
}
|
||||
oib.sendTableData[0].totalPrice =
|
||||
etMoney.text.toString().toDouble()
|
||||
Log.e("货源信息", Gson().toJson(oib))
|
||||
DataManager.getInstance().againOrder(oib)
|
||||
.compose(DataManager.setThread())
|
||||
.subscribe(BaseObserver(mContext,
|
||||
object : RxHttpCallBack<Any>() {
|
||||
override fun onSuccess(t: CommonResponseBean<Any>?) {
|
||||
super.onSuccess(t)
|
||||
showToast("订单创建成功")
|
||||
EventBus.getDefault().post(RefreshEvent("",
|
||||
intent.extras!!.getInt("type")))
|
||||
finish()
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show()
|
||||
} else {
|
||||
Toast.makeText(this, "提交订单信息不完整", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, "此账户不能进行发货操作", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, "请先登录", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//选择分配车辆回调
|
||||
@Subscribe
|
||||
fun disCarEvent(baseEvent: BaseEvent<*>) {
|
||||
if (baseEvent.data is CarBean) {
|
||||
val data = baseEvent.data as CarBean
|
||||
etCar.text = data.carNum + " " + data.driverPhone
|
||||
oib.formData.shipperCarId = data.carId.toString() + ""
|
||||
oib.formData.shipperDriverId = data.driverId.toString() + ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
fun addressResult(event: AddressEvent) {
|
||||
Log.e("返回结果", event.message + "--")
|
||||
var ad = Gson().fromJson(event.message,
|
||||
AddressListBean.DataDTO.RecordsDTO::class.java)
|
||||
val list: MutableList<Int> = java.util.ArrayList()
|
||||
list.add(ad.getProvince())
|
||||
list.add(ad.getCity())
|
||||
list.add(ad.getArea())
|
||||
if (event.type == 0) {
|
||||
oib.sendTableData.get(0).setDetailAddress(ad.pathName+ad.getAddressDetail())
|
||||
oib.sendTableData.get(0).setLoadingName(ad.getContactPerson())
|
||||
oib.sendTableData.get(0).setLoadingPhone(ad.getContactNumber())
|
||||
oib.sendTableData.get(0).setCompanyCode(ad.getCompanyCode())
|
||||
oib.sendTableData.get(0).setCompanyName(ad.getCompanyName())
|
||||
oib.sendTableData.get(0).lat = ad.latitude
|
||||
oib.sendTableData.get(0).lng = ad.longitude
|
||||
oib.sendTableData.get(0).setLoadingAddress(list)
|
||||
tvName.setText(ad.getContactPerson())
|
||||
tvPhone.setText(ad.getContactNumber())
|
||||
tvAddress.setText(ad.pathName+ad.getAddressDetail())
|
||||
// GetObjectName.ZIModel(address_box,os,con);
|
||||
} else {
|
||||
oib.putTableData.get(0).setDetailAddress(ad.pathName+ad.getAddressDetail())
|
||||
oib.putTableData.get(0).setLoadingName(ad.getContactPerson())
|
||||
oib.putTableData.get(0).setLoadingPhone(ad.getContactNumber())
|
||||
oib.putTableData.get(0).setCompanyCode(ad.getCompanyCode())
|
||||
oib.putTableData.get(0).setCompanyName(ad.getCompanyName())
|
||||
oib.putTableData.get(0).lat = ad.latitude
|
||||
oib.putTableData.get(0).lng = ad.longitude
|
||||
oib.putTableData.get(0).setLoadingAddress(list)
|
||||
tvNameDis.setText(ad.getContactPerson())
|
||||
tvPhoneDis.setText(ad.getContactNumber())
|
||||
tvAddressDis.setText(ad.pathName+ad.getAddressDetail())
|
||||
// GetObjectName.ZIModel(address_box,op,con);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
fun goodsResult(event: GoodsEvent) {
|
||||
Log.e("返回结果", event.message + "--")
|
||||
if (goodsType == 0) {
|
||||
val osg1 = Gson().fromJson(event.message,
|
||||
SendTableDataDTO.GoodsDTO::class.java)
|
||||
if (-1 != updatePosGoods) {
|
||||
oib.sendTableData.get(0).goods.set(updatePosGoods, osg1)
|
||||
// os.getGoods().set(updatePosGoods, osg1)
|
||||
ryPretend.updateItemV(updatePosGoods, osg1)
|
||||
|
||||
//删除卸货货物信息
|
||||
// oib.putTableData.get(0).getGoods().clear()
|
||||
// ryDis.delAllDatas()
|
||||
updatePosGoods = -1
|
||||
} else {
|
||||
// os.getGoods().add(osg1);
|
||||
ryPretend.addItemV(osg1)
|
||||
|
||||
// 同步卸货货物
|
||||
val goodsDTO = Gson().fromJson(event.message,
|
||||
PutTableDataDTO.GoodsDTO::class.java)
|
||||
// op.getGoods().add(goodsDTO)
|
||||
oib.putTableData.get(0).getGoods().add(goodsDTO)
|
||||
ryDis.addItemV(goodsDTO)
|
||||
}
|
||||
} else {
|
||||
val osg2 = Gson().fromJson(event.message,
|
||||
PutTableDataDTO.GoodsDTO::class.java)
|
||||
if (-1 != updatePosGoodsDis) {
|
||||
oib.putTableData.get(0).getGoods().set(updatePosGoodsDis, osg2)
|
||||
ryDis.updateItemV(updatePosGoodsDis, osg2)
|
||||
updatePosGoodsDis = -1
|
||||
} else {
|
||||
oib.putTableData.get(0).getGoods().add(osg2)
|
||||
ryDis.addItemV(osg2)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
fun isLogin(): Boolean {
|
||||
return if (UiAuxiliary.isLogin(this)) {
|
||||
true
|
||||
} else {
|
||||
val `in` = Intent(this, LoginActivity::class.java)
|
||||
startActivity(`in`)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fun getRead(num: Int): String? {
|
||||
return if (num < 10) {
|
||||
"0$num"
|
||||
} else num.toString() + ""
|
||||
}
|
||||
}
|
||||
@ -1,348 +0,0 @@
|
||||
package com.oneclouds.cargo.ui.waybill.activity
|
||||
|
||||
import android.accessibilityservice.AccessibilityService.SoftKeyboardController
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Message
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.Toast
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.google.gson.Gson
|
||||
import com.lxj.xpopup.util.KeyboardUtils
|
||||
import com.oneclouds.cargo.R
|
||||
import com.oneclouds.cargo.bean.WaybillListBean
|
||||
import com.oneclouds.cargo.bean.WaybillListBean.DataDTO.ListDTO
|
||||
import com.oneclouds.cargo.request.WaybillRequest
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsActivity
|
||||
import com.oneclouds.cargo.ui.home.OrderDetailsAllActivity
|
||||
import com.oneclouds.cargo.ui.home.typelist.OrderList4Fragment
|
||||
import com.oneclouds.cargo.ui.parts.TypeParts
|
||||
import com.oneclouds.cargo.util.ToastUtil
|
||||
import com.oneclouds.cargo.util.adapter.AdapterAlls
|
||||
import com.oneclouds.cargo.util.adapter.ManyBean
|
||||
import com.oneclouds.cargo.util.cache.CacheGroup
|
||||
import com.oneclouds.cargo.util.http.RequsetCodeConstants
|
||||
import com.oneclouds.cargo.util.time.Timer
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout
|
||||
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener
|
||||
import com.scwang.smart.refresh.layout.listener.OnRefreshListener
|
||||
import kotlinx.android.synthetic.main.activity_search_waybill.btnSearch
|
||||
import kotlinx.android.synthetic.main.activity_search_waybill.etSearch
|
||||
import kotlinx.android.synthetic.main.activity_search_waybill.refreshLayout
|
||||
import kotlinx.android.synthetic.main.activity_search_waybill.rv
|
||||
|
||||
/**
|
||||
* @ClassName SearchWaybillActivity
|
||||
* @Author john
|
||||
* @Date 2025/1/7 09:17
|
||||
* @Description TODO
|
||||
*/
|
||||
class SearchWaybillActivity : BaseActivity() {
|
||||
private val type = 200004
|
||||
private var index = 1
|
||||
private var dataKey = true
|
||||
private lateinit var aas: AdapterAlls
|
||||
private lateinit var olb: WaybillListBean
|
||||
private lateinit var wr :WaybillRequest
|
||||
private var timer = ""
|
||||
var sum: Int = 0
|
||||
private var list = mutableListOf<ManyBean>()
|
||||
private var keys = mutableListOf<Boolean>()
|
||||
|
||||
override fun msgMethod(m: Message) {
|
||||
super.msgMethod(m)
|
||||
when (m.what) {
|
||||
RequsetCodeConstants.SUCCESS -> {
|
||||
// sr.finishRefresh()
|
||||
// sr.finishLoadMore()
|
||||
//获取数据
|
||||
if (CacheGroup.cacheList["searchOrderList"] != null) {
|
||||
refreshLayout.finishLoadMore()
|
||||
refreshLayout.finishRefresh()
|
||||
Log.e(
|
||||
"-list-",
|
||||
CacheGroup.cacheList["searchOrderList"]+""
|
||||
)
|
||||
olb = Gson().fromJson<WaybillListBean>(
|
||||
CacheGroup.cacheList["searchOrderList"],
|
||||
WaybillListBean::class.java
|
||||
)
|
||||
if (olb.code==200){
|
||||
if (index == 1) {
|
||||
initRecyclerView()
|
||||
} else {
|
||||
if (olb.data.list.size == 0) {
|
||||
dataKey = false
|
||||
Toast.makeText(mContext, "没有更多了", Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
addData()
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ToastUtil.show(mContext, "加载失败")
|
||||
}
|
||||
|
||||
// if (olb.code == 200) {
|
||||
// if (index == 1) {
|
||||
// initData()
|
||||
// } else {
|
||||
// if (olb.data.list.size == 0) {
|
||||
// dataKey = false
|
||||
// Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show()
|
||||
// } else {
|
||||
// addData()
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// ToastUtil.show(con, "加载失败")
|
||||
// }
|
||||
CacheGroup.cacheList.remove("searchOrderList")
|
||||
}
|
||||
|
||||
|
||||
//签收
|
||||
// if (CacheGroup.cacheList["order_sign"] != null) {
|
||||
// val bb: BaseBean = gson.fromJson<BaseBean>(
|
||||
// CacheGroup.cacheList["order_sign"],
|
||||
// BaseBean::class.java
|
||||
// )
|
||||
// if (bb.code == 200) {
|
||||
// sr.autoRefresh()
|
||||
// ToastUtil.show(con, "收货成功")
|
||||
// } else {
|
||||
// sr.autoRefresh()
|
||||
// ToastUtil.show(con, bb.msg)
|
||||
// }
|
||||
// CacheGroup.cacheList.remove("order_sign")
|
||||
// }
|
||||
// //删除
|
||||
// if (CacheGroup.cacheList[OrderRequest.ORDER_DEL] != null) {
|
||||
// val bb: BaseBean = gson.fromJson<BaseBean>(
|
||||
// CacheGroup.cacheList[OrderRequest.ORDER_DEL],
|
||||
// BaseBean::class.java
|
||||
// )
|
||||
// if (bb.code == 200) {
|
||||
// sr.autoRefresh()
|
||||
// ToastUtil.show(con, "删除成功")
|
||||
// } else {
|
||||
// ToastUtil.show(con, bb.msg)
|
||||
// }
|
||||
// CacheGroup.cacheList.remove(OrderRequest.ORDER_DEL)
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun getLayout() = R.layout.activity_search_waybill
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.color_theme)
|
||||
setTitleBar("搜索运单") { finish() }
|
||||
wr = WaybillRequest(mContext, hd)
|
||||
btnSearch.setOnClickListener {
|
||||
etSearch.text.toString().trim().let {
|
||||
if (it.isNotEmpty()) {
|
||||
index = 1
|
||||
refreshLayout.autoRefresh()
|
||||
// getDatas(it)
|
||||
} else {
|
||||
refreshLayout.autoRefresh()
|
||||
}
|
||||
}
|
||||
KeyboardUtils.hideSoftInput(etSearch)
|
||||
}
|
||||
initRefreshLoad()
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
getDatas("")
|
||||
}
|
||||
|
||||
private fun getDatas(search: String){
|
||||
wr.searchOrderList(index, 10, search)
|
||||
}
|
||||
|
||||
private fun initRecyclerView() {
|
||||
list.clear()
|
||||
val lists: MutableList<ManyBean> = mutableListOf()
|
||||
for (i in olb.getData().getList().indices) {
|
||||
var str: String = olb.getData().getList().get(i).getCreateTime()
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM")
|
||||
if (str != timer) {
|
||||
timer = str
|
||||
keys.add(false)
|
||||
lists.add(ManyBean(time(timer), R.layout.order_time))
|
||||
}
|
||||
if (TypeParts.isEntrust(mContext)) {
|
||||
olb.getData().getList().get(i).setTotalFreight("")
|
||||
}
|
||||
keys.add(false)
|
||||
lists.add(ManyBean(olb.getData().getList().get(i), R.layout.order_item))
|
||||
}
|
||||
if (lists.size == 0 && index == 1) {
|
||||
keys.add(false)
|
||||
lists.add(ManyBean(time(""), R.layout.item_null))
|
||||
}
|
||||
list.addAll(lists)
|
||||
aas = rv.creates(mContext, list)
|
||||
aas.setOnItemViewListener { position: Int, o: Any, v: View, layout: Int ->
|
||||
when (layout) {
|
||||
R.layout.order_item -> {
|
||||
val ld = o as ListDTO
|
||||
val btn = v.findViewById<Button>(R.id.btn)
|
||||
val llQrsh = v.findViewById<LinearLayout>(R.id.llQrsh)
|
||||
val state_img = v.findViewById<ImageView>(R.id.state_img)
|
||||
val btnQrsh = v.findViewById<Button>(R.id.btnQrsh)
|
||||
val btnAgain = v.findViewById<Button>(R.id.btnAgain)
|
||||
btn.visibility = View.GONE
|
||||
// llQrsh.visibility = View.VISIBLE
|
||||
// btnQrsh.setOnClickListener { v1: View? ->
|
||||
// XPopup.Builder(mContext)
|
||||
// .asConfirm(
|
||||
// "确认收货", "确认 " + ld.orderNum + "收货么?",
|
||||
// "取消", "确认",
|
||||
// {
|
||||
// or.orderSigin(ld.waybillId)
|
||||
// }, null, false, R.layout.alert_ok_cancel
|
||||
// ) //最后一个参数绑定已有布局
|
||||
// .show()
|
||||
// }
|
||||
btnAgain.setOnClickListener { v1: View? ->
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
val `in` = Intent(mContext, AnotherOrderActivity::class.java)
|
||||
`in`.putExtra("id", ld.orderId)
|
||||
`in`.putExtra("type", type)
|
||||
startActivity(`in`)
|
||||
}
|
||||
v.setOnClickListener { v12: View? ->
|
||||
val `in` = Intent(mContext, OrderDetailsAllActivity::class.java)
|
||||
`in`.putExtra("id", ld.orderId)
|
||||
startActivity(`in`)
|
||||
}
|
||||
v.setOnLongClickListener { v13: View? ->
|
||||
// 获取TextView中的文本
|
||||
val text = ld.orderNum
|
||||
|
||||
// 获取剪切板管理器
|
||||
val clipboard =
|
||||
mContext.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
||||
if (clipboard != null) {
|
||||
// 创建一个剪切数据对象
|
||||
val clip = ClipData.newPlainText("label", text)
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip)
|
||||
ToastUtil.show(mContext, text + "复制到剪切板")
|
||||
}
|
||||
true
|
||||
}
|
||||
if (ld.makeStatus == 107001) {
|
||||
state_img.visibility = View.VISIBLE
|
||||
state_img.setImageResource(R.mipmap.invoicing_state)
|
||||
} else if (ld.makeStatus == 107002) {
|
||||
state_img.visibility = View.VISIBLE
|
||||
state_img.setImageResource(R.mipmap.invoicing)
|
||||
} else if (ld.makeStatus == 107003) {
|
||||
state_img.visibility = View.VISIBLE
|
||||
state_img.setImageResource(R.mipmap.invoicing_no)
|
||||
} else {
|
||||
}
|
||||
v.top = resources.getDimensionPixelOffset(R.dimen.dp_10)
|
||||
if (ld.status > 102002) {
|
||||
btn.text = "查看运单"
|
||||
}
|
||||
if (ld.status == 102001) {
|
||||
btn.text = "删除"
|
||||
}
|
||||
btn.setOnClickListener { v1: View? ->
|
||||
if (ld.status > 102002) {
|
||||
Log.e("查看", "查看")
|
||||
val `in` = Intent(mContext, OrderDetailsActivity::class.java)
|
||||
`in`.putExtra("id", ld.waybillId)
|
||||
startActivity(`in`)
|
||||
}
|
||||
// else {
|
||||
// if (ld.status == 102002) {
|
||||
// XPopup.Builder(getActivity())
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
// .asConfirm(
|
||||
// "请确认", "是否撤销此订单?",
|
||||
// "取消", "确认",
|
||||
// {
|
||||
// or.orderRevoke(ld.orderId)
|
||||
// }, null, false, R.layout.alert_ok_cancel
|
||||
// ) //最后一个参数绑定已有布局
|
||||
// .show()
|
||||
// } else {
|
||||
// XPopup.Builder(getActivity())
|
||||
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
||||
// .asConfirm(
|
||||
// "请确认", "是否删除此订单?",
|
||||
// "取消", "确认",
|
||||
// {
|
||||
// Log.e("删除", "删除")
|
||||
// or.orderDelete(ld.orderId)
|
||||
// }, null, false, R.layout.alert_ok_cancel
|
||||
// ) //最后一个参数绑定已有布局
|
||||
// .show()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun addData() {
|
||||
val lists: MutableList<ManyBean> = ArrayList()
|
||||
for (listDTO in olb.data.list) {
|
||||
var str = listDTO.createTime
|
||||
str = Timer.formatChange(str, "yyyy-MM-dd HH:mm:ss", "yyyy-MM")
|
||||
if (str != timer) {
|
||||
timer = str
|
||||
lists.add(ManyBean(time(timer), R.layout.order_time))
|
||||
}
|
||||
lists.add(ManyBean(listDTO, R.layout.order_item))
|
||||
}
|
||||
rv.adds(lists)
|
||||
}
|
||||
|
||||
fun initRefreshLoad() {
|
||||
refreshLayout.setOnRefreshListener(OnRefreshListener { refreshLayout: RefreshLayout? ->
|
||||
Log.e("下拉刷新", "pps")
|
||||
index = 1
|
||||
dataKey = true
|
||||
timer = ""
|
||||
getDatas(etSearch.text.toString().trim())
|
||||
KeyboardUtils.hideSoftInput(etSearch)
|
||||
})
|
||||
refreshLayout.setOnLoadMoreListener(OnLoadMoreListener { refreshLayout: RefreshLayout ->
|
||||
Log.e(
|
||||
"上拉加载",
|
||||
"次数$index"
|
||||
)
|
||||
if (dataKey) {
|
||||
index++
|
||||
getDatas(etSearch.text.toString().trim())
|
||||
} else {
|
||||
Toast.makeText(mContext, "没有更多了", Toast.LENGTH_SHORT).show()
|
||||
refreshLayout.finishLoadMore()
|
||||
}
|
||||
KeyboardUtils.hideSoftInput(etSearch)
|
||||
})
|
||||
refreshLayout.autoRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
class time(var timer: String)
|
||||
@ -1,134 +0,0 @@
|
||||
package com.oneclouds.cargo.util;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.dahe.mylibrary.net.JsonUtils;
|
||||
import com.dahe.mylibrary.utils.BaseSPUtils;
|
||||
import com.oneclouds.cargo.bean.UserBean;
|
||||
|
||||
|
||||
public class SPUtils extends BaseSPUtils {
|
||||
|
||||
private static final String PRE_WEL_PIC = "PRE_WEL_PIC";
|
||||
|
||||
/**
|
||||
* 存用户信息
|
||||
*
|
||||
* @param context
|
||||
* @param json
|
||||
*/
|
||||
public static void setUserInfo(Context context, String json) {
|
||||
put(context, USER_INFO_KEY, json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拿用户信息
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public static UserBean getUserInfo(Context context) {
|
||||
return JsonUtils.getInstance().fromJson((String) get(context, USER_INFO_KEY, ""), UserBean.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 存服务器类型
|
||||
*
|
||||
* @param context
|
||||
* @param isTestService
|
||||
*/
|
||||
public static void setNetServiceType(Context context, boolean isTestService) {
|
||||
put(context, NET_SERVICE_TEST, isTestService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拿服务器类型
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public static boolean geNetServiceType(Context context) {
|
||||
return (boolean) get(context, NET_SERVICE_TEST, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 存搜索数据
|
||||
*
|
||||
* @param context
|
||||
* @param json
|
||||
*/
|
||||
public static void setSearchCache(Context context, String json) {
|
||||
put(context, SEARRH_CACHE, json);
|
||||
}
|
||||
|
||||
public static String getSearchCache(Context context) {
|
||||
return JsonUtils.getInstance().fromJson((String) get(context, SEARRH_CACHE, ""), String.class);
|
||||
}
|
||||
|
||||
public static void removeSearchCache(Context context) {
|
||||
remove(context, SEARRH_CACHE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航偏好设置
|
||||
*/
|
||||
public static void setNaviPreferenceCache(Context context, String json) {
|
||||
put(context, NAVI_PH_EDIT_CACHE, json);
|
||||
}
|
||||
|
||||
public static String getNaviPreferenceCache(Context context) {
|
||||
return JsonUtils.getInstance().fromJson((String) get(context, NAVI_PH_EDIT_CACHE, ""), String.class);
|
||||
}
|
||||
|
||||
public static void removeNaviPreference(Context context) {
|
||||
remove(context, NAVI_PH_EDIT_CACHE);
|
||||
}
|
||||
|
||||
//第一次登录
|
||||
public static boolean getIsFirstOpen(Context context){
|
||||
boolean b = (boolean) get(context, FIRST_OPEN, true);
|
||||
return b;
|
||||
|
||||
}
|
||||
|
||||
public static void setIsFirstOpen(Context context, boolean json){
|
||||
put(context, FIRST_OPEN, json);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置隐私协议是否同意
|
||||
*
|
||||
* @param value 是否同意
|
||||
*/
|
||||
public static void setAgreePrivacyAgreement(Context context, boolean value) {
|
||||
put(context, KEY_PRIVACY_AGREEMENT, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否同意了隐私协议
|
||||
*
|
||||
* @return true 已经同意;false 还没有同意
|
||||
*/
|
||||
public static boolean hasAgreePrivacyAgreement(Context context) {
|
||||
boolean b = (boolean) get(context, KEY_PRIVACY_AGREEMENT, false);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存欢迎页网络地址
|
||||
* @param context
|
||||
* @param url
|
||||
*/
|
||||
public static void setPreWelPic(Context context, String url){
|
||||
put(context,PRE_WEL_PIC,url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取欢迎页地址
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public static String getPreWelPic(Context context){
|
||||
return (String) get(context,PRE_WEL_PIC,"");
|
||||
}
|
||||
|
||||
}
|
||||
@ -30,19 +30,19 @@ public class BottomTabUtil {
|
||||
fm = act.getSupportFragmentManager();
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//ft.replace(R.id.body,f);
|
||||
ft.add(layout,f,"").commitAllowingStateLoss();
|
||||
ft.add(layout,f,"").commit();
|
||||
}
|
||||
public void setDefaultFragment(Fragment f) {
|
||||
fm =act.getSupportFragmentManager();
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
ft.hide(fs[index]);
|
||||
ft.show(f);
|
||||
ft.commitAllowingStateLoss();
|
||||
ft.commit();
|
||||
}
|
||||
public void hide(Fragment f) {
|
||||
fm =act.getSupportFragmentManager();
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
ft.hide(f);
|
||||
ft.commitAllowingStateLoss();
|
||||
ft.commit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
package com.oneclouds.cargo.weight.pop;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.lxj.xpopup.util.XPopupUtils;
|
||||
import com.oneclouds.cargo.R;
|
||||
import com.oneclouds.cargo.request.bean.CarLocaBean;
|
||||
|
||||
|
||||
/**
|
||||
* Description: 仿知乎底部评论弹窗
|
||||
* Create by dance, at 2018/12/25
|
||||
*/
|
||||
public class ZhihuCommentPopup extends BottomPopupView {
|
||||
|
||||
|
||||
private CarLocaBean data;
|
||||
public ZhihuCommentPopup(@NonNull Context context, CarLocaBean data) {
|
||||
super(context);
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.custom_bottom_popup;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
((TextView)findViewById(R.id.tvCarLoca)).setText(data.getAdr());
|
||||
((TextView)findViewById(R.id.tvCarDate)).setText(data.getUtc());
|
||||
|
||||
}
|
||||
|
||||
//完全可见执行
|
||||
@Override
|
||||
protected void onShow() {
|
||||
super.onShow();
|
||||
Log.e("tag", "知乎评论 onShow");
|
||||
}
|
||||
|
||||
//完全消失执行
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
Log.e("tag", "知乎评论 onDismiss");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMaxHeight() {
|
||||
return (int) (XPopupUtils.getScreenHeight(getContext()) * .7f);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// protected boolean onBackPressed() {
|
||||
// Toast.makeText(getContext(), "拦截返回", Toast.LENGTH_SHORT).show();
|
||||
// return true;
|
||||
// }
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:topLeftRadius="16dp"
|
||||
android:topRightRadius="16dp"/>
|
||||
<solid android:color="#fff"/>
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#fff5f5f5" />
|
||||
<corners
|
||||
android:radius="@dimen/dp_23"
|
||||
></corners>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/log_sel" android:state_checked="true"></item>
|
||||
<item android:drawable="@drawable/log_nor" android:state_checked="false"></item>
|
||||
<item android:drawable="@drawable/log_nor"></item>
|
||||
</selector>
|
||||
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffff4a02" />
|
||||
<corners
|
||||
android:radius="@dimen/dp_20"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
@ -42,37 +42,35 @@
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/add_address"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
app:cardCornerRadius="@dimen/dp_29"
|
||||
app:cardBackgroundColor="@color/color_theme"
|
||||
app:cardCornerRadius="@dimen/dp_29">
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center">
|
||||
<TextView
|
||||
android:id="@+id/type_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="添加常用地址"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
<ImageView
|
||||
android:layout_marginLeft="@dimen/dp_6"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_6"
|
||||
android:src="@mipmap/add" />
|
||||
android:src="@mipmap/add"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
@ -1,447 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_invoice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_theme"
|
||||
android:orientation="vertical">
|
||||
<include layout="@layout/common_toolbar" />
|
||||
<!-- <include layout="@layout/assembly_title_block" />-->
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
>
|
||||
<com.oneclouds.cargo.util.view.BaseRecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never"
|
||||
></com.oneclouds.cargo.util.view.BaseRecyclerView>
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/shape_w_bg8"
|
||||
android:paddingLeft="@dimen/dp_12"
|
||||
android:paddingRight="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
|
||||
android:elevation="@dimen/dp_1">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/r2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_49"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_vehicletype" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:text="熟车"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<LinearLayout
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/etCar"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="match_parent"
|
||||
android:hint="选择车牌/手机号搜索"
|
||||
android:gravity="right|center_vertical"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColorHint="#ffc7c7c7"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:background="@null"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:src="@mipmap/chevron2"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:id="@+id/r3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_vehicletype" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:text="车型"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<LinearLayout
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:id="@+id/vehicle_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:src="@mipmap/chevron2"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:id="@+id/r31"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_vehicletype"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="车长"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:id="@+id/vehicle_length"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:src="@mipmap/chevron2"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:id="@+id/r4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_businesstype"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="业务类型"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:id="@+id/businessType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:src="@mipmap/chevron2"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/r7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_businesstype" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:text="货物大类"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHwdlJt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/chevron2" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/r8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_businesstype"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:text="货物大类(安联)"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<LinearLayout
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:id="@+id/tvHwdlAl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:src="@mipmap/chevron2"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/r5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_home_time"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:text="订单有效期"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<LinearLayout
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:id="@+id/effectiveTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="@dimen/dp_7"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:src="@mipmap/chevron2"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:id="@+id/r6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:visibility="gone">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="是否购买货物险"
|
||||
android:textColor="#666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_alignParentRight="true"
|
||||
android:id="@+id/isGoods"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@mipmap/icon_no"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@null"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<EditText
|
||||
android:visibility="gone"
|
||||
android:id="@+id/requirement"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left|top"
|
||||
android:minHeight="@dimen/dp_60"
|
||||
android:hint="添加备注信息(选填)"
|
||||
android:textColorHint="#ffc7c7c7"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:background="@null"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:background="@drawable/bg_btn"
|
||||
android:text="确定"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -1,137 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/assembly_title_block" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etCar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/search_bg"
|
||||
android:drawableLeft="@drawable/search"
|
||||
android:drawablePadding="@dimen/dp_6"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入车牌号"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/sp_12"></EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSearch"
|
||||
android:layout_width="@dimen/dp_57"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_9"
|
||||
android:background="@drawable/shape_search_bg"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"></Button>
|
||||
</LinearLayout>
|
||||
|
||||
<com.amap.api.maps.MapView
|
||||
android:id="@+id/map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/bg_round"
|
||||
android:maxHeight="500dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingRight="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_22">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivHead"
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_84"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:background="@drawable/login_car" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarLoca"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_weight="1"
|
||||
android:text="王师傅"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:text="15835201103"
|
||||
android:textColor="@color/color_9"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_alignParentBottom="true"
|
||||
android:id="@+id/keyboardParent"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
@ -78,7 +78,7 @@
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dp_18" />
|
||||
android:textSize="@dimen/dp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -201,6 +201,8 @@
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="请输入详细地址"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
|
||||
<ImageView
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
<TextView
|
||||
android:visibility="invisible"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_width="wrap_content"
|
||||
@ -47,7 +46,7 @@
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入账号"
|
||||
android:hint="请输入手机号码"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ff000000"
|
||||
@ -95,42 +94,6 @@
|
||||
android:paddingTop="@dimen/dp_6"
|
||||
android:paddingBottom="@dimen/dp_6"/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#F2F2F2"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etCode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:textColor="#ff000000"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCode"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
@ -138,32 +101,13 @@
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#F2F2F2"/>
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_check"
|
||||
android:paddingLeft="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<CheckBox
|
||||
android:id="@+id/cb"
|
||||
android:clickable="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@null"
|
||||
android:background="@drawable/select_log"
|
||||
></CheckBox>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
@ -172,7 +116,6 @@
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/no_btn"
|
||||
android:visibility="gone"
|
||||
android:layout_width="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
app:cardCornerRadius="@dimen/dp_6"
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:background="#fff">
|
||||
|
||||
<FrameLayout
|
||||
@ -12,123 +13,124 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#DEEAF5"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/dp_4">
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="@dimen/dp_4"
|
||||
android:background="#DEEAF5">
|
||||
|
||||
<LinearLayout
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:id="@+id/huoyuan_box"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_12">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/huoyuan"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:src="@mipmap/tab1_s"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tab1_s" />
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title1"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="首页"
|
||||
android:textColor="@color/color_theme"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:id="@+id/wallet_box"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_12">
|
||||
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/wallet"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:src="@mipmap/tab2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/waybill" />
|
||||
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/title2"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="运单"
|
||||
android:text="钱包"
|
||||
android:textColor="#ffc9c9c9"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:id="@+id/news_box"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
>
|
||||
|
||||
android:visibility="gone">
|
||||
<ImageView
|
||||
android:id="@+id/news"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:layout_width="@dimen/dp_26"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:src="@mipmap/xiaoxi0"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tab2" />
|
||||
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/title3"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="钱包"
|
||||
android:text="消息"
|
||||
android:textColor="#ffc9c9c9"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:id="@+id/my_box"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_12">
|
||||
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/my"
|
||||
android:layout_width="@dimen/dp_36"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:src="@mipmap/tab3"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tab3" />
|
||||
|
||||
android:background="@null"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/title4"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="我的"
|
||||
android:textColor="#ffc9c9c9"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_invoice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_theme"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/common_toolbar" />
|
||||
<!-- <include layout="@layout/assembly_title_block" />-->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
android:paddingRight="@dimen/dp_15">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/search_bg"
|
||||
android:drawableLeft="@drawable/search"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="搜索运单"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/sp_18" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSearch"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:background="@drawable/shape_search_bg"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
</RelativeLayout>
|
||||
|
||||
<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.MaterialHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.oneclouds.cargo.util.view.BaseRecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never"></com.oneclouds.cargo.util.view.BaseRecyclerView>
|
||||
|
||||
<com.scwang.smart.refresh.footer.BallPulseFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
@ -274,14 +274,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_2"
|
||||
android:background="#F6F6F9"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ICP备案号:豫ICP备09025418号-25A"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:text="右边"
|
||||
android:textColor="#fff"
|
||||
android:layout_alignParentRight="true"
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
<?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:maxHeight="500dp"
|
||||
android:background="@drawable/bg_round"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_8"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_22"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivHead"
|
||||
android:layout_width="@dimen/dp_84"
|
||||
android:layout_height="@dimen/dp_84"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:background="@drawable/login_car" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/tvCarLoca"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:text="王师傅"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCarDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:text="15835201103"
|
||||
android:textColor="@color/color_9"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -25,18 +25,18 @@
|
||||
android:layout_height="wrap_content"/>
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
||||
<!-- <Button-->
|
||||
<!-- android:id="@+id/submit"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_34"-->
|
||||
<!-- android:layout_alignParentBottom="true"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginRight="@dimen/dp_20"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="@dimen/dp_44"-->
|
||||
<!-- android:background="@drawable/bg_btn"-->
|
||||
<!-- android:text="提交开票申请"-->
|
||||
<!-- android:textColor="#ffffffff"-->
|
||||
<!-- android:textSize="@dimen/sp_16"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- />-->
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_marginBottom="@dimen/dp_34"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:background="@drawable/bg_btn"
|
||||
android:text="提交开票申请"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
@ -183,7 +183,6 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_width="wrap_content"
|
||||
@ -202,7 +201,6 @@
|
||||
android:layout_marginBottom="@dimen/dp_20"/>-->
|
||||
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
<?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:id="@+id/activity_order_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_theme"
|
||||
android:paddingTop="@dimen/dp_49"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<include
|
||||
layout="@layout/order_list_top" />
|
||||
|
||||
<com.xuexiang.xui.widget.tabbar.TabSegment
|
||||
android:id="@+id/tabSegment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:ts_normal_color="#ff999999"
|
||||
app:ts_selected_color="@color/color_theme"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/vp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/dp_76"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
@ -10,7 +10,7 @@
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_346"
|
||||
android:orientation="vertical"
|
||||
android:background="@mipmap/icon_huoyuan_bottom"
|
||||
android:paddingLeft="@dimen/dp_12"
|
||||
@ -260,7 +260,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:text="货物大类"
|
||||
android:text="货物大类(交通厅)"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<LinearLayout
|
||||
@ -287,13 +287,11 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/r8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -336,13 +334,11 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#8AA5E1"
|
||||
android:alpha="0.5"/>
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/r5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -79,7 +79,6 @@
|
||||
android:background="@color/def_text" />
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -115,7 +114,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
|
||||
@ -391,16 +391,6 @@
|
||||
android:src="@mipmap/icon_my_8"
|
||||
android:scaleType="fitXY"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/onSeeLocation"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:src="@mipmap/icon_my_10"
|
||||
android:scaleType="fitXY"/>
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"/>
|
||||
|
||||
|
||||
@ -1,102 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/order_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/order_item"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_1"
|
||||
app:cardCornerRadius="@dimen/dp_8">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8">
|
||||
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_3"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/color_theme" />
|
||||
|
||||
android:background="@color/color_theme"
|
||||
android:layout_gravity="center"/>
|
||||
<TextView
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
android:text="货源号:"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
|
||||
android:textSize="@dimen/sp_13"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/orderNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0999023488"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
android:textSize="@dimen/sp_13"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="@dimen/dp_10">
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:visibility="gone"
|
||||
android:id="@+id/xuan"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:background="@null"
|
||||
android:src="@mipmap/no_xuan"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/no_xuan" />
|
||||
android:background="@null"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:background="#EFEFEF" />
|
||||
|
||||
android:background="#EFEFEF"/>
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11">
|
||||
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:src="@mipmap/icon_loading"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_loading" />
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loadingAddress"
|
||||
@ -110,19 +99,17 @@
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:src="@mipmap/icon_discharge"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/icon_discharge" />
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/receiverAddress"
|
||||
@ -137,22 +124,19 @@
|
||||
android:textSize="@dimen/sp_13" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:layout_centerVertical="true">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="¥"
|
||||
android:textColor="#fff65151"
|
||||
android:textSize="@dimen/sp_19" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalFreight"
|
||||
android:layout_width="wrap_content"
|
||||
@ -162,113 +146,51 @@
|
||||
android:textSize="@dimen/sp_19" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginBottom="@dimen/dp_7"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_7">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="状态:"
|
||||
android:textColor="#999999"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/statusOver"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="审核中"
|
||||
android:textColor="@color/color_theme"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
android:textSize="@dimen/sp_13"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:background="#EFEFEF" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
android:background="#EFEFEF"/>
|
||||
<Button
|
||||
android:id="@+id/btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:elevation="@dimen/dp_3"
|
||||
android:gravity="center"
|
||||
android:text="撤销"
|
||||
android:textColor="#ffd95959"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/llQrsh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="#EFEFEF" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnQrsh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="@null"
|
||||
android:elevation="@dimen/dp_3"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:gravity="center"
|
||||
android:text="确认收货"
|
||||
android:textColor="#00BCD4"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llAgain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="#EFEFEF" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAgain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="@null"
|
||||
android:elevation="@dimen/dp_3"
|
||||
android:gravity="center"
|
||||
android:text="再来一单"
|
||||
android:textColor="#4CAF50"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
android:elevation="@dimen/dp_3"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/state_img"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:src="@mipmap/invoicing"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
@ -1,247 +1,187 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/order_list_top">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
android:paddingRight="@dimen/dp_15">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/search_bg"
|
||||
android:drawableLeft="@drawable/search"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="搜索运单"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/sp_18"/>
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:visibility="gone"
|
||||
android:id="@+id/btnSearch"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="@dimen/dp_2"
|
||||
android:background="@drawable/shape_search_bg"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/order_list_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:background="@drawable/order_list_top_bg"
|
||||
android:elevation="@dimen/dp_1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/waybillNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="30"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="单"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_marginRight="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginRight="@dimen/dp_26"
|
||||
android:background="#fff" />
|
||||
|
||||
android:background="#fff"/>
|
||||
<TextView
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="总发货运单"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_26"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:src="@mipmap/icon_order_top1"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/icon_order_top1" />
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:background="@drawable/order_list_top_bg"
|
||||
android:elevation="@dimen/dp_1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="30"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="公里"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_marginRight="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginRight="@dimen/dp_26"
|
||||
android:background="#fff" />
|
||||
|
||||
android:background="#fff"/>
|
||||
<TextView
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="总发货里程"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:src="@mipmap/icon_order_top2"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/icon_order_top2" />
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:background="@drawable/order_list_top_bg"
|
||||
android:elevation="@dimen/dp_1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="元"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:textSize="@dimen/sp_14"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_marginRight="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginRight="@dimen/dp_26"
|
||||
android:background="#fff" />
|
||||
|
||||
android:background="#fff"/>
|
||||
<TextView
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="总运费支出"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
android:textSize="@dimen/sp_12"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_27"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:src="@mipmap/icon_order_top3"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/icon_order_top3" />
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB |
@ -2,8 +2,7 @@
|
||||
apply from: "compile.gradle"
|
||||
|
||||
buildscript {
|
||||
// ext.kotlin_version = "1.5.0"
|
||||
ext.kotlin_version = "1.6.10"
|
||||
ext.kotlin_version = "1.5.0"
|
||||
repositories {
|
||||
google()
|
||||
// jcenter() // 这个
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Thu Sep 23 20:04:06 CST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-6.7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@ -4,14 +4,11 @@ import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.ColorRes;
|
||||
import androidx.annotation.DrawableRes;
|
||||
@ -42,28 +39,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
protected Toolbar mToolbar;
|
||||
protected int mRefreshPage = 1;
|
||||
protected int mRefreshCount = 15;
|
||||
|
||||
public Handler hd=new Handler(msg -> {
|
||||
msgMethod(msg);
|
||||
return false;
|
||||
});
|
||||
|
||||
public void msgMethod(Message m){
|
||||
switch (m.what){
|
||||
case -1:
|
||||
Toast.makeText(mContext,"请求失败,请检查网络状况",Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case 404:
|
||||
Toast.makeText(mContext,"请求地址未找到",Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case 500:
|
||||
Toast.makeText(mContext,"服务器出现异常",Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
case 502:
|
||||
Toast.makeText(mContext,"网关错误",Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@ -6,7 +6,7 @@ import android.util.Base64;
|
||||
|
||||
public class Base64Utils {
|
||||
|
||||
public static Bitmap base64ToBitmap(String imageBase64){
|
||||
public static Bitmap asdf(String imageBase64){
|
||||
byte[] decodedString = Base64.decode(imageBase64, Base64.DEFAULT);
|
||||
return BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<color name="colorBlack3">#333333</color>
|
||||
<color name="colorBlack6">#666666</color>
|
||||
<color name="colorWebViewIndicator">#FE0606</color>
|
||||
<color name="mine_top_bg">#8AA5E1</color>
|
||||
<color name="mine_top_bg">#ff007aff</color>
|
||||
<color name="text_bg_blue">#3C6FC6</color>
|
||||
<color name="mask_color">#88888888</color>
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
rootProject.name = "app-dhhy-cargo"
|
||||
include ':app'
|
||||
include ':mylibrary'
|
||||
include ':keybordlib'
|
||||
|
||||