|
|
@@ -22,8 +22,10 @@ import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.util.Constants;
|
|
|
import com.xzjmyk.pm.activity.ui.erp.view.SingleDialog;
|
|
|
import com.xzjmyk.pm.activity.util.ToastUtil;
|
|
|
+import com.xzjmyk.pm.activity.view.wheel.DatePicker;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
|
@@ -88,6 +90,16 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
|
|
|
et_business_jieDuan.setKeyListener(null);
|
|
|
et_business_source.setKeyListener(null);
|
|
|
et_business_enterMan.setKeyListener(null);
|
|
|
+
|
|
|
+ et_business_createTime.setOnClickListener(this);
|
|
|
+ et_business_enterTime.setOnClickListener(this);
|
|
|
+ et_business_createTime.setKeyListener(null);
|
|
|
+ et_business_enterTime.setKeyListener(null);
|
|
|
+ et_business_createTime.setFocusable(false);
|
|
|
+ et_business_enterTime.setFocusable(false);
|
|
|
+
|
|
|
+ et_business_no.setKeyListener(null);
|
|
|
+ et_business_no.setFocusable(false);
|
|
|
}
|
|
|
private void initData() {
|
|
|
getCodeByNet();
|
|
|
@@ -116,6 +128,12 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
|
|
|
case R.id.et_business_jieDuan:
|
|
|
loadJieDuan();
|
|
|
break;
|
|
|
+ case R.id.et_business_createTime:
|
|
|
+ showDateDialog((FormEditText) v.findViewById(R.id.et_business_createTime));
|
|
|
+ break;
|
|
|
+ case R.id.et_business_enterTime:
|
|
|
+ showDateDialog((FormEditText) v.findViewById(R.id.et_business_enterTime));
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -199,7 +217,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
|
|
|
array = JSON.parseObject(json).getJSONArray("recorders");
|
|
|
if (!array.isEmpty()) {
|
|
|
for (int i = 0; i < array.size(); i++) {
|
|
|
- lists.add(array.getJSONObject(i).getString("BC_RECORDER"));
|
|
|
+ lists.add(array.getJSONObject(i).getString("BC_DOMAN"));
|
|
|
}
|
|
|
}
|
|
|
if (lists.isEmpty()) {
|
|
|
@@ -261,38 +279,27 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
|
|
|
String bc_contact = getEditText(et_company_man); //联系人
|
|
|
String bc_remark = getEditText(et_business_source);//备注
|
|
|
String bc_position = getEditText(et_company_position); //职位
|
|
|
- String bc_type = "1"; //商机类型
|
|
|
- String formStore = "{\n" +
|
|
|
+ String bc_type = "私有"; //商机类型
|
|
|
+ String formStore = "{\n"+
|
|
|
+ "\"bc_code\":\"" + et_business_no.getText().toString() + "\",\n" + //商机名称
|
|
|
+ "\"bc_status\":\"" + "在录入" + "\",\n" +
|
|
|
+ "\"bc_domancode\":\"" + CommonUtil.getSharedPreferences(ct,"erp_username") + "\",\n" +
|
|
|
+ "\"bc_statuscode\":\"" + "ENTERING" + "\",\n" +
|
|
|
"\"bc_description\":\"" + name + "\",\n" + //商机名称
|
|
|
-
|
|
|
"\"bc_from\":\"" + from + "\",\n" + //商机来源
|
|
|
-
|
|
|
"\"bc_nichehouse\":\"" + bc_nichehouse + "\",\n" + //商机库
|
|
|
-
|
|
|
"\"bc_currentprocess\":\"" + bc_currentprocess + "\",\n" + //当前阶段
|
|
|
-
|
|
|
"\"bc_recorddate\":\"" + bc_recorddate + "\",\n" + //创建时间
|
|
|
-
|
|
|
"\"bc_recorder\":\"" + bc_recorder + "\",\n" + //创建人
|
|
|
-
|
|
|
"\"bc_lastdate\":\"" + bc_lastdate + "\",\n" + //最后跟进时间
|
|
|
-
|
|
|
"\"bc_doman\":\"" + bc_doman + "\",\n" + //跟进人
|
|
|
-
|
|
|
"\"bc_remark\":\"" + bc_remark + "\",\n" + //备注
|
|
|
-
|
|
|
"\"bc_custname\":\"" + bc_custname + "\",\n" + //企业名称
|
|
|
-
|
|
|
"\"bc_address\":\"" + bc_address + "\",\n" + //地址
|
|
|
-
|
|
|
"\"bc_contact\":\"" + bc_contact + "\",\n" + //联系人
|
|
|
-
|
|
|
"\"bc_position\":\"" + bc_position + "\",\n" + //职位
|
|
|
-
|
|
|
"\"bt_tel\":\"" + bt_tel + "\",\n" + //电话
|
|
|
-
|
|
|
"\"bc_type\":\"" + bc_type + "\"\n" + //商机类型
|
|
|
-
|
|
|
"}";
|
|
|
params.put("formStore", formStore);
|
|
|
params.put("caller", "BusinessChance");
|
|
|
@@ -304,7 +311,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
|
|
|
private void getCodeByNet() {
|
|
|
String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
|
|
|
final Map<String, Object> param = new HashMap<>();
|
|
|
- String caller = "Meetingroomapply";
|
|
|
+ String caller = "BusinessChance";
|
|
|
param.put("caller", caller);
|
|
|
param.put("type", 2);
|
|
|
param.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
@@ -397,4 +404,21 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
|
|
|
}*/
|
|
|
}
|
|
|
|
|
|
+ private void showDateDialog(final FormEditText tv) {
|
|
|
+ DatePicker picker = new DatePicker(this);
|
|
|
+ picker.setRange(1950, 2030);
|
|
|
+ picker.setSelectedItem(
|
|
|
+ Calendar.getInstance().get(Calendar.YEAR),
|
|
|
+ Calendar.getInstance().get(Calendar.MONTH) + 1,
|
|
|
+ Calendar.getInstance().get(Calendar.DAY_OF_MONTH));
|
|
|
+ picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() {
|
|
|
+ @Override
|
|
|
+ public void onDatePicked(String year, String month, String day) {
|
|
|
+// ToastUtil.showToast(ct, year + "-" + month + "-" + day);
|
|
|
+ tv.setText(year + "-" + month + "-" + day);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ picker.show();
|
|
|
+ }
|
|
|
+
|
|
|
}
|