|
|
@@ -81,9 +81,7 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
private NScrollerGridView gv_topic;
|
|
|
List<DataState> dataStates;
|
|
|
GridDataAdapter adapter;
|
|
|
-
|
|
|
-
|
|
|
- private String[] mTypes = {"商务洽谈", "开会", "外出娱乐", "吃饭", "卡拉OK", "高尔夫","麻将","电影","其它" };
|
|
|
+ private String[] mTypes ;
|
|
|
private String phone;
|
|
|
|
|
|
@Override
|
|
|
@@ -91,20 +89,21 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.activity_book_add);
|
|
|
getSupportActionBar().setTitle(getString(R.string.booking_add));
|
|
|
- tvBookObject = (TextView) findViewById(R.id.tv_book_object);
|
|
|
- companyAddRl = (RelativeLayout) findViewById(R.id.company_add_rl);
|
|
|
- tvBookTimes = (TextView) findViewById(R.id.tv_book_times);
|
|
|
- remarkRl = (RelativeLayout) findViewById(R.id.remark_rl);
|
|
|
- rlObject = (RelativeLayout) findViewById(R.id.rl_object);
|
|
|
-
|
|
|
- topic_rl = (RelativeLayout) findViewById(R.id.topic_rl);
|
|
|
- tvBookAddress = (TextView) findViewById(R.id.tv_book_address);
|
|
|
- et_book_content = (EditText) findViewById(R.id.et_book_content);
|
|
|
-
|
|
|
- tv_book_topic = (EditText) findViewById(R.id.tv_book_topic);
|
|
|
- gv_topic = (NScrollerGridView) findViewById(R.id.gv_topic);
|
|
|
- tv_book_topic.setText("商务洽谈");
|
|
|
- bt_commit = (Button) findViewById(R.id.submit_btn);
|
|
|
+ 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);
|
|
|
+
|
|
|
+ topic_rl = findViewById(R.id.topic_rl);
|
|
|
+ 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);
|
|
|
+ mTypes = getResources().getStringArray(R.array.booking_topics);
|
|
|
+ tv_book_topic.setText(mTypes[0]);
|
|
|
+ bt_commit = findViewById(R.id.submit_btn);
|
|
|
findViewById(R.id.submit_btn).setOnClickListener(this);
|
|
|
rlObject.setOnClickListener(this);
|
|
|
companyAddRl.setOnClickListener(this);
|
|
|
@@ -169,7 +168,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
break;
|
|
|
case R.id.company_add_rl://时段
|
|
|
if (!StringUtil.isEmpty(tvBookObject.getText().toString())) {
|
|
|
- LogUtil.d("HttpLogs","imid:"+imId);
|
|
|
startActivityForResult(new Intent(mContext, SelectCalendarActivity.class)
|
|
|
.putExtra("startDate", DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))
|
|
|
.putExtra("endDate", DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))
|
|
|
@@ -198,7 +196,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
if (model != null) {
|
|
|
ToastMessage("预约对象不能更改!");
|
|
|
} else {
|
|
|
- //SelectPContactsActivity
|
|
|
intent = new Intent(this, ContactsActivity.class);
|
|
|
// SelectCollisionTurnBean bean = new SelectCollisionTurnBean()
|
|
|
// .setTitle(getString(R.string.booking_object_name))
|
|
|
@@ -226,18 +223,13 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
longitude = poi.location.longitude;
|
|
|
break;
|
|
|
case 0x24://时间
|
|
|
-
|
|
|
startTime = data.getStringExtra("startDate");
|
|
|
endTime = data.getStringExtra("endDate");
|
|
|
-
|
|
|
String displayDate = startTime.substring(11, 16) + "-" + endTime.substring(11, 16);
|
|
|
tvBookTimes.setText(displayDate);
|
|
|
-
|
|
|
break;
|
|
|
case 0x01://对象
|
|
|
- // SelectEmUser model = data.getParcelableExtra("data");
|
|
|
ContactsModel model = data.getParcelableExtra("data");
|
|
|
- LogUtil.d("Test",JSON.toJSONString(model));
|
|
|
imId = model.getImid();
|
|
|
phone = model.getPhone();
|
|
|
tvBookObject.setText(model.getName());
|
|
|
@@ -274,11 +266,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
bt_commit.setEnabled(true);
|
|
|
return;
|
|
|
}
|
|
|
-// if (StringUtil.isEmpty(et_book_content.getText().toString())) {
|
|
|
-// ToastMessage("请填写预约内容!");
|
|
|
-// bt_commit.setEnabled(true);
|
|
|
-// return;
|
|
|
-// }
|
|
|
if (isEmoji(et_book_content.getText().toString()) || isEmoji(tvBookObject.getText().toString())) {
|
|
|
ToastMessage("不支持表情符号的输入!");
|
|
|
bt_commit.setEnabled(true);
|
|
|
@@ -303,7 +290,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
"\"ab_longitude\":\"" + longitude + "\",\n" +
|
|
|
"\"ab_latitude\":\"" + latitude + "\"" +
|
|
|
"}\n";
|
|
|
- LogUtil.prinlnLongMsg("Test", json);
|
|
|
String url = Constants.IM_BASE_URL() + "user/appSaveBooking";
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("token", MyApplication.getInstance().mAccessToken);
|
|
|
@@ -342,19 +328,12 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
bt_commit.setEnabled(true);
|
|
|
return;
|
|
|
}
|
|
|
-// if (StringUtil.isEmpty(et_book_content.getText().toString())) {
|
|
|
-// ToastMessage("请填写预约内容!");
|
|
|
-// bt_commit.setEnabled(true);
|
|
|
-// return;
|
|
|
-// }
|
|
|
-
|
|
|
if (isEmoji(et_book_content.getText().toString()) || isEmoji(tvBookObject.getText().toString())) {
|
|
|
ToastMessage("不支持表情符号的输入!");
|
|
|
bt_commit.setEnabled(true);
|
|
|
return;
|
|
|
}
|
|
|
showLoading();
|
|
|
- // "\"ab_sharestatus\":\"未共享\","+//变为未共享
|
|
|
String content = "";
|
|
|
content = et_book_content.getText().toString();
|
|
|
content = content.replace("'", "''");
|
|
|
@@ -390,7 +369,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
public void handleMessage(Message msg) {
|
|
|
dimssLoading();
|
|
|
switch (msg.what) {
|
|
|
-
|
|
|
case 0x01:
|
|
|
try {
|
|
|
String resutl = JSON.parseObject(msg.getData().getString("result")).getString("result");
|
|
|
@@ -451,7 +429,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
selectBean.setName(mTypes[i]);
|
|
|
formBeaan.add(selectBean);
|
|
|
}
|
|
|
-
|
|
|
Intent intent = new Intent();
|
|
|
intent.setClass(this, SelectActivity.class);
|
|
|
intent.putExtra("type", 2);
|
|
|
@@ -535,7 +512,6 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private void invite(String user, final String modeid) {
|
|
|
final String name = CommonUtil.getName();
|
|
|
final String phone = user.trim().replaceAll(" ", "");
|
|
|
@@ -573,9 +549,4 @@ public class BookingAddActivity extends OABaseActivity implements HttpImp, View.
|
|
|
};
|
|
|
MyApplication.getInstance().getFastVolley().addDefaultRequest("Volley", request);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
+}
|