Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
6f431b7e
Commit
6f431b7e
authored
Sep 30, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9.30 清理編譯警告代碼
Signed-off-by: Wyh <1239658231>
parent
9e31d381
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
50 additions
and
60 deletions
+50
-60
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/SoundPoolUtils.kt
+2
-2
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
+3
-3
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoSession.java
+14
-14
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/ExpandInfoDao.java
+3
-3
build.gradle
+4
-4
cc-register/build.gradle
+3
-3
cc-register/src/main/groovy/com/billy/android/register/cc/ProjectModuleManager.groovy
+1
-4
cc/src/main/java/com/billy/cc/core/component/CC.java
+3
-4
config.gradle
+1
-1
delivery_pick_module/build.gradle
+0
-6
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/data/model/bean/ThirdSend.kt
+1
-1
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/HistoryOrderViewModel.kt
+1
-1
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/PageViewModel.kt
+4
-4
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/DeliveryOrderMainActivity.kt
+3
-3
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/DeliverySettingActivity.kt
+1
-1
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/HistoryOrderActivity.kt
+1
-1
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/OrderDetailsActivity.kt
+3
-3
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/fragment/HistoryFragment.kt
+2
-2
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/SoundPoolUtils.kt
View file @
6f431b7e
...
...
@@ -13,7 +13,7 @@ object SoundPoolUtils {
//实例化SoundPool
//sdk版本21是SoundPool 的一个分水岭
if
(
soundPool
==
null
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
21
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
val
builder
=
SoundPool
.
Builder
()
//传入最多播放音频数量,
builder
.
setMaxStreams
(
1
)
...
...
@@ -49,7 +49,7 @@ object SoundPoolUtils {
private
fun
loadSound
(
context
:
Context
,
resId
:
Int
)
{
val
voiceId
=
soundPool
!!
.
load
(
context
,
resId
,
1
)
//异步需要等待加载完成,音频才能播放成功
soundPool
!!
.
setOnLoadCompleteListener
{
soundPool
,
sampleId
,
status
->
soundPool
!!
.
setOnLoadCompleteListener
{
soundPool
,
_
,
status
->
if
(
status
==
0
)
{
//第一个参数soundID
//第二个参数leftVolume为左侧音量值(范围= 0.0到1.0)
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
View file @
6f431b7e
...
...
@@ -31,8 +31,8 @@ public class DaoMaster extends AbstractDaoMaster {
LanguageDao
.
createTable
(
db
,
ifNotExists
);
ModifierDao
.
createTable
(
db
,
ifNotExists
);
PrintCurrencyBeanDao
.
createTable
(
db
,
ifNotExists
);
PrinterDeviceBeanDao
.
createTable
(
db
,
ifNotExists
);
PrintModelBeanDao
.
createTable
(
db
,
ifNotExists
);
PrinterDeviceBeanDao
.
createTable
(
db
,
ifNotExists
);
}
/** Drops underlying database table using DAOs. */
...
...
@@ -47,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster {
LanguageDao
.
dropTable
(
db
,
ifExists
);
ModifierDao
.
dropTable
(
db
,
ifExists
);
PrintCurrencyBeanDao
.
dropTable
(
db
,
ifExists
);
PrinterDeviceBeanDao
.
dropTable
(
db
,
ifExists
);
PrintModelBeanDao
.
dropTable
(
db
,
ifExists
);
PrinterDeviceBeanDao
.
dropTable
(
db
,
ifExists
);
}
/**
...
...
@@ -77,8 +77,8 @@ public class DaoMaster extends AbstractDaoMaster {
registerDaoClass
(
LanguageDao
.
class
);
registerDaoClass
(
ModifierDao
.
class
);
registerDaoClass
(
PrintCurrencyBeanDao
.
class
);
registerDaoClass
(
PrinterDeviceBeanDao
.
class
);
registerDaoClass
(
PrintModelBeanDao
.
class
);
registerDaoClass
(
PrinterDeviceBeanDao
.
class
);
}
public
DaoSession
newSession
()
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoSession.java
View file @
6f431b7e
...
...
@@ -18,8 +18,8 @@ import com.gingersoft.gsa.cloud.database.bean.Function;
import
com.gingersoft.gsa.cloud.database.bean.Language
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.greendao.ComboItemDao
;
import
com.gingersoft.gsa.cloud.database.greendao.DiscountDao
;
...
...
@@ -31,8 +31,8 @@ import com.gingersoft.gsa.cloud.database.greendao.FunctionDao;
import
com.gingersoft.gsa.cloud.database.greendao.LanguageDao
;
import
com.gingersoft.gsa.cloud.database.greendao.ModifierDao
;
import
com.gingersoft.gsa.cloud.database.greendao.PrintCurrencyBeanDao
;
import
com.gingersoft.gsa.cloud.database.greendao.PrinterDeviceBeanDao
;
import
com.gingersoft.gsa.cloud.database.greendao.PrintModelBeanDao
;
import
com.gingersoft.gsa.cloud.database.greendao.PrinterDeviceBeanDao
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
...
...
@@ -53,8 +53,8 @@ public class DaoSession extends AbstractDaoSession {
private
final
DaoConfig
languageDaoConfig
;
private
final
DaoConfig
modifierDaoConfig
;
private
final
DaoConfig
printCurrencyBeanDaoConfig
;
private
final
DaoConfig
printerDeviceBeanDaoConfig
;
private
final
DaoConfig
printModelBeanDaoConfig
;
private
final
DaoConfig
printerDeviceBeanDaoConfig
;
private
final
ComboItemDao
comboItemDao
;
private
final
DiscountDao
discountDao
;
...
...
@@ -66,8 +66,8 @@ public class DaoSession extends AbstractDaoSession {
private
final
LanguageDao
languageDao
;
private
final
ModifierDao
modifierDao
;
private
final
PrintCurrencyBeanDao
printCurrencyBeanDao
;
private
final
PrinterDeviceBeanDao
printerDeviceBeanDao
;
private
final
PrintModelBeanDao
printModelBeanDao
;
private
final
PrinterDeviceBeanDao
printerDeviceBeanDao
;
public
DaoSession
(
Database
db
,
IdentityScopeType
type
,
Map
<
Class
<?
extends
AbstractDao
<?,
?>>,
DaoConfig
>
daoConfigMap
)
{
...
...
@@ -103,12 +103,12 @@ public class DaoSession extends AbstractDaoSession {
printCurrencyBeanDaoConfig
=
daoConfigMap
.
get
(
PrintCurrencyBeanDao
.
class
).
clone
();
printCurrencyBeanDaoConfig
.
initIdentityScope
(
type
);
printerDeviceBeanDaoConfig
=
daoConfigMap
.
get
(
PrinterDeviceBeanDao
.
class
).
clone
();
printerDeviceBeanDaoConfig
.
initIdentityScope
(
type
);
printModelBeanDaoConfig
=
daoConfigMap
.
get
(
PrintModelBeanDao
.
class
).
clone
();
printModelBeanDaoConfig
.
initIdentityScope
(
type
);
printerDeviceBeanDaoConfig
=
daoConfigMap
.
get
(
PrinterDeviceBeanDao
.
class
).
clone
();
printerDeviceBeanDaoConfig
.
initIdentityScope
(
type
);
comboItemDao
=
new
ComboItemDao
(
comboItemDaoConfig
,
this
);
discountDao
=
new
DiscountDao
(
discountDaoConfig
,
this
);
expandInfoDao
=
new
ExpandInfoDao
(
expandInfoDaoConfig
,
this
);
...
...
@@ -119,8 +119,8 @@ public class DaoSession extends AbstractDaoSession {
languageDao
=
new
LanguageDao
(
languageDaoConfig
,
this
);
modifierDao
=
new
ModifierDao
(
modifierDaoConfig
,
this
);
printCurrencyBeanDao
=
new
PrintCurrencyBeanDao
(
printCurrencyBeanDaoConfig
,
this
);
printerDeviceBeanDao
=
new
PrinterDeviceBeanDao
(
printerDeviceBeanDaoConfig
,
this
);
printModelBeanDao
=
new
PrintModelBeanDao
(
printModelBeanDaoConfig
,
this
);
printerDeviceBeanDao
=
new
PrinterDeviceBeanDao
(
printerDeviceBeanDaoConfig
,
this
);
registerDao
(
ComboItem
.
class
,
comboItemDao
);
registerDao
(
Discount
.
class
,
discountDao
);
...
...
@@ -132,8 +132,8 @@ public class DaoSession extends AbstractDaoSession {
registerDao
(
Language
.
class
,
languageDao
);
registerDao
(
Modifier
.
class
,
modifierDao
);
registerDao
(
PrintCurrencyBean
.
class
,
printCurrencyBeanDao
);
registerDao
(
PrinterDeviceBean
.
class
,
printerDeviceBeanDao
);
registerDao
(
PrintModelBean
.
class
,
printModelBeanDao
);
registerDao
(
PrinterDeviceBean
.
class
,
printerDeviceBeanDao
);
}
public
void
clear
()
{
...
...
@@ -147,8 +147,8 @@ public class DaoSession extends AbstractDaoSession {
languageDaoConfig
.
clearIdentityScope
();
modifierDaoConfig
.
clearIdentityScope
();
printCurrencyBeanDaoConfig
.
clearIdentityScope
();
printerDeviceBeanDaoConfig
.
clearIdentityScope
();
printModelBeanDaoConfig
.
clearIdentityScope
();
printerDeviceBeanDaoConfig
.
clearIdentityScope
();
}
public
ComboItemDao
getComboItemDao
()
{
...
...
@@ -191,12 +191,12 @@ public class DaoSession extends AbstractDaoSession {
return
printCurrencyBeanDao
;
}
public
PrinterDeviceBeanDao
getPrinterDeviceBeanDao
()
{
return
printerDeviceBeanDao
;
}
public
PrintModelBeanDao
getPrintModelBeanDao
()
{
return
printModelBeanDao
;
}
public
PrinterDeviceBeanDao
getPrinterDeviceBeanDao
()
{
return
printerDeviceBeanDao
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/ExpandInfoDao.java
View file @
6f431b7e
...
...
@@ -3,13 +3,13 @@ package com.gingersoft.gsa.cloud.database.greendao;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
...
...
build.gradle
View file @
6f431b7e
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply
from:
"config.gradle"
buildscript
{
ext
.
kotlin_version
=
'1.
3.5
0'
ext
.
kotlin_version
=
'1.
4.1
0'
//1.3.50
repositories
{
google
()
jcenter
()
...
...
@@ -10,7 +10,7 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.
3
'
classpath
'com.android.tools.build:gradle:3.5.
2
'
// classpath 'com.android.tools.build:gradle:3.0.1'
classpath
'com.github.dcendents:android-maven-gradle-plugin:2.0'
...
...
@@ -23,7 +23,7 @@ buildscript {
classpath
'com.novoda:bintray-release:0.9.2'
classpath
'com.billy.android:cc-register:1.1.2'
classpath
'org.greenrobot:greendao-gradle-plugin:3.
2.2
'
classpath
'org.greenrobot:greendao-gradle-plugin:3.
3.0
'
// classpath 'org.aspectj:aspectjtools:1.8.13' // add
// classpath 'org.aspectj:aspectjrt:1.8.13' // add
...
...
cc-register/build.gradle
View file @
6f431b7e
...
...
@@ -2,15 +2,15 @@ apply plugin: 'groovy'
dependencies
{
compile
gradleApi
()
compile
localGroovy
()
implementation
gradleApi
()
implementation
localGroovy
()
}
repositories
{
mavenCentral
()
}
dependencies
{
compile
'com.android.tools.build:gradle:3.5.3'
implementation
'com.android.tools.build:gradle:3.5.3'
}
ext
{
...
...
cc-register/src/main/groovy/com/billy/android/register/cc/ProjectModuleManager.groovy
View file @
6f431b7e
package
com.billy.android.register.cc
import
com.billy.android.register.RegisterPlugin
import
groovy.util.logging.Log
import
org.gradle.api.Project
import
org.gradle.util.GradleVersion
import
java.util.logging.Logger
import
java.util.regex.Pattern
/**
* 工程中的组件module管理工具
* 1. 用于管理组件module以application或library方式进行编译
...
...
@@ -162,7 +159,7 @@ class ProjectModuleManager {
def
excludeModule
=
'true'
==
localProperties
.
getProperty
(
dependencyName
)
if
(!
excludeModule
)
{
def
componentProject
=
project
.
rootProject
.
subprojects
.
find
{
it
.
name
==
dependencyName
}
def
dependencyMode
=
GradleVersion
.
version
(
project
.
gradle
.
gradleVersion
)
>=
GradleVersion
.
version
(
'4.1'
)
?
'api'
:
'
compile
'
def
dependencyMode
=
GradleVersion
.
version
(
project
.
gradle
.
gradleVersion
)
>=
GradleVersion
.
version
(
'4.1'
)
?
'api'
:
'
implementation
'
if
(
realDependency
)
{
//通过参数传递的依赖方式,如:
// project(':moduleName')
...
...
cc/src/main/java/com/billy/cc/core/component/CC.java
View file @
6f431b7e
...
...
@@ -10,6 +10,9 @@ import android.os.SystemClock;
import
android.text.TextUtils
;
import
android.util.Log
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
com.billy.android.pools.ObjPool
;
import
org.json.JSONObject
;
...
...
@@ -22,9 +25,6 @@ import java.util.Map;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
static
com
.
billy
.
cc
.
core
.
component
.
CCUtil
.
put
;
import
static
com
.
billy
.
cc
.
core
.
component
.
ComponentManager
.
ACTION_REGISTER
;
import
static
com
.
billy
.
cc
.
core
.
component
.
ComponentManager
.
ACTION_UNREGISTER
;
...
...
@@ -38,7 +38,6 @@ import static com.billy.cc.core.component.ComponentManager.KEY_PROCESS_NAME;
* @author billy.qi
*/
@SuppressLint
(
"PrivateApi"
)
public
class
CC
{
private
static
final
String
TAG
=
"ComponentCaller"
;
private
static
final
String
VERBOSE_TAG
=
"ComponentCaller_VERBOSE"
;
...
...
config.gradle
View file @
6f431b7e
...
...
@@ -2,7 +2,7 @@ ext {
android
=
[
compileSdkVersion:
28
,
buildToolsVersion:
'2
8.0.3
'
,
buildToolsVersion:
'2
9.0.2
'
,
minSdkVersion
:
19
,
//N5收銀機應用安卓開發環境要求Android OS Version: 5.1Android SDK Min Version: 19
targetSdkVersion
:
28
,
//正式版: 1.0.3 3
...
...
delivery_pick_module/build.gradle
View file @
6f431b7e
...
...
@@ -22,12 +22,6 @@ android {
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
// javaCompileOptions {
// annotationProcessorOptions {
// arguments = [AROUTER_MODULE_NAME: project.getName()]
// includeCompileClasspath true
// }
// }
}
resourcePrefix
"otherOrder"
dataBinding
{
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/data/model/bean/ThirdSend.kt
View file @
6f431b7e
...
...
@@ -4,7 +4,7 @@ data class ThirdSend(
val
`data`
:
Data
,
val
success
:
Boolean
,
val
errCode
:
String
,
val
errMsg
:
String
,
val
errMsg
:
String
?
,
val
sysTime
:
Long
,
val
code
:
String
,
val
message
:
String
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/HistoryOrderViewModel.kt
View file @
6f431b7e
...
...
@@ -25,7 +25,7 @@ class HistoryOrderViewModel(private val historyOrderRepository: HistoryOrderRepo
var
searchValue
=
MutableLiveData
(
""
)
//按搜索內容查詢
var
orderType
=
0
fun
getHistoryOrderList
(
context
:
Context
,
pageIndex
:
String
,
orderNum
:
String
=
""
,
startDate
:
String
,
endDate
:
String
,
status
:
String
)
{
fun
getHistoryOrderList
(
pageIndex
:
String
,
orderNum
:
String
=
""
,
startDate
:
String
,
endDate
:
String
,
status
:
String
)
{
launch
({
var
phone
=
""
var
orderNumber
=
""
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/model/viewModel/PageViewModel.kt
View file @
6f431b7e
...
...
@@ -593,7 +593,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
.
addParam
(
PrintConstans
.
PRINT_LOADING
,
false
)
.
setActionName
(
"printActivity"
)
.
build
()
.
callAsyncCallbackOnMainThread
{
_
,
result
->
.
callAsyncCallbackOnMainThread
{
_
,
_
->
}
}
...
...
@@ -629,7 +629,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
listener
(
getMsgBean
(
Transportation
,
errMsg
?:
"修改運輸工具成功"
,
success
))
}
}
else
if
(!
TextUtil
.
isEmptyOrNullOrUndefined
(
errMsg
))
{
listener
.
invoke
(
getMsgBean
(
OrderDelivery
,
errMsg
,
false
))
listener
.
invoke
(
getMsgBean
(
OrderDelivery
,
errMsg
!!
,
false
))
//第三方物流接口異常
OkHttp3Utils
.
noticePersonnel
(
AppConstans
.
RP_THIRE_LOGISTICS_ERROR
,
"第三方物流請求失敗:$errMsg"
)
}
else
if
(!
TextUtil
.
isEmptyOrNullOrUndefined
(
message
))
{
...
...
@@ -689,7 +689,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
val
deliveryAdapter
=
DeliveryAdapter
(
data
)
recycler
.
adapter
=
deliveryAdapter
deliveryAdapter
.
setOnItemClickListener
{
adapter
,
view
,
position
->
deliveryAdapter
.
setOnItemClickListener
{
adapter
,
_
,
position
->
selectIndex
=
position
deliveryAdapter
.
selectIndex
=
position
adapter
.
notifyDataSetChanged
()
...
...
@@ -763,7 +763,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
val
deliveryAdapter
=
DeliveryAdapter
(
data
)
recycler
.
adapter
=
deliveryAdapter
deliveryAdapter
.
setOnItemClickListener
{
adapter
,
view
,
position
->
deliveryAdapter
.
setOnItemClickListener
{
adapter
,
_
,
position
->
selectIndex
=
position
deliveryAdapter
.
selectIndex
=
position
adapter
.
notifyDataSetChanged
()
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/DeliveryOrderMainActivity.kt
View file @
6f431b7e
...
...
@@ -117,9 +117,9 @@ class DeliveryOrderMainActivity : BaseActivity() {
pageViewModel
.
apply
{
getDeliveryInfo
(
restaurantId
.
toString
(),
memberId
.
toString
())
balanceBean
.
observe
(
this
@DeliveryOrderMainActivity
,
Observer
{
it
?.
data
?.
let
{
it
->
tv_balance
.
text
=
"餘額:${
it.balance}"
+
"(保證金: ${it
.bond} )"
if
(
it
.
balance
<=
it
.
threshold
)
{
it
?.
data
?.
let
{
data
->
tv_balance
.
text
=
"餘額:${
data.balance}"
+
"(保證金: ${data
.bond} )"
if
(
data
.
balance
<=
data
.
threshold
)
{
//提示餘額不足
tv_balance
.
setTextColor
(
getmColor
(
R
.
color
.
theme_red_color
))
}
else
{
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/DeliverySettingActivity.kt
View file @
6f431b7e
...
...
@@ -21,7 +21,7 @@ class DeliverySettingActivity : BaseActivity() {
top_bar_delivery
.
setTitle
(
"配送設置"
)
top_bar_delivery
.
setBackgroundColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
theme_color
))
top_bar_delivery
.
addLeftImageButton
(
R
.
drawable
.
icon_return
,
R
.
id
.
iv_left_back
).
setOnClickListener
{
finish
()
}
top_bar_delivery
.
addRightImageButton
(
R
.
drawable
.
ic_add
,
R
.
id
.
topbar_right_change_button
).
setOnClickListener
{
v
->
top_bar_delivery
.
addRightImageButton
(
R
.
drawable
.
ic_add
,
R
.
id
.
topbar_right_change_button
).
setOnClickListener
{
supportFragmentManager
.
beginTransaction
().
add
(
R
.
id
.
fl_delivery
,
UpdateDeliveryFragment
.
newInstance
(
null
)).
addToBackStack
(
null
).
commit
()
}
}
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/HistoryOrderActivity.kt
View file @
6f431b7e
...
...
@@ -94,7 +94,7 @@ class HistoryOrderActivity : BaseActivity() {
}
catch
(
e
:
ParseException
)
{
e
.
printStackTrace
()
}
TimePickerUtils
.
showReportTimePicker
(
this
@HistoryOrderActivity
,
cal
)
{
date
,
v
->
TimePickerUtils
.
showReportTimePicker
(
this
@HistoryOrderActivity
,
cal
)
{
date
,
_
->
// tv_start_time.text = TimeUtils.DATE_FORMAT_DATE.format(date)
// time = TimeUtils.DATE_FORMAT_DATE.format(date)
mViewModel
.
historyTime
.
postValue
(
TimeUtils
.
DATE_FORMAT_DATE
.
format
(
date
))
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/activity/OrderDetailsActivity.kt
View file @
6f431b7e
...
...
@@ -300,14 +300,14 @@ class OrderDetailsActivity : BaseActivity() {
// 亂糟糟的代碼,該優化了
//--------------------------------------------------------------不同按鈕點擊事件----------------------------------------------------------------------------------------
orderBtnAdapter
.
setOnItemClickListener
{
adapter
,
view
,
position
->
orderBtnAdapter
.
setOnItemClickListener
{
_
,
_
,
position
->
when
(
btnList
[
position
].
type
)
{
BtnBuilder
.
LogisticsBtn
->
//取消第三方物流 彈出彈窗詢問是否確認取消
cancelLogistics
(
orderDetails
)
BtnBuilder
.
AssignDeliveryBtn
->
//指派送貨
selectorDelivery
(
this
@OrderDetailsActivity
,
orderDetails
,
3
)
{
status
,
isSuccess
->
finish
()
}
selectorDelivery
(
this
@OrderDetailsActivity
,
orderDetails
,
3
)
{
_
,
_
->
finish
()
}
BtnBuilder
.
CancelBtn
->
//取消訂單
cancelOrder
(
orderDetails
)
...
...
@@ -326,7 +326,7 @@ class OrderDetailsActivity : BaseActivity() {
BtnBuilder
.
ClosingBtn
->
{
//如果是在線支付的訂單,就直接修改訂單狀態
if
(
orderPayType
!=
1
)
{
gsUpdateOrderStatus
(
orderDetails
,
null
)
{
status
,
isSuccess
->
gsUpdateOrderStatus
(
orderDetails
,
null
)
{
_
,
isSuccess
->
if
(
isSuccess
)
{
finish
()
}
else
{
...
...
delivery_pick_module/src/main/java/com/gingersoft/gsa/delivery_pick_mode/ui/fragment/HistoryFragment.kt
View file @
6f431b7e
...
...
@@ -47,7 +47,7 @@ class HistoryFragment : BaseFragment(R.layout.fragment_other_order) {
if
(
it2
.
data
!=
null
&&
it2
.
data
!!
.
isNotEmpty
())
{
//顯示彈窗
context
?.
let
{
context
->
OtherOrderUtils
.
showOrderDetailsDialog
(
context
,
it2
,
it
.
STATUS
,
it
.
order_type
,
true
)
{
view
,
_
,
_
->
OtherOrderUtils
.
showOrderDetailsDialog
(
context
,
it2
,
it
.
STATUS
,
it
.
order_type
,
true
)
{
_
,
_
,
_
->
//重印
showLoading
()
viewModel
.
printOrder
(
context
,
it
)
{
...
...
@@ -101,7 +101,7 @@ class HistoryFragment : BaseFragment(R.layout.fragment_other_order) {
private
fun
getHistoryInfo
(
page
:
Int
=
pageIndex
)
{
showLoading
()
viewModel
.
getHistoryOrderList
(
activity
!!
,
page
.
toString
(),
viewModel
.
searchValue
.
value
!!
,
viewModel
.
historyTime
.
value
!!
,
viewModel
.
historyTime
.
value
!!
,
viewModel
.
status
.
value
!!
)
viewModel
.
getHistoryOrderList
(
page
.
toString
(),
viewModel
.
searchValue
.
value
!!
,
viewModel
.
historyTime
.
value
!!
,
viewModel
.
historyTime
.
value
!!
,
viewModel
.
status
.
value
!!
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment