|
|
@@ -61,8 +61,8 @@ import java.util.regex.Pattern;
|
|
|
* @desc:小秘书新增界面
|
|
|
* @author:Arison on 2017/6/22
|
|
|
*/
|
|
|
-public class BookingAddActivity extends SupportToolBarActivity implements View.OnClickListener {
|
|
|
-
|
|
|
+public class BookingAddActivity extends SupportToolBarActivity implements View.OnClickListener {
|
|
|
+
|
|
|
private TextView tvBookObject;
|
|
|
private RelativeLayout companyAddRl;
|
|
|
private RelativeLayout rlObject;
|
|
|
@@ -83,23 +83,24 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
private NScrollerGridView gv_topic;
|
|
|
List<DataState> dataStates;
|
|
|
GridDataAdapter adapter;
|
|
|
- private String[] mTypes ;
|
|
|
+ private String[] mTypes;
|
|
|
private String phone;
|
|
|
+ private String mWhichPage;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.activity_book_add);
|
|
|
setTitle(getString(R.string.booking_add));
|
|
|
- tvBookObject =findViewById(R.id.tv_book_object);
|
|
|
- companyAddRl =findViewById(R.id.company_add_rl);
|
|
|
- tvBookTimes =findViewById(R.id.tv_book_times);
|
|
|
+ tvBookObject = findViewById(R.id.tv_book_object);
|
|
|
+ companyAddRl = findViewById(R.id.company_add_rl);
|
|
|
+ tvBookTimes = findViewById(R.id.tv_book_times);
|
|
|
remarkRl = findViewById(R.id.remark_rl);
|
|
|
- rlObject =findViewById(R.id.rl_object);
|
|
|
+ rlObject = findViewById(R.id.rl_object);
|
|
|
|
|
|
topic_rl = findViewById(R.id.topic_rl);
|
|
|
- tvBookAddress =findViewById(R.id.tv_book_address);
|
|
|
- et_book_content =findViewById(R.id.et_book_content);
|
|
|
+ tvBookAddress = findViewById(R.id.tv_book_address);
|
|
|
+ et_book_content = findViewById(R.id.et_book_content);
|
|
|
|
|
|
tv_book_topic = findViewById(R.id.tv_book_topic);
|
|
|
gv_topic = findViewById(R.id.gv_topic);
|
|
|
@@ -113,6 +114,7 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
topic_rl.setOnClickListener(this);
|
|
|
if (getIntent() != null && getIntent().getExtras() != null) {
|
|
|
model = getIntent().getExtras().getParcelable("model");
|
|
|
+ mWhichPage = getIntent().getStringExtra("whichPage");
|
|
|
if (model != null) {
|
|
|
tvBookObject.setText(model.getAb_bman());
|
|
|
tvBookTimes.setText(model.getAb_starttime().substring(0, 10) + " " + model.getAb_starttime().substring(11, 16) + "-"
|
|
|
@@ -152,7 +154,6 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
@@ -212,7 +213,9 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
private PopupWindow popupWindow;
|
|
|
+
|
|
|
@Override
|
|
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
if (data == null) return;
|
|
|
@@ -227,7 +230,7 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
popupWindow.dismiss();
|
|
|
popupWindow = null;
|
|
|
}
|
|
|
- SelectAimModel chcheAimModel=new SelectAimModel();
|
|
|
+ SelectAimModel chcheAimModel = new SelectAimModel();
|
|
|
chcheAimModel.setLatLng(poi.location);
|
|
|
chcheAimModel.setName(poi.address);
|
|
|
chcheAimModel.setAddress(poi.name);
|
|
|
@@ -414,7 +417,8 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
invite(phone, "8636ba7f-a1b4-4062-8571-782035101167");
|
|
|
}
|
|
|
startActivity(new Intent(BookingAddActivity.this, BookingListActivity.class)
|
|
|
- .putExtra("curDate", startTime));
|
|
|
+ .putExtra("curDate", startTime)
|
|
|
+ .putExtra("whichPage", mWhichPage));
|
|
|
} else {
|
|
|
ToastMessage("预约失败!");
|
|
|
bt_commit.setEnabled(true);
|
|
|
@@ -549,7 +553,7 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
final String name = CommonUtil.getName();
|
|
|
final String phone = user.trim().replaceAll(" ", "");
|
|
|
if (!StringUtil.isMobileNumber(phone)) {
|
|
|
- // showToast(, R.color.load_submit);
|
|
|
+ // showToast(, R.color.load_submit);
|
|
|
showToast("选择人员电话号码为空或是格式不正确");
|
|
|
return;
|
|
|
}
|
|
|
@@ -557,7 +561,7 @@ public class BookingAddActivity extends SupportToolBarActivity implements View.
|
|
|
Request.Method.POST, "http://message.ubtob.com/sms/send", new Response.ErrorListener() {
|
|
|
@Override
|
|
|
public void onErrorResponse(VolleyError arg0) {
|
|
|
- // dimssLoading();
|
|
|
+ // dimssLoading();
|
|
|
}
|
|
|
}, new StringJsonObjectRequest.Listener<AddAttentionResult>() {
|
|
|
@Override
|