|
|
@@ -60,33 +60,39 @@ public class CustomerVisitBillInputActivity extends BillInputActivity {
|
|
|
@Override
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
if (item.getItemId() == R.id.saveAndSubmit) {
|
|
|
- String mp_cuname = "";
|
|
|
- String mp_address = "";
|
|
|
- List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
|
|
|
- for (BillGroupModel.BillModel billModel : showBillModels) {
|
|
|
- if ("mp_address".equals(billModel.getField())) {
|
|
|
- mp_address = billModel.getValue();
|
|
|
- }
|
|
|
- if (StringUtil.hasOneEqual(billModel.getField(), "mp_cuname", "mp_xmmc_user")) {
|
|
|
- mp_cuname = billModel.getValue();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (!StringUtil.isEmpty(mp_cuname) || !StringUtil.isEmpty(mp_address)) {
|
|
|
- if (address == null) {
|
|
|
- address = new SelectAimModel();
|
|
|
- }
|
|
|
- address.setName(mp_cuname);
|
|
|
- address.setAddress(mp_address);
|
|
|
+ if (!CommonUtil.isRepeatClick(4000)) {
|
|
|
+ submitBill();
|
|
|
}
|
|
|
-
|
|
|
- loadLatLng(StringUtil.isEmpty(mp_address) ? mp_cuname : mp_address);
|
|
|
} else if (item.getItemId() == com.modular.apputils.R.id.list) {
|
|
|
toDataFormList();
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ private void submitBill() {
|
|
|
+ String mp_cuname = "";
|
|
|
+ String mp_address = "";
|
|
|
+ List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
|
|
|
+ for (BillGroupModel.BillModel billModel : showBillModels) {
|
|
|
+ if ("mp_address".equals(billModel.getField())) {
|
|
|
+ mp_address = billModel.getValue();
|
|
|
+ }
|
|
|
+ if (StringUtil.hasOneEqual(billModel.getField(), "mp_cuname", "mp_xmmc_user")) {
|
|
|
+ mp_cuname = billModel.getValue();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!StringUtil.isEmpty(mp_cuname) || !StringUtil.isEmpty(mp_address)) {
|
|
|
+ if (address == null) {
|
|
|
+ address = new SelectAimModel();
|
|
|
+ }
|
|
|
+ address.setName(mp_cuname);
|
|
|
+ address.setAddress(mp_address);
|
|
|
+ }
|
|
|
+
|
|
|
+ loadLatLng(StringUtil.isEmpty(mp_address) ? mp_cuname : mp_address);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void setAdapter(List<BillGroupModel> groupModels) {
|
|
|
if (!ListUtils.isEmpty(groupModels)) {
|