Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
AnchorCollect_p
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hywang
AnchorCollect_p
Commits
ef19c7db
Commit
ef19c7db
authored
Mar 26, 2023
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.输入框点击外面不会取消
parent
2bbdab56
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
92 additions
and
14 deletions
+92
-14
DaoMaster.java
.../main/java/com/phlx/anchorcollect_p/db/gen/DaoMaster.java
+2
-2
RetrofitClient.java
...ain/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
+4
-4
BasicsCollectFragment.java
...lx/anchorcollect_p/ui/fragment/BasicsCollectFragment.java
+65
-1
BreedingRecordFragment.java
...x/anchorcollect_p/ui/fragment/BreedingRecordFragment.java
+2
-1
ImmunRecordFragment.java
...phlx/anchorcollect_p/ui/fragment/ImmunRecordFragment.java
+2
-1
MedicalRecordFragment.java
...lx/anchorcollect_p/ui/fragment/MedicalRecordFragment.java
+2
-1
PerformanceFragment.java
...phlx/anchorcollect_p/ui/fragment/PerformanceFragment.java
+2
-1
WeightManFragment.java
...m/phlx/anchorcollect_p/ui/fragment/WeightManFragment.java
+2
-1
BasicsCollectVM.java
.../phlx/anchorcollect_p/ui/fragment/vm/BasicsCollectVM.java
+11
-2
No files found.
app/src/main/java/com/phlx/anchorcollect_p/db/gen/DaoMaster.java
View file @
ef19c7db
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
/**
* Master of DAO (schema version
1
): knows all DAOs.
* Master of DAO (schema version
3
): knows all DAOs.
*/
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
1
;
public
static
final
int
SCHEMA_VERSION
=
3
;
/** Creates underlying database table using DAOs. */
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
...
...
app/src/main/java/com/phlx/anchorcollect_p/net/RetrofitClient.java
View file @
ef19c7db
...
@@ -49,15 +49,15 @@ public class RetrofitClient {
...
@@ -49,15 +49,15 @@ public class RetrofitClient {
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
private
static
final
int
CACHE_TIMEOUT
=
10
*
1024
*
1024
;
//服务端根路径
//服务端根路径
public
static
String
baseUrl
=
public
static
String
baseUrl
=
//
"serve.xlglmnmyzspt.org.cn"//正式
"serve.xlglmnmyzspt.org.cn"
//正式
// "39.101.170.186"//阿里云测试
// "39.101.170.186"//阿里云测试
"192.168.8.135"
//董
//
"192.168.8.135"//董
// "192.168.43.154"//张敏
// "192.168.43.154"//张敏
;
;
public
static
String
port
=
public
static
String
port
=
//
""//正式
""
//正式
// "9000"//阿里云测试
// "9000"//阿里云测试
"9000"
//董
//
"9000"//董
;
;
private
static
Context
mContext
=
Utils
.
getContext
();
private
static
Context
mContext
=
Utils
.
getContext
();
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/BasicsCollectFragment.java
View file @
ef19c7db
...
@@ -45,6 +45,7 @@ import com.phlx.anchorcollect_p.entity.GenTableColumn;
...
@@ -45,6 +45,7 @@ import com.phlx.anchorcollect_p.entity.GenTableColumn;
import
com.phlx.anchorcollect_p.event.EventTag
;
import
com.phlx.anchorcollect_p.event.EventTag
;
import
com.phlx.anchorcollect_p.ui.fragment.vm.BasicsCollectVM
;
import
com.phlx.anchorcollect_p.ui.fragment.vm.BasicsCollectVM
;
import
com.phlx.anchorcollect_p.ui.info.CattleActivity
;
import
com.phlx.anchorcollect_p.ui.info.CattleActivity
;
import
com.phlx.anchorcollect_p.ui.main.MainActivity
;
import
com.phlx.anchorcollect_p.util.BaseImageUtils
;
import
com.phlx.anchorcollect_p.util.BaseImageUtils
;
import
com.phlx.anchorcollect_p.util.DictUtils
;
import
com.phlx.anchorcollect_p.util.DictUtils
;
import
com.phlx.anchorcollect_p.util.ImagePicker
;
import
com.phlx.anchorcollect_p.util.ImagePicker
;
...
@@ -58,6 +59,7 @@ import java.util.List;
...
@@ -58,6 +59,7 @@ import java.util.List;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
import
me.goldze.mvvmhabit.base.BaseFragment
;
import
me.goldze.mvvmhabit.base.BaseFragment
;
import
me.goldze.mvvmhabit.utils.StringUtils
;
import
me.goldze.mvvmhabit.utils.ToastUtils
;
import
me.goldze.mvvmhabit.utils.ToastUtils
;
...
@@ -67,6 +69,8 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -67,6 +69,8 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
private
ImagePicker
mImagePicker
;
private
ImagePicker
mImagePicker
;
public
MaterialDialog
scanRfidDialog
;
private
static
class
SingletonClassInstance
{
private
static
class
SingletonClassInstance
{
private
static
final
BasicsCollectFragment
instance
=
new
BasicsCollectFragment
();
private
static
final
BasicsCollectFragment
instance
=
new
BasicsCollectFragment
();
}
}
...
@@ -165,6 +169,15 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -165,6 +169,15 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
@Override
@Override
public
void
initViewObservable
()
{
public
void
initViewObservable
()
{
super
.
initViewObservable
();
super
.
initViewObservable
();
viewModel
.
setRfidValueEvent
.
observe
(
this
,
new
Observer
<
String
>()
{
@Override
public
void
onChanged
(
String
s
)
{
scanRfidDialog
.
setContent
(
s
);
}
});
viewModel
.
onCardClickEvent
.
observe
(
getActivity
(),
new
Observer
<
Boolean
>()
{
viewModel
.
onCardClickEvent
.
observe
(
getActivity
(),
new
Observer
<
Boolean
>()
{
@Override
@Override
public
void
onChanged
(
Boolean
aBoolean
)
{
public
void
onChanged
(
Boolean
aBoolean
)
{
...
@@ -187,6 +200,9 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -187,6 +200,9 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
case
"photo"
:
case
"photo"
:
showPhotoDialog
(
viewModel
.
currentParamEntity
);
showPhotoDialog
(
viewModel
.
currentParamEntity
);
break
;
break
;
case
"inventory"
:
showInventoryDialog
(
viewModel
.
currentParamEntity
);
break
;
}
}
}
}
...
@@ -309,7 +325,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -309,7 +325,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -354,6 +370,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -354,6 +370,7 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
@@ -404,6 +421,53 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
...
@@ -404,6 +421,53 @@ public class BasicsCollectFragment extends BaseFragment<FragmentBasicsCollectBin
});
});
}
}
//盘点
private
void
showInventoryDialog
(
GenTableColumn
uiParamEntity
)
{
scanRfidDialog
=
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
"牲畜耳标"
)
// .iconRes(R.drawable.ic_logo)
.
content
(
""
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .inputType(inputType)//可以输入的类型
// .inputRangeRes(0, columnSize, android.R.color.black)
//前2个一个是hint一个是预输入的文字
// .input("低频耳标", "", new MaterialDialog.InputCallback() {
// @Override
// public void onInput(@NonNull MaterialDialog dialog, CharSequence input) {
// Log.i("scan", "输入的是:" + input);
// }
// })
.
negativeText
(
"取消"
)
.
neutralText
(
"扫描"
)
.
positiveText
(
"确定"
)
.
autoDismiss
(
false
)
.
onPositive
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
viewModel
.
currentParamEntity
.
setShowName
(
dialog
.
getContentView
().
getText
().
toString
());
viewModel
.
currentParamEntity
.
setContent
(
dialog
.
getContentView
().
getText
().
toString
());
viewModel
.
currentParamEntity
.
notifyChange
();
dialog
.
dismiss
();
}
})
.
onNeutral
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
viewModel
.
scanFunction
=
1
;
viewModel
.
scanRfid
();
}
})
.
onNegative
(
new
MaterialDialog
.
SingleButtonCallback
()
{
@Override
public
void
onClick
(
@NonNull
MaterialDialog
dialog
,
@NonNull
DialogAction
which
)
{
dialog
.
dismiss
();
}
})
.
show
();
}
//时间选择
//时间选择
private
void
showSelectDateDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showSelectDateDialog
(
GenTableColumn
uiParamEntity
)
{
pvTime
.
show
(
binding
.
card99
);
pvTime
.
show
(
binding
.
card99
);
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/BreedingRecordFragment.java
View file @
ef19c7db
...
@@ -204,7 +204,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -204,7 +204,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -269,6 +269,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
...
@@ -269,6 +269,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/ImmunRecordFragment.java
View file @
ef19c7db
...
@@ -187,7 +187,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
...
@@ -187,7 +187,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -252,6 +252,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
...
@@ -252,6 +252,7 @@ public class ImmunRecordFragment extends BaseFragment<FragmentImmunRecordBinding
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/MedicalRecordFragment.java
View file @
ef19c7db
...
@@ -186,7 +186,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
...
@@ -186,7 +186,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -251,6 +251,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
...
@@ -251,6 +251,7 @@ public class MedicalRecordFragment extends BaseFragment<FragmentMedicalRecordBin
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/PerformanceFragment.java
View file @
ef19c7db
...
@@ -187,7 +187,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
...
@@ -187,7 +187,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -252,6 +252,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
...
@@ -252,6 +252,7 @@ public class PerformanceFragment extends BaseFragment<FragmentPerformanceBinding
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/WeightManFragment.java
View file @
ef19c7db
...
@@ -300,7 +300,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
...
@@ -300,7 +300,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
private
void
showCheckboxDialog
(
GenTableColumn
uiParamEntity
)
{
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
new
MaterialDialog
.
Builder
(
getActivity
()).
title
(
"系统信息"
).
content
(
"请选择!!!"
)
.
cancelable
(
false
).
canceledOnTouchOutside
(
false
)
//
.cancelable(false).canceledOnTouchOutside(false)
.
positiveText
(
"确定"
)
.
positiveText
(
"确定"
)
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
items
(
DictUtils
.
getDistNameList
(
uiParamEntity
.
getDictType
()))
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
.
itemsCallbackMultiChoice
(
null
,
new
MaterialDialog
.
ListCallbackMultiChoice
()
{
...
@@ -366,6 +366,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
...
@@ -366,6 +366,7 @@ public class WeightManFragment extends BaseFragment<FragmentWeightmanBinding, We
new
MaterialDialog
.
Builder
(
getActivity
())
new
MaterialDialog
.
Builder
(
getActivity
())
.
title
(
uiParamEntity
.
getColumnComment
())
.
title
(
uiParamEntity
.
getColumnComment
())
// .iconRes(R.drawable.ic_logo)
// .iconRes(R.drawable.ic_logo)
.
canceledOnTouchOutside
(
false
)
.
content
(
"请输入"
)
.
content
(
"请输入"
)
// .widgetColor(Color.BLUE)//输入框光标的颜色
// .widgetColor(Color.BLUE)//输入框光标的颜色
.
inputType
(
inputType
)
//可以输入的类型
.
inputType
(
inputType
)
//可以输入的类型
...
...
app/src/main/java/com/phlx/anchorcollect_p/ui/fragment/vm/BasicsCollectVM.java
View file @
ef19c7db
...
@@ -90,6 +90,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -90,6 +90,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
public
SingleLiveEvent
<
Boolean
>
onTagClickEvent
=
new
SingleLiveEvent
<>();
public
SingleLiveEvent
<
Boolean
>
onTagClickEvent
=
new
SingleLiveEvent
<>();
public
SingleLiveEvent
<
Boolean
>
onNotifyAllEvent
=
new
SingleLiveEvent
<>();
//true是清空页面
public
SingleLiveEvent
<
Boolean
>
onNotifyAllEvent
=
new
SingleLiveEvent
<>();
//true是清空页面
public
SingleLiveEvent
<
String
>
setRfidValueEvent
=
new
SingleLiveEvent
<>();
//设置弹窗的扫到的标签epc
public
SingleLiveEvent
<
String
>
onShowDialogEvent
=
new
SingleLiveEvent
<>();
//弹窗提示
public
SingleLiveEvent
<
String
>
onShowDialogEvent
=
new
SingleLiveEvent
<>();
//弹窗提示
public
ObservableField
<
String
>
tag
=
new
ObservableField
<>(
""
);
public
ObservableField
<
String
>
tag
=
new
ObservableField
<>(
""
);
...
@@ -118,6 +120,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -118,6 +120,8 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
private
List
<
CattleResumeEntity
>
uploadData
;
private
List
<
CattleResumeEntity
>
uploadData
;
public
int
scanFunction
=
0
;
//0 是普通扫描耳标,1 是弹出窗的扫描耳标
public
BasicsCollectVM
(
@NonNull
Application
application
,
Repository
model
)
{
public
BasicsCollectVM
(
@NonNull
Application
application
,
Repository
model
)
{
super
(
application
,
model
);
super
(
application
,
model
);
...
@@ -222,7 +226,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -222,7 +226,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
}
}
//扫描rfid
//扫描rfid
p
rivate
void
scanRfid
()
{
p
ublic
void
scanRfid
()
{
if
(!
isScan
)
{
if
(!
isScan
)
{
rfidTag
=
""
;
rfidTag
=
""
;
...
@@ -320,6 +324,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -320,6 +324,7 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
public
BindingCommand
onWeightChangedClick
=
new
BindingCommand
(
new
BindingAction
()
{
public
BindingCommand
onWeightChangedClick
=
new
BindingCommand
(
new
BindingAction
()
{
@Override
@Override
public
void
call
()
{
public
void
call
()
{
scanFunction
=
0
;
scanRfid
();
scanRfid
();
}
}
});
});
...
@@ -520,7 +525,11 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
...
@@ -520,7 +525,11 @@ public class BasicsCollectVM extends BaseViewModel<Repository> implements OnInve
private
void
checkEpc
(
String
epc
,
String
tid
)
{
private
void
checkEpc
(
String
epc
,
String
tid
)
{
ToastUtils
.
showShort
(
"盘点到标签:"
+
epc
+
"|停止盘点"
);
ToastUtils
.
showShort
(
"盘点到标签:"
+
epc
+
"|停止盘点"
);
rfidTag
=
epc
+
tid
;
rfidTag
=
epc
+
tid
;
if
(
scanFunction
==
0
)
{
initDataForRfid
(
epc
);
initDataForRfid
(
epc
);
}
else
if
(
scanFunction
==
1
)
{
setRfidValueEvent
.
setValue
(
epc
);
}
}
}
@Override
@Override
...
...
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