Browse Source

Merge branch 'feature' of https://gitlab.com/Arisono/SkWeiChat-Baidu into developer_fix

# Conflicts:
#	WeiChat/version.properties
Arison 8 years ago
parent
commit
01a7946663

+ 11 - 0
WeiChat/src/main/AndroidManifest.xml

@@ -135,6 +135,17 @@
 
                 <action android:name="cat.ereza.customactivityoncrash.RESTART" />
             </intent-filter>
+
+            <intent-filter>
+                <action android:name="android.intent.action.VIEW"></action>
+                <category android:name="android.intent.category.DEFAULT"></category>
+                <category android:name="android.intent.category.BROWSABLE"></category>
+                <data
+                    android:scheme="http"
+                    android:host="www.usoftchina.com/usoft"
+                    android:pathPrefix="/app">
+                </data>
+            </intent-filter>
         </activity>
         <!-- 异常跳转页面 -->
         <activity

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed Dec 27 09:00:27 CST 2017
-debugName=279
+#Thu Dec 28 08:50:24 CST 2017
+debugName=288
 versionName=613
-debugCode=279
+debugCode=288
 versionCode=152

+ 1 - 1
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java

@@ -1642,7 +1642,7 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
     public void searchSeatNumbers(String yearmonth,String companyid){
         //companyid,userid,yearmonth,token
         
-        showLoading();
+    
         yearmonth=DateFormatUtil.getStrDate4Date(DateFormatUtil.getDate4StrDate(yearmonth,"yyyy-MM-dd HH:ss"),"yyyyMMdd");
         String peopleNumber=tv_food_peoples.getText().toString();
         String aType="小桌";

+ 3 - 4
app_modular/appbooking/src/main/java/com/modular/booking/adapter/ItemBserviceHeaderAdapter.java

@@ -9,6 +9,7 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
+import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.modular.booking.R;
@@ -17,8 +18,6 @@ import com.modular.booking.model.SBMenuModel;
 import java.util.ArrayList;
 import java.util.List;
 
-import de.hdodenhof.circleimageview.CircleImageView;
-
 public class ItemBserviceHeaderAdapter extends BaseAdapter {
 
     private List<SBMenuModel> objects = new ArrayList<SBMenuModel>();
@@ -71,12 +70,12 @@ public class ItemBserviceHeaderAdapter extends BaseAdapter {
         public SBMenuModel menuModel;
         public TextView tvTitle;
         public TextView tvDesc;
-        public CircleImageView ivMenu;
+        public ImageView ivMenu;
 
         public ViewHolder(View view) {
             tvTitle = (TextView) view.findViewById(R.id.tv_title);
             tvDesc = (TextView) view.findViewById(R.id.tv_desc);
-            ivMenu = (CircleImageView) view.findViewById(R.id.iv_menu);
+            ivMenu = (ImageView) view.findViewById(R.id.iv_menu);
         }
     }
 }

+ 5 - 5
app_modular/appbooking/src/main/res/layout/item_bservice_header.xml

@@ -27,12 +27,12 @@
         android:layout_margin="2dp"
         android:text="*****" />
 
-    <de.hdodenhof.circleimageview.CircleImageView
+    <ImageView
         android:id="@+id/iv_menu"
-        android:layout_width="45dp"
-        android:layout_height="45dp"
+        android:layout_width="46dp"
+        android:layout_height="46dp"
+        android:scaleType="fitXY"
         android:layout_marginBottom="10dp"
-        
         android:src="@drawable/defaultpic">
-    </de.hdodenhof.circleimageview.CircleImageView>
+    </ImageView>
 </LinearLayout>

+ 20 - 7
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/activity/ContactsActivity.java

@@ -90,6 +90,10 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
+/**
+  * @desc:单选和多选通讯录人员界面
+  * @author:Arison on 2017/12/27
+  */
 public class ContactsActivity extends OABaseActivity implements ContactsAdapter.ResultItemsInface {
 
 	private PullToRefreshListView mlist;
@@ -214,11 +218,16 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
 				} else if (type == 1) { //预约---获取对象界面
 					//预约对象
 					if (isSingleSelect) {
+						//单选
 						Intent intent = new Intent();
 						intent.putExtra("data", viewHolder.model);
 						setResult(0x20, intent);
 						finish();
 					} else {
+						//多选
+						LogUtil.d(TAG,"models size:"+adapter.getModels().size());
+						LogUtil.prinlnLongMsg(TAG,"models:"+JSON.toJSONString(adapter.getModels()));
+						
 						boolean isChecked = !viewHolder.checkBox.isChecked();
 						LogUtil.d("ContactsActivity", "isChecked:" + isChecked);
 						setSelectNumber(isChecked);
@@ -255,15 +264,19 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
 			}
 		});
 
-
+		//确认按钮
 		findViewById(R.id.sure_tv).setOnClickListener(new View.OnClickListener() {
 			@Override
 			public void onClick(View view) {
-				ArrayList<ContactsModel> models = getSelectNumber();
-				Intent intent = new Intent();
-				intent.putParcelableArrayListExtra("data", models);
-				activity.setResult(0x01, intent);
-				activity.finish();
+				if (StringUtil.isEmpty(voiceSearchView.getSearch_edit().getText().toString())) {
+					ArrayList<ContactsModel> models = getSelectNumber();
+					Intent intent = new Intent();
+					intent.putParcelableArrayListExtra("data", models);
+					activity.setResult(0x01, intent);
+					activity.finish();
+				}else{
+					ToastMessage("请清除查询条件便可以点击确认操作!");
+				}
 			}
 		});
 
@@ -334,7 +347,7 @@ public class ContactsActivity extends OABaseActivity implements ContactsAdapter.
 	private synchronized void sreachKeyWork(final String keyWork) {
 		searchKey = keyWork;
 		LogUtil.i("allModels=" + allModels.size());
-		if (StringUtil.isEmail(keyWork)) {
+		if (StringUtil.isEmpty(keyWork)) {
 			mlist.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
 			models.clear();
 			models.addAll(allModels);

+ 70 - 52
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessActivity.java

@@ -124,10 +124,10 @@ public class BusinessActivity extends BaseActivity implements View.OnClickListen
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.crm_data_find){
+        if (item.getItemId() == R.id.crm_data_find) {
             View view = getWindow().findViewById(item.getItemId());
             showPopupWindow(view);
-        }else if (item.getItemId() == android.R.id.home){
+        } else if (item.getItemId() == android.R.id.home) {
             onBackPressed();
         }
         return true;
@@ -135,15 +135,15 @@ public class BusinessActivity extends BaseActivity implements View.OnClickListen
 
     @Override
     public void onClick(View v) {
-        if (v.getId() ==  R.id.bt_create){
+        if (v.getId() == R.id.bt_create) {
             if (VersionUtil.canShowCrm2_0() && !CommonUtil.isBiteman())
                 startActivity(new Intent(this, AddBusinessActivity.class));
             else startActivity(new Intent(this, BusinessAddActivity.class));
-        }else if (v.getId() == R.id.bt_qiang){
+        } else if (v.getId() == R.id.bt_qiang) {
             startActivity(new Intent(this, BusinessDetailActivty.class).putExtra("bt_type", 1));
-        }else if (v.getId() == R.id.bt_manage){
+        } else if (v.getId() == R.id.bt_manage) {
             startActivity(new Intent(this, BusinessDetailActivty.class).putExtra("bt_type", 2));
-        }else if (v.getId() == R.id.bt_go){
+        } else if (v.getId() == R.id.bt_go) {
             startActivity(new Intent(this, BusinessStateActivity.class).putExtra("bt_type", 0));
         }
     }
@@ -156,61 +156,79 @@ public class BusinessActivity extends BaseActivity implements View.OnClickListen
                     progressDialog.dismiss();
                     gridlists.clear();
                     Log.i(TAG, "json:" + msg.getData().getString("result"));
-                    JSONObject root = JSON.parseObject(msg.getData().getString("result"));
-                    JSONArray chances = root.getJSONArray("chances");
-                    ArrayList<Integer> counts = new ArrayList<>();
-                    ArrayList<String> colors = new ArrayList<>();
-                    int countToatal = 0;
-                    if (!chances.isEmpty()) {
-                        ArrayList<String> items = new ArrayList<>();
-                        items.add(getString(R.string.color_text));
-                        // items.add("序号");
-                        items.add(getString(R.string.business_stage));
-                        items.add(getString(R.string.business_number));
-                        items.add(getString(R.string.business_Conversion_rate));
-                        gridlists.add(items);
-                        for (int i = 0; i < chances.size(); i++) {
-                            items = new ArrayList<>();
-                            String currentprocess = chances.getJSONObject(i).getString("currentprocess");
-                            String percent = chances.getJSONObject(i).getString("percent");
-                            String color = chances.getJSONObject(i).getString("color");
-                            int detno = chances.getJSONObject(i).getInteger("detno");
-                            int count = chances.getJSONObject(i).getInteger("count");
-                            items.add("#" + color);
-                            colors.add("#" + color);
-                            // items.add(String.valueOf(i + 1));
-                            items.add(currentprocess);
-                            items.add(String.valueOf(count));
-                            counts.add(count);
-                            countToatal = countToatal + count;
-                            items.add(percent);
-                            gridlists.add(items);
-                        }
-                    }
-                    //gridlists = (ArrayList) JSON.parseArray(gridData, ArrayList.class);
-                    hl_adapter = new HListViewOneAdapter(ct, gridlists);
-                    lv_grid_dispaly.setAdapter(hl_adapter);
-                    layout.setVisibility(View.VISIBLE);
-                    Log.i(TAG, "handleMessage:colors:" + JSON.toJSONString(colors));
-                    Log.i(TAG, "handleMessage:counts:" + JSON.toJSONString(counts));
-                    Log.i(TAG, "handleMessage:countToatal:" + countToatal);
-                    if (countToatal == 0) {//数据为空,显示空视图
-                        for (int i = 0; i < counts.size(); i++) {
-                            counts.set(i, 50);
-                        }
-                        countToatal = counts.size() * 50;
-                    }
-                    funnelView.setData(counts, countToatal, colors);
-                    funnelView.animateY();
+                    showFunelView(msg.getData().getString("result"));
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     progressDialog.dismiss();
                     Log.i(TAG, "json:" + msg.getData().getString("result"));
+                    String json = "{\"sessionId\":\"A84EE897980B21770FD00FC69C47B27B\",\"chances\":[{\"detno\":1,\"percent\":\"0.00%\",\"count\":0,\"color\":\"485CC6\",\"currentprocess\":\"初次沟通\"},{\"detno\":2,\"percent\":\"0.00%\",\"count\":0,\"color\":\"4686CC\",\"currentprocess\":\"产品演示\"},{\"detno\":3,\"percent\":\"0.00%\",\"count\":0,\"color\":\"49B0C9\",\"currentprocess\":\"立项评估\"},{\"detno\":4,\"percent\":\"0.00%\",\"count\":0,\"color\":\"48C79E\",\"currentprocess\":\"需求分析\"},{\"detno\":5,\"percent\":\"0.00%\",\"count\":0,\"color\":\"55CC59\",\"currentprocess\":\"样品报价\"},{\"detno\":6,\"percent\":\"0.00%\",\"count\":0,\"color\":\"90BB42\",\"currentprocess\":\"商务谈判\"},{\"detno\":7,\"percent\":\"0.00%\",\"count\":0,\"color\":\"BAA535\",\"currentprocess\":\"合同签约\"},{\"detno\":8,\"percent\":\"0.00%\",\"count\":0,\"color\":\"C7853F\",\"currentprocess\":\"完成交易\"},{\"detno\":9,\"percent\":\"0.00%\",\"count\":0,\"color\":\"BB5743\",\"currentprocess\":\"多次交易\"}],\"success\":true}";
+                    showFunelView(json);
+                    break;
+                case Constants.APP_NOTNETWORK:
+                    progressDialog.dismiss();
+                    gridlists.clear();
+                    ToastMessage(getString(R.string.networks_out));
+                    json = "{\"sessionId\":\"A84EE897980B21770FD00FC69C47B27B\",\"chances\":[{\"detno\":1,\"percent\":\"0.00%\",\"count\":0,\"color\":\"485CC6\",\"currentprocess\":\"初次沟通\"},{\"detno\":2,\"percent\":\"0.00%\",\"count\":0,\"color\":\"4686CC\",\"currentprocess\":\"产品演示\"},{\"detno\":3,\"percent\":\"0.00%\",\"count\":0,\"color\":\"49B0C9\",\"currentprocess\":\"立项评估\"},{\"detno\":4,\"percent\":\"0.00%\",\"count\":0,\"color\":\"48C79E\",\"currentprocess\":\"需求分析\"},{\"detno\":5,\"percent\":\"0.00%\",\"count\":0,\"color\":\"55CC59\",\"currentprocess\":\"样品报价\"},{\"detno\":6,\"percent\":\"0.00%\",\"count\":0,\"color\":\"90BB42\",\"currentprocess\":\"商务谈判\"},{\"detno\":7,\"percent\":\"0.00%\",\"count\":0,\"color\":\"BAA535\",\"currentprocess\":\"合同签约\"},{\"detno\":8,\"percent\":\"0.00%\",\"count\":0,\"color\":\"C7853F\",\"currentprocess\":\"完成交易\"},{\"detno\":9,\"percent\":\"0.00%\",\"count\":0,\"color\":\"BB5743\",\"currentprocess\":\"多次交易\"}],\"success\":true}";
+                    showFunelView(json);
+                    break;
+                default:
+                    progressDialog.dismiss();
+                    json = "{\"sessionId\":\"A84EE897980B21770FD00FC69C47B27B\",\"chances\":[{\"detno\":1,\"percent\":\"0.00%\",\"count\":0,\"color\":\"485CC6\",\"currentprocess\":\"初次沟通\"},{\"detno\":2,\"percent\":\"0.00%\",\"count\":0,\"color\":\"4686CC\",\"currentprocess\":\"产品演示\"},{\"detno\":3,\"percent\":\"0.00%\",\"count\":0,\"color\":\"49B0C9\",\"currentprocess\":\"立项评估\"},{\"detno\":4,\"percent\":\"0.00%\",\"count\":0,\"color\":\"48C79E\",\"currentprocess\":\"需求分析\"},{\"detno\":5,\"percent\":\"0.00%\",\"count\":0,\"color\":\"55CC59\",\"currentprocess\":\"样品报价\"},{\"detno\":6,\"percent\":\"0.00%\",\"count\":0,\"color\":\"90BB42\",\"currentprocess\":\"商务谈判\"},{\"detno\":7,\"percent\":\"0.00%\",\"count\":0,\"color\":\"BAA535\",\"currentprocess\":\"合同签约\"},{\"detno\":8,\"percent\":\"0.00%\",\"count\":0,\"color\":\"C7853F\",\"currentprocess\":\"完成交易\"},{\"detno\":9,\"percent\":\"0.00%\",\"count\":0,\"color\":\"BB5743\",\"currentprocess\":\"多次交易\"}],\"success\":true}";
+                    showFunelView(json);
                     break;
             }
         }
     };
 
+    private void showFunelView(String result) {
+        JSONObject root = JSON.parseObject(result);
+        JSONArray chances = root.getJSONArray("chances");
+        ArrayList<Integer> counts = new ArrayList<>();
+        ArrayList<String> colors = new ArrayList<>();
+        int countToatal = 0;
+        if (!chances.isEmpty()) {
+            ArrayList<String> items = new ArrayList<>();
+            items.add(getString(R.string.color_text));
+            // items.add("序号");
+            items.add(getString(R.string.business_stage));
+            items.add(getString(R.string.business_number));
+            items.add(getString(R.string.business_Conversion_rate));
+            gridlists.add(items);
+            for (int i = 0; i < chances.size(); i++) {
+                items = new ArrayList<>();
+                String currentprocess = chances.getJSONObject(i).getString("currentprocess");
+                String percent = chances.getJSONObject(i).getString("percent");
+                String color = chances.getJSONObject(i).getString("color");
+                int detno = chances.getJSONObject(i).getInteger("detno");
+                int count = chances.getJSONObject(i).getInteger("count");
+                items.add("#" + color);
+                colors.add("#" + color);
+                // items.add(String.valueOf(i + 1));
+                items.add(currentprocess);
+                items.add(String.valueOf(count));
+                counts.add(count);
+                countToatal = countToatal + count;
+                items.add(percent);
+                gridlists.add(items);
+            }
+        }
+        //gridlists = (ArrayList) JSON.parseArray(gridData, ArrayList.class);
+        hl_adapter = new HListViewOneAdapter(ct, gridlists);
+        lv_grid_dispaly.setAdapter(hl_adapter);
+        layout.setVisibility(View.VISIBLE);
+        Log.i(TAG, "handleMessage:colors:" + JSON.toJSONString(colors));
+        Log.i(TAG, "handleMessage:counts:" + JSON.toJSONString(counts));
+        Log.i(TAG, "handleMessage:countToatal:" + countToatal);
+        if (countToatal == 0) {//数据为空,显示空视图
+            for (int i = 0; i < counts.size(); i++) {
+                counts.set(i, 50);
+            }
+            countToatal = counts.size() * 50;
+        }
+        funnelView.setData(counts, countToatal, colors);
+        funnelView.animateY();
+    }
+
     private String currentDate;
 
     private void sendHttpResquest(String currentdate) {