|
|
@@ -43,6 +43,7 @@ import com.handmark.pulltorefresh.library.PullToRefreshBase;
|
|
|
import com.handmark.pulltorefresh.library.PullToRefreshListView;
|
|
|
import com.uas.appworks.CRM.erp.model.Business;
|
|
|
import com.uas.appworks.R;
|
|
|
+import com.uas.appworks.activity.businessManage.businessDetailActivity.BusinessDetailNewActivity;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
@@ -129,13 +130,24 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
mlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
- final BussinessDetailAdapter.OldViewHolder holder = (BussinessDetailAdapter.OldViewHolder) view.getTag();
|
|
|
+ /*final BussinessDetailAdapter.OldViewHolder holder = (BussinessDetailAdapter.OldViewHolder) view.getTag();
|
|
|
startActivity(new Intent(BusinessDetailActivty.this, BusinessDetailInfoActivity.class)
|
|
|
.putExtra("type", holder.type)
|
|
|
.putExtra("formCondition", formCondition + "=" + holder.bc_id)
|
|
|
.putExtra("gridCondition", gridCondition + "=" + holder.bc_id)
|
|
|
.putExtra("id", holder.bc_id)
|
|
|
- );
|
|
|
+ );*/
|
|
|
+ try {
|
|
|
+ Business business = mData.get(position);
|
|
|
+ startActivity(new Intent(mContext, BusinessDetailNewActivity.class)
|
|
|
+ .putExtra("id", business.getBc_id())
|
|
|
+ .putExtra("type", mBusinessType)
|
|
|
+ .putExtra("bc_code", business.getCode())
|
|
|
+ .putExtra("bc_description", business.getName())
|
|
|
+ .putExtra(Constants.FLAG.COMMON_WHICH_PAGE, "businessCompany"));
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -170,6 +182,7 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
int type;
|
|
|
String business_steps;
|
|
|
String currentdate;
|
|
|
+ String mBusinessType = "项目商机";
|
|
|
|
|
|
private void initData() {
|
|
|
Intent intent = getIntent();
|
|
|
@@ -179,17 +192,18 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
type = intent.getIntExtra("bt_type", 0);
|
|
|
business_steps = intent.getStringExtra("steps");
|
|
|
currentdate = intent.getStringExtra("currentdate");
|
|
|
+ mBusinessType = intent.getStringExtra("businessType");
|
|
|
}
|
|
|
if (type == 0) {
|
|
|
- setTitle(getString(R.string.business_followup));
|
|
|
+ setTitle(getString(R.string.business_followup));
|
|
|
ll_top_state.setVisibility(View.VISIBLE);
|
|
|
sendHttpResquest(Constants.HTTP_SUCCESS_INIT, page);
|
|
|
} else if (type == 1) {
|
|
|
- setTitle(getString(R.string.business_seize));
|
|
|
+ setTitle(getString(R.string.business_seize));
|
|
|
ll_top_state.setVisibility(View.GONE);
|
|
|
sendHttpResquest(Constants.HTTP_SUCCESS_INIT, page);
|
|
|
} else if (type == 2) {
|
|
|
- setTitle(getString(R.string.business_distribution));
|
|
|
+ setTitle(getString(R.string.business_distribution));
|
|
|
ll_top_state.setVisibility(View.GONE);
|
|
|
sendHttpResquest(Constants.HTTP_SUCCESS_INIT, page);
|
|
|
} else if (type == 3) {
|
|
|
@@ -287,7 +301,7 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
holder.iv_event.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
- if (ListUtils.getSize(mdata)>position){
|
|
|
+ if (ListUtils.getSize(mdata) > position) {
|
|
|
if (mdata.get(position).getType() == 1) {
|
|
|
bc_code = mdata.get(position).getNum();
|
|
|
progressDialog.show();
|
|
|
@@ -464,9 +478,9 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
} else {
|
|
|
mEmptyLayout.showEmpty();
|
|
|
if (page == 1) {
|
|
|
- showToast( R.string.crm_nodatas);
|
|
|
+ showToast(R.string.crm_nodatas);
|
|
|
} else {
|
|
|
- showToast( R.string.common_up_finish);
|
|
|
+ showToast(R.string.common_up_finish);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -512,7 +526,7 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
JSONObject result = JSON.parseObject(msg.getData().getString("result"));
|
|
|
String isok = result.getString("isok");
|
|
|
if (!JSONUtil.validate(msg.getData().getString("result"))) {
|
|
|
- showToast( msg.getData().getString("result"));
|
|
|
+ showToast(msg.getData().getString("result"));
|
|
|
}
|
|
|
if ("0".equals(isok)) {
|
|
|
Log.i("qiang", isok);
|
|
|
@@ -579,6 +593,7 @@ public class BusinessDetailActivty extends BaseActivity {
|
|
|
params.put("currentdate", currentdate);
|
|
|
params.put("page", page);
|
|
|
params.put("pageSize", "10");
|
|
|
+ params.put("type", mBusinessType);
|
|
|
} else {//跟进
|
|
|
params.put("condition", "(bc_type='公有' or nvl(bc_type,' ')=' ')");
|
|
|
}
|