Browse Source

新增单据接口测试通过,开始字段校验和crm首页接口测试工作;

Arison 9 years ago
parent
commit
7a086ddac9
27 changed files with 1917 additions and 265 deletions
  1. 4 4
      WeiChat/build.gradle
  2. 19 16
      WeiChat/src/main/AndroidManifest.xml
  3. 0 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/LeaveActivity.java
  4. 22 6
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailActivty.java
  5. 99 22
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailInfoActivity.java
  6. 72 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessLessActivity.java
  7. 60 6
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessSelectCustomerActivity.java
  8. 100 7
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessTransferActivity.java
  9. 22 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ClientActivity.java
  10. 170 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ContactManAddActivity.java
  11. 87 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerAddActivity.java
  12. 62 18
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerDetailActivity.java
  13. 45 61
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListActivity.java
  14. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/SalesRankingActivity.java
  15. 133 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/TaskAddActivity.java
  16. 60 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportAddActivity.java
  17. 72 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportPlanActivity.java
  18. 3 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java
  19. 4 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/steps/StepsView.java
  20. 3 0
      WeiChat/src/main/res/layout/activity_business_less.xml
  21. 432 9
      WeiChat/src/main/res/layout/activity_contact_man_add.xml
  22. 14 1
      WeiChat/src/main/res/layout/activity_customer_detail.xml
  23. 12 11
      WeiChat/src/main/res/layout/activity_customter_add.xml
  24. 299 0
      WeiChat/src/main/res/layout/activity_task_add.xml
  25. 67 62
      WeiChat/src/main/res/layout/activity_visit_report_add.xml
  26. 23 21
      WeiChat/src/main/res/layout/activity_visit_report_plan.xml
  27. 32 9
      WeiChat/src/main/res/layout/item_customer_main.xml

+ 4 - 4
WeiChat/build.gradle

@@ -3,12 +3,12 @@ apply plugin: 'com.getkeepsafe.dexcount'
 
 android {
     signingConfigs {
-        config {
+     /*   config {
             keyPassword '13237658359'
             storeFile file('D:/config/applicationsignname[20150409]')
             storePassword '13237658359'
             keyAlias 'jie-20150409'
-        }
+        }*/
     }
     compileSdkVersion 22
     buildToolsVersion "22.0.1"
@@ -31,9 +31,9 @@ android {
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
         }
-         debug {
+        /* debug {
             signingConfig signingConfigs.config
-        }
+        }*/
     }
 }
 

+ 19 - 16
WeiChat/src/main/AndroidManifest.xml

@@ -3,7 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     package="com.xzjmyk.pm.activity"
     android:versionCode="45"
-    android:versionName="4.5">
+    android:versionName="4.5" >
 
     <uses-sdk
         android:minSdkVersion="11"
@@ -70,7 +70,7 @@
         android:allowBackup="true"
         android:icon="@drawable/uuu"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme">
+        android:theme="@style/AppTheme" >
         <meta-data
             android:name="UMENG_APPKEY"
             android:value="574504a167e58eec520017df" />
@@ -81,7 +81,7 @@
         <!-- 启动页面 -->
         <activity
             android:name=".ui.SplashActivity"
-            android:theme="@style/SplashTheme">
+            android:theme="@style/SplashTheme" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -241,7 +241,7 @@
             android:exported="true"
             android:icon="@drawable/ic_chooser"
             android:label="@string/choose_file"
-            android:theme="@style/ChooserTheme">
+            android:theme="@style/ChooserTheme" >
             <intent-filter>
                 <action android:name="android.intent.action.GET_CONTENT" />
 
@@ -258,13 +258,13 @@
             android:enabled="@bool/use_provider"
             android:exported="true"
             android:grantUriPermissions="true"
-            android:permission="android.permission.MANAGE_DOCUMENTS">
+            android:permission="android.permission.MANAGE_DOCUMENTS" >
             <intent-filter>
                 <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
             </intent-filter>
         </provider>
 
-        <receiver android:name=".broadcast.ScrenLockedBroadCastReceiver">
+        <receiver android:name=".broadcast.ScrenLockedBroadCastReceiver" >
             <intent-filter>
                 <action android:name="android.intent.action.SCREEN_OFF" />
                 <action android:name="android.intent.action.SCREEN_ON" />
@@ -291,7 +291,7 @@
         <!-- 用于接收系统消息以保证PushService正常运行 -->
         <receiver
             android:name="com.baidu.android.pushservice.PushServiceReceiver"
-            android:process=":bdservice_v1">
+            android:process=":bdservice_v1" >
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
                 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
@@ -309,7 +309,7 @@
         <!-- Push服务接收客户端发送的各种请求 -->
         <receiver
             android:name="com.baidu.android.pushservice.RegistrationReceiver"
-            android:process=":bdservice_v1">
+            android:process=":bdservice_v1" >
             <intent-filter>
                 <action android:name="com.baidu.android.pushservice.action.METHOD" />
                 <action android:name="com.baidu.android.pushservice.action.BIND_SYNC" />
@@ -328,7 +328,7 @@
             android:name="com.baidu.android.pushservice.PushService"
             android:exported="true"
             android:persistent="true"
-            android:process=":bdservice_v1">
+            android:process=":bdservice_v1" >
             <intent-filter>
                 <action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE" />
             </intent-filter>
@@ -342,7 +342,7 @@
 
 
         <!-- 此处Receiver名字修改为当前包名路径 -->
-        <receiver android:name=".ui.PushNetMessageReceiver">
+        <receiver android:name=".ui.PushNetMessageReceiver" >
             <intent-filter>
 
                 <!-- 接收push消息 -->
@@ -363,7 +363,7 @@
             </intent-filter>
         </activity>
         -->
-        <activity android:name=".ui.message.SelectCardActivity">
+        <activity android:name=".ui.message.SelectCardActivity" >
             <intent-filter>
                 <action android:name="com.xzjmyk.pm.activity.ui.message.SelectCardActivity" />
             </intent-filter>
@@ -387,7 +387,7 @@
 
         <receiver
             android:name="com.baidu.autoupdatesdk.receiver.BDBroadcastReceiver"
-            android:exported="false">
+            android:exported="false" >
             <intent-filter>
                 <action android:name="com.baidu.autoupdatesdk.ACTION_NEW_UPDATE" />
                 <action android:name="com.baidu.autoupdatesdk.ACTION_DOWNLOAD_COMPLETE" />
@@ -471,11 +471,14 @@
         <activity
             android:name=".ui.erp.activity.oa.OutofficeSetActivity"
             android:label="签到设置" />
-        <activity android:name=".ui.erp.activity.oa.TestActivity"></activity>
-        <activity android:name=".ui.erp.activity.oa.OutSigninOKActivity"
-            android:label="签到"/>
+        <activity android:name=".ui.erp.activity.oa.TestActivity" />
+        <activity
+            android:name=".ui.erp.activity.oa.OutSigninOKActivity"
+            android:label="签到" />
         <activity android:name=".ui.erp.activity.crm.ContactManAddActivity" >
         </activity>
+        <activity android:name=".ui.erp.activity.crm.TaskAddActivity" >
+        </activity>
     </application>
 
-</manifest>
+</manifest>

+ 0 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/LeaveActivity.java

@@ -505,7 +505,6 @@ public class LeaveActivity extends BaseActivity implements OnClickListener {
             case R.id.et_leave_man:
                 Intent et_dbfind = new Intent(ct, DbfindListActivity.class);
                 startActivityForResult(et_dbfind, 1);
-
                 break;
 
             default:

+ 22 - 6
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailActivty.java

@@ -26,6 +26,7 @@ import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.bean.crm.Business;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.DbfindListActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
@@ -82,16 +83,16 @@ public class BusinessDetailActivty extends BaseActivity {
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 final BussinessDetailAdapter.ViewHolder holder = (BussinessDetailAdapter.ViewHolder) 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("type", holder.type)
+                                .putExtra("formCondition", formCondition + "=" + holder.bc_id)
+                                .putExtra("gridCondition", gridCondition + "=" + holder.bc_id)
                 );
             }
         });
     }
     int type;
     private void initData() {
-        sendHttpResquest(Constants.HTTP_SUCCESS_INIT,1);
+        sendHttpResquest(Constants.HTTP_SUCCESS_INIT, 1);
         Intent intent = getIntent();
          type = 0;
         if (intent != null) {
@@ -195,7 +196,7 @@ public class BusinessDetailActivty extends BaseActivity {
                     if (mdata.get(position).getType() == 1) {
                         startActivity(new Intent(BusinessDetailActivty.this, BusinessDetailInfoActivity.class));
                     } else if (mdata.get(position).getType() == 2) {
-                        startActivity(new Intent(BusinessDetailActivty.this, BusinessDetailInfoActivity.class));
+                        startActivityForResult(new Intent(ct, DbfindListActivity.class),1);
                     }
                 }
             });
@@ -238,7 +239,8 @@ public class BusinessDetailActivty extends BaseActivity {
                             model.setPhone(array.getJSONObject(i).getString("bc_tel"));
                             model.setNote(array.getJSONObject(i).getString("bc_remark"));
                             model.setSource(array.getJSONObject(i).getString("bc_from"));
-                            model.setBc_id(array.getJSONObject(i).getInteger("bc_id"));
+                            if (array.getJSONObject(i).getObject("bc_id",Object.class) instanceof Integer)
+                            { model.setBc_id(array.getJSONObject(i).getInteger("bc_id"));}
                             model.setType(type);
                             mData.add(model);
                         }
@@ -275,4 +277,18 @@ public class BusinessDetailActivty extends BaseActivity {
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        switch (requestCode){
+            case 1:
+                if (data == null) {
+                    return;
+                }
+                String en_name = data.getStringExtra("en_name");
+
+                break;
+        }
+        super.onActivityResult(requestCode, resultCode, data);
+    }
 }

+ 99 - 22
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailInfoActivity.java

@@ -1,18 +1,15 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
-import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.Handler;
 import android.os.Message;
-import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.WindowManager;
 import android.widget.AdapterView;
 import android.widget.Button;
@@ -30,11 +27,11 @@ import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.DbfindListActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.util.DisplayUtil;
-import com.xzjmyk.pm.activity.view.steps.StepsView;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -151,7 +148,8 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                 sendHttpBusinessQiang(BUSINESS_QIANG,bt_code,bt_doman);
                 break;
             case R.id.bt_fenpei:
-
+                startActivityForResult(new Intent(ct, DbfindListActivity.class),1);
+                //sendHttpBusinessQiang(BUSINESS_FENPEI,bt_code,bt_doman);
                 break;
         }
     }
@@ -178,21 +176,50 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                     position = position + 1;
                     switch (position) {
                         case 1:
-                            ViewUtil.ToastMessage(BusinessDetailInfoActivity.this, "释放");
+                           // ViewUtil.ToastMessage(BusinessDetailInfoActivity.this, "释放");
+                            new MaterialDialog.Builder(ct).title("系统提示")
+                                    .content("确定释放这个线索?")
+                                    .negativeText("取消")
+                                    .positiveText("确定")
+                                    .contentGravity(GravityEnum.CENTER)
+                                    .callback(new MaterialDialog.ButtonCallback() {
+                                        @Override
+                                        public void onNegative(MaterialDialog dialog) {
+                                            super.onNegative(dialog);
+                                        }
+
+                                        @Override
+                                        public void onPositive(MaterialDialog dialog) {
+                                            super.onPositive(dialog);
+                                            sendHttpResquestRelease(BUSINESS_RELEASE);
+                                        }
+                                    }).build().show();
                             break;
                         case 2:
-                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessLessActivity.class).putExtra("type", 1));
+                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessLessActivity.class)
+                                    .putExtra("type", 1)
+                                    .putExtra("code", bt_code)
+                                    .putExtra("process", bt_process)
+                            .putExtra("doman",bt_doman));
                             break;
                         case 3:
-                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessLessActivity.class).putExtra("type", 2));
+                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessLessActivity.class)
+                                    .putExtra("type", 2)
+                            .putExtra("code", bt_code)
+                            .putExtra("process",bt_process)
+                                    .putExtra("doman", bt_doman));
                             break;
                         case 4:
-                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessTransferActivity.class));
+                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessTransferActivity.class)
+                                    .putExtra("code", bt_code));
                             break;
                         case 5:
+                            startActivity(new Intent(BusinessDetailInfoActivity.this, CustomerAddActivity.class)
+                                   );
                             break;
                         case 6:
-                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessSelectCustomerActivity.class));
+                            startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessSelectCustomerActivity.class)
+                            .putExtra("code",bt_code));
                             break;
                     }
                 }
@@ -241,9 +268,12 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
     }
 
     private final  int BUSINESS_QIANG=2;
+    private final  int BUSINESS_FENPEI=3;
+    private final  int BUSINESS_RELEASE=4;
+
     private String bt_doman;//跟进人
     private String bt_code;//编号
-
+    private String bt_process;//商机阶段
     private Handler mHandler=new Handler(){
         @Override
         public void handleMessage(Message msg) {
@@ -260,20 +290,36 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
 //                        "bc_remark":""
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     JSONObject root= JSON.parseObject(msg.getData().getString("result")).getJSONObject("panelData");
-                    bc_from.setText(root.getString("bc_from"));
-                    bc_name.setText(root.getString("bc_nichehouse"));
-                    bc_phone.setText("无");
-                    bc_recorddate.setText(root.getString("bc_recorddate"));
-                    bc_recorddate_update.setText(root.getString("bc_lastdate"));
-                    bc_recorder.setText(root.getString("bc_recorder"));
-                    bc_remark.setText(root.getString("bc_remark"));
-                    bc_state.setText("已分配");
-                    bt_doman=root.getString("bc_doman");
-                    bt_code=root.getString("bt_code");
+                    if (root!=null) {
+                        bc_from.setText(root.getString("bc_from"));
+                        bc_name.setText(root.getString("bc_nichehouse"));
+                        bc_phone.setText("无");
+                        bc_recorddate.setText(root.getString("bc_recorddate"));
+                        bc_recorddate_update.setText(root.getString("bc_lastdate"));
+                        bc_recorder.setText(root.getString("bc_recorder"));
+                        bc_remark.setText(root.getString("bc_remark"));
+                        bc_state.setText("已分配");
+                        bt_doman = root.getString("bc_doman");
+                        bt_code = root.getString("bc_code");
+                        bt_process = root.getString("bc_currentprocess");
+                    }
                     break;
                 case BUSINESS_QIANG:
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
-                    ViewUtil.ToastMessage(ct,msg.getData().getString("result"));
+                   // ViewUtil.ToastMessage(ct, msg.getData().getString("result"));
+                    progressDialog.dismiss();
+                    ToastMessage("抢商机成功!");
+                    startActivity(new Intent(ct,BusinessActivity.class));
+                    break;
+                case BUSINESS_FENPEI:
+                    progressDialog.dismiss();
+                    ToastMessage("分配商机成功!");
+                    startActivity(new Intent(ct, BusinessActivity.class));
+                    break;
+                case BUSINESS_RELEASE:
+                    ToastMessage("商机释放成功!");
+                    progressDialog.dismiss();
+                    popupWindow.dismiss();
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     progressDialog.dismiss();
@@ -306,4 +352,35 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
+
+
+    /**
+      * @desc:商机释放
+      * @author:Arison on 2016/7/25
+      */
+    public void sendHttpResquestRelease(int what){
+        String url=Constants.getAppBaseUrl(ct)+"mobile/crm/updateBusinessChanceType.action";
+        progressDialog.show();
+        Map<String,Object> params=new HashMap<>();
+        params.put("bc_code", bt_code);
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        switch (requestCode){
+            case 1:
+                if (data == null) {
+                    return;
+                }
+                bt_doman = data.getStringExtra("en_name");
+                sendHttpBusinessQiang(BUSINESS_FENPEI,bt_code,bt_doman);
+            break;
+        }
+        super.onActivityResult(requestCode, resultCode, data);
+    }
 }
+

+ 72 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessLessActivity.java

@@ -1,17 +1,29 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 import android.content.Intent;
+import android.os.Handler;
+import android.os.Message;
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.widget.EditText;
 import android.widget.LinearLayout;
+import android.widget.TextView;
 
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 /**
  * @功能:商机失效
@@ -25,6 +37,11 @@ public class BusinessLessActivity extends BaseActivity {
     @ViewInject(R.id.ll_leader)
     private LinearLayout ll_leader;
 
+    @ViewInject(R.id.et_remark)
+    private EditText et_remark;
+    @ViewInject(R.id.tv_business_state)
+    private TextView tv_business_state;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -44,11 +61,16 @@ public class BusinessLessActivity extends BaseActivity {
     }
 
     int type = 1;
-
+    private String code;
+    private String process;
+    private String doman;
     private void initData() {
         Intent intent = getIntent();
         if (intent != null) {
             type = intent.getIntExtra("type", 1);
+            code=intent.getStringExtra("code");
+            process=intent.getStringExtra("process");
+            doman=intent.getStringExtra("doman");
         }
 
         switch (type) {
@@ -59,6 +81,7 @@ public class BusinessLessActivity extends BaseActivity {
                 break;
             case 2:
                 getSupportActionBar().setTitle("商机跟进");
+                tv_business_state.setText(process);
                 ll_leader.setVisibility(View.GONE);
                 ll_moment.setVisibility(View.VISIBLE);
                 break;
@@ -75,9 +98,56 @@ public class BusinessLessActivity extends BaseActivity {
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
-            case R.id.bt_save:
+            case R.id.btn_save:
+                if (type==1) {
+                    sendHttpResquest(Constants.HTTP_SUCCESS_INIT,"失效");
+                }
+                if (type==2){
+                    sendHttpResquest(Constants.HTTP_SUCCESS_INIT,"继续跟进");
+                }
                 break;
         }
         return true;
     }
+
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                    ViewUtil.ToastMessage(ct,"操作成功!");
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what,String type){
+        progressDialog.show();
+        String remark=et_remark.getText().toString();
+        String gridSore="{\n" +
+                "\"bcd_bccode\":\""+code+"\",\n" +
+                "\"bcd_remark\":\""+remark+"\",\n" +
+                "\"bcd_leader\":\"陈经理\",\n" +
+                "\"bcd_date\":\"2016-07-23\",\n" +
+                "\"bcd_bsname\":\""+process+"\",\n" +
+                "\"bcd_type\":\""+type+"\",\n" +
+                "\"bcd_man\":\""+doman+"\""+
+                "}";
+        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/updatebusinessChanceData.action";
+
+        Map<String,Object> params=new HashMap<>();
+        params.put("gridStore", gridSore);
+        params.put("caller", "BusinessChance");
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
 }

+ 60 - 6
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessSelectCustomerActivity.java

@@ -1,8 +1,11 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
@@ -20,15 +23,22 @@ import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.bean.crm.Business;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.view.SmoothCheckBox;
 
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class BusinessSelectCustomerActivity extends BaseActivity {
     private BussinessDetailAdapter mAdapter;
     @ViewInject(R.id.list_business)
     private PullToRefreshListView mlist;
     private ArrayList<Business> mData = new ArrayList<Business>();
+    private String code;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -38,10 +48,13 @@ public class BusinessSelectCustomerActivity extends BaseActivity {
         initData();
         initListener();
     }
-
+ 
     private void initView() {
         ViewUtils.inject(this);
         getSupportActionBar().setTitle("选择客户");
+        if (getIntent()!=null){
+            code=getIntent().getStringExtra("code");
+        }
     }
 
     private void initListener() {
@@ -58,17 +71,29 @@ public class BusinessSelectCustomerActivity extends BaseActivity {
         });
         mlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                Business bean = (Business) parent.getAdapter().getItem(position);
-                bean.isChecked = !bean.isChecked;
-                SmoothCheckBox checkBox = (SmoothCheckBox) view.findViewById(R.id.cb_left);
-                checkBox.setChecked(bean.isChecked, true);
+            public void onItemClick(final  AdapterView<?> parent,final View view,final int position, long id) {
+                for (int i=0;i<mData.size();i++){
+                    if (position-1!=i){
+                        mData.get(i).setIsChecked(false);
+                    }
+                }
+                mAdapter.notifyDataSetChanged();
+                new Handler().postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        Business bean = (Business) parent.getAdapter().getItem(position);
+                        bean.isChecked = !bean.isChecked;
+                        SmoothCheckBox checkBox = (SmoothCheckBox) view.findViewById(R.id.cb_left);
+                        checkBox.setChecked(bean.isChecked, true);
+                    }
+                },100);
             }
         });
         ;
     }
 
     private void initData() {
+        sendHttpResquest(Constants.HTTP_SUCCESS_INIT,code);
         for (int i = 0; i < 22; i++) {
             Business model = new Business();
             model.setNum("013223" + i);
@@ -154,4 +179,33 @@ public class BusinessSelectCustomerActivity extends BaseActivity {
             TextView tv_business_name;
         }
     }
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what,String code){
+        progressDialog.show();
+        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/getCustomerbySeller.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("sellercode", code);
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
+
 }

+ 100 - 7
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessTransferActivity.java

@@ -2,8 +2,11 @@ package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 import android.content.Context;
 import android.content.Intent;
+import android.os.Handler;
+import android.os.Message;
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
@@ -15,6 +18,9 @@ import android.widget.Button;
 import android.widget.ListView;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.lidroid.xutils.ViewUtils;
@@ -22,9 +28,15 @@ import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.bean.crm.Business;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.view.SmoothCheckBox;
 
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 /**
  * @功能:商机转移
@@ -67,17 +79,36 @@ public class BusinessTransferActivity extends BaseActivity {
         });
         mlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                Business bean = (Business) parent.getAdapter().getItem(position);
-                bean.isChecked = !bean.isChecked;
-                SmoothCheckBox checkBox = (SmoothCheckBox) view.findViewById(R.id.cb_left);
-                checkBox.setChecked(bean.isChecked, true);
+            public void onItemClick(final AdapterView<?> parent,final View view, final int position, long id) {
+                for (int i=0;i<mData.size();i++){
+                    if (position-1!=i){
+                        mData.get(i).setIsChecked(false);
+                    }
+                }
+                mAdapter.notifyDataSetChanged();
+               new Handler().postDelayed(new Runnable() {
+                   @Override
+                   public void run() {
+                       Business bean = (Business) parent.getAdapter().getItem(position);
+                       nicehouse=bean.getName();
+                       bean.isChecked = !bean.isChecked;
+                       SmoothCheckBox checkBox = (SmoothCheckBox) view.findViewById(R.id.cb_left);
+                       checkBox.setChecked(bean.isChecked, true);
+                   }
+               },100);
             }
         });
-        ;
+
     }
 
+    private String nicehouse;
+    private String code;
+    private final int BUSSINE_TRANSFER=3;
     private void initData() {
+        sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
+        if (getIntent()!=null){
+            code=getIntent().getStringExtra("code");
+        }
         for (int i = 0; i < 22; i++) {
             Business model = new Business();
             model.setNum("013223" + i);
@@ -102,7 +133,8 @@ public class BusinessTransferActivity extends BaseActivity {
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
-            case R.id.bt_save:
+            case R.id.btn_save:
+                sendHttpResquestTransfer(BUSSINE_TRANSFER,code,nicehouse);
                 break;
         }
         return true;
@@ -164,4 +196,65 @@ public class BusinessTransferActivity extends BaseActivity {
             TextView tv_business_name;
         }
     }
+
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    mData.clear();
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                    JSONObject root= JSON.parseObject(msg.getData().getString("result"));
+                    JSONArray items=root.getJSONArray("combos");
+                    if (!items.isEmpty()){
+                        for (int i=0;i<items.size();i++){
+                            Business model = new Business();
+                            model.setName(items.getJSONObject(i).getString("DLC_VALUE"));
+                            model.setNum(items.getJSONObject(i).getString("DLC_DISPLAY"));
+                            mData.add(model);
+                        }
+                    }
+                    mAdapter = new BussinessDetailAdapter(ct, mData);
+                    mlist.setAdapter(mAdapter);
+                    break;
+                case BUSSINE_TRANSFER:
+                    progressDialog.dismiss();
+                    ToastMessage("转移成功!");
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what){
+        progressDialog.show();
+        String url= Constants.getAppBaseUrl(ct)+"/mobile/crm/getBusinessChanceCombo.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("caller", "BusinessChance");
+        params.put("field", "bc_nichehouse");
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
+
+    /**
+      * @desc:商机转移
+      * @author:Arison on 2016/7/25
+      */
+    private void sendHttpResquestTransfer(int what,String bc_code,String bc_nicehehouse){
+        progressDialog.show();
+        String url= Constants.getAppBaseUrl(ct)+"/mobile/crm/getBusinessChanceCombo.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("bc_code", bc_code);
+        params.put("bc_nichehouse", bc_nicehehouse);
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
 }

+ 22 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ClientActivity.java

@@ -287,6 +287,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
                 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                     switch (position) {
                         case 0:
+                            startActivity(new Intent(ClientActivity.this, ContactManAddActivity.class));
                             break;
                         case 1:
                             startActivity(new Intent(ClientActivity.this, BusinessAddActivity.class));
@@ -295,8 +296,19 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
                             startActivity(new Intent(ClientActivity.this, CustomerAddActivity.class));
                             break;
                         case 3:
+                            startActivity(new Intent(ClientActivity.this, TaskAddActivity.class).putExtra("type",0));
                             break;
                         case 4:
+                            startActivity(new Intent(ClientActivity.this, TaskAddActivity.class).putExtra("type",1));
+                            break;
+                        case 5:
+                            
+                            break;
+                        case 6:
+                            startActivity(new Intent(ClientActivity.this, VisitReportPlanActivity.class));
+                            break;
+                        case 7:
+                            startActivity(new Intent(ClientActivity.this, VisitReportAddActivity.class));
                             break;
                     }
                 }
@@ -339,9 +351,19 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
         map = new HashMap<String, Object>();
         map.put("item_name", "新增任务");
         list.add(map);
+        map = new HashMap<String, Object>();
+        map.put("item_name", "新增日程");
+        list.add(map);
+
         map = new HashMap<String, Object>();
         map.put("item_name", "新增分享");
         list.add(map);
+        map = new HashMap<String, Object>();
+        map.put("item_name", "拜访计划");
+        list.add(map);
+        map = new HashMap<String, Object>();
+        map.put("item_name", "拜访报告");
+        list.add(map);
         return list;
     }
 }

+ 170 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ContactManAddActivity.java

@@ -1,15 +1,184 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.RelativeLayout;
 
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+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.util.ViewUtil;
+import com.xzjmyk.pm.activity.util.ToastUtil;
+import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 
-public class ContactManAddActivity extends BaseActivity{
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
+public class ContactManAddActivity extends BaseActivity implements View.OnClickListener{
+
+    @ViewInject(R.id.tv_name)
+    private EditText tv_name;
+    @ViewInject(R.id.tv_sex)
+    private EditText tv_sex;
+    @ViewInject(R.id.tv_company_login)
+    private EditText tv_company_login;
+    @ViewInject(R.id.tv_department_login)
+    private EditText tv_department_login;
+    @ViewInject(R.id.tv_position_login)
+    private EditText tv_position_login;
+    @ViewInject(R.id.tv_tel_login)
+    private EditText tv_tel_login;
+    @ViewInject(R.id.tv_phone_login)
+    private EditText tv_phone_login;
+    @ViewInject(R.id.tv_email_login)
+    private EditText tv_email_login;
+    @ViewInject(R.id.tv_address_login)
+    private EditText tv_address_login;
+    @ViewInject(R.id.tv_birthday_login)
+    private EditText tv_birthday_login;
+    @ViewInject(R.id.tv_notes_login)
+    private EditText tv_notes_login;
+    @ViewInject(R.id.tv_card_login)
+    private EditText tv_card_login;
+
+    @ViewInject(R.id.sex_erp_rl)
+    private RelativeLayout sex_erp_rl;
+    @ViewInject(R.id.address_erp_rl)
+    private RelativeLayout address_erp_rl;
+    @ViewInject(R.id.birthday_erp_rl)
+    private RelativeLayout birthday_erp_rl;
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_contact_man_add);
+        initView();
+        initData();
+        initListener();
+    }
+
+    private void initData() {
+
+    }
+
+    private void initView() {
+        ViewUtils.inject(this);
+    }
+
+    private void initListener() {
+       birthday_erp_rl.setOnClickListener(this);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main_btn_submit, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.btn_save:
+                sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
+                break;
+            case android.R.id.home:
+                onBackPressed();
+                break;
+        }
+        return true;
+    }
+
+    private Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what) {
+        progressDialog.show();
+        String formStore="{\"ct_name\":\"" +
+                "wang二" +
+                "\",\"ct_sex\":" +
+                "1" +
+                ",\"ct_cuname\":\"" +
+                "12" +
+                "\",\"ct_dept\":\"" +
+                "研发部" +
+                "\",\"ct_position\":\"" +
+                "工程师" +
+                "\",\"ct_officephone\":\"" +
+                "1132213" +
+                "\",\"ct_mobile\":\"" +
+                "13266699268" +
+                "\",\"ct_personemail\":\"" +
+                "728437832@qq.com" +
+                "\",\"ct_address\":\"" +
+                "深圳市" +
+                "\",\"ct_birthday\":\"" +
+                "1990-08-11" +
+                "\",\"ct_reamrk\":\"" +
+                "似懂非懂" +
+                "\",\"ct_attach\":\"" +
+                "12" +
+                "\"}";
+        String url = Constants.getAppBaseUrl(ct) + "crm/customermgr/saveContact.action";
+        Map<String, Object> params = new HashMap<>();
+        params.put("formStore", formStore);
+        params.put("caller", "Contact");
+        params.put("param", "[]");
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()){
+            case R.id.birthday_erp_rl:
+                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);
+                    }
+                });
+                picker.show();
+                break;
+            case R.id.sex_erp_rl:
+
+                break;
+            case R.id.address_erp_rl:
+
+                break;
+        }
     }
+    
+ 
 }

+ 87 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerAddActivity.java

@@ -1,16 +1,45 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
-import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
-import android.view.View;
 
+import com.andreabaccega.widget.FormEditText;
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.Constants;
+import com.xzjmyk.pm.activity.util.DateFormatUtil;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class CustomerAddActivity extends BaseActivity {
 
+    @ViewInject(R.id.et_cu_name)
+    private  FormEditText et_cu_name;
+    @ViewInject(R.id.et_cu_source)
+    private  FormEditText et_cu_source;
+    @ViewInject(R.id.et_cu_industry)
+    private  FormEditText  et_cu_industry;
+    @ViewInject(R.id.et_cu_defaultLevel)
+    private  FormEditText et_cu_defaultLevel;
+    @ViewInject(R.id.et_cu_tel)
+    private  FormEditText et_cu_tel;
+    @ViewInject(R.id.tv_cu_lastDate)
+    private  FormEditText tv_cu_lastDate;
+    @ViewInject(R.id.tv_cu_address)
+    private  FormEditText tv_cu_address;
+    @ViewInject(R.id.tv_cu_remark)
+    private  FormEditText tv_cu_remark;
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -29,7 +58,10 @@ public class CustomerAddActivity extends BaseActivity {
     }
 
     private void initView() {
+        ViewUtils.inject(this);
         getSupportActionBar().setTitle("客户预录入");
+        tv_cu_lastDate.setText(DateFormatUtil.getStrDate4Date(new Date(),"yyyy-MM-dd"));
+        tv_cu_lastDate.setKeyListener(null);
     }
 
 
@@ -44,6 +76,14 @@ public class CustomerAddActivity extends BaseActivity {
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.btn_save:
+//                if (   et_cu_name.testValidity()
+//                        &&et_cu_source.testValidity()
+//                        &&et_cu_defaultLevel.testValidity()
+//                        &&et_cu_tel.testValidity()
+//                        &&tv_cu_address.testValidity()
+//                        &&tv_cu_remark.testValidity()){
+                sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
+//                }
                 break;
             case android.R.id.home:
                 onBackPressed();
@@ -51,4 +91,49 @@ public class CustomerAddActivity extends BaseActivity {
         }
         return true;
     }
+
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                    ToastMessage("录入成功!");
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                    ToastMessage(msg.getData().getString("result"));
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what){
+        progressDialog.show();
+        String formStore="{\"cu_code\":\"232423453\",\"cu_name\":\"" +
+                et_cu_name.getText().toString()+
+                "\",\"cu_source\":\"" +
+                et_cu_source.getText().toString() +
+                "\",\"cu_defaultlevel\":\"" +
+                et_cu_defaultLevel.getText().toString() +
+                "\",\"cu_tel\":\"" +
+                et_cu_tel.getText().toString() +
+                "\",\"cu_lastdate\":\"" +
+                DateFormatUtil.getStrDate4Date(new Date(),"yyyy-MM-dd") +
+                "\",\"cu_add1\":\"" +
+                tv_cu_address.getText().toString() +
+                "\",\"cu_remark\":\"" +
+                tv_cu_address.getText().toString() +
+                "\"}";
+        String url= Constants.getAppBaseUrl(ct)+"scm/sale/savePreCustomer.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("formStore", formStore);
+        params.put("caller", "PreCustome");
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
 }

+ 62 - 18
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerDetailActivity.java

@@ -8,7 +8,11 @@ import android.os.Message;
 import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
@@ -29,11 +33,38 @@ import java.util.Map;
  * @return:
  */
 public class CustomerDetailActivity extends BaseActivity {
+    @ViewInject(R.id.tv_company_name)
+    private TextView tv_company_name;
+    @ViewInject(R.id.tv_leader)
+    private TextView tv_leader;
+    @ViewInject(R.id.tv_state)
+    private TextView tv_state;
+    @ViewInject(R.id.tv_lastDate)
+    private TextView tv_lastDate;
+    @ViewInject(R.id.tv_address)
+    private TextView tv_address;
+    @ViewInject(R.id.tv_receiveTime)
+    private TextView tv_receiveTime;
+    @ViewInject(R.id.tv_source)
+    private TextView tv_source;
+    @ViewInject(R.id.tv_industry)
+    private TextView tv_industry;
+    @ViewInject(R.id.tv_tel)
+    private TextView tv_tel;
+    @ViewInject(R.id.tv_reimbursementIng)
+    private TextView tv_reimbursementIng;
+    @ViewInject(R.id.tv_reimbursement_end)
+    private TextView tv_reimbursement_end;
+    @ViewInject(R.id.tv_modifyRecord)
+    private TextView tv_modifyRecord;
+    @ViewInject(R.id.tv_visitTimes)
+    private TextView tv_visitTimes;
     @ViewInject(R.id.stepsView)
     private StepsView mStepsView;
     private Context ct;
-    private final String[] labels = {"Step 1", "Step 2", "Step 3", "Step 4", "Step 5"
-            ,"进度6" ,"进度7" ,"进度8" ,"进度9" };
+    private final String[] labels = {"初次沟通", "立项评估","产品演示", "合同签约", "样品报价", "多次交易"
+            , "商务谈判", "需求分析", "完成交易"};
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -45,7 +76,7 @@ public class CustomerDetailActivity extends BaseActivity {
 
     private void initView() {
         ViewUtils.inject(this);
-        ct=this;
+        ct = this;
         getSupportActionBar().setTitle("客户详情");
     }
 
@@ -54,12 +85,13 @@ public class CustomerDetailActivity extends BaseActivity {
     }
 
     private void initData() {
-        sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
-        sendAdd(Constants.HTTP_SUCCESS_INIT);
+        String code = getIntent().getStringExtra("code");
+        sendHttpResquest(Constants.HTTP_SUCCESS_INIT, code);
+        // sendAdd(Constants.HTTP_SUCCESS_INIT);
         mStepsView.setCompletedPosition(5 % labels.length)
                 .setLabels(labels)
                 .setBarColorIndicator(
-                       ct.getResources().getColor(R.color.material_blue_grey_800))
+                        ct.getResources().getColor(R.color.material_blue_grey_800))
                 .setProgressColorIndicator(ct.getResources().getColor(R.color.orange))
                 .setLabelColorIndicator(ct.getResources().getColor(R.color.orange))
                 .drawView();
@@ -85,13 +117,24 @@ public class CustomerDetailActivity extends BaseActivity {
     }
 
 
-    private Handler mHandler=new Handler(){
+    private Handler mHandler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
-            switch (msg.what){
+            switch (msg.what) {
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                    JSONObject jsonArray = JSON.parseObject(msg.getData().getString("result")).getJSONObject("customer");
+                    if (jsonArray != null) {
+                        tv_company_name.setText(jsonArray.getString("cu_name"));
+                        tv_leader.setText("负责人:"+jsonArray.getString("cu_contact"));
+                        tv_state.setText(jsonArray.getString("cu_dealstatus")+"|普通客户");
+                        tv_lastDate.setText("最后跟进:"+jsonArray.getString("cu_lastdate"));
+                        tv_address.setText(jsonArray.getString("cu_add1"));
+                        tv_source.setText(jsonArray.getString("cu_source"));
+                        tv_industry.setText(jsonArray.getString("cu_kind"));
+                        tv_tel.setText(jsonArray.getString("cu_mobile"));
+                    }
 
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
@@ -103,25 +146,26 @@ public class CustomerDetailActivity extends BaseActivity {
         }
     };
 
-    private void sendHttpResquest(int what){
+    private void sendHttpResquest(int what, String code) {
         progressDialog.show();
-        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/getCustomerbycode.action";
-        Map<String,Object> params=new HashMap<>();
-        params.put("cu_code", "A00000333");
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "mobile/crm/getCustomerbycode.action";
+        Map<String, Object> params = new HashMap<>();
+        params.put("cu_code", code);
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
 
-    public static String formStore="{\"ct_name\":\"wang二\",\"ct_sex\":\"男\",\"ct_cuname\":\"12\",\"ct_dept\":\"研发部\",\"ct_position\":\"工程师\",\"ct_officephone\":\"1132213\",\"ct_mobile\":\"13266699268\",\"ct_personemail\":\"728437832@qq.com\",\"ct_address\":\"深圳市\",\"ct_birthday\":\"1990-08-11\",\"ct_reamrk\":\"似懂非懂\",\"ct_attach\":\"12\"}";
-    private void sendAdd(int what){
+    public static String formStore = "{\"ct_name\":\"wang二\",\"ct_sex\":\"男\",\"ct_cuname\":\"12\",\"ct_dept\":\"研发部\",\"ct_position\":\"工程师\",\"ct_officephone\":\"1132213\",\"ct_mobile\":\"13266699268\",\"ct_personemail\":\"728437832@qq.com\",\"ct_address\":\"深圳市\",\"ct_birthday\":\"1990-08-11\",\"ct_reamrk\":\"似懂非懂\",\"ct_attach\":\"12\"}";
+
+    private void sendAdd(int what) {
         progressDialog.show();
-        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/getCustomerbycode.action";
-        Map<String,Object> params=new HashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "mobile/crm/getCustomerbycode.action";
+        Map<String, Object> params = new HashMap<>();
         params.put("formStore", formStore);
         params.put("caller", "Contact");
         params.put("param", "");
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }

+ 45 - 61
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListActivity.java

@@ -22,6 +22,9 @@ import android.widget.SimpleAdapter;
 import android.widget.TextView;
 
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.lidroid.xutils.ViewUtils;
@@ -85,7 +88,10 @@ public class CustomerListActivity extends BaseActivity {
         mlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                startActivity(new Intent(ct, CustomerDetailActivity.class));
+                BussinessDetailAdapter.ViewHolder viewHolder= (BussinessDetailAdapter.ViewHolder) view.getTag();
+                Log.i(TAG, "onItemClick:" + viewHolder.tv_code.getText().toString());
+                startActivity(new Intent(ct, CustomerDetailActivity.class).putExtra("code",viewHolder.tv_code
+                .getText().toString()));
             }
         });
     }
@@ -101,18 +107,17 @@ public class CustomerListActivity extends BaseActivity {
 
     private void initData() {
         sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
-        for (int i = 0; i < 22; i++) {
-            Business model = new Business();
-            model.setNum("013223" + i);
-            model.setName("xxx" + i);
-            model.setLeader("****" + i);
-            model.setNote("xxxxxxxxxxxx" + i);
-            model.setPhone("*********" + i);
-            model.setSource("####" + i);
-            mData.add(model);
-        }
-        mAdapter = new BussinessDetailAdapter(this, mData);
-        mlist.setAdapter(mAdapter);
+//        for (int i = 0; i < 22; i++) {
+//            Business model = new Business();
+//            model.setNum("013223" + i);
+//            model.setName("xxx" + i);
+//            model.setLeader("****" + i);
+//            model.setNote("xxxxxxxxxxxx" + i);
+//            model.setPhone("*********" + i);
+//            model.setSource("####" + i);
+//            mData.add(model);
+//        }
+
 
     }
 
@@ -143,10 +148,10 @@ public class CustomerListActivity extends BaseActivity {
 
     private class BussinessDetailAdapter extends BaseAdapter {
         private Context ct;
-        private ArrayList<Business> mdata = new ArrayList<>();
+        private JSONArray mdata = new JSONArray();
         private LayoutInflater inflater;
 
-        public BussinessDetailAdapter(Context ct, ArrayList<Business> data) {
+        public BussinessDetailAdapter(Context ct, JSONArray  data) {
             this.ct = ct;
             this.mdata = data;
             this.inflater = LayoutInflater.from(ct);
@@ -158,8 +163,8 @@ public class CustomerListActivity extends BaseActivity {
         }
 
         @Override
-        public Object getItem(int position) {
-            return mdata.get(position);
+        public JSONObject getItem(int position) {
+            return mdata.getJSONObject(position);
         }
 
         @Override
@@ -173,62 +178,38 @@ public class CustomerListActivity extends BaseActivity {
             if (convertView == null) {
                 convertView = inflater.inflate(R.layout.item_customer_main, null);
                 holder = new ViewHolder();
-                holder.tv_num = (TextView) convertView.findViewById(R.id.tv_crm_business_num);
-                holder.tv_name = (TextView) convertView.findViewById(R.id.tv_crm_business_name);
-                holder.tv_note = (TextView) convertView.findViewById(R.id.tv_crm_business_note);
+                holder.tv_title= (TextView) convertView.findViewById(R.id.tv_cu_title);
+                holder.tv_state = (TextView) convertView.findViewById(R.id.tv_cu_state);
+                holder.tv_money = (TextView) convertView.findViewById(R.id.tv_cu_money);
+                holder.tv_leader = (TextView) convertView.findViewById(R.id.tv_cu_leader);
                 holder.tv_date = (TextView) convertView.findViewById(R.id.tv_crm_business_date);
                 holder.tv_datetv = (TextView) convertView.findViewById(R.id.tv_crm_business_datetv);
-                holder.tv_phone = (TextView) convertView.findViewById(R.id.tv_crm_business_phone);
-                holder.tv_source = (TextView) convertView.findViewById(R.id.tv_crm_business_source);
-                //  holder.tv_num= (TextView) convertView.findViewById(R.id.tv_crm_business_num);
-                holder.bt_event = (Button) convertView.findViewById(R.id.bt_business_qiang);
+                holder.tv_step = (TextView) convertView.findViewById(R.id.tv_cu_step);
+                holder.tv_code=(TextView)convertView.findViewById(R.id.tv_cu_code);
                 convertView.setTag(holder);
             } else {
                 holder = (ViewHolder) convertView.getTag();
             }
-            holder.tv_num.setText(mdata.get(position).getNum());
-            holder.tv_name.setText(mdata.get(position).getName());
-            holder.tv_date.setText(mdata.get(position).getDate());
-            holder.tv_datetv.setText("");
-            //holder.tv_leader.setText(mdata.get(position).getLeader());
-            holder.tv_note.setText(mdata.get(position).getNote());
-            holder.tv_phone.setText(mdata.get(position).getPhone());
-            holder.tv_source.setText(mdata.get(position).getSource());
-            if (mdata.get(position).getType() == 0) {
-                holder.bt_event.setVisibility(View.GONE);
-            } else if (mdata.get(position).getType() == 1) {
-                holder.bt_event.setVisibility(View.VISIBLE);
-                holder.bt_event.setText("抢");
-            } else if (mdata.get(position).getType() == 2) {
-                holder.bt_event.setVisibility(View.VISIBLE);
-                holder.bt_event.setText("分配");
-            }
-            holder.bt_event.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    if (mdata.get(position).getType() == 1) {
-//                        holder.bt_event.setVisibility(View.VISIBLE);
-//                        holder.bt_event.setText("抢");
-                    } else if (mdata.get(position).getType() == 2) {
-//                        holder.bt_event.setVisibility(View.VISIBLE);
-//                        holder.bt_event.setText("分配");
-                    }
-                }
-            });
+            holder.tv_title.setText(mdata.getJSONObject(position).getString("cu_name"));
+            holder.tv_money.setText(mdata.getJSONObject(position).getString("count"));
+            holder.tv_step.setText(mdata.getJSONObject(position).getString("cu_nichestep"));
+            holder.tv_date.setText(mdata.getJSONObject(position).getString("cu_lastdate"));
+            holder.tv_datetv.setText("最后跟进时间:");
+            holder.tv_leader.setText(mdata.getJSONObject(position).getString("cu_contact"));
+            holder.tv_code.setText(mdata.getJSONObject(position).getString("cu_code"));
             return convertView;
         }
 
 
         class ViewHolder {
-            TextView tv_num;
-            TextView tv_name;
+            TextView tv_code;
+            TextView tv_state;
+            TextView tv_title;
+            TextView tv_money;
+            TextView tv_step;
             TextView tv_leader;
-            TextView tv_source;
-            TextView tv_phone;
-            TextView tv_note;
             TextView tv_datetv;
             TextView tv_date;
-            Button bt_event;
         }
     }
 
@@ -301,12 +282,15 @@ public class CustomerListActivity extends BaseActivity {
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
-
+                    JSONArray jsonArray= JSON.parseObject(msg.getData().getString("result")).getJSONArray("customers");
+                    if (jsonArray!=null){
+                        mAdapter = new BussinessDetailAdapter(ct, jsonArray);
+                        mlist.setAdapter(mAdapter);
+                    }
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
-
                     break;
             }
         }

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/SalesRankingActivity.java

@@ -98,7 +98,7 @@ public class SalesRankingActivity extends BaseActivity {
         switch (item.getItemId()) {
             case R.id.sale_date_select:
                 DatePicker picker = new DatePicker(this);
-                picker.setRange(2000, 2030);
+                picker.setRange(1950, 2030);
                 picker.setSelectedItem(
                         calendar.get(Calendar.YEAR),
                         calendar.get(Calendar.MONTH) + 1,

+ 133 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/TaskAddActivity.java

@@ -0,0 +1,133 @@
+package com.xzjmyk.pm.activity.ui.erp.activity.crm;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.widget.TextView;
+
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.ViewInjectInfo;
+import com.lidroid.xutils.view.annotation.ViewInject;
+import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+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.util.ViewUtil;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class TaskAddActivity extends BaseActivity {
+    @ViewInject(R.id.tv_name)
+    private TextView tv_name;
+    @ViewInject(R.id.tv_executive)
+    private TextView tv_executive;
+    @ViewInject(R.id.tv_date)
+    private TextView tv_date;
+    @ViewInject(R.id.tv_priority)
+    private TextView tv_priority;
+    @ViewInject(R.id.tv_type)
+    private TextView tv_type;
+    @ViewInject(R.id.tv_customer)
+    private TextView tv_customer;
+    @ViewInject(R.id.tv_notice)
+    private TextView tv_notice;
+    @ViewInject(R.id.tv_content)
+    private TextView tv_content;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_task_add);
+        initView();
+        initData();
+        initListener();
+    }
+
+    private void initView() {
+        ViewUtils.inject(this);
+        int type=getIntent().getIntExtra("type",0);
+        if (type==0){
+            getSupportActionBar().setTitle("新增任务");
+            tv_type.setText("任务");
+        }else if (type==1){
+            getSupportActionBar().setTitle("新增日程");
+            tv_type.setText("日程");
+        }
+        
+     
+
+    }
+    private void initData() {
+
+    }
+
+  
+
+    private void initListener() {
+
+    }
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main_btn_submit, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.btn_save:
+                sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
+                break;
+            case android.R.id.home:
+                onBackPressed();
+                break;
+        }
+        return true;
+    }
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what){
+        progressDialog.show();
+        String formStore="{\n" +
+                "\"name\":\"开发任务\",\n" +
+                "\"resourcename\":\"U0316\",\n" +
+                "\"enddate\":\"2016-07-12\",\n" +
+                "\"tasklevel\":\"紧急\",\n" +
+                "\"taskorschedule\":\""+tv_type.getText().toString()+"\",\n" +
+                "\"custname\":\"王丹\",\n" +
+                "\"timealert\":\"10分钟提醒\",\n" +
+                "\"description\":\"任务立刻开始\",\n" +
+          /*      "\"SOURCECOD\":\"U0316\"\n" +*/
+                "}";
+        String url= Constants.getAppBaseUrl(ct)+"plm/task/addbilltask.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("formStore", formStore);
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
+}

+ 60 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportAddActivity.java

@@ -3,6 +3,9 @@ package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 import android.content.Intent;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
@@ -10,6 +13,13 @@ import android.view.View;
 import com.lidroid.xutils.ViewUtils;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+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.util.ViewUtil;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class VisitReportAddActivity extends BaseActivity {
 
@@ -44,7 +54,8 @@ public class VisitReportAddActivity extends BaseActivity {
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
-            case R.id.bt_save:
+            case R.id.btn_save:
+                sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
                 break;
             case android.R.id.home:
                 onBackPressed();
@@ -52,4 +63,52 @@ public class VisitReportAddActivity extends BaseActivity {
         }
         return true;
     }
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what){
+        progressDialog.show();
+        String formStore="{\n" +
+                "\"vr_visittime\":\"2016-07-12\",\n" +
+                "\"vr_visitplace\":\"深南路\",\n" +
+                "\"vr_cuname\":\"华商龙\",\n" +
+                "\"vr_cucontact\":\"王单\",\n" +
+                "\"vr_visitend\":\"2016-07-28\",\n" +
+                "\"vr_nichestep\":\"初次沟通\",\n" +
+                "\"vr_remark\":\"添加评论\",\n" +
+                "\"vr_recorddate\":\"2016-07-28\",\n" +
+                "\"vr_recorder\":\"U0316\"\n" +
+                "}";
+        String url= Constants.getAppBaseUrl(ct)+"crm/customermgr/saveVisitRecord.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("formStore", formStore);
+        params.put("caller", "VisitRecord");
+        params.put("param1", "[]");
+        params.put("param2", "[]");
+        params.put("param3", "[]");
+        params.put("param4", "[]");
+        params.put("param5", "[]");
+        params.put("param6", "[]");
+        params.put("param7", "[]");
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
+
 }

+ 72 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportPlanActivity.java

@@ -1,13 +1,25 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
+import android.os.Handler;
+import android.os.Message;
 import android.support.v7.app.AppCompatActivity;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
+import android.widget.TextView;
 
 import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+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.util.ViewUtil;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 /**
  * @功能:拜访计划录入
@@ -16,6 +28,18 @@ import com.xzjmyk.pm.activity.ui.base.BaseActivity;
  * @return:
  */
 public class VisitReportPlanActivity extends BaseActivity {
+    @ViewInject(R.id.tv_date_select)
+    private TextView tv_date_select;
+    @ViewInject(R.id.tv_address_login)
+    private TextView  tv_address_login;
+    @ViewInject(R.id.tv_address_refresh)
+    private TextView  tv_address_refresh;
+    @ViewInject(R.id.tv_customer_login)
+    private TextView  tv_customer_login;
+    @ViewInject(R.id.tv_linksman_login)
+    private TextView  tv_linksman_login;
+    @ViewInject(R.id.tv_visit_login)
+    private TextView  tv_visit_login;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -49,7 +73,8 @@ public class VisitReportPlanActivity extends BaseActivity {
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
-            case R.id.bt_save:
+            case R.id.btn_save:
+                sendHttpResquest(Constants.HTTP_SUCCESS_INIT);
                 break;
             case android.R.id.home:
                 onBackPressed();
@@ -57,4 +82,50 @@ public class VisitReportPlanActivity extends BaseActivity {
         }
         return true;
     }
+
+
+    private Handler mHandler=new Handler(){
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what){
+                case Constants.HTTP_SUCCESS_INIT:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                     ToastMessage("保存成功!");
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    progressDialog.dismiss();
+                    Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
+                    ToastMessage("保存异常!");
+                    break;
+            }
+        }
+    };
+
+    private void sendHttpResquest(int what){
+        progressDialog.show();
+        String formStore ="\n" +
+                "{\n" +
+              /*  "\"vp_id\":\"1223\",\n" +*/
+                "\"vp_date\":\"2016-07-27\",\n" +
+                "\"vp_custcode\":\"12321312\",\n" +
+                "\"vp_custname\":\"深圳市华商龙科技\",\n" +
+                "\"vp_address\":\"深圳市*****\",\n" +
+                "\"vp_contact\":\"王二\",\n" +
+                "\"vp_visitman\":\"深圳市华商龙\",\n" +
+                "\"vp_recordman\":\"U0316\",\n" +
+                "\"vp_status\":\"未拜访\",\n" +
+                "\"vp_visitmancode\":\"U0316\",\n" +
+                "\"vp_nichestep\":\"初次沟通\",\n" +
+                "\"vp_recordate\":\"2016-07-27\"\n" +
+                "}";
+        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/saveVisitPlan.action";
+        Map<String,Object> params=new HashMap<>();
+        params.put("formStore", formStore);
+        params.put("caller", "visitplan");
+        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
+    }
+
 }

+ 3 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java

@@ -16,6 +16,7 @@ import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.MainActivity;
 import com.xzjmyk.pm.activity.ui.base.XutilsFragment;
 import com.xzjmyk.pm.activity.ui.circle.BusinessCircleActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.crm.ClientActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.oa.OAActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.oa.TestActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
@@ -98,8 +99,8 @@ public class WorksFragment extends XutilsFragment implements View.OnClickListene
                         ct.startActivity(new Intent(ct, OAActivity.class));
                 break;
             case R.id.my_client_rl:
-//                 ct.startActivity(new Intent(ct, ClientActivity.class));
-                 ct.startActivity(new Intent(ct, TestActivity.class));
+                ct.startActivity(new Intent(ct, ClientActivity.class));
+               //  ct.startActivity(new Intent(ct, TestActivity.class));
 //                ToastUtil.showToast(getActivity(), "抱歉,该功能尚未完善");
                 break;
             case R.id.my_friend_rl:

+ 4 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/steps/StepsView.java

@@ -124,12 +124,15 @@ public class StepsView extends LinearLayout implements StepsViewIndicator.OnDraw
                 textView.setText(mLabels[i]);
                 textView.setTextColor(mLabelColorIndicator);
                 textView.setX(indicatorPosition.get(i));
-                textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10);
+                textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 8);
                 textView.setLayoutParams(
                         new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                                 ViewGroup.LayoutParams.WRAP_CONTENT));
 
                 if (i <= mCompletedPosition) {
+//                    textView.setTypeface(null, Typeface.BOLD);
+                }
+                if (i==mCompletedPosition){
                     textView.setTypeface(null, Typeface.BOLD);
                 }
 

+ 3 - 0
WeiChat/src/main/res/layout/activity_business_less.xml

@@ -11,8 +11,10 @@
         style="@style/TextView_Basic"></TextView>
 
     <EditText
+        android:id="@+id/et_remark"
         android:layout_width="match_parent"
         android:layout_height="120dp"
+        android:gravity="left|top"
         android:layout_marginLeft="10dp"
         android:layout_marginRight="10dp"
         android:background="@drawable/shape_from_edit" />
@@ -50,6 +52,7 @@
             style="@style/TextView_Basic" />
 
         <TextView
+            android:id="@+id/tv_business_state"
             android:text="未分配"
             android:layout_margin="10dp"
             style="@style/TextView_Basic" />

+ 432 - 9
WeiChat/src/main/res/layout/activity_contact_man_add.xml

@@ -1,10 +1,433 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
-    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.ContactManAddActivity">
-
-</RelativeLayout>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fillViewport="true">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
+
+        <RelativeLayout
+            android:id="@+id/rl_name"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/name_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="姓名"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_name"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/name_text"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine"
+                android:text="王丹" />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:clickable="true"
+            android:id="@+id/sex_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/sex_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="性别"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_sex"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/sex_arrow_img"
+                android:layout_toRightOf="@+id/sex_text"
+                android:text="男"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/sex_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/company_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/company_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="公司"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_company_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/company_arrow_img"
+                android:layout_toRightOf="@+id/company_text"
+                android:text="北京******公司"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/company_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/deparment_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/deparment_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="部门"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_department_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/deparment_arrow_img"
+                android:layout_toRightOf="@+id/deparment_text"
+                android:text="研发部"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/deparment_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/position_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/position_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="职位"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_position_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/position_arrow_img"
+                android:layout_toRightOf="@+id/position_text"
+                android:text="研发工程师"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/position_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/tel_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/tel_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="电话"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_tel_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_marginBottom="1dp"
+                android:layout_toRightOf="@+id/tel_text"
+                android:text="13255599349"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:id="@+id/startTime_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/startTime_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="手机"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_phone_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/startTime_text"
+                android:text="13234345363"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            
+            android:id="@+id/email_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/email_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="邮件"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_email_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/email_text"
+                android:text="324213412@qq.com"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:clickable="true"
+            android:id="@+id/address_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/address_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="地址"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_address_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/address_arrow_img"
+                android:layout_toRightOf="@+id/address_text"
+                android:text="深圳市南山区科技南五路"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/address_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:clickable="true"
+            android:layout_marginBottom="1dp"
+            android:id="@+id/birthday_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/birthday_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="生日"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_birthday_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/birthday_arrow_img"
+                android:layout_toRightOf="@+id/birthday_text"
+                android:text="1990-01-01"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/birthday_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:layout_marginBottom="1dp"
+            android:id="@+id/notes_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/notes_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="备注"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_notes_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/notes_text"
+                android:text="联系人描述"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/card_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/card_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="名片"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:background="@null"
+                android:id="@+id/tv_card_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/card_text"
+                android:text="001"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+    </LinearLayout>
+
+
+</ScrollView>
+
+

+ 14 - 1
WeiChat/src/main/res/layout/activity_customer_detail.xml

@@ -16,6 +16,7 @@
             style="@style/LinearLayout_vertical">
 
             <TextView
+                android:id="@+id/tv_company_name"
                 android:textSize="18sp"
                 android:layout_margin="20dp"
                 android:textColor="@color/white"
@@ -23,6 +24,7 @@
                 style="@style/TextView_VerticalCenter" />
 
             <TextView
+                android:id="@+id/tv_leader"
                 android:layout_marginLeft="20dp"
                 android:layout_marginBottom="5dp"
                 android:textColor="@color/white"
@@ -30,6 +32,7 @@
                 style="@style/TextView_VerticalCenter" />
 
             <TextView
+                android:id="@+id/tv_state"
                 android:layout_marginLeft="20dp"
                 android:layout_marginBottom="5dp"
                 android:textColor="@color/white"
@@ -37,6 +40,7 @@
                 style="@style/TextView_VerticalCenter" />
 
             <TextView
+                android:id="@+id/tv_lastDate"
                 android:layout_marginLeft="20dp"
                 android:layout_marginBottom="5dp"
                 android:textColor="@color/white"
@@ -79,6 +83,7 @@
                     style="@style/TextView_VerticalCenter" />
 
                 <TextView
+                    android:id="@+id/tv_address"
                     android:layout_marginLeft="5dp"
                     android:text="深圳市南山区科技园科技南五路"
                     style="@style/TextView_VerticalCenter" />
@@ -96,6 +101,7 @@
                     style="@style/TextView_VerticalCenter" />
 
                 <TextView
+                    android:id="@+id/tv_receiveTime"
                     android:layout_marginLeft="5dp"
                     android:text="2016-07-05 18:00"
                     style="@style/TextView_VerticalCenter" />
@@ -113,6 +119,7 @@
                     style="@style/TextView_VerticalCenter" />
 
                 <TextView
+                    android:id="@+id/tv_source"
                     android:layout_marginLeft="5dp"
                     android:text="线上注册"
                     style="@style/TextView_VerticalCenter" />
@@ -130,6 +137,7 @@
                     style="@style/TextView_VerticalCenter" />
 
                 <TextView
+                    android:id="@+id/tv_industry"
                     android:layout_marginLeft="5dp"
                     android:text="金融业"
                     style="@style/TextView_VerticalCenter" />
@@ -147,6 +155,7 @@
                     style="@style/TextView_VerticalCenter" />
 
                 <TextView
+                    android:id="@+id/tv_tel"
                     android:layout_marginLeft="5dp"
                     android:text="0755-21321312"
                     style="@style/TextView_VerticalCenter" />
@@ -265,6 +274,7 @@
                         style="@style/TextView_VerticalCenter" />
 
                     <TextView
+                        android:id="@+id/tv_reimbursementIng"
                         android:text="0元"
                         android:layout_gravity="center_horizontal"
                         android:layout_margin="10dp"
@@ -277,11 +287,12 @@
                     style="@style/LinearLayout_vertical">
 
                     <TextView
-                        android:text="报销"
+                        android:text="报销"
                         android:layout_margin="10dp"
                         style="@style/TextView_VerticalCenter" />
 
                     <TextView
+                        android:id="@+id/tv_reimbursement_end"
                         android:text="0元"
                         android:layout_gravity="center_horizontal"
                         android:layout_margin="10dp"
@@ -329,6 +340,7 @@
                         style="@style/TextView_VerticalCenter" />
 
                     <TextView
+                        android:id="@+id/tv_modifyRecord"
                         android:text="0条"
                         android:layout_gravity="center_horizontal"
                         android:layout_margin="10dp"
@@ -346,6 +358,7 @@
                         style="@style/TextView_VerticalCenter" />
 
                     <TextView
+                        android:id="@+id/tv_visitTimes"
                         android:text="0次"
                         android:layout_gravity="center_horizontal"
                         android:layout_margin="10dp"

+ 12 - 11
WeiChat/src/main/res/layout/activity_customter_add.xml

@@ -13,6 +13,7 @@
         android:orientation="vertical">
 
         <RelativeLayout
+            android:visibility="gone"
             android:id="@+id/ry_leave_man"
             style="@style/form_relative_customer"
             android:background="@color/item_color1">
@@ -47,7 +48,7 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/et_leave_mankind"
+                android:id="@+id/et_cu_name"
                 style="@style/form_relative_right_text"
                 editTextFormExample:testType="nocheck" />
         </RelativeLayout>
@@ -85,7 +86,7 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/et_leave_category"
+                android:id="@+id/et_cu_source"
                 style="@style/form_relative_right_text"
                 editTextFormExample:testType="nocheck" />
         </RelativeLayout>
@@ -106,7 +107,7 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/et_leave_days"
+                android:id="@+id/et_cu_industry"
                 style="@style/form_relative_right_text"
                 whatever:customRegexp="^(([0-9])|([0-9]+\\.?[0-9]+))$"
                 whatever:testErrorString="@string/error_only_numeric_digits_allowed"
@@ -130,7 +131,7 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/et_leave_hours"
+                android:id="@+id/et_cu_defaultLevel"
                 style="@style/form_relative_right_text"
 
                 whatever:customRegexp="^(([0-9])|([0-9]+\\.?[0-9]+))$"
@@ -154,7 +155,7 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/et_leave_reason"
+                android:id="@+id/et_cu_tel"
                 style="@style/form_relative_right_text"
                 editTextFormExample:testType="nocheck" />
         </RelativeLayout>
@@ -174,10 +175,10 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/tv_start_time"
+                android:id="@+id/tv_cu_lastDate"
                 style="@style/form_relative_right_text"
                 editTextFormExample:customFormat="yyyy-MM-dd HH:mm"
-                editTextFormExample:testType="date" />
+                editTextFormExample:testType="nocheck" />
         </RelativeLayout>
 
 
@@ -194,10 +195,10 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/tv_end_time"
+                android:id="@+id/tv_cu_address"
                 style="@style/form_relative_right_text"
                 editTextFormExample:customFormat="yyyy-MM-dd HH:mm"
-                editTextFormExample:testType="date" />
+                editTextFormExample:testType="nocheck" />
         </RelativeLayout>
 
         <RelativeLayout
@@ -213,10 +214,10 @@
                 android:textSize="@dimen/text_main" />
 
             <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                android:id="@+id/tv_note_value"
+                android:id="@+id/tv_cu_remark"
                 style="@style/form_relative_right_text"
                 editTextFormExample:customFormat="yyyy-MM-dd HH:mm"
-                editTextFormExample:testType="date" />
+                editTextFormExample:testType="nocheck"/>
         </RelativeLayout>
     </LinearLayout>
 </RelativeLayout>

+ 299 - 0
WeiChat/src/main/res/layout/activity_task_add.xml

@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fillViewport="true">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
+
+        <RelativeLayout
+            android:id="@+id/rl_name"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/name_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="任务标题"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_name"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/date_text"
+                android:text="2016-07-05"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/sex_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/sex_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="执行人"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_executive"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/sex_arrow_img"
+                android:layout_toRightOf="@+id/sex_text"
+                android:text="深圳市******"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/sex_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/company_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/company_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="执行日期"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_date"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/company_arrow_img"
+                android:layout_toRightOf="@+id/company_text"
+                android:text="北京******公司"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/company_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/deparment_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/deparment_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="紧急程度"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_priority"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/deparment_arrow_img"
+                android:layout_toRightOf="@+id/deparment_text"
+                android:text="***"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/deparment_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/position_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/position_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="类型"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_type"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/position_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/tel_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/tel_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="关联客户"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_customer"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_marginBottom="1dp"
+                android:layout_toLeftOf="@+id/tel_arrow_img"
+                android:layout_toRightOf="@+id/tel_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine"
+                android:layout_alignParentStart="true" />
+
+            <ImageView
+                android:id="@+id/tel_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:id="@+id/startTime_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/startTime_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="提醒"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_notice"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/startTime_arrow_img"
+                android:layout_toRightOf="@+id/startTime_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/startTime_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+
+            android:id="@+id/email_erp_rl"
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
+
+            <TextView
+                android:id="@+id/email_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/oa_client"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="内容"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_content"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toRightOf="@+id/email_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+        </RelativeLayout>
+
+
+    </LinearLayout>
+
+
+</ScrollView>
+
+

+ 67 - 62
WeiChat/src/main/res/layout/activity_visit_report_add.xml

@@ -12,17 +12,17 @@
         tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
 
         <RelativeLayout
-            android:layout_marginBottom="20dp"
-            android:background="@color/white"
             android:id="@+id/rl_dateSelect"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
 
             <TextView
                 android:id="@+id/date_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="拜访日期"
@@ -32,14 +32,14 @@
             <TextView
                 android:id="@+id/tv_date_select"
                 style="@style/IMTbleLine_TextValue"
-                android:layout_toLeftOf="@+id/date_arrow_img"
+                android:layout_toLeftOf="@+id/name_arrow_img"
                 android:layout_toRightOf="@+id/date_text"
                 android:text="2016-07-05"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
 
             <ImageView
-                android:id="@+id/date_arrow_img"
+                android:id="@+id/name_arrow_img"
                 android:layout_width="@dimen/next_width"
                 android:layout_height="@dimen/next_height"
                 android:layout_alignParentRight="true"
@@ -50,17 +50,17 @@
         </RelativeLayout>
 
         <RelativeLayout
-            android:layout_marginBottom="1dp"
-            android:background="@color/white"
             android:id="@+id/address_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
                 android:id="@+id/address_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_signin"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="地址"
@@ -88,26 +88,26 @@
         </RelativeLayout>
 
         <TextView
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
             android:layout_marginRight="10dp"
-            android:text="定位不准?点我重试"
-            android:textSize="13sp"
-            android:textColor="@color/light_green"
             android:gravity="right|center_vertical"
-            android:layout_width="match_parent"
-            android:layout_height="40dp" />
+            android:text="定位不准?点我重试"
+            android:textColor="#415dea"
+            android:textSize="13sp" />
 
         <RelativeLayout
-            android:layout_marginBottom="1dp"
-            android:background="@color/white"
             android:id="@+id/customer_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
-                android:id="@+id/customer_text"
+                android:id="@+id/company_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="客户"
@@ -117,14 +117,14 @@
             <TextView
                 android:id="@+id/tv_customer_login"
                 style="@style/IMTbleLine_TextValue"
-                android:layout_toLeftOf="@+id/customer_arrow_img"
-                android:layout_toRightOf="@+id/customer_text"
+                android:layout_toLeftOf="@+id/company_arrow_img"
+                android:layout_toRightOf="@+id/company_text"
                 android:text="北京******公司"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
 
             <ImageView
-                android:id="@+id/customer_arrow_img"
+                android:id="@+id/company_arrow_img"
                 android:layout_width="@dimen/next_width"
                 android:layout_height="@dimen/next_height"
                 android:layout_alignParentRight="true"
@@ -135,17 +135,17 @@
         </RelativeLayout>
 
         <RelativeLayout
-            android:layout_marginBottom="20dp"
-            android:background="@color/white"
             android:id="@+id/linksman_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="20dp"
+            android:background="@color/white">
 
             <TextView
-                android:id="@+id/linksman_text"
+                android:id="@+id/deparment_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="联系人"
@@ -155,14 +155,14 @@
             <TextView
                 android:id="@+id/tv_linksman_login"
                 style="@style/IMTbleLine_TextValue"
-                android:layout_toLeftOf="@+id/linksman_arrow_img"
-                android:layout_toRightOf="@+id/linksman_text"
+                android:layout_toLeftOf="@+id/deparment_arrow_img"
+                android:layout_toRightOf="@+id/deparment_text"
                 android:text="***"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
 
             <ImageView
-                android:id="@+id/linksman_arrow_img"
+                android:id="@+id/deparment_arrow_img"
                 android:layout_width="@dimen/next_width"
                 android:layout_height="@dimen/next_height"
                 android:layout_alignParentRight="true"
@@ -173,16 +173,17 @@
         </RelativeLayout>
 
         <RelativeLayout
-            android:background="@color/white"
             android:id="@+id/visit_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
-                android:id="@+id/visit_text"
+                android:id="@+id/position_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="业务员"
@@ -192,14 +193,14 @@
             <TextView
                 android:id="@+id/tv_visit_login"
                 style="@style/IMTbleLine_TextValue"
-                android:layout_toLeftOf="@+id/visit_arrow_img"
-                android:layout_toRightOf="@+id/visit_text"
+                android:layout_toLeftOf="@+id/position_arrow_img"
+                android:layout_toRightOf="@+id/position_text"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
 
             <ImageView
-                android:id="@+id/visit_arrow_img"
+                android:id="@+id/position_arrow_img"
                 android:layout_width="@dimen/next_width"
                 android:layout_height="@dimen/next_height"
                 android:layout_alignParentRight="true"
@@ -210,16 +211,17 @@
         </RelativeLayout>
 
         <RelativeLayout
-            android:background="@color/white"
             android:id="@+id/depart_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
-                android:id="@+id/depart_text"
+                android:id="@+id/tel_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="部门"
@@ -229,14 +231,15 @@
             <TextView
                 android:id="@+id/tv_depart_login"
                 style="@style/IMTbleLine_TextValue"
-                android:layout_toLeftOf="@+id/depart_arrow_img"
-                android:layout_toRightOf="@+id/depart_text"
+                android:layout_marginBottom="1dp"
+                android:layout_toLeftOf="@+id/tel_arrow_img"
+                android:layout_toRightOf="@+id/tel_text"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
 
             <ImageView
-                android:id="@+id/depart_arrow_img"
+                android:id="@+id/tel_arrow_img"
                 android:layout_width="@dimen/next_width"
                 android:layout_height="@dimen/next_height"
                 android:layout_alignParentRight="true"
@@ -248,16 +251,17 @@
 
 
         <RelativeLayout
-            android:background="@color/white"
             android:id="@+id/startTime_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
                 android:id="@+id/startTime_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="开始时间"
@@ -286,16 +290,17 @@
 
 
         <RelativeLayout
-            android:background="@color/white"
             android:id="@+id/endTime_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
-                android:id="@+id/endTime_text"
+                android:id="@+id/email_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="截止时间"
@@ -305,14 +310,14 @@
             <TextView
                 android:id="@+id/tv_endTime_login"
                 style="@style/IMTbleLine_TextValue"
-                android:layout_toLeftOf="@+id/endTime_arrow_img"
-                android:layout_toRightOf="@+id/endTime_text"
+                android:layout_toLeftOf="@+id/email_arrow_img"
+                android:layout_toRightOf="@+id/email_text"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
 
             <ImageView
-                android:id="@+id/endTime_arrow_img"
+                android:id="@+id/email_arrow_img"
                 android:layout_width="@dimen/next_width"
                 android:layout_height="@dimen/next_height"
                 android:layout_alignParentRight="true"
@@ -322,18 +327,18 @@
                 android:contentDescription="@string/app_name" />
         </RelativeLayout>
 
-
         <RelativeLayout
-            android:background="@color/white"
             android:id="@+id/businessState_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:layout_marginBottom="1dp"
+            android:background="@color/white">
 
             <TextView
                 android:id="@+id/businessState_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="当前商机阶段"
@@ -362,16 +367,16 @@
 
 
         <RelativeLayout
-            android:background="@color/white"
             android:id="@+id/notes_erp_rl"
-            style="@style/IMTbleLine_UP_Me">
+            style="@style/IMTbleLine_UP_Me"
+            android:background="@color/white">
 
             <TextView
                 android:id="@+id/notes_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
-                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawableLeft="@drawable/oa_client"
                 android:drawablePadding="10dp"
                 android:gravity="center"
                 android:text="备注"

+ 23 - 21
WeiChat/src/main/res/layout/activity_visit_report_plan.xml

@@ -17,7 +17,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawableLeft="@drawable/oa_client"
             android:drawablePadding="10dp"
             android:gravity="center"
             android:text="日期"
@@ -27,14 +27,14 @@
         <TextView
             android:id="@+id/tv_date_select"
             style="@style/IMTbleLine_TextValue"
-            android:layout_toLeftOf="@+id/date_arrow_img"
+            android:layout_toLeftOf="@+id/name_arrow_img"
             android:layout_toRightOf="@+id/date_text"
             android:text="2016-07-05"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
 
         <ImageView
-            android:id="@+id/date_arrow_img"
+            android:id="@+id/name_arrow_img"
             android:layout_width="@dimen/next_width"
             android:layout_height="@dimen/next_height"
             android:layout_alignParentRight="true"
@@ -55,12 +55,13 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawableLeft="@drawable/oa_signin"
             android:drawablePadding="10dp"
             android:gravity="center"
             android:text="地址"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
+            android:textSize="@dimen/text_main"
+            android:editable="true" />
 
         <TextView
             android:id="@+id/tv_address_login"
@@ -89,7 +90,8 @@
         android:textColor="@color/light_green"
         android:gravity="right|center_vertical"
         android:layout_width="match_parent"
-        android:layout_height="40dp" />
+        android:layout_height="40dp"
+        android:id="@+id/tv_address_refresh" />
 
     <RelativeLayout
         android:layout_marginBottom="1dp"
@@ -98,11 +100,11 @@
         style="@style/IMTbleLine_UP_Me">
 
         <TextView
-            android:id="@+id/customer_text"
+            android:id="@+id/company_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawableLeft="@drawable/oa_client"
             android:drawablePadding="10dp"
             android:gravity="center"
             android:text="客户"
@@ -112,14 +114,14 @@
         <TextView
             android:id="@+id/tv_customer_login"
             style="@style/IMTbleLine_TextValue"
-            android:layout_toLeftOf="@+id/customer_arrow_img"
-            android:layout_toRightOf="@+id/customer_text"
+            android:layout_toLeftOf="@+id/company_arrow_img"
+            android:layout_toRightOf="@+id/company_text"
             android:text="北京******公司"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
 
         <ImageView
-            android:id="@+id/customer_arrow_img"
+            android:id="@+id/company_arrow_img"
             android:layout_width="@dimen/next_width"
             android:layout_height="@dimen/next_height"
             android:layout_alignParentRight="true"
@@ -136,11 +138,11 @@
         style="@style/IMTbleLine_UP_Me">
 
         <TextView
-            android:id="@+id/linksman_text"
+            android:id="@+id/deparment_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawableLeft="@drawable/oa_client"
             android:drawablePadding="10dp"
             android:gravity="center"
             android:text="联系人"
@@ -150,14 +152,14 @@
         <TextView
             android:id="@+id/tv_linksman_login"
             style="@style/IMTbleLine_TextValue"
-            android:layout_toLeftOf="@+id/linksman_arrow_img"
-            android:layout_toRightOf="@+id/linksman_text"
+            android:layout_toLeftOf="@+id/deparment_arrow_img"
+            android:layout_toRightOf="@+id/deparment_text"
             android:text="***"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
 
         <ImageView
-            android:id="@+id/linksman_arrow_img"
+            android:id="@+id/deparment_arrow_img"
             android:layout_width="@dimen/next_width"
             android:layout_height="@dimen/next_height"
             android:layout_alignParentRight="true"
@@ -173,11 +175,11 @@
         style="@style/IMTbleLine_UP_Me">
 
         <TextView
-            android:id="@+id/visit_text"
+            android:id="@+id/position_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawableLeft="@drawable/oa_client"
             android:drawablePadding="10dp"
             android:gravity="center"
             android:text="拜访人"
@@ -187,14 +189,14 @@
         <TextView
             android:id="@+id/tv_visit_login"
             style="@style/IMTbleLine_TextValue"
-            android:layout_toLeftOf="@+id/visit_arrow_img"
-            android:layout_toRightOf="@+id/visit_text"
+            android:layout_toLeftOf="@+id/position_arrow_img"
+            android:layout_toRightOf="@+id/position_text"
             android:text="xxxxx"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
 
         <ImageView
-            android:id="@+id/visit_arrow_img"
+            android:id="@+id/position_arrow_img"
             android:layout_width="@dimen/next_width"
             android:layout_height="@dimen/next_height"
             android:layout_alignParentRight="true"

+ 32 - 9
WeiChat/src/main/res/layout/item_customer_main.xml

@@ -1,33 +1,48 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_height="wrap_content"
-
     style="@style/crm_ll_card">
 
     <RelativeLayout style="@style/crm_ll_sale_item">
 
         <TextView
-
+            android:id="@+id/tv_cu_title"
             android:text="深圳市优软科技有限公司"
-            android:textSize="18sp"
+            android:textSize="16sp"
             style="@style/TextView_Basic" />
 
         <TextView
             android:layout_alignParentRight="true"
-            android:id="@+id/tv_crm_business_num"
+            android:id="@+id/tv_cu_state"
             android:text="未成交"
             style="@style/TextView_Basic" />
     </RelativeLayout>
+    <LinearLayout style="@style/crm_ll_sale_item">
+
+        <TextView
+            android:text="编号:"
+            android:minWidth="100dp"
+            android:gravity="left"
+            style="@style/TextView_Basic" />
 
+        <TextView
+            android:id="@+id/tv_cu_code"
+            android:text="XXXXXXX"
+            android:textColor="@color/black"
+            style="@style/TextView_Basic" />
+    </LinearLayout>
     <LinearLayout style="@style/crm_ll_sale_item">
 
         <TextView
             android:text="本月预测(元):"
+            android:minWidth="100dp"
+            android:gravity="left"
             style="@style/TextView_Basic" />
 
         <TextView
-            android:id="@+id/tv_crm_business_name"
+            android:id="@+id/tv_cu_money"
             android:text="XXXXXXX"
+            android:textColor="@color/black"
             style="@style/TextView_Basic" />
     </LinearLayout>
 
@@ -35,11 +50,14 @@
 
         <TextView
             android:text="当前阶段:"
+            android:minWidth="100dp"
+            android:gravity="left"
             style="@style/TextView_Basic" />
 
         <TextView
-            android:id="@+id/tv_crm_business_source"
+            android:id="@+id/tv_cu_step"
             android:text="XXXXXXX"
+            android:textColor="@color/black"
             style="@style/TextView_Basic" />
     </LinearLayout>
 
@@ -61,19 +79,23 @@
 
         <TextView
             android:text="负责人:"
+            android:minWidth="100dp"
+            android:gravity="left"
             style="@style/TextView_Basic" />
 
         <TextView
-            android:id="@+id/tv_crm_business_note"
+            android:id="@+id/tv_cu_leader"
             android:text="XXXXXXX"
+            android:textColor="@color/black"
             style="@style/TextView_Basic" />
     </LinearLayout>
 
     <RelativeLayout
-        style="@style/crm_ll_sale_item"
-        android:layout_gravity="right">
+        style="@style/crm_ll_sale_item">
 
         <TextView
+            android:minWidth="100dp"
+            android:gravity="left"
             android:id="@+id/tv_crm_business_datetv"
             android:text="最后更进时间:"
             android:layout_gravity="center_vertical"
@@ -83,6 +105,7 @@
             android:id="@+id/tv_crm_business_date"
             android:layout_toRightOf="@+id/tv_crm_business_datetv"
             android:text="XXXXXXX"
+            android:textColor="@color/black"
             android:layout_gravity="center_vertical"
             style="@style/TextView_Basic" />