Kaynağa Gözat

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

# Conflicts:
#	WeiChat/version.properties
FANGLH 8 yıl önce
ebeveyn
işleme
4bf3334bda
54 değiştirilmiş dosya ile 4255 ekleme ve 228 silme
  1. BIN
      WeiChat/src/main/res/drawable-xhdpi/uuu.png
  2. 5 3
      WeiChat/src/main/res/layout/item_booking_list.xml
  3. 5 5
      WeiChat/version.properties
  4. 3 0
      app_core/common/src/main/java/com/common/data/StringUtil.java
  5. 6 1
      app_core/common/src/main/java/com/core/net/http/ViewUtil.java
  6. 8 1
      app_core/common/src/main/java/com/core/utils/CommonUtil.java
  7. 3 2
      app_core/common/src/main/res/layout/seach_include.xml
  8. 24 2
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java
  9. 49 48
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceListActivity.java
  10. 72 49
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServicesActivity.java
  11. 1 0
      app_modular/appbooking/src/main/res/layout/activity_bservices.xml
  12. 14 0
      app_modular/appbooking/src/main/res/layout/header_bservices_grid.xml
  13. 3 2
      app_modular/appbooking/src/main/res/layout/item_bservice_header.xml
  14. 23 3
      app_modular/apputils/src/main/java/com/modular/apputils/activity/SelectNetAcitivty.java
  15. 2 1
      app_modular/apputils/src/main/java/com/modular/apputils/utils/SwitchUtil.java
  16. 97 0
      app_modular/apputils/src/main/java/com/modular/apputils/widget/EmptyRecyclerView.java
  17. 140 0
      app_modular/apputils/src/main/java/com/modular/apputils/widget/MenuVoiceSearchView.java
  18. 29 0
      app_modular/apputils/src/main/res/layout/common_empty_view.xml
  19. 1 1
      app_modular/apputils/src/main/res/layout/common_refresh_recycler.xml
  20. 35 0
      app_modular/apputils/src/main/res/layout/menu_seach_include.xml
  21. 9 1
      app_modular/appworks/src/main/AndroidManifest.xml
  22. 146 53
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountActivity.java
  23. 361 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountAddActivity.java
  24. 177 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountDetailsActivity.java
  25. 304 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountInfoActivity.java
  26. 128 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java
  27. 81 9
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceManageActivity.java
  28. 281 16
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/ScanDetailActivity.java
  29. 219 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/adapter/CycleCountAdapter.java
  30. 118 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/CycleCount.java
  31. 107 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/CycleCountAdd.java
  32. 63 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/DeviceInfo.java
  33. 18 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/DeviceManage.java
  34. 973 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/TestStr.java
  35. 59 26
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/CommonDocDetailsActivity.java
  36. 0 1
      app_modular/appworks/src/main/java/com/uas/appworks/activity/CityIndustryServiceMainActivity.java
  37. 6 2
      app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceQueryActivity.java
  38. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_menu_retract.png
  39. 11 0
      app_modular/appworks/src/main/res/drawable/frame_square_hint_bg.xml
  40. 7 0
      app_modular/appworks/src/main/res/drawable/text_btn_bg.xml
  41. 3 2
      app_modular/appworks/src/main/res/layout/action_device_cycle_count.xml
  42. 17 0
      app_modular/appworks/src/main/res/layout/activity_device_cycle.xml
  43. 12 0
      app_modular/appworks/src/main/res/layout/activity_device_cycle_details.xml
  44. 212 0
      app_modular/appworks/src/main/res/layout/activity_device_cycle_info.xml
  45. 6 0
      app_modular/appworks/src/main/res/layout/device_scan_head.xml
  46. 31 0
      app_modular/appworks/src/main/res/layout/item_cycle_count.xml
  47. 62 0
      app_modular/appworks/src/main/res/layout/item_device_data.xml
  48. 48 0
      app_modular/appworks/src/main/res/layout/item_device_info.xml
  49. 27 0
      app_modular/appworks/src/main/res/layout/item_pop_device_cyclecount.xml
  50. 29 0
      app_modular/appworks/src/main/res/layout/item_rl_listview.xml
  51. 4 0
      app_modular/appworks/src/main/res/layout/menu_device_scan.xml
  52. 60 0
      app_modular/appworks/src/main/res/layout/pop_device_cyclecount.xml
  53. 153 0
      app_modular/appworks/src/main/res/layout/pop_submit_cycle.xml
  54. 3 0
      app_modular/appworks/src/main/res/values/strings.xml

BIN
WeiChat/src/main/res/drawable-xhdpi/uuu.png


+ 5 - 3
WeiChat/src/main/res/layout/item_booking_list.xml

@@ -61,10 +61,11 @@
 
     <TextView
         android:id="@+id/handler_tv"
-        android:layout_width="250dp"
+        android:layout_width="wrap_content"
+        android:maxWidth="280dp"
         android:layout_height="wrap_content"
         android:layout_below="@id/address_tv"
-        android:layout_marginRight="30dp"
+        android:layout_marginRight="10dp"
         android:text="*****"
         android:layout_marginTop="10dp"
         android:ellipsize="end"
@@ -72,7 +73,8 @@
 
     <TextView
         android:id="@+id/topic_tv"
-        android:layout_width="150dp"
+        android:layout_width="wrap_content"
+        android:maxWidth="150dp"
         android:layout_height="wrap_content"
         android:layout_below="@id/address_tv"
         android:layout_toRightOf="@+id/handler_tv"

+ 5 - 5
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Mon Dec 25 14:41:11 CST 2017
-debugName=255
-versionName=613
-debugCode=255
-versionCode=152
+#Fri Dec 22 17:27:12 CST 2017
+debugName=235
+versionName=612
+debugCode=235
+versionCode=151

+ 3 - 0
app_core/common/src/main/java/com/common/data/StringUtil.java

@@ -127,6 +127,9 @@ public class StringUtil {
 	public static String getTextRexHttp(TextView tv) {
 		if (tv == null || TextUtils.isEmpty(tv.getText())) return "";
 		return toHttpString(tv.getText().toString());
+	}	public static String getText(TextView tv) {
+		if (tv == null || TextUtils.isEmpty(tv.getText())) return "";
+		return toHttpString(tv.getText().toString());
 	}
 
 	//Bitliker 从字符串中取出第一个数字

+ 6 - 1
app_core/common/src/main/java/com/core/net/http/ViewUtil.java

@@ -17,6 +17,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.common.LogUtil;
+import com.common.config.BaseConfig;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
@@ -861,7 +862,7 @@ public class ViewUtil {
                             params.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
                         }
                         if (!params.containsKey("master") || params.get("master") == null) {
-                            params.put("master", CommonUtil.getSharedPreferences(ct, "erp_master"));
+                            params.put("master", CommonUtil.getMaster());
                         }
                         if (!params.containsKey("sessionUser"))
                             params.put("sessionUser", CommonUtil.getSharedPreferences(ct, "erp_username"));
@@ -1046,6 +1047,10 @@ public class ViewUtil {
                                     String password) {
         mdProcessDialog.setContent(MyApplication.getInstance().getString(R.string.login_progress_erp));
         url = url + "mobile/login.action";
+//        if (BaseConfig.isDebug()){
+//            master=CommonUtil.getMaster();
+//            url="http://192.168.253.203:8090/ERP/mobile/login.action";
+//        }
  //       url="http://192.168.253.58:8080/ERP/mobile/login.action";
 //        url = "http://192.168.253.29:8080/ERP/mobile/login.action";
 //        url = "http://192.168.253.6/uas_dev/mobile/login.action";

+ 8 - 1
app_core/common/src/main/java/com/core/utils/CommonUtil.java

@@ -99,7 +99,11 @@ public class CommonUtil {
             return "";
         }
         String baseUrl = getSharedPreferences(ct, "erp_baseurl");
-//        baseUrl="http://192.168.253.203:8090/ERP/";
+//        if (BaseConfig.isDebug()){
+//            baseUrl="http://192.168.253.203:8090/ERP/";
+//        }
+//        baseUrl="http://192.168.253.203:8090/ERP/
+
         return baseUrl;
     }
 
@@ -471,6 +475,9 @@ public class CommonUtil {
         boolean isB2b = ApiUtils.getApiModel() instanceof ApiPlatform;
         String master = isB2b ? CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu")
                 : CommonUtil.getSharedPreferences(MyApplication.getInstance(), "erp_master");
+//      if (BaseConfig.isDebug()){
+//          master="UAS_DEV";
+//      }
         return master;
 
     }

+ 3 - 2
app_core/common/src/main/res/layout/seach_include.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="48dp"
     android:background="@drawable/bg_bar"
@@ -17,6 +17,7 @@
         android:drawableLeft="@drawable/search"
         android:drawableRight="@drawable/search_clear"
         android:hint="@string/search"
+        android:imeOptions="actionSearch"
         android:paddingRight="26dp"
         android:textColor="@color/dark_grey"
         android:textColorHint="@color/grey"
@@ -32,4 +33,4 @@
         android:layout_marginRight="6dp"
         android:background="@drawable/btn_yuyin_nor"
         android:visibility="visible" />
-</RelativeLayout>
+</merge>

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

@@ -361,8 +361,8 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                     
                 }
 
-                getSupportActionBar().setTitle(model.getName());
-
+               // getSupportActionBar().setTitle(model.getName());
+                getSupportActionBar().setTitle("预约");
 
             } else {
                 //TODO 由于该界面必须要转进来的对象,如果model缺失,应返回
@@ -1331,6 +1331,9 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                     }
                     tv_hospital_rooms.setText(data.getString("sb_stname"));
                     tag_hospital_doctor.setText(data.getString("sb_username"));
+
+                    tv_hospital_time.setCompoundDrawables(null,null,null,null);
+                    tv_hospital_rooms.setCompoundDrawables(null,null,null,null);
                 }
                 break;
             case "10002"://运动健身
@@ -1349,6 +1352,9 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                     }
                     tv_sport_rooms.setText(data.getString("sb_spname"));
                     tv_sport_peoples.setText(data.getString("sb_person"));
+
+                    tv_sport_rooms.setCompoundDrawables(null,null,null,null);
+                    tv_sport_peoples.setCompoundDrawables(null,null,null,null);
                 }
                 break;
             case "10003"://餐饮
@@ -1387,6 +1393,11 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                             tvSeatsRight.setVisibility(View.VISIBLE);  //商家释放
                         }
                     }
+
+                    tvSeatsRight .setCompoundDrawables(null,null,null,null);
+                    tv_food_peoples .setCompoundDrawables(null,null,null,null);
+                    tv_food_times .setCompoundDrawables(null,null,null,null);
+                    tv_food_rooms.setCompoundDrawables(null,null,null,null);
                 }
                 break;
             case "10004"://美容美发
@@ -1402,6 +1413,8 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                                 + data.getString("sb_starttime").substring(11, 16) + "-" + data.getString("sb_endtime").substring(11, 16));
                     }
                     tv_hair_rooms.setText(data.getString("sb_stname"));
+                    tv_hair_times.setCompoundDrawables(null,null,null,null);
+                    tv_hair_rooms. setCompoundDrawables(null,null,null,null);
                 }
                 break;
             case "10005"://会所
@@ -1420,6 +1433,9 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                     }
                     tv_club_technician.setText(data.getString("sb_stname"));
                     tv_club_peoples.setText(data.getString("sb_person"));
+
+                    tv_club_technician. setCompoundDrawables(null,null,null,null);
+                    tv_club_peoples.setCompoundDrawables(null,null,null,null);
                 }
                 break;
             case "10006"://ktv
@@ -1438,6 +1454,9 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                     }
                     tv_ktv_rooms.setText(data.getString("sb_spname"));
                     tv_ktv_peoples.setText(data.getString("sb_person"));
+                    tv_ktv_rooms.setCompoundDrawables(null,null,null,null);
+                    tv_ktv_peoples. setCompoundDrawables(null,null,null,null);
+                    tv_ktv_times.setCompoundDrawables(null,null,null,null);
                 }
                 break;
 
@@ -1653,6 +1672,9 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
                              JSONArray deskbook=JSON.parseObject(o.toString()).getJSONArray("deskbook");
                              JSONArray desklist=JSON.parseObject(o.toString()).getJSONArray("desklist");
                              if (!ListUtils.isEmpty(deskbook)){
+                                 CommonUtil.textSpanForStyle(tvMSeatsNum,"前方"+"0"+"桌","0",ct.getResources().getColor(R.color.blue_seats_num));
+                                 CommonUtil.textSpanForStyle(tvZSeatsNum,"前方"+"0"+"桌","0",ct.getResources().getColor(R.color.blue_seats_num));
+                                 CommonUtil.textSpanForStyle(tvDSeatsNum,"前方"+"0"+"桌","0",ct.getResources().getColor(R.color.blue_seats_num));
                                  for (int i = 0; i <deskbook.size() ; i++) {
                                      JSONObject object=deskbook.getJSONObject(i);
                                      String number= object.getString("number");//预约量

+ 49 - 48
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceListActivity.java

@@ -43,37 +43,37 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
-  * @desc:
-  * @author:Arison on 2017/9/28
-  */
+ * @desc:
+ * @author:Arison on 2017/9/28
+ */
 public class BServiceListActivity extends OABaseActivity {
     private VoiceSearchView voiceSearchView;
     private PullToRefreshListView mListView;
     private ItemBserviceListAdapter mListAdapter;
-    private List<SBListModel> modelList=new ArrayList<>();
-    private  SBMenuModel menuModel;
-    
+    private List<SBListModel> modelList = new ArrayList<>();
+    private SBMenuModel menuModel;
     private EmptyLayout emptyLayout;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_bservices);
-        
+
         initView();
         initEvent();
         initData();
     }
 
     private void initView() {
-        if (getIntent()!=null){
-            menuModel=getIntent().getParcelableExtra("SBMenuModel");
+        if (getIntent() != null) {
+            menuModel = getIntent().getParcelableExtra("SBMenuModel");
             getSupportActionBar().setTitle(menuModel.getTitle());
-            LogUtil.d("myTest","menuModel:"+JSON.toJSONString(menuModel));
+            LogUtil.d("myTest", "menuModel:" + JSON.toJSONString(menuModel));
         }
         voiceSearchView = (VoiceSearchView) findViewById(R.id.voiceSearchView);
         mListView = (PullToRefreshListView) findViewById(R.id.mListView);
-        emptyLayout=new EmptyLayout(mContext,mListView.getRefreshableView());
-        mListAdapter=new ItemBserviceListAdapter(mContext,modelList);
+        emptyLayout = new EmptyLayout(mContext, mListView.getRefreshableView());
+        mListAdapter = new ItemBserviceListAdapter(mContext, modelList);
         mListView.setAdapter(mListAdapter);
 
         initSearchView();
@@ -82,6 +82,7 @@ public class BServiceListActivity extends OABaseActivity {
     private ImageView mBackImageView, mVoiceImageView;
     private ClearEditText mSearchEditText;
     private EmptyLayout mEmptyLayout;
+
     private void initSearchView() {
         View view = LayoutInflater.from(ct).inflate(R.layout.action_book_service_search, null);
         mBackImageView = (ImageView) view.findViewById(R.id.book_service_search_back);
@@ -126,21 +127,21 @@ public class BServiceListActivity extends OABaseActivity {
 
             @Override
             public void afterTextChanged(Editable s) {
-                if (!TextUtils.isEmpty(s.toString())){
-                    if (!ListUtils.isEmpty(modelList)){
-                        List<SBListModel> tempList=new ArrayList<>();
-                        for (int i = 0; i <modelList.size() ; i++) {
-                            if (modelList.get(i).getName().contains(s.toString())){
+                if (!TextUtils.isEmpty(s.toString())) {
+                    if (!ListUtils.isEmpty(modelList)) {
+                        List<SBListModel> tempList = new ArrayList<>();
+                        for (int i = 0; i < modelList.size(); i++) {
+                            if (modelList.get(i).getName().contains(s.toString())) {
                                 tempList.add(modelList.get(i));
                             }
                         }
-                        if (ListUtils.isEmpty(tempList))  mEmptyLayout.showEmpty();
-                        LogUtil.d(TAG,"tempList:"+JSON.toJSONString(tempList.toString()));
+                        if (ListUtils.isEmpty(tempList)) mEmptyLayout.showEmpty();
+                        LogUtil.d(TAG, "tempList:" + JSON.toJSONString(tempList.toString()));
                         mListAdapter.setObjects(tempList);
                         mListAdapter.notifyDataSetChanged();
 
                     }
-                }else{
+                } else {
                     mListAdapter.setObjects(modelList);
                     mListAdapter.notifyDataSetChanged();
                 }
@@ -155,48 +156,48 @@ public class BServiceListActivity extends OABaseActivity {
                 LogUtil.i("position=" + position);
                 LogUtil.i("id=" + id);
                 SBListModel model = mListAdapter.getItem((int) id);
-                Intent intent =null;
-                if (model.getType().equals("会所")||model.getType().equals("美容美发")){
+                Intent intent = null;
+                if (model.getType().equals("会所") || model.getType().equals("美容美发")) {
                     intent = new Intent(ct, BServiceDetailActivity.class);
-                }else{
+                } else {
                     intent = new Intent(ct, BServiceAddActivity.class);
                 }
-                LogUtil.d(TAG,"model:"+JSON.toJSONString(model));
+                LogUtil.d(TAG, "model:" + JSON.toJSONString(model));
                 intent.putExtra("model", model);
                 startActivity(intent);
                 //@update by Bitliker 由于不同类型的预约详情界面差别很大,需要判断当前点击的进行分类
             }
         });
     }
-    
+
     private void initData() {
-        if (menuModel!=null){
-            loadListData(menuModel.getCode(),1);
+        if (menuModel != null) {
+            loadListData(menuModel.getCode(), 1);
         }
     }
 
-    
-    public void loadListData(String type,int page){
+
+    public void loadListData(String type, int page) {
         MyApplication.getInstance().getBdLocationHelper().requestLocation();
-        HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
+        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
         httpClient.Api().send(new HttpClient.Builder()
                 .url("/user/appStoreList")
-                .add("type",type)
-                .add("pageIndex",page)
+                .add("type", type)
+                .add("pageIndex", page)
                 .add("token", MyApplication.getInstance().mAccessToken)
                 .method(Method.POST)
-                .build(),new ResultSubscriber<>(new ResultListener<Object>() {
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
             @Override
             public void onResponse(Object o) {
                 modelList.clear();
-                LogUtil.d("o.toString"+o.toString());
-                if (JSONUtil.validate(o.toString())){
-                    JSONObject object= JSON.parseObject(o.toString());
-                    JSONArray jsonArray=object.getJSONArray("reslut");
-                    if (!ListUtils.isEmpty(jsonArray)){
-                        for (int i=0;i<jsonArray.size();i++){
-                            JSONObject mObject=jsonArray.getJSONObject(i);
-                            SBListModel sbListModel=new SBListModel();
+                LogUtil.d("o.toString" + o.toString());
+                if (JSONUtil.validate(o.toString())) {
+                    JSONObject object = JSON.parseObject(o.toString());
+                    JSONArray jsonArray = object.getJSONArray("reslut");
+                    if (!ListUtils.isEmpty(jsonArray)) {
+                        for (int i = 0; i < jsonArray.size(); i++) {
+                            JSONObject mObject = jsonArray.getJSONObject(i);
+                            SBListModel sbListModel = new SBListModel();
                             sbListModel.setName(mObject.getString("sc_companyname"));
                             sbListModel.setAddress(mObject.getString("sc_address"));
                             sbListModel.setBookType(mObject.getString("sc_booktype"));
@@ -204,14 +205,14 @@ public class BServiceListActivity extends OABaseActivity {
                             sbListModel.setType(mObject.getString("sc_industry"));
                             sbListModel.setPhone(mObject.getString("sc_telephone"));
                             sbListModel.setIndustrycode(mObject.getString("sc_industrycode"));
-                            String sc_latitude=mObject.getString("sc_latitude");
-                            String sc_longitude=mObject.getString("sc_longitude");
+                            String sc_latitude = mObject.getString("sc_latitude");
+                            String sc_longitude = mObject.getString("sc_longitude");
                             sbListModel.setLatitude(sc_latitude);
                             sbListModel.setLongitude(sc_longitude);
                             sbListModel.setIntroduce(mObject.getString("sc_introduce"));
                             LatLng latLng = new LatLng(Double.valueOf(sc_latitude), Double.valueOf(sc_longitude));
                             float distance = BaiduMapUtil.getInstence().autoDistance(latLng);
-                            sbListModel.setDistance(String.valueOf(DistanceUtils.mToKm(distance,"#.0")));
+                            sbListModel.setDistance(String.valueOf(DistanceUtils.mToKm(distance, "#.0")));
                             sbListModel.setCash(mObject.getString("sc_telephone"));
                             sbListModel.setCompanyid(mObject.getString("sc_uu"));
                             sbListModel.setImid(mObject.getString("sc_imid"));
@@ -221,14 +222,14 @@ public class BServiceListActivity extends OABaseActivity {
                             modelList.add(sbListModel);
                         }
                         LogUtil.d("myTest", JSON.toJSONString(modelList));
-                        mListAdapter=new ItemBserviceListAdapter(mContext,modelList);
+                        mListAdapter = new ItemBserviceListAdapter(mContext, modelList);
                         mListView.setAdapter(mListAdapter);
-                        if (mListAdapter.getCount()==0){
+                        if (mListAdapter.getCount() == 0) {
                             emptyLayout.showEmpty();
                         }
                         //mListAdapter.notifyDataSetChanged();
-                    }else{
-                        if (mListAdapter.getCount()==0){
+                    } else {
+                        if (mListAdapter.getCount() == 0) {
                             emptyLayout.showEmpty();
                         }
                     }

+ 72 - 49
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServicesActivity.java

@@ -36,6 +36,7 @@ import com.core.widget.DrawableCenterTextView;
 import com.core.widget.view.MyGridView;
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.me.imageloader.ImageLoaderUtil;
 import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.Method;
 import com.me.network.app.http.rx.ResultListener;
@@ -48,6 +49,8 @@ import com.modular.booking.model.ItemsSelectType1;
 import com.modular.booking.model.SBListModel;
 import com.modular.booking.model.SBMenuModel;
 import com.modular.booking.widget.ObservableScrollView;
+import com.youth.banner.Banner;
+import com.youth.banner.loader.ImageLoader;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -69,6 +72,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
     private Drawable drawBg;
     private int pageSize = 1;
     private TextView tv_distance;
+    private Banner mBanner;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -112,7 +116,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         bar.setCustomView(view);
 
         mListView = (PullToRefreshListView) findViewById(R.id.mListView);
-    
+
         initHeader();
         mListAdapter = new ItemBserviceListAdapter(mContext, modelList);
         mListView.setAdapter(mListAdapter);
@@ -121,8 +125,17 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
     private void initHeader() {
         View headview = LayoutInflater.from(ct).inflate(R.layout.header_bservices_grid, null);
         mListView.getRefreshableView().addHeaderView(headview);
-        tv_distance =(TextView)findViewById(R.id.tv_distance);
-        MyGridView mGridView = (MyGridView) findViewById(R.id.mGridView);
+        tv_distance = findViewById(R.id.tv_distance);
+        MyGridView mGridView = findViewById(R.id.mGridView);
+        mBanner = findViewById(R.id.city_industry_service_main_banner);
+        mBanner.setImageLoader(new BannerImageLoader());
+        List<String> imgList=new ArrayList<>();
+        imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/3-1.jpg");
+        imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/2-1.jpg");
+        imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/1-1.jpg");
+        imgList.add("http://demo.sc.chinaz.com/Files/DownLoad/webjs1/201707/jiaoben5258/images/4-1.jpg");
+        mBanner.update(imgList);
+        mBanner.start();
         List<SBMenuModel> menuModels = new ArrayList<>();
         SBMenuModel menuModel = new SBMenuModel();
         menuModel.setUrl("");
@@ -195,6 +208,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
     protected void onResume() {
         super.onResume();
 //        drawBg.setAlpha(80);
+        mBanner.stopAutoPlay();
     }
 
     @Override
@@ -228,25 +242,25 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
             @Override
             public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
                 pageSize = 1;
-                if (tv_distance.getText().toString().equals("全部")||tv_distance.getText().toString().equals("距离")){
+                if (tv_distance.getText().toString().equals("全部") || tv_distance.getText().toString().equals("距离")) {
                     loadListData(pageSize);
-                }else{
-                    loadSeachData(tv_distance.getTag().toString(),pageSize);
+                } else {
+                    loadSeachData(tv_distance.getTag().toString(), pageSize);
                 }
-                
+
             }
 
             @Override
             public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
                 pageSize++;
-                if (tv_distance.getText().toString().equals("全部")||tv_distance.getText().toString().equals("距离")){
+                if (tv_distance.getText().toString().equals("全部") || tv_distance.getText().toString().equals("距离")) {
                     loadListData(pageSize);
-                }else{
-                    loadSeachData(tv_distance.getTag().toString(),pageSize);
+                } else {
+                    loadSeachData(tv_distance.getTag().toString(), pageSize);
                 }
             }
         });
-        
+
         mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
@@ -331,7 +345,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
 //        drawBg.setAlpha(255);
 //    }
 
-    public void loadSeachData(String distance,final int pageSize){
+    public void loadSeachData(String distance, final int pageSize) {
         showLoading();
         BdLocationHelper helper = MyApplication.getInstance().getBdLocationHelper();
         //distance, type, longitude, latitude, pageIndex, token
@@ -339,7 +353,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         httpClient.Api().send(new HttpClient.Builder()
                 .url("user/appSearchStore")
                 .add("type", "0")
-                .add("distance",distance)
+                .add("distance", distance)
                 .add("longitude", helper.getLongitude())
                 .add("latitude", helper.getLatitude())
                 .add("pageIndex", String.valueOf(pageSize))
@@ -404,8 +418,8 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
             }
         }));
     }
-    
-    
+
+
     public void loadListData(final int pageSize) {
         HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
         httpClient.Api().send(new HttpClient.Builder()
@@ -438,7 +452,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
                                 sbListModel.setIndustrycode(mObject.getString("sc_industrycode"));
                                 sbListModel.setCompanyid(mObject.getString("sc_uu"));
                                 sbListModel.setPhone(mObject.getString("sc_telephone"));
-                            
+
                                 String sc_latitude = mObject.getString("sc_latitude");
                                 String sc_longitude = mObject.getString("sc_longitude");
                                 sbListModel.setLatitude(sc_latitude);
@@ -482,16 +496,17 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
             Intent intent = new Intent();
             intent.setClass(this, BServiceSearchActivity.class);
             startActivity(intent);
-        } else if (id==R.id.tv_distance){
+        } else if (id == R.id.tv_distance) {
             //搜索距离-showPopupWindow
             showPopupWindow(v);
         }
     }
 
-    
+
     //距离popupWindow
     private PopupWindow popupWindow = null;
     private int selectId;
+
     public void showPopupWindow(View parent) {
         View view = null;
         WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
@@ -501,8 +516,8 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
             ListView plist = (ListView) view.findViewById(R.id.mList);
 //            SelectSimpleAdapter adapter = new SelectSimpleAdapter(ct, getPopData(),
 //                    R.layout.item_pop_list);
-            List<ItemsSelectType1> datas=  getItemsSelect();
-            final ItemPopListAdapter adapter=new ItemPopListAdapter(ct,datas);
+            List<ItemsSelectType1> datas = getItemsSelect();
+            final ItemPopListAdapter adapter = new ItemPopListAdapter(ct, datas);
             plist.setAdapter(adapter);
             Drawable drawable = getResources().getDrawable(R.drawable.selector_check_items);
             plist.setSelector(drawable);
@@ -510,8 +525,8 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
                 @Override
                 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                     popupWindow.dismiss();
-                    pageSize=1;
-                    selectId=position;
+                    pageSize = 1;
+                    selectId = position;
                     adapter.setSelectId(selectId);
                     adapter.notifyDataSetChanged();
 //                    ItemPopListAdapter.ViewHolder viewHolder= (ItemPopListAdapter.ViewHolder) view.getTag();
@@ -519,37 +534,37 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
 //                    adapter.notifyDataSetChanged();
                     switch (position) {
                         case 0:
-                           loadSeachData("500",pageSize);
-                           tv_distance.setText("0.5km");
-                           tv_distance.setTag("500");
+                            loadSeachData("500", pageSize);
+                            tv_distance.setText("0.5km");
+                            tv_distance.setTag("500");
                             break;
                         case 1:
-                            loadSeachData("1000",pageSize);
+                            loadSeachData("1000", pageSize);
                             tv_distance.setText("1km");
                             tv_distance.setTag("1000");
                             break;
                         case 2:
-                            loadSeachData("2000",pageSize);
+                            loadSeachData("2000", pageSize);
                             tv_distance.setText("2km");
                             tv_distance.setTag("2000");
                             break;
                         case 3:
-                            loadSeachData("5000",pageSize);
+                            loadSeachData("5000", pageSize);
                             tv_distance.setText("5km");
                             tv_distance.setTag("5000");
                             break;
                         case 4:
-                            loadSeachData("10000",pageSize);
+                            loadSeachData("10000", pageSize);
                             tv_distance.setText("10km");
                             tv_distance.setTag("10000");
                             break;
                         case 5:
-                            loadSeachData("20000",pageSize);
+                            loadSeachData("20000", pageSize);
                             tv_distance.setText("20km");
                             tv_distance.setTag("20000");
                             break;
                         case 6:
-                            loadSeachData("30000",pageSize);
+                            loadSeachData("30000", pageSize);
                             tv_distance.setText("30km");
                             tv_distance.setTag("30000");
                             break;
@@ -561,7 +576,7 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
                         default:
                             break;
                     }
-                
+
                 }
             });
             popupWindow = new PopupWindow(view, windowManager.getDefaultDisplay().getWidth() / 3, windowManager.getDefaultDisplay().getHeight() / 3);
@@ -581,54 +596,54 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
         popupWindow.showAsDropDown(parent, windowManager.getDefaultDisplay().getWidth(), 0);
     }
 
-    
-    private List<ItemsSelectType1> getItemsSelect(){
-        List<ItemsSelectType1> list=new ArrayList<>();
-        ItemsSelectType1 model=new ItemsSelectType1();
+
+    private List<ItemsSelectType1> getItemsSelect() {
+        List<ItemsSelectType1> list = new ArrayList<>();
+        ItemsSelectType1 model = new ItemsSelectType1();
         model.setName("0.5km");
         list.add(model);
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("1km");
         list.add(model);
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("2km");
         list.add(model);
 
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("5km");
         list.add(model);
 
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("10km");
         list.add(model);
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("20km");
         list.add(model);
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("30km");
         list.add(model);
 
-        model=new ItemsSelectType1();
+        model = new ItemsSelectType1();
         model.setName("全部");
         list.add(model);
-        
-        return  list;
-        
+
+        return list;
+
     }
-     
+
     private List<Map<String, Object>> getPopData() {
         List<Map<String, Object>> list = new ArrayList<>();
         Map<String, Object> map = new HashMap<>();
-        map.put("item_name","0.5km");
+        map.put("item_name", "0.5km");
         list.add(map);
         map = new HashMap<>();
-        map.put("item_name","1km");
+        map.put("item_name", "1km");
         list.add(map);
         map = new HashMap<>();
         map.put("item_name", "2km");
@@ -655,4 +670,12 @@ public class BServicesActivity extends OABaseActivity implements View.OnClickLis
     public void onObservableScrollViewListener(int l, int t, int oldl, int oldt) {
 
     }
+
+    private class BannerImageLoader extends ImageLoader {
+        @Override
+        public void displayImage(Context context, Object path, ImageView imageView) {
+            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
+            ImageLoaderUtil.getInstance().loadImage(path.toString(), imageView);
+        }
+    }
 }

+ 1 - 0
app_modular/appbooking/src/main/res/layout/activity_bservices.xml

@@ -9,6 +9,7 @@
         android:id="@+id/mListView"
         android:layout_below="@+id/voiceSearchView"
         android:dividerHeight="0.1dp"
+        android:background="@color/transparent"
         android:divider="@color/item_line"
         style="@style/ListViewBasic" />
 </RelativeLayout>

+ 14 - 0
app_modular/appbooking/src/main/res/layout/header_bservices_grid.xml

@@ -2,6 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:background="#EBE9EA"
     android:orientation="vertical">
     <!--android:layout_marginTop="80dp"-->
@@ -17,6 +18,19 @@
         android:verticalSpacing="0.5dp">
     </com.core.widget.view.MyGridView>
 
+
+    <com.youth.banner.Banner
+        android:id="@+id/city_industry_service_main_banner"
+        android:layout_width="match_parent"
+        android:layout_marginTop="10dp"
+        android:layout_height="100dp"
+        app:banner_default_image="@drawable/skin_icon_blue_circle"
+        app:delay_time="3000"
+        app:is_auto_play="true"
+        app:layout_collapseMode="none"
+        app:layout_collapseParallaxMultiplier="0.5"
+        app:scroll_time="600" />
+    
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

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

@@ -16,14 +16,15 @@
         android:layout_margin="3dp"
         android:text="*****"
         android:textColor="@color/black"
-        android:textSize="17sp"
+        android:textSize="15sp"
         android:textStyle="bold" />
 
     <TextView
         android:id="@id/tv_desc"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_margin="3dp"
+        android:textSize="11sp"
+        android:layout_margin="2dp"
         android:text="*****" />
 
     <de.hdodenhof.circleimageview.CircleImageView

+ 23 - 3
app_modular/apputils/src/main/java/com/modular/apputils/activity/SelectNetAcitivty.java

@@ -187,8 +187,8 @@ public class SelectNetAcitivty extends OABaseActivity {
         String fieldKeyLike = null;
         for (int i = 0; i < dbfinds.size(); i++) {
             config = dbfinds.getJSONObject(i);
-            String dbGridField = JSONUtil.getText(config, "dbGridField","ds_dbfindfield");
-            String field = JSONUtil.getText(config, "field","ds_gridfield");
+            String dbGridField = JSONUtil.getText(config, "dbGridField", "ds_dbfindfield");
+            String field = JSONUtil.getText(config, "field", "ds_gridfield");
             if (!StringUtil.isEmpty(dbGridField) && !StringUtil.isEmpty(field)) {
                 if (field.equals(fieldKey)) {
                     fieldKeyLike = dbGridField;
@@ -204,6 +204,13 @@ public class SelectNetAcitivty extends OABaseActivity {
             o = data.getJSONObject(i);
             b = new Bean();
             b.name = JSONUtil.getText(o, fieldKeyLike);
+
+            //TODO 修改显示
+            try {
+                b.showName = getShowName(o);
+            } catch (Exception e) {
+
+            }
             jsonMap = new HashMap<>();
             for (Map.Entry<String, String> e : configMap.entrySet()) {
                 jsonMap.put(e.getValue(), JSONUtil.getText(o, e.getKey()));
@@ -241,6 +248,14 @@ public class SelectNetAcitivty extends OABaseActivity {
         }
     }
 
+    private String getShowName(JSONObject object) throws Exception {
+        StringBuilder builder = new StringBuilder();
+        for (Map.Entry<String, Object> e : object.entrySet()) {
+            builder.append(e.getValue() + ",");
+        }
+        StringUtil.removieLast(builder);
+        return builder.toString();
+    }
 
     class ListAdapter extends BaseAdapter {
         private List<Bean> models;
@@ -298,7 +313,7 @@ public class SelectNetAcitivty extends OABaseActivity {
                 holer = (ViewHoler) view.getTag();
             }
             Bean bean = models.get(i);
-            holer.name_tv.setText(bean.name);
+            holer.name_tv.setText(bean.getShowName());
             return view;
         }
 
@@ -311,5 +326,10 @@ public class SelectNetAcitivty extends OABaseActivity {
     private class Bean {
         String name;
         String json;
+        String showName;
+
+        public String getShowName() {
+            return StringUtil.isEmpty(showName)?name:showName;
+        }
     }
 }

+ 2 - 1
app_modular/apputils/src/main/java/com/modular/apputils/utils/SwitchUtil.java

@@ -13,8 +13,9 @@ public class SwitchUtil {
     }
 
     public static boolean showShebeiguanli() {
-        return false;
+        return  BaseConfig.isDebug() && true;
     }
 
 
+
 }

+ 97 - 0
app_modular/apputils/src/main/java/com/modular/apputils/widget/EmptyRecyclerView.java

@@ -0,0 +1,97 @@
+package com.modular.apputils.widget;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.modular.apputils.R;
+
+
+public class EmptyRecyclerView extends RecyclerView {
+
+    private View emptyView;
+    private static final String TAG = "EmptyRecyclerView";
+
+    final private AdapterDataObserver observer = new AdapterDataObserver() {
+        @Override
+        public void onChanged() {
+            checkIfEmpty();
+        }
+
+        @Override
+        public void onItemRangeInserted(int positionStart, int itemCount) {
+            Log.i(TAG, "onItemRangeInserted" + itemCount);
+            checkIfEmpty();
+        }
+
+        @Override
+        public void onItemRangeRemoved(int positionStart, int itemCount) {
+            checkIfEmpty();
+        }
+    };
+    private LayoutInflater mInflater;
+
+    public EmptyRecyclerView(Context context) {
+        super(context);
+        initEmptyView(context);
+    }
+
+    public EmptyRecyclerView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        initEmptyView(context);
+    }
+
+    public EmptyRecyclerView(Context context, AttributeSet attrs,
+                             int defStyle) {
+        super(context, attrs, defStyle);
+        initEmptyView(context);
+    }
+
+    private void initEmptyView(Context context) {
+        mInflater = LayoutInflater.from(context);
+        emptyView = mInflater.inflate(R.layout.common_empty_view, null);
+        post(new Runnable() {
+            @Override
+            public void run() {
+                ((ViewGroup) getRootView()).addView(emptyView);
+            }
+        });
+
+    }
+
+
+
+    private void checkIfEmpty() {
+        if (emptyView != null && getAdapter() != null) {
+            final boolean emptyViewVisible =
+                    getAdapter().getItemCount() == 0;
+            emptyView.setVisibility(emptyViewVisible ? VISIBLE : GONE);
+            setVisibility(emptyViewVisible ? GONE : VISIBLE);
+        }
+    }
+
+    @Override
+    public void setAdapter(Adapter adapter) {
+        final Adapter oldAdapter = getAdapter();
+        if (oldAdapter != null) {
+            oldAdapter.unregisterAdapterDataObserver(observer);
+        }
+        super.setAdapter(adapter);
+        if (adapter != null) {
+            adapter.registerAdapterDataObserver(observer);
+        }
+
+        checkIfEmpty();
+    }
+
+
+    //设置没有内容时,提示用户的空布局
+    public void setEmptyView(View emptyView) {
+        this.emptyView = emptyView;
+        checkIfEmpty();
+    }
+}

+ 140 - 0
app_modular/apputils/src/main/java/com/modular/apputils/widget/MenuVoiceSearchView.java

@@ -0,0 +1,140 @@
+package com.modular.apputils.widget;
+
+import android.content.Context;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.AttributeSet;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.core.interfac.OnVoiceCompleteListener;
+import com.core.widget.ClearEditText;
+import com.core.xmpp.utils.audio.voicerecognition.JsonParser;
+import com.iflytek.cloud.RecognizerResult;
+import com.iflytek.cloud.SpeechConstant;
+import com.iflytek.cloud.SpeechError;
+import com.iflytek.cloud.ui.RecognizerDialog;
+import com.iflytek.cloud.ui.RecognizerDialogListener;
+import com.modular.apputils.R;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Created by Bitliker on 2017/5/15.
+ */
+
+public class MenuVoiceSearchView extends RelativeLayout {
+    private ClearEditText search_edit;
+    private OnVoiceCompleteListener mOnVoiceCompleteListener;
+
+    public MenuVoiceSearchView(Context context) {
+        this(context, null);
+    }
+
+    public MenuVoiceSearchView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public MenuVoiceSearchView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        LayoutInflater.from(context).inflate(R.layout.menu_seach_include, this);
+        search_edit = (ClearEditText) findViewById(R.id.search_edit);
+        findViewById(R.id.voice_search_iv).setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                btnVoice();
+            }
+        });
+        search_edit.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                return false;
+            }
+        });
+    }
+
+
+
+
+    public void setHineText(String hine) {
+        search_edit.setHint(hine);
+    }
+
+    public void setText(String hine) {
+        search_edit.setText(hine);
+    }
+
+    public Editable getText() {
+        return search_edit.getText();
+    }
+
+    private void btnVoice() {
+        RecognizerDialog dialog = new RecognizerDialog(getContext(), null);
+        dialog.setParameter(SpeechConstant.LANGUAGE, "zh_cn");
+        dialog.setParameter(SpeechConstant.ACCENT, "mandarin");
+        dialog.setListener(new RecognizerDialogListener() {
+            @Override
+            public void onResult(RecognizerResult recognizerResult, boolean b) {
+                String text = JsonParser.parseIatResult(recognizerResult.getResultString());
+                search_edit.setText(search_edit.getText().toString() + getPlaintext(text));
+
+                if (mOnVoiceCompleteListener != null && b) {
+                    mOnVoiceCompleteListener.onVoiceComplete();
+                }
+            }
+
+            @Override
+            public void onError(SpeechError speechError) {
+
+            }
+        });
+        dialog.show();
+
+    }
+
+    public void setOnVoiceCompleteListener(OnVoiceCompleteListener onVoiceCompleteListener) {
+        mOnVoiceCompleteListener = onVoiceCompleteListener;
+    }
+
+    public void addTextChangedListener(TextWatcher watcher) {
+        search_edit.addTextChangedListener(watcher);
+    }
+
+    public void setOnEditorActionListener(TextView.OnEditorActionListener watcher) {
+        search_edit.setOnEditorActionListener(watcher);
+    }
+
+    public ClearEditText getSearch_edit() {
+        return search_edit;
+    }
+
+    public void setSearch_edit(ClearEditText search_edit) {
+        this.search_edit = search_edit;
+    }
+
+    public static String getPlaintext(String stringInfo) {
+        Pattern p = Pattern.compile("[.,,?!。\"\\?!:']");//增加对应的标点
+
+        Matcher m = p.matcher(stringInfo);
+
+        String first = m.replaceAll(""); //把英文标点符号替换成空,即去掉英文标点符号
+
+        p = Pattern.compile(" {2,}");//去除多余空格
+
+        m = p.matcher(first);
+
+        String second = m.replaceAll(" ");
+
+        String nulltext = "";
+        if (!TextUtils.isEmpty(second)) {
+            return second;
+        } else {
+            return nulltext;
+        }
+    }
+}

+ 29 - 0
app_modular/apputils/src/main/res/layout/common_empty_view.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:orientation="vertical">
+
+        <android.support.v7.widget.AppCompatImageView
+            android:id="@+id/emptyImg"
+            android:layout_width="80dp"
+            android:layout_height="60dp"
+            android:src="@drawable/ic_empty" />
+
+        <android.support.v7.widget.AppCompatTextView
+            android:id="@+id/emptyTv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:text="暂无记录"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_main" />
+    </LinearLayout>
+
+</RelativeLayout>

+ 1 - 1
app_modular/apputils/src/main/res/layout/common_refresh_recycler.xml

@@ -6,7 +6,7 @@
     android:layout_height="match_parent"
     app:fectiveScroll="30dp">
 
-    <android.support.v7.widget.RecyclerView
+    <com.modular.apputils.widget.EmptyRecyclerView
         android:id="@+id/mRecyclerView"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />

+ 35 - 0
app_modular/apputils/src/main/res/layout/menu_seach_include.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="48dp"
+    android:background="@drawable/bg_bar">
+
+    <com.core.widget.ClearEditText
+        android:id="@+id/search_edit"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_centerVertical="true"
+        android:background="@drawable/search_input"
+        android:drawableLeft="@drawable/search"
+        android:drawableRight="@drawable/search_clear"
+        android:hint="@string/search"
+        android:imeOptions="actionSearch"
+        android:maxLines="1"
+        android:singleLine="true"
+    android:paddingRight="26dp"
+        android:lines="1"
+        android:textColor="@color/dark_grey"
+        android:textColorHint="@color/grey"
+        android:textSize="15sp" />
+
+    <ImageView
+        android:id="@+id/voice_search_iv"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
+        android:layout_alignParentRight="true"
+        android:layout_alignRight="@+id/search_edit"
+        android:layout_centerVertical="true"
+        android:layout_marginRight="6dp"
+        android:background="@drawable/btn_yuyin_nor"
+        android:visibility="visible" />
+</merge>

+ 9 - 1
app_modular/appworks/src/main/AndroidManifest.xml

@@ -334,7 +334,15 @@
             android:label="@string/text_scan_device" />
         <activity
             android:name=".CRM.erp.activity.DeviceCycleCountActivity"
-            android:label="@string/title_device_manage" />
+            android:label="@string/title_device_manage" />        <activity
+            android:name=".CRM.erp.activity.DeviceCycleCountInfoActivity"
+            android:label="@string/text_cycle_count" />  <activity
+            android:name=".CRM.erp.activity.DeviceDataFormAddActivity"
+            android:label="@string/title_device_manage" />  <activity
+            android:name=".CRM.erp.activity.DeviceCycleCountDetailsActivity"
+            android:label="@string/title_device_manage" /> <activity
+            android:name=".CRM.erp.activity.DeviceCycleCountAddActivity"
+            android:label="@string/text_cycle_count_add" />
         <activity android:name=".OA.platform.activity.BusinessTravelActivity"></activity>
 
         <activity android:name=".activity.DeviceQueryActivity"

+ 146 - 53
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountActivity.java

@@ -1,27 +1,48 @@
 package com.uas.appworks.CRM.erp.activity;
 
 import android.content.Intent;
+import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.support.v7.app.ActionBar;
 import android.support.v7.widget.DefaultItemAnimator;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
+import android.view.Gravity;
+import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.EditText;
 import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.common.LogUtil;
 import com.common.config.BaseConfig;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
+import com.common.data.StringUtil;
+import com.common.system.DisplayUtil;
 import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
+import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
 import com.core.widget.ClearEditText;
+import com.core.widget.EmptyLayout;
 import com.core.widget.VoiceSearchView;
 import com.core.widget.listener.EditChangeListener;
+import com.core.widget.view.Activity.SelectActivity;
 import com.core.xmpp.utils.audio.voicerecognition.JsonParser;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.iflytek.cloud.RecognizerResult;
 import com.iflytek.cloud.SpeechConstant;
 import com.iflytek.cloud.SpeechError;
@@ -31,13 +52,19 @@ import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.Method;
 import com.me.network.app.http.rx.ResultListener;
 import com.me.network.app.http.rx.ResultSubscriber;
+import com.modular.apputils.widget.MenuVoiceSearchView;
 import com.modular.apputils.widget.RecycleViewDivider;
 import com.module.recyclerlibrary.ui.refresh.BaseRefreshLayout;
+import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
+import com.uas.appworks.CRM.erp.model.CycleCount;
+import com.uas.appworks.CRM.erp.model.CycleCountAdd;
+import com.uas.appworks.CRM.erp.model.DeviceInfo;
+import com.uas.appworks.CRM.erp.model.TestStr;
 import com.uas.appworks.R;
 
+import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
+import java.util.List;
 
 /**
  * Created by Bitlike on 2017/11/22.
@@ -45,39 +72,38 @@ import java.util.Map;
 
 public class DeviceCycleCountActivity extends BaseActivity implements View.OnClickListener {
     private HttpClient httpClient = null;
-
-    private BaseRefreshLayout mRefreshLayout;
-    private RecyclerView contantRv;
-
-    private int mPageIndex;
-    private int mSchemeId;
-    private String mCaller;
+    private List<CycleCount> allCycleCount = new ArrayList<>();
+    private PullToRefreshListView mRefreshListView;
+    private MenuVoiceSearchView mVoiceSearchView;
+    private int pageIndex;
+    private EmptyLayout mEmptyLayout;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.common_refresh_recycler);
+        setContentView(R.layout.activity_device_cycle);
         initView();
         initData();
     }
 
     private void initView() {
         initActionbar();
-        mRefreshLayout = (BaseRefreshLayout) findViewById(R.id.mRefreshLayout);
-        contantRv = (RecyclerView) findViewById(R.id.mRecyclerView);
-        contantRv.setLayoutManager(new LinearLayoutManager(ct));
-        contantRv.setItemAnimator(new DefaultItemAnimator());
-        contantRv.addItemDecoration(new RecycleViewDivider(ct, LinearLayoutManager.VERTICAL));
-        mRefreshLayout.setEnabledPullUp(true);
-        mRefreshLayout.setOnRefreshListener(new BaseRefreshLayout.onRefreshListener() {
+        mRefreshListView = (PullToRefreshListView) findViewById(R.id.mRefreshListView);
+        mRefreshListView.setMode(PullToRefreshBase.Mode.BOTH);
+        mEmptyLayout = new EmptyLayout(this, mRefreshListView.getRefreshableView());
+        mEmptyLayout.setShowLoadingButton(false);
+        mEmptyLayout.setShowEmptyButton(false);
+        mEmptyLayout.setShowErrorButton(false);
+        mEmptyLayout.setEmptyMessage("没有符合条件的数据");
+        mRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
             @Override
-            public void onRefresh() {
-                loadData(mPageIndex = 1);
+            public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+                loadData(pageIndex = 1);
             }
 
             @Override
-            public void onLoadMore() {
-                loadData(++mPageIndex);
+            public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
+                loadData(++pageIndex);
             }
         });
     }
@@ -86,17 +112,17 @@ public class DeviceCycleCountActivity extends BaseActivity implements View.OnCli
         View view = LayoutInflater.from(ct).inflate(R.layout.action_device_cycle_count, null);
         view.findViewById(R.id.addImg).setOnClickListener(this);
         view.findViewById(R.id.backImg).setOnClickListener(this);
-        VoiceSearchView mVoiceSearchView = view.findViewById(R.id.mVoiceSearchView);
-        mVoiceSearchView.addTextChangedListener(new EditChangeListener() {
+        mVoiceSearchView = view.findViewById(R.id.mVoiceSearchView);
+        mVoiceSearchView.getSearch_edit().setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
-            public void afterTextChanged(Editable s) {
-                try {
-                    changedText(s.toString());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                loadData(pageIndex = 1);
+                return false;
             }
         });
+        ActionBar bar = this.getSupportActionBar();
+        bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
+        bar.setCustomView(view);
     }
 
     @Override
@@ -105,26 +131,26 @@ public class DeviceCycleCountActivity extends BaseActivity implements View.OnCli
         if (id == R.id.backImg) {
             onBackPressed();
         } else if (R.id.addImg == id) {
-            showAddPop();
+            startActivityForResult(new Intent(ct, DeviceCycleCountAddActivity.class), 0x12);
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (0x12 == requestCode && 0x12 == resultCode) {
+            loadData(pageIndex = 1);
         }
     }
 
     private void initData() {
-        mPageIndex = 1;
         Intent intent = getIntent();
         if (intent == null) {
             ToastUtil.showToast(ct, R.string.data_exception);
             finish();
         } else {
-            this.mSchemeId = intent.getIntExtra("id", 0);
-            this.mCaller = intent.getStringExtra("caller");
-            if (BaseConfig.isDebug()) {
-                this.mSchemeId = 3285;
-                this.mCaller = "SalePrice!query";
-
-            }
             String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
-            String emCode = CommonUtil.getSharedPreferences(ct, "sessionId");
+            String emCode = CommonUtil.getEmcode();
             httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(MyApplication.getInstance()))
                     .isDebug(true)
                     .add("sessionId", sessionId)
@@ -134,21 +160,26 @@ public class DeviceCycleCountActivity extends BaseActivity implements View.OnCli
                     .header("Cookie", "JSESSIONID=" + sessionId)
                     .header("sessionUser", emCode)
                     .build();
-            loadData(mPageIndex);
+            loadData(pageIndex = 1);
         }
     }
 
-    private void loadData(int mPageIndex) {
-        if (!mRefreshLayout.isRefreshing()) {
+    private void loadData(int pageIndex) {
+        if (!mRefreshListView.isRefreshing()) {
             progressDialog.show();
         }
+        String condition = null;
+        Editable editable = mVoiceSearchView.getText();
+        if (editable != null && !StringUtil.isEmpty(editable.toString())) {
+            String text = editable.toString();
+            condition = "db_code like '%" + text + "%' or db_inman like '%" + text + "%'  or db_devtype like '%" + text + "%' or db_centercode like '%" + text + "%'";
+        }
         httpClient.Api().send(new HttpClient.Builder()
-                .url("mobile/qry/schemeResult.action")
-                .add("caller", mCaller)
-                .add("id", mSchemeId)
-                .add("pageIndex", mPageIndex)
-                .add("pageSize", 30)
-                .add("condition", "1=1")
+                .url("mobile/common/list.action")
+                .add("condition", "db_class='周期盘点' and db_statuscode='COMMITED'" + (StringUtil.isEmpty(condition) ? "" : ("  and (" + condition + ")")))
+                .add("caller", "DeviceBatch!Stock")
+                .add("page", pageIndex)
+                .add("pageSize", 25)
                 .method(Method.GET)
                 .build(), new ResultSubscriber<>(new ResultListener<Object>() {
             @Override
@@ -160,22 +191,84 @@ public class DeviceCycleCountActivity extends BaseActivity implements View.OnCli
                         LogUtil.i("e=" + e.getMessage());
                     }
                 }
-                mRefreshLayout.stopRefresh();
+                mRefreshListView.onRefreshComplete();
                 progressDialog.dismiss();
             }
         }));
     }
 
-    private void changedText(String message) throws Exception {
-
-    }
 
     private void handleData(String message) throws Exception {
+        JSONObject object = JSON.parseObject(message);
+        JSONArray columns = JSONUtil.getJSONArray(object, "columns");
+        JSONArray listdata = JSONUtil.getJSONArray(object, "listdata");
+        List<CycleCount> moreListData = new ArrayList<>();
+        for (int i = 0; i < listdata.size(); i++) {
+            moreListData.add(handleFrom(columns, listdata.getJSONObject(i)));
+        }
+        if (pageIndex == 1) {
+            allCycleCount = moreListData;
+            if (ListUtils.isEmpty(moreListData)) {
+                mEmptyLayout.showEmpty();
+            }
+        } else {
+            allCycleCount.addAll(moreListData);
+        }
+        setAdapter(allCycleCount);
+    }
 
+    private CycleCount handleFrom(JSONArray columns, JSONObject data) throws Exception {
+        CycleCount cycleCount = new CycleCount();
+        for (int i = 0; i < columns.size(); i++) {
+            JSONObject item = columns.getJSONObject(i);
+            String field = JSONUtil.getText(item, "dataIndex", "field");
+            String caption = JSONUtil.getText(item, "caption");
+            int width = JSONUtil.getInt(item, "width");
+            String values = JSONUtil.getText(data, field);
+            CycleCount.Data o = new CycleCount.Data(caption, values);
+            if (caption.equals("ID")) {
+                cycleCount.setId(values);
+            }
+            if (width > 0) {
+                if (width < 100 && columns.size() > (i + 1) && JSONUtil.getInt(columns.getJSONObject(i + 1), "width") < 100) {
+                    //有两个
+                    JSONObject item2 = columns.getJSONObject(i + 1);
+                    String field2 = JSONUtil.getText(item2, "dataIndex", "field");
+                    String caption2 = JSONUtil.getText(item2, "caption");
+                    String values2 = JSONUtil.getText(data, field2);
+                    o.setCaption2(caption2);
+                    o.setValues2(values2);
+                    o.setHasTwo(true);
+                    if (caption.equals("ID")) {
+                        cycleCount.setId(values);
+                    }
+                    i++;
+                }
+                cycleCount.addData(o);
+            }
+        }
+        return cycleCount;
     }
 
-    private void showAddPop() {
 
+    private CycleCountAdapter mAdapter;
+
+    private void setAdapter(List<CycleCount> models) {
+        if (mAdapter == null) {
+            mAdapter = new CycleCountAdapter(ct, models);
+            mAdapter.setOnItemClickListener(new CycleCountAdapter.OnItemClickListener() {
+                @Override
+                public void click(CycleCount model) {
+                    startActivity(new Intent(ct, DeviceCycleCountInfoActivity.class)
+                            .putExtra("models", JSON.toJSONString(model.getDatas()))
+                            .putExtra("id", model.getId()));
+                }
+            });
+            mRefreshListView.setAdapter(mAdapter);
+        } else {
+            mAdapter.setModels(models);
+        }
     }
 
+
 }

+ 361 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountAddActivity.java

@@ -0,0 +1,361 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.EditText;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.common.LogUtil;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
+import com.common.data.StringUtil;
+import com.common.system.DisplayUtil;
+import com.core.app.MyApplication;
+import com.core.base.BaseActivity;
+import com.core.model.Approval;
+import com.core.model.SelectBean;
+import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
+import com.core.widget.VoiceSearchView;
+import com.core.widget.listener.EditChangeListener;
+import com.core.widget.view.Activity.SelectActivity;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.me.network.app.http.HttpClient;
+import com.me.network.app.http.Method;
+import com.me.network.app.http.rx.ResultListener;
+import com.me.network.app.http.rx.ResultSubscriber;
+import com.modular.apputils.activity.SelectNetAcitivty;
+import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
+import com.uas.appworks.CRM.erp.model.CycleCount;
+import com.uas.appworks.CRM.erp.model.CycleCountAdd;
+import com.uas.appworks.CRM.erp.model.TestStr;
+import com.uas.appworks.R;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by Bitlike on 2017/11/22.
+ */
+
+public class DeviceCycleCountAddActivity extends BaseActivity implements View.OnClickListener {
+    private HttpClient httpClient = null;
+    private RecyclerView popListView = null;
+    private PopAdapter popAdapter = null;
+    private List<CycleCountAdd> cycleCountAdds;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.pop_device_cyclecount);
+        initView();
+        initData();
+    }
+
+    private void initView() {
+        popListView = findViewById(R.id.mRecyclerView);
+        findViewById(R.id.cancelBtn).setOnClickListener(this);
+        findViewById(R.id.sureBtn).setOnClickListener(this);
+        findViewById(R.id.resetBtn).setOnClickListener(this);
+        popListView.setLayoutManager(new LinearLayoutManager(ct));
+    }
+
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (R.id.cancelBtn == id) {
+            finish();
+        } else if (R.id.resetBtn == id) {
+            if (popAdapter != null) {
+                popAdapter.reset();
+            }
+        } else if (R.id.sureBtn == id) {
+            if (popAdapter != null) {
+                addCycle(popAdapter.getModels());
+            }
+        }
+    }
+
+    private void initData() {
+        Intent intent = getIntent();
+        if (intent == null) {
+            ToastUtil.showToast(ct, R.string.data_exception);
+            finish();
+        } else {
+            String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+            String emCode = CommonUtil.getEmcode();
+            httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(MyApplication.getInstance()))
+                    .isDebug(true)
+                    .add("sessionId", sessionId)
+                    .add("master", CommonUtil.getSharedPreferences(ct, "erp_master"))
+                    .add("sessionUser", emCode)
+                    .add("sessionId", sessionId)
+                    .header("Cookie", "JSESSIONID=" + sessionId)
+                    .header("sessionUser", emCode)
+                    .build();
+            loadPopData();
+        }
+    }
+
+
+    private void loadPopData() {
+        progressDialog.show();
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("mobile/common/getFormPanel.action")
+                .add("caller", "DeviceBatch!Stock")
+                .method(Method.GET)
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                try {
+                    handlePopData(o.toString());
+                } catch (Exception e) {
+                    if (e != null) {
+                        LogUtil.i("e=" + e.getMessage());
+                    }
+                }
+                if (progressDialog != null) {
+                    progressDialog.dismiss();
+                }
+            }
+        }));
+    }
+
+    private boolean isSubmitl;
+
+    private void addCycle(List<CycleCountAdd> models) {
+        Map<String, Object> formStore = new HashMap<>();
+        for (CycleCountAdd e : models) {
+            if (!StringUtil.isEmpty(e.getValues())) {
+                formStore.put(e.getField(), e.getValues());
+            } else if (!e.isAllowblank()) {
+                ToastUtil.showToast(ct, e.getCaption() + "为必填项,请输入后提交");
+                return;
+            }
+        }
+        if (isSubmitl) return;
+        isSubmitl = true;
+        progressDialog.show();
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("mobile/device/saveAndSubmitDeviceStock.action")
+                .add("caller", "DeviceBatch!Stock")
+                .add("formStore", JSONUtil.map2JSON(formStore))
+                .method(Method.POST)
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                try {
+                    if (progressDialog != null) {
+                        progressDialog.dismiss();
+                    }
+                    boolean success = JSONUtil.getBoolean(o.toString(), "success");
+                    if (success) {
+                        setResult(0x12);
+                        ToastUtil.showToast(ct, "添加成功");
+                        finish();
+                    }
+                    isSubmitl = false;
+
+                } catch (Exception e) {
+                    if (e != null) {
+                        LogUtil.i("e=" + e.getMessage());
+                    }
+                }
+            }
+        }));
+    }
+
+    private void handlePopData(String message) throws Exception {
+        cycleCountAdds = new ArrayList<>();
+        JSONObject data = JSONUtil.getJSONObject(message, "data");
+        JSONArray items = JSONUtil.getJSONArray(data, "formdetail");
+        for (int i = 0; i < items.size(); i++) {
+            cycleCountAdds.add(new CycleCountAdd(items.getJSONObject(i)));
+        }
+        popAdapter = new PopAdapter(cycleCountAdds);
+        popListView.setAdapter(popAdapter);
+    }
+
+
+    private class PopAdapter extends RecyclerView.Adapter<PopAdapter.ViewHodler> {
+        private List<CycleCountAdd> models;
+        private Drawable drawable;
+
+        public List<CycleCountAdd> getModels() {
+            return models;
+        }
+        public void updateValues(String message) {
+            if (!StringUtil.isEmpty(message) && JSONUtil.validateJSONObject(message)) {
+                LogUtil.i("message="+message);
+                JSONObject object = JSON.parseObject(message);
+                if (models != null) {
+                    for (int i=0;i<models.size();i++) {
+                        LogUtil.i("e="+JSON.toJSONString(models.get(i)));
+                        if (object.containsKey(models.get(i).getField())){
+                            LogUtil.i("Field="+models.get(i).getField());
+                            models.get(i).setValues(JSONUtil.getText(object,models.get(i).getField()));
+                        }
+                    }
+                    notifyDataSetChanged();
+                    for (CycleCountAdd e:models){
+                        LogUtil.i(JSON.toJSONString(e));
+                    }
+                }
+            }
+        }
+
+        public PopAdapter(List<CycleCountAdd> models) {
+            this.models = models;
+            drawable = getResources().getDrawable(R.drawable.ic_menu_retract);
+        }
+
+        private class TextChangListener extends EditChangeListener {
+            ViewHodler hodler;
+            private int position;
+
+            public TextChangListener(ViewHodler hodler, int position) {
+                this.hodler = hodler;
+                this.position = position;
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                if (this.position >= 0) {
+                    if (this.hodler.valuesEd != null) {
+                        String valueEt = this.hodler.valuesEd.getText().toString();
+                        models.get(this.position).setValues(valueEt == null ? "" : valueEt);
+                    }
+                }
+            }
+        }
+
+        @Override
+        public ViewHodler onCreateViewHolder(ViewGroup parent, int viewType) {
+            return new ViewHodler(parent);
+        }
+
+        @Override
+        public void onBindViewHolder(ViewHodler holder, int position) {
+            CycleCountAdd model = models.get(position);
+            holder.captionTv.setText(model.getCaption());
+            holder.valuesEd.setText(model.getValues());
+            if (model.getType().equals("DBFIND") || model.getType().equals("C")) {
+                holder.valuesEd.setFocusableInTouchMode(false);
+                holder.valuesEd.setTag(R.id.tag_key, position);
+                holder.valuesEd.setTag(model);
+                holder.valuesEd.setOnClickListener(onClickListener);
+                holder.valuesEd.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null);
+            } else {
+                holder.valuesEd.setFocusableInTouchMode(true);
+                holder.valuesEd.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
+            }
+            holder.valuesEd.addTextChangedListener(new TextChangListener(holder, position));
+        }
+
+        @Override
+        public int getItemCount() {
+            return models == null ? 0 : models.size();
+        }
+
+        public void reset() {
+            if (models != null) {
+                for (CycleCountAdd e : models) {
+                    e.setValues("");
+                }
+            }
+            notifyDataSetChanged();
+        }
+
+        class ViewHodler extends RecyclerView.ViewHolder {
+            TextView captionTv;
+            EditText valuesEd;
+
+            public ViewHodler(ViewGroup viewGroup) {
+                this(LayoutInflater.from(ct).inflate(R.layout.item_pop_device_cyclecount, viewGroup, false));
+            }
+
+            public ViewHodler(View itemView) {
+                super(itemView);
+                captionTv = itemView.findViewById(R.id.captionTv);
+                valuesEd = itemView.findViewById(R.id.valuesEd);
+            }
+        }
+
+        private View.OnClickListener onClickListener = new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                try {
+                    if (view.getId() == R.id.valuesEd) {
+                        CycleCountAdd model = (CycleCountAdd) view.getTag();
+                        Intent intent = new Intent(ct, SelectActivity.class);
+                        intent.putExtra("title", model.getCaption());
+                        if (model.getType().equals("C")) {
+                            selectField=model.getField();
+                            LogUtil.i("selectField="+selectField);
+                            ArrayList<SelectBean> formBeaans = new ArrayList<>();
+                            for (Approval.Data e : model.getDatas()) {
+                                formBeaans.add(new SelectBean(e.display));
+                            }
+                            intent.putExtra("type", 2);
+                            intent.putParcelableArrayListExtra("data", formBeaans);
+                            startActivityForResult(intent, 0x21);
+                        } else {
+                            startActivityForResult(new Intent(ct, SelectNetAcitivty.class)
+                                            .putExtra("fieldKey", model.getField())
+                                            .putExtra("caller", "DeviceBatch!Stock")
+                                            .putExtra("isForm", true)
+                                    , 90);
+                        }
+
+                    }
+                } catch (Exception e) {
+
+                }
+            }
+        };
+    }
+
+    private String  selectField;
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (data != null && popAdapter != null) {
+            if (0x21 == requestCode&&!StringUtil.isEmpty(selectField)) {
+                SelectBean b = data.getParcelableExtra("data");
+                LogUtil.d(JSON.toJSONString(b));
+                if (b == null) return;
+                Map<String,Object> map=new HashMap<>();
+                LogUtil.i("selectField="+selectField);
+                map.put(selectField,b.getName());
+                selectField=null;
+                popAdapter.updateValues(JSONUtil.map2JSON(map));
+            } else if (90 == requestCode) {
+                String json = data.getStringExtra("data");
+                LogUtil.i("json=" + json);
+                popAdapter.updateValues(json);
+            }
+        }
+    }
+}

+ 177 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountDetailsActivity.java

@@ -0,0 +1,177 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+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.common.LogUtil;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
+import com.core.app.MyApplication;
+import com.core.base.BaseActivity;
+import com.core.utils.CommonUtil;
+import com.core.widget.EmptyLayout;
+import com.me.network.app.http.HttpClient;
+import com.me.network.app.http.Method;
+import com.me.network.app.http.rx.ResultListener;
+import com.me.network.app.http.rx.ResultSubscriber;
+import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
+import com.uas.appworks.CRM.erp.model.CycleCount;
+import com.uas.appworks.CRM.erp.model.TestStr;
+import com.uas.appworks.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class DeviceCycleCountDetailsActivity extends BaseActivity {
+    private HttpClient httpClient = null;
+    private ListView mListView;
+    private boolean isAct;
+    private EmptyLayout mEmptyLayout;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_device_cycle_details);
+        initView();
+        initData();
+    }
+
+    private String id;
+
+    private void initData() {
+        String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+        String emCode = CommonUtil.getEmcode();
+        httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(MyApplication.getInstance()))
+                .isDebug(true)
+                .add("sessionId", sessionId)
+                .add("master", CommonUtil.getSharedPreferences(ct, "erp_master"))
+                .add("sessionUser", emCode)
+                .add("sessionId", sessionId)
+                .header("Cookie", "JSESSIONID=" + sessionId)
+                .header("sessionUser", emCode)
+                .build();
+        Intent intent = getIntent();
+        if (intent != null) {
+            isAct = intent.getBooleanExtra("isAct", false);
+            id = intent.getStringExtra("id");
+            String title = isAct ? "已盘点" : "未盘点";
+            if (title != null) {
+                getSupportActionBar().setTitle(title);
+            }
+            String modelJSON = intent.getStringExtra("models");
+            List<CycleCount.Data> models = JSON.parseArray(modelJSON, CycleCount.Data.class);
+            mListView.setAdapter(new CycleCountAdapter.DataAdapter(ct, models));
+        }
+        loadData();
+    }
+
+    private void initView() {
+        mListView = findViewById(R.id.mListView);
+        mEmptyLayout = new EmptyLayout(this, mListView);
+        mEmptyLayout.setShowLoadingButton(false);
+        mEmptyLayout.setShowEmptyButton(false);
+        mEmptyLayout.setShowErrorButton(false);
+    }
+
+    private void loadData() {
+        progressDialog.show();
+        String condition = (isAct ? "nvl(dc_actionresult,' ')<>' '" : "nvl(dc_actionresult,' ')=' '") + "  and dc_dbid='" + id + "'";
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("mobile/common/getGridPanel.action")
+                .add("caller", "DeviceBatch!Stock")
+                .add("condition", condition)
+                .method(Method.GET)
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                try {
+                    handleData(o.toString());
+                } catch (Exception e) {
+                    if (e != null) {
+                        LogUtil.i("e=" + e.getMessage());
+                    }
+                }
+                if (progressDialog != null) {
+                    progressDialog.dismiss();
+                }
+            }
+        }));
+    }
+
+
+    private void handleData(String message) throws Exception {
+        JSONObject object = JSON.parseObject(message);
+        JSONArray columns = JSONUtil.getJSONArray(object, "gridItem");
+        JSONArray listdata = JSONUtil.getJSONArray(object, "gridData");
+        List<CycleCount> moreListData = new ArrayList<>();
+        for (int i = 0; i < listdata.size(); i++) {
+            moreListData.add(handleFrom(columns, listdata.getJSONObject(i)));
+        }
+        setAdapter(moreListData);
+    }
+
+    private CycleCount handleFrom(JSONArray columns, JSONObject data) throws Exception {
+        CycleCount cycleCount = new CycleCount();
+        for (int i = 0; i < columns.size(); i++) {
+            JSONObject item = columns.getJSONObject(i);
+            String field = JSONUtil.getText(item, "dataIndex", "field", "dg_field");
+            String caption = JSONUtil.getText(item, "caption", "dg_caption");
+            int width = JSONUtil.getInt(item, "width", "dg_appwidth");
+            String values = JSONUtil.getText(data, field.toUpperCase());
+            CycleCount.Data o = new CycleCount.Data(caption, values);
+            if (caption.equals("ID")) {
+                cycleCount.setId(values);
+            }
+//            if (width < 100 && columns.size() > (i + 1) && JSONUtil.getInt(columns.getJSONObject(i + 1), "width") < 100) {
+//                //有两个
+//                JSONObject item2 = columns.getJSONObject(i + 1);
+//                String field2 = JSONUtil.getText(item2, "dataIndex", "field");
+//                String caption2 = JSONUtil.getText(item2, "caption");
+//                String values2 = JSONUtil.getText(data, field2);
+//                o.setCaption2(caption2);
+//                o.setValues2(values2);
+//                o.setHasTwo(true);
+//                if (caption.equals("ID")) {
+//                    cycleCount.setId(values);
+//                }
+//                i++;
+//            }
+            if (width > 0) {
+                cycleCount.addData(o);
+            }
+        }
+        return cycleCount;
+    }
+
+    private CycleCountAdapter mAdapter;
+
+    private void setAdapter(List<CycleCount> models) {
+        if (mAdapter == null) {
+            mAdapter = new CycleCountAdapter(ct, models);
+            mAdapter.setNeedShowAll(true);
+            mAdapter.setOnItemClickListener(new CycleCountAdapter.OnItemClickListener() {
+                @Override
+                public void click(CycleCount model) {
+                    LogUtil.i("model.getDatas()=" + JSON.toJSONString(model.getDatas()));
+                }
+            });
+            mListView.setAdapter(mAdapter);
+        } else {
+            mAdapter.setModels(models);
+        }
+        if (ListUtils.isEmpty(models)){
+            mEmptyLayout.showEmpty();
+        }
+    }
+}

+ 304 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceCycleCountInfoActivity.java

@@ -0,0 +1,304 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.Manifest;
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Html;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.LogUtil;
+import com.common.data.JSONUtil;
+import com.common.data.StringUtil;
+import com.common.system.DisplayUtil;
+import com.core.app.MyApplication;
+import com.core.base.BaseActivity;
+import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
+import com.me.network.app.http.HttpClient;
+import com.me.network.app.http.Method;
+import com.me.network.app.http.rx.ResultListener;
+import com.me.network.app.http.rx.ResultSubscriber;
+import com.uas.appworks.CRM.erp.adapter.CycleCountAdapter;
+import com.uas.appworks.CRM.erp.model.CycleCount;
+import com.uas.appworks.CRM.erp.model.TestStr;
+import com.uas.appworks.R;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class DeviceCycleCountInfoActivity extends BaseActivity implements View.OnClickListener {
+    private HttpClient httpClient = null;
+    private String id;
+    private TextView actionqtyTv;
+    private TextView unactionqtyTv;
+    private TextView codeTv;
+    private ListView mListView;
+    private TextView centerTv;
+    private TextView lineTv;
+    private TextView kindTv;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_device_cycle_info);
+        initView();
+        initData();
+    }
+
+    private void initData() {
+        String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+        String emCode = CommonUtil.getEmcode();
+        httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(MyApplication.getInstance()))
+                .isDebug(true)
+                .add("sessionId", sessionId)
+                .add("master", CommonUtil.getSharedPreferences(ct, "erp_master"))
+                .add("sessionUser", emCode)
+                .add("sessionId", sessionId)
+                .header("Cookie", "JSESSIONID=" + sessionId)
+                .header("sessionUser", emCode)
+                .build();
+        Intent intent = getIntent();
+        if (intent != null) {
+            id = intent.getStringExtra("id");
+            try {
+                initJSONData(intent.getStringExtra("models"));
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        loadData();
+    }
+
+    private void initJSONData(String message) throws Exception {
+        JSONArray array = JSON.parseArray(message);
+        JSONObject object;
+        CycleCount.Data data;
+        List<CycleCount.Data> models = new ArrayList<>();
+        for (int i = 0; i < array.size(); i++) {
+            object = array.getJSONObject(i);
+            String caption = JSONUtil.getText(object, "caption");
+            boolean hasTwo = JSONUtil.getBoolean(object, "hasTwo");
+            String values = JSONUtil.getText(object, "values");
+            String caption2 = JSONUtil.getText(object, "caption2");
+            String values2 = JSONUtil.getText(object, "values2");
+            data = new CycleCount.Data(caption, values);
+            data.setHasTwo(hasTwo);
+            data.setCaption2(caption2);
+            data.setValues2(values2);
+            models.add(data);
+        }
+        mListView.setAdapter(new CycleCountAdapter.DataAdapter(ct, models));
+    }
+
+    private void initView() {
+        codeTv = findViewById(R.id.codeTv);
+        centerTv = findViewById(R.id.centerTv);
+        lineTv = findViewById(R.id.lineTv);
+        kindTv = findViewById(R.id.kindTv);
+        mListView = findViewById(R.id.mListView);
+        actionqtyTv = findViewById(R.id.actionqtyTv);
+        unactionqtyTv = findViewById(R.id.unactionqtyTv);
+        findViewById(R.id.actionqtyTv).setOnClickListener(this);
+        findViewById(R.id.unactionqtyTv).setOnClickListener(this);
+        findViewById(R.id.cycleBtn).setOnClickListener(this);
+    }
+
+
+    private void loadData() {
+        progressDialog.show();
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("mobile/device/getCheckQty.action")
+                .add("caller", "DeviceBatch!Stock")
+                .add("id", id)
+                .method(Method.GET)
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                try {
+                    handleData(o.toString());
+                } catch (Exception e) {
+                    if (e != null) {
+                        LogUtil.i("e=" + e.getMessage());
+                    }
+                }
+                if (progressDialog != null) {
+                    progressDialog.dismiss();
+                }
+            }
+        }));
+    }
+
+    private void submitCycle(String de_code) {
+        progressDialog.show();
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("mobile/device/deviceStock.action")
+                .add("caller", "DeviceBatch!Stock")
+                .add("id", id)
+                .add("de_code", de_code)
+                .method(Method.POST)
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                if (progressDialog != null) {
+                    progressDialog.dismiss();
+                }
+                try {
+                    handleSubmitCycle(o.toString());
+                } catch (Exception e) {
+                    if (e != null) {
+                        LogUtil.i("e=" + e.getMessage());
+                    }
+                }
+
+            }
+        }));
+    }
+
+
+    private void handleData(String message) throws Exception {
+        JSONObject object = JSONUtil.getJSONObject(message, "data");
+        String code = JSONUtil.getText(object, "DB_CODE");
+        String centercode = JSONUtil.getText(object, "DB_CENTERCODE");
+        String centername = JSONUtil.getText(object, "DB_CENTERNAME");
+        String linecode = JSONUtil.getText(object, "DB_LINECODE");
+        String devkind = JSONUtil.getText(object, "DB_DEVTYPE");
+        String actionqty = JSONUtil.getText(object, "DB_ACTIONQTY");
+        String unactionqty = JSONUtil.getText(object, "DB_UNACTIONQTY");
+        codeTv.setText(code);
+        centerTv.setText(centername);
+        lineTv.setText(linecode);
+        kindTv.setText(devkind);
+        actionqtyTv.setText(Html.fromHtml("<u>" + actionqty + "</u>"));
+        unactionqtyTv.setText(Html.fromHtml("<u>" + unactionqty + "</u>"));
+    }
+
+    private void handleSubmitCycle(String message) throws Exception {
+        boolean success = JSONUtil.getBoolean(message, "success");
+        if (success) {
+            JSONObject object = JSONUtil.getJSONObject(message, "data");
+            String popCode = JSONUtil.getText(object, "DE_CODE");
+            String popName = JSONUtil.getText(object, "DE_NAME");
+            String popGui = JSONUtil.getText(object, "DE_SPEC");
+            String popUnActNum = String.valueOf(JSONUtil.getInt(object, "DB_UNACTIONQTY"));
+            showMuenPop(popCode, popName, popGui, popUnActNum);
+        } else {
+            String exceptionInfo = JSONUtil.getText(message, "exceptionInfo");
+            if (!StringUtil.isEmpty(exceptionInfo)) {
+                ToastUtil.showToast(ct, exceptionInfo);
+            }
+        }
+    }
+
+    private PopupWindow mPopupWindow;
+    private TextView popCodeTv;
+    private TextView popNameTv;
+    private TextView popGuiTv;
+    private TextView popUnActNumTv;
+
+    private void showMuenPop(String popCode, String popName, String popGui, String popUnActNum) {
+        View view = LayoutInflater.from(ct).inflate(R.layout.pop_submit_cycle, null);
+        if (mPopupWindow == null) {
+            mPopupWindow = new PopupWindow(ct);
+            mPopupWindow.setContentView(view);
+            mPopupWindow.setBackgroundDrawable(ct.getResources().getDrawable(R.color.white));
+            mPopupWindow.setTouchable(true);
+            DisplayUtil.backgroundAlpha(ct, 0.4f);
+            mPopupWindow.setOutsideTouchable(false);
+            mPopupWindow.setFocusable(true);
+            mPopupWindow.setWidth(DisplayUtil.dip2px(ct, 300));
+            mPopupWindow.setHeight(DisplayUtil.dip2px(ct, 250));
+            mPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+                @Override
+                public void onDismiss() {
+                    DisplayUtil.backgroundAlpha(ct, 1.0f);
+                }
+            });
+            popCodeTv = view.findViewById(R.id.popCodeTv);
+            popNameTv = view.findViewById(R.id.popNameTv);
+            popGuiTv = view.findViewById(R.id.popGuiTv);
+            popUnActNumTv = view.findViewById(R.id.popUnActNumTv);
+            view.findViewById(R.id.nextBtn).setOnClickListener(this);
+            view.findViewById(R.id.backBtn).setOnClickListener(this);
+        }
+        if (popCodeTv != null) {
+            popCodeTv.setText(popCode);
+        }
+        if (popNameTv != null) {
+            popNameTv.setText(popName);
+        }
+        if (popGuiTv != null) {
+            popGuiTv.setText(popGui);
+        }
+        if (popUnActNumTv != null) {
+            popUnActNumTv.setText(popUnActNum);
+        }
+        DisplayUtil.backgroundAlpha(ct, 0.4f);
+        if (!mPopupWindow.isShowing()) {
+            mPopupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);
+        }
+    }
+
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.actionqtyTv) {
+            startActivity(new Intent(ct, DeviceCycleCountDetailsActivity.class).putExtra("isAct", true)
+                    .putExtra("id", this.id));
+        } else if (id == R.id.unactionqtyTv) {
+            startActivity(new Intent(ct, DeviceCycleCountDetailsActivity.class).putExtra("isAct", false)
+                    .putExtra("id", this.id));
+        } else if (id == R.id.cycleBtn || R.id.nextBtn == id) {
+            requestPermission(Manifest.permission.CAMERA, new Runnable() {
+                @Override
+                public void run() {
+                    startActivityForResult(new Intent(ct, CaptureActivity.class), 0x21);
+                }
+            }, new Runnable() {
+                @Override
+                public void run() {
+                    ToastUtil.showToast(ct, R.string.not_camera_permission);
+                }
+            });
+            if (mPopupWindow != null && mPopupWindow.isShowing()) {
+                mPopupWindow.dismiss();
+            }
+        } else if (R.id.backBtn == id) {
+            if (mPopupWindow != null && mPopupWindow.isShowing()) {
+                mPopupWindow.dismiss();
+            }
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == 0x21 && resultCode == Activity.RESULT_OK && data != null) {
+            Bundle bundle = data.getExtras();
+            if (bundle != null) {
+                if (bundle.getInt(CodeUtils.RESULT_TYPE) == CodeUtils.RESULT_SUCCESS) {
+                    String result = bundle.getString(CodeUtils.RESULT_STRING);
+                    //TODO 测试数据
+//                    result = "ASDF01098";
+                    submitCycle(result);
+                }
+            }
+        }
+    }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 128 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java


+ 81 - 9
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceManageActivity.java

@@ -1,15 +1,25 @@
 package com.uas.appworks.CRM.erp.activity;
 
+import android.Manifest;
+import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.util.Log;
 
+import com.afollestad.materialdialogs.MaterialDialog;
 import com.common.data.StringUtil;
+import com.core.app.Constants;
+import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
+import com.core.utils.ToastUtil;
 import com.uas.appworks.CRM.erp.adapter.DeviceManageAdapter;
 import com.uas.appworks.CRM.erp.model.DeviceManage;
 import com.uas.appworks.R;
+import com.uas.appworks.activity.DeviceQueryActivity;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -30,14 +40,15 @@ public class DeviceManageActivity extends BaseActivity {
         contantRv.setLayoutManager(new GridLayoutManager(ct, 4));
         List<DeviceManage> models = new ArrayList<>();
         //扫一扫
-        models.add(new DeviceManage(1, R.drawable.icon_scan_device, StringUtil.getMessage(R.string.text_scan_device)).setCazz(ScanDetailActivity.class));
+        models.add(new DeviceManage(1, R.drawable.icon_scan_device, StringUtil.getMessage(R.string.text_scan_device)).setCazz(CaptureActivity.class).setRequest(0x21));
         //设备查询
-        models.add(new DeviceManage(2, R.drawable.icon_device_query, StringUtil.getMessage(R.string.text_device_query)));
+        models.add(new DeviceManage(2, R.drawable.icon_device_query, StringUtil.getMessage(R.string.text_device_query)).setCazz(DeviceQueryActivity.class).addString(Constants.FLAG.DEVICE_CALLER, "Device"));
         //通用配置表单
-        models.add(new DeviceManage(3, R.drawable.icon_application_use, StringUtil.getMessage(R.string.text_application_use)));
-        models.add(new DeviceManage(4, R.drawable.icon_scrap_application, StringUtil.getMessage(R.string.text_scrap_application)));
-        models.add(new DeviceManage(5, R.drawable.icon_maintenance, StringUtil.getMessage(R.string.text_maintenance)));
-        models.add(new DeviceManage(6, R.drawable.icon_fault_inspection, StringUtil.getMessage(R.string.text_fault_inspection)));
+
+        models.add(new DeviceManage(3, R.drawable.icon_application_use, StringUtil.getMessage(R.string.text_application_use)).setCazz(DeviceDataFormAddActivity.class).addString("caller", "DeviceChange!Use"));
+        models.add(new DeviceManage(4, R.drawable.icon_scrap_application, StringUtil.getMessage(R.string.text_scrap_application)).setCazz(DeviceDataFormAddActivity.class).addString("caller", "DeviceChange!Scrap"));
+        models.add(new DeviceManage(5, R.drawable.icon_maintenance, StringUtil.getMessage(R.string.text_maintenance)).setCazz(DeviceDataFormAddActivity.class).addString("caller", "DeviceChange!Maintain"));
+        models.add(new DeviceManage(6, R.drawable.icon_fault_inspection, StringUtil.getMessage(R.string.text_fault_inspection)).setCazz(DeviceDataFormAddActivity.class).addString("caller", "DeviceChange!Inspect"));
         //周期盘点
         models.add(new DeviceManage(7, R.drawable.icon_cycle_count, StringUtil.getMessage(R.string.text_cycle_count)).setCazz(DeviceCycleCountActivity.class));
         DeviceManageAdapter adapter = new DeviceManageAdapter(this, models);
@@ -54,15 +65,76 @@ public class DeviceManageActivity extends BaseActivity {
         });
     }
 
-    private void clickDevice(DeviceManage manage) throws Exception {
+    private void clickDevice(final DeviceManage manage) throws Exception {
         if (manage != null) {
             Class cazz = manage.getCazz();
-            Intent intent = new Intent(ct, cazz);
+            final Intent intent = new Intent(ct, cazz);
+            intent.putExtra("title", manage.getName());
             Bundle bundle = manage.getBundle();
             if (bundle != null) {
                 intent.putExtra("data", bundle);
+                if (bundle.keySet() != null) {
+                    for (String e : bundle.keySet())
+                        intent.putExtra(e, bundle.getString(e));
+                }
+            }
+            if (manage.getRequest() > 0) {
+                requestPermission(Manifest.permission.CAMERA, new Runnable() {
+                    @Override
+                    public void run() {
+                        startActivityForResult(intent, manage.getRequest());
+                    }
+                }, new Runnable() {
+                    @Override
+                    public void run() {
+                        ToastUtil.showToast(ct, R.string.not_camera_permission);
+                    }
+                });
+            } else {
+                startActivity(intent);
+            }
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (data != null) {
+            if (requestCode == 0x21 && resultCode == Activity.RESULT_OK) {
+                Bundle bundle = data.getExtras();
+                if (bundle != null) {
+                    if (bundle.getInt(CodeUtils.RESULT_TYPE) == CodeUtils.RESULT_SUCCESS) {
+                        String result = bundle.getString(CodeUtils.RESULT_STRING);
+                        Log.d("scanurl", result);
+                        ToastUtil.showToast(ct, result);
+                        startActivityForResult(new Intent(ct, ScanDetailActivity.class).putExtra("decode", result), 0x22);
+                    }
+                }
+            } else if (requestCode == 0x22) {
+                showDialog(data.getStringExtra("data"));
+
             }
-            startActivity(intent);
         }
     }
+
+    private void showDialog(String message) {
+        if (StringUtil.isEmpty(message)) return;
+        new MaterialDialog.Builder(ct)
+                .title(R.string.app_dialog_title)
+                .content(message)
+                .positiveText(MyApplication.getInstance().getString(R.string.app_dialog_ok))
+                .autoDismiss(false)
+                .callback(new MaterialDialog.ButtonCallback() {
+                    @Override
+                    public void onPositive(MaterialDialog dialog) {
+                        dialog.dismiss();
+
+                    }
+
+                    @Override
+                    public void onNegative(MaterialDialog dialog) {
+                        dialog.dismiss();
+                    }
+                }).show();
+    }
 }

+ 281 - 16
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/ScanDetailActivity.java

@@ -8,36 +8,109 @@ import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.PopupWindow;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.LogUtil;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
+import com.common.data.StringUtil;
 import com.common.system.DisplayUtil;
+import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
+import com.core.net.utils.NetUtils;
+import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
+import com.me.network.app.http.HttpClient;
+import com.me.network.app.http.Method;
+import com.me.network.app.http.rx.ResultListener;
+import com.me.network.app.http.rx.ResultSubscriber;
 import com.modular.apputils.widget.RecycleViewDivider;
+import com.module.recyclerlibrary.ui.refresh.BaseRefreshLayout;
+import com.uas.appworks.CRM.erp.model.DeviceInfo;
 import com.uas.appworks.R;
 
+import java.util.ArrayList;
+import java.util.List;
+
+
 /**
  * Created by Bitlike on 2017/11/22.
  */
 
 public class ScanDetailActivity extends BaseActivity implements View.OnClickListener {
-
+    private HttpClient httpClient = null;
     private RecyclerView mRecyclerView;
+    private BaseRefreshLayout mRefreshLayout;
+
+    private String decode;
+    private String id;
+    private DeviceInfoAdapter mAdapter;
+    private List<DeviceInfo> baseInfoList;
+    private List<DeviceInfo> moreInfoList;
+    private List<DeviceInfo> historyInfoList;
+
+    private int selectItem;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.common_refresh_recycler);
         initView();
+        initData();
     }
 
+    private void initData() {
+        Intent intent = getIntent();
+        if (intent != null) {
+            decode = intent.getStringExtra("decode");
+            LogUtil.i("decode=" + decode);
+        }
+        baseInfoList = new ArrayList<>();
+        moreInfoList = new ArrayList<>();
+        historyInfoList = new ArrayList<>();
+        String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+        String emCode = CommonUtil.getSharedPreferences(ct, "sessionId");
+        httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(MyApplication.getInstance()))
+                .isDebug(true)
+                .add("sessionId", sessionId)
+                .add("master", CommonUtil.getSharedPreferences(ct, "erp_master"))
+                .add("sessionUser", emCode)
+                .add("sessionId", sessionId)
+                .header("Cookie", "JSESSIONID=" + sessionId)
+                .header("sessionUser", emCode)
+                .build();
+        selectItem = 1;
+        loadData();
+    }
+
+
     private void initView() {
         mRecyclerView = (RecyclerView) findViewById(R.id.mRecyclerView);
+        mRefreshLayout = (BaseRefreshLayout) findViewById(R.id.mRefreshLayout);
         mRecyclerView.setLayoutManager(new LinearLayoutManager(ct));
         mRecyclerView.setItemAnimator(new DefaultItemAnimator());
         mRecyclerView.addItemDecoration(new RecycleViewDivider(ct, LinearLayoutManager.VERTICAL));
         initActionBar();
+        mRefreshLayout.setEnabledPullUp(false);
+        mRefreshLayout.setOnRefreshListener(new BaseRefreshLayout.onRefreshListener() {
+            @Override
+            public void onRefresh() {
+                loadData();
+            }
+
+            @Override
+            public void onLoadMore() {
+
+            }
+        });
     }
 
     private void initActionBar() {
@@ -47,20 +120,17 @@ public class ScanDetailActivity extends BaseActivity implements View.OnClickList
         bar.setCustomView(view);
         view.findViewById(R.id.backImg).setOnClickListener(this);
         view.findViewById(R.id.doneTv).setOnClickListener(this);
-
         RadioGroup selectRg = view.findViewById(R.id.selectRg);
 
         selectRg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(RadioGroup group, int checkedId) {
                 if (checkedId == R.id.baseInfoRb) {
-                    ToastMessage("选择基础信息");
+                    setData2Adapter(1);
                 } else if (checkedId == R.id.moreInfoRb) {
-                    ToastMessage("选择详细信息");
-
+                    setData2Adapter(2);
                 } else if (checkedId == R.id.historyRb) {
-                    ToastMessage("选择设备履历");
-
+                    setData2Adapter(3);
                 }
             }
         });
@@ -75,25 +145,25 @@ public class ScanDetailActivity extends BaseActivity implements View.OnClickList
             View view = LayoutInflater.from(ct).inflate(R.layout.menu_device_scan, null);
             menuPop = new PopupWindow(ct);
             menuPop.setContentView(view);
-            menuPop.setBackgroundDrawable(ct.getResources().getDrawable(R.drawable.pop_round_bg));
+            menuPop.setBackgroundDrawable(ct.getResources().getDrawable(R.color.white));
             menuPop.setTouchable(true);
             DisplayUtil.backgroundAlpha(ct, 0.4f);
             menuPop.setOutsideTouchable(false);
             menuPop.setFocusable(true);
             menuPop.setWidth(DisplayUtil.dip2px(ct, 100));
-            menuPop.setHeight(DisplayUtil.dip2px(ct, 295));
+            menuPop.setHeight(DisplayUtil.dip2px(ct, 200));
             menuPop.setOnDismissListener(new PopupWindow.OnDismissListener() {
                 @Override
                 public void onDismiss() {
                     DisplayUtil.backgroundAlpha(ct, 1.0f);
                 }
             });
-            view.findViewById(R.id.popFindBtn).setOnClickListener(this);
+//            view.findViewById(R.id.popFindBtn).setOnClickListener(this);
             view.findViewById(R.id.popUseApplyBtn).setOnClickListener(this);
             view.findViewById(R.id.popScrapApplyBtn).setOnClickListener(this);
             view.findViewById(R.id.popMaintenanceBtn).setOnClickListener(this);
             view.findViewById(R.id.popInspectBtn).setOnClickListener(this);
-            view.findViewById(R.id.popCycleCountBtn).setOnClickListener(this);
+//            view.findViewById(R.id.popCycleCountBtn).setOnClickListener(this);
         }
         DisplayUtil.backgroundAlpha(ct, 0.4f);
         menuPop.showAsDropDown(v, 0, DisplayUtil.dip2px(ct, 10));
@@ -106,19 +176,18 @@ public class ScanDetailActivity extends BaseActivity implements View.OnClickList
             onBackPressed();
         } else if (R.id.doneTv == id) {
             showMuenPop(v);
-        } else if (R.id.popFindBtn == id) {
-            dismissMenuPop();
         } else if (R.id.popUseApplyBtn == id) {
+            startActivity(new Intent(ct, DeviceDataFormAddActivity.class).putExtra("title", StringUtil.getMessage(R.string.text_application_use)).putExtra("caller", "DeviceChange!Use").putExtra("noCode", decode));
             dismissMenuPop();
         } else if (R.id.popScrapApplyBtn == id) {
+            startActivity(new Intent(ct, DeviceDataFormAddActivity.class).putExtra("title", StringUtil.getMessage(R.string.text_scrap_application)).putExtra("caller", "DeviceChange!Scrap").putExtra("noCode", decode));
             dismissMenuPop();
         } else if (R.id.popMaintenanceBtn == id) {
+            startActivity(new Intent(ct, DeviceDataFormAddActivity.class).putExtra("title", StringUtil.getMessage(R.string.text_maintenance)).putExtra("caller", "DeviceChange!Maintain").putExtra("noCode", decode));
             dismissMenuPop();
         } else if (R.id.popInspectBtn == id) {
+            startActivity(new Intent(ct, DeviceDataFormAddActivity.class).putExtra("title", StringUtil.getMessage(R.string.text_fault_inspection)).putExtra("caller", "DeviceChange!Inspect").putExtra("noCode", decode));
             dismissMenuPop();
-        } else if (R.id.popCycleCountBtn == id) {
-            dismissMenuPop();
-            startActivity(new Intent(ct,DeviceCycleCountActivity.class));
         }
 
     }
@@ -128,4 +197,200 @@ public class ScanDetailActivity extends BaseActivity implements View.OnClickList
             menuPop.dismiss();
         }
     }
+
+
+    private void loadData() {
+
+        if (NetUtils.isNetWorkConnected(ct)) {
+            if (!mRefreshLayout.isRefreshing()) {
+                progressDialog.show();
+            }
+            httpClient.Api().send(new HttpClient.Builder()
+                    .url("mobile/device/getDeviceInfo.action")
+                    .add("decode", decode)
+                    .method(Method.GET)
+                    .build(), new ResultSubscriber<>(new ResultListener<Object>() {
+                @Override
+                public void onResponse(Object o) {
+                    try {
+                        handleData(o.toString());
+                    } catch (Exception e) {
+                        if (e != null) {
+                            LogUtil.i("e=" + e.getMessage());
+                        }
+                    }
+                    if (progressDialog != null) {
+                        progressDialog.dismiss();
+
+                    }
+                    if (mRefreshLayout != null) {
+                        mRefreshLayout.stopRefresh();
+                    }
+
+                }
+            }));
+        } else {
+            if (!mRefreshLayout.isRefreshing()) {
+                endOfError(getString(R.string.networks_out));
+            }
+        }
+    }
+
+    private void endOfError(String exceptionInfo) {
+        setResult(0x22, new Intent().putExtra("data", exceptionInfo));
+        finish();
+    }
+
+    private void handleData(String message) throws Exception {
+        JSONObject json = JSON.parseObject(message);
+        boolean success = JSONUtil.getBoolean(json, "success");
+        JSONObject object = JSONUtil.getJSONObject(json, "data");
+        if (success) {
+            //处理主表
+            JSONArray formItem = JSONUtil.getJSONArray(object, "formItem");
+            JSONObject formData = JSONUtil.getJSONObject(object, "formData");
+            List<DeviceInfo> formListData = handleFromGrid(true, null, formItem, formData);
+            //详细配置
+            JSONArray grid1Data = JSONUtil.getJSONArray(object, "grid1Data");
+            List<DeviceInfo> moreListData = new ArrayList<>();
+            JSONArray grid1Item = JSONUtil.getJSONArray(object, "grid1Item");
+            for (int i = 0; i < grid1Data.size(); i++) {
+                moreListData.addAll(handleFromGrid(false, "详细配置" + (i + 1), grid1Item, grid1Data.getJSONObject(i)));
+            }
+            //设备履历数据
+            JSONArray grid2Item = JSONUtil.getJSONArray(object, "grid2Item");
+            JSONArray grid2Data = JSONUtil.getJSONArray(object, "grid2Data");
+            List<DeviceInfo> historyListData = new ArrayList<>();
+            for (int i = 0; i < grid2Data.size(); i++) {
+                historyListData.addAll(handleFromGrid(false, "设备履历" + (i + 1), grid2Item, grid2Data.getJSONObject(i)));
+            }
+            setData2Adapter(formListData, moreListData, historyListData);
+        } else {
+            String exceptionInfo = JSONUtil.getText(message, "exceptionInfo");
+            if (!StringUtil.isEmpty(exceptionInfo)) {
+                ToastUtil.showToast(ct, exceptionInfo);
+            }
+            endOfError(exceptionInfo);
+        }
+
+    }
+
+    private void setData2Adapter(int selectItem) {
+        this.selectItem = selectItem;
+        List<DeviceInfo> listData = null;
+        switch (selectItem) {
+            case 1:
+                listData = this.baseInfoList;
+                break;
+            case 2:
+                listData = this.moreInfoList;
+                break;
+            case 3:
+                listData = this.historyInfoList;
+                break;
+        }
+
+        if (mAdapter == null) {
+            mAdapter = new DeviceInfoAdapter(listData);
+            mRecyclerView.setAdapter(mAdapter);
+        } else {
+            mAdapter.setModels(listData);
+        }
+    }
+
+    private void setData2Adapter(List<DeviceInfo> baseInfoList, List<DeviceInfo> moreInfoList, List<DeviceInfo> historyInfoList) {
+        this.baseInfoList = baseInfoList;
+        this.moreInfoList = moreInfoList;
+        this.historyInfoList = historyInfoList;
+        setData2Adapter(selectItem);
+    }
+
+
+    private List<DeviceInfo> handleFromGrid(boolean isFrom, String title, JSONArray items, JSONObject data) throws Exception {
+        List<DeviceInfo> deviceInfos = new ArrayList<>();
+        for (int i = 0; i < items.size(); i++) {
+            JSONObject item = items.getJSONObject(i);
+            String field = JSONUtil.getText(item, "field", "dataIndex");
+            String caption = JSONUtil.getText(item, "caption");
+            String type = JSONUtil.getText(item, "type");
+            String values =getValues(type,JSONUtil.getText(data, field,field.toUpperCase())) ;
+            if (isFrom && caption.equals("ID")) {
+                id = values;
+            }
+            deviceInfos.add(new DeviceInfo(isFrom, i == 0 ? title : null, caption, field, values));
+        }
+        return deviceInfos;
+    }
+
+    private String getValues(String type, String values) {
+        if (type.equals("combo")) {
+            switch (values) {
+                case "UNUSED":
+                    return "闲置中";
+                case "USING":
+                    return "正常使用";
+                case "BREAKING":
+                    return "故障中";
+                case "SCRAPPED":
+                    return "已报废";
+                case "LOSSED":
+                    return "已盘亏";
+            }
+        }
+        return values;
+    }
+
+    private class DeviceInfoAdapter extends RecyclerView.Adapter<DeviceInfoAdapter.ViewHolder> {
+
+        List<DeviceInfo> models;
+
+        public DeviceInfoAdapter(List<DeviceInfo> models) {
+            this.models = models;
+        }
+
+        public void setModels(List<DeviceInfo> models) {
+            this.models = models;
+            notifyDataSetChanged();
+        }
+
+        @Override
+        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+            return new ViewHolder(parent);
+        }
+
+        @Override
+        public void onBindViewHolder(ViewHolder holder, int position) {
+            DeviceInfo model = models.get(position);
+            if (StringUtil.isEmpty(model.getTitle())) {
+                holder.titleRl.setVisibility(View.GONE);
+            } else {
+                holder.titleRl.setVisibility(View.VISIBLE);
+                holder.titleTv.setText(model.getTitle());
+            }
+            holder.captionTv.setText(model.getCaption());
+            holder.valuesTv.setText(model.getValues());
+        }
+
+        @Override
+        public int getItemCount() {
+            return ListUtils.getSize(models);
+        }
+
+        class ViewHolder extends RecyclerView.ViewHolder {
+            RelativeLayout titleRl;
+            TextView titleTv, captionTv, valuesTv;
+
+            public ViewHolder(ViewGroup parent) {
+                this(LayoutInflater.from(ct).inflate(R.layout.item_device_info, parent, false));
+            }
+
+            public ViewHolder(View itemView) {
+                super(itemView);
+                titleRl = itemView.findViewById(R.id.titleRl);
+                titleTv = itemView.findViewById(R.id.titleTv);
+                captionTv = itemView.findViewById(R.id.captionTv);
+                valuesTv = itemView.findViewById(R.id.valuesTv);
+            }
+        }
+    }
 }

+ 219 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/adapter/CycleCountAdapter.java

@@ -0,0 +1,219 @@
+package com.uas.appworks.CRM.erp.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+
+
+import com.common.LogUtil;
+import com.uas.appworks.CRM.erp.model.CycleCount;
+import com.uas.appworks.R;
+
+import java.util.List;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class CycleCountAdapter extends BaseAdapter {
+    private Context context;
+    private boolean needShowAll;
+    private List<CycleCount> models;
+
+    public void setNeedShowAll(boolean needShowAll) {
+        this.needShowAll = needShowAll;
+    }
+
+    public CycleCountAdapter(Context context, List<CycleCount> models) {
+        this.context = context;
+        this.models = models;
+    }
+
+    public void setModels(List<CycleCount> models) {
+        this.models = models;
+        notifyDataSetChanged();
+    }
+
+
+    @Override
+    public View getView(int i, View view, ViewGroup viewGroup) {
+        CycleCount model = models.get(i);
+        ViewHolder holder = null;
+        if (view == null) {
+            view = LayoutInflater.from(context).inflate(R.layout.item_rl_listview, null);
+            holder = new ViewHolder(view);
+            view.setTag(holder);
+        } else {
+            holder = (ViewHolder) view.getTag();
+        }
+        List<CycleCount.Data> datas = null;
+        if (model.isExpand()) {
+            holder.expandImg.setImageResource(R.drawable.ic_menu_retract);
+            datas = model.getDatas();
+        } else {
+            holder.expandImg.setImageResource(R.drawable.ic_menu_retract);
+            datas = model.getLowDatas();
+        }
+        ListAdapter mAdapter = holder.mListView.getAdapter();
+        if (mAdapter != null && mAdapter instanceof DataAdapter) {
+            ((DataAdapter) mAdapter).setModels(datas);
+        } else {
+            holder.mListView.setAdapter(new DataAdapter(context, datas));
+        }
+        view.setTag(R.id.tag_key2, model);
+        view.setOnClickListener(onClickListener);
+        if (needShowAll) {
+            holder.expandImg.setVisibility(View.VISIBLE);
+            holder.expandImg.setTag(R.id.tag_key, i);
+            holder.expandImg.setOnClickListener(onClickListener);
+        } else {
+            holder.expandImg.setVisibility(View.GONE);
+        }
+        return view;
+    }
+
+    private View.OnClickListener onClickListener = new View.OnClickListener() {
+        @Override
+        public void onClick(View view) {
+            try {
+                LogUtil.i("进来点击事件");
+                if (view.getId() == R.id.expandImg) {
+                    LogUtil.i("进来拓展点击事件");
+                    int i = (int) view.getTag(R.id.tag_key);
+                    if (models != null && models.size() > i) {
+                        models.get(i).setExpand(!models.get(i).isExpand());
+                        notifyDataSetChanged();
+                    }
+                } else {
+                    LogUtil.i("进来单机点击事件");
+                    CycleCount model = (CycleCount) view.getTag(R.id.tag_key2);
+                    if (onItemClickListener != null) {
+                        onItemClickListener.click(model);
+                    }
+                }
+            } catch (Exception e) {
+                LogUtil.i("e=" + e.getMessage());
+
+            }
+        }
+    };
+    private OnItemClickListener onItemClickListener;
+
+    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
+        this.onItemClickListener = onItemClickListener;
+    }
+
+    public interface OnItemClickListener {
+        void click(CycleCount model);
+    }
+
+    @Override
+    public int getCount() {
+        return models == null ? 0 : models.size();
+    }
+
+    @Override
+    public Object getItem(int i) {
+        return models.get(i);
+    }
+
+    @Override
+    public long getItemId(int i) {
+        return i;
+    }
+
+
+    class ViewHolder {
+        ListView mListView;
+        ImageView expandImg;
+
+        public ViewHolder(View itemView) {
+            mListView = itemView.findViewById(R.id.listView);
+            expandImg = itemView.findViewById(R.id.expandImg);
+
+            mListView.setEnabled(false);
+            mListView.setFocusable(false);
+            mListView.setClickable(false);
+            mListView.setPressed(false);
+        }
+    }
+
+    public static class DataAdapter extends BaseAdapter {
+        private List<CycleCount.Data> models;
+        private Context context;
+
+        public void setModels(List<CycleCount.Data> models) {
+            this.models = models;
+            notifyDataSetChanged();
+        }
+
+        public DataAdapter(Context context, List<CycleCount.Data> models) {
+            this.context = context;
+            this.models = models;
+        }
+
+        @Override
+        public int getCount() {
+            return models == null ? 0 : models.size();
+        }
+
+
+        @Override
+        public Object getItem(int i) {
+            return models.get(i);
+        }
+
+        @Override
+        public long getItemId(int i) {
+            return i;
+        }
+
+        @Override
+        public View getView(int i, View view, ViewGroup viewGroup) {
+            CycleCount.Data model = models.get(i);
+            ViewHolder holder = null;
+            if (view == null) {
+                view = LayoutInflater.from(context).inflate(R.layout.item_device_data, null);
+                holder = new ViewHolder(view);
+                view.setTag(holder);
+            } else {
+                holder = (ViewHolder) view.getTag();
+            }
+            try {
+                if (model.isHasTwo()) {
+                    holder.twoLL.setVisibility(View.VISIBLE);
+                    holder.caption2Tv.setText(model.getCaption2() + ":");
+                    holder.values2Tv.setText(model.getValues2());
+                } else {
+                    holder.twoLL.setVisibility(View.GONE);
+                }
+                holder.caption1Tv.setText(model.getCaption() + ":");
+                holder.values1Tv.setText(model.getValues());
+            } catch (Exception e) {
+
+            }
+            return view;
+        }
+
+        class ViewHolder {
+            LinearLayout twoLL;
+            TextView caption1Tv, values1Tv, caption2Tv, values2Tv;
+
+            public ViewHolder(View itemView) {
+                twoLL = itemView.findViewById(R.id.twoLL);
+                caption1Tv = itemView.findViewById(R.id.caption1Tv);
+                values1Tv = itemView.findViewById(R.id.values1Tv);
+                values2Tv = itemView.findViewById(R.id.values2Tv);
+                caption2Tv = itemView.findViewById(R.id.caption2Tv);
+            }
+        }
+    }
+}

+ 118 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/CycleCount.java

@@ -0,0 +1,118 @@
+package com.uas.appworks.CRM.erp.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class CycleCount {
+    private boolean isExpand;
+    private String id;
+    private List<Data> datas;
+    private List<Data> lowDatas;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public boolean isExpand() {
+        return isExpand;
+    }
+
+    public void setExpand(boolean expand) {
+        isExpand = expand;
+    }
+
+    public List<Data> getDatas() {
+        return datas;
+    }
+
+    public List<Data> getLowDatas() {
+        return lowDatas;
+    }
+
+    public void setDatas(List<Data> datas) {
+        this.datas = datas;
+    }
+
+    public void addDatas(List<Data> datas) {
+        if (this.datas == null) {
+            this.datas = new ArrayList<>();
+        }
+        this.datas.addAll(datas);
+    }
+
+    public void addData(Data data) {
+        if (this.datas == null) {
+            this.datas = new ArrayList<>();
+        }
+        if (lowDatas == null) {
+            lowDatas = new ArrayList<>();
+            lowDatas.add(data);
+        } else if (lowDatas.size() < 3) {
+            lowDatas.add(data);
+        }
+        this.datas.add(data);
+    }
+
+    public static class Data {
+        private boolean hasTwo;
+        private String caption;
+        private String values;
+        private String caption2;
+        private String values2;
+
+        public Data(String caption, String values) {
+            this.caption = caption;
+            this.values = values;
+        }
+
+        public boolean isHasTwo() {
+            return hasTwo;
+        }
+
+        public void setHasTwo(boolean hasTwo) {
+            this.hasTwo = hasTwo;
+        }
+
+        public String getCaption() {
+            return caption;
+        }
+
+        public void setCaption(String caption) {
+            this.caption = caption;
+        }
+
+        public String getValues() {
+            return values;
+        }
+
+        public void setValues(String values) {
+            this.values = values;
+        }
+
+        public String getCaption2() {
+            return caption2;
+        }
+
+        public void setCaption2(String caption2) {
+            this.caption2 = caption2;
+        }
+
+        public String getValues2() {
+            return values2;
+        }
+
+        public void setValues2(String values2) {
+            this.values2 = values2;
+        }
+    }
+
+
+}

+ 107 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/CycleCountAdd.java

@@ -0,0 +1,107 @@
+package com.uas.appworks.CRM.erp.model;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.data.JSONUtil;
+import com.core.model.Approval;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class CycleCountAdd {
+    private int id;
+    private boolean allowblank;
+    private String field;
+    private String caption;
+    private String values;
+    private String type;
+    private String which;
+    private List<Approval.Data> datas = new ArrayList<>();
+
+    public CycleCountAdd(JSONObject object) {
+        setValues(JSONUtil.getText(object, "fd_defaultvalue"));
+        setField(JSONUtil.getText(object, "fd_field"));
+        setCaption(JSONUtil.getText(object, "fd_caption"));
+        setType(JSONUtil.getText(object, "fd_type"));
+        if ("T".equals(JSONUtil.getText(object, "fd_dbfind"))) {
+            setType("DBFIND");
+        }
+        if (getType().equals("C")) {
+            JSONArray combostores = JSONUtil.getJSONArray(object, "COMBOSTORE");
+            for (int i = 0; i < combostores.size(); i++) {
+                JSONObject o = combostores.getJSONObject(i);
+                datas.add(new Approval.Data(JSONUtil.getText(o, "DLC_VALUE"), JSONUtil.getText(o, "DLC_DISPLAY")));
+            }
+        }
+        setAllowblank(JSONUtil.getBoolean(object, "fd_allowblank"));
+        setId(JSONUtil.getInt(object, "fd_id"));
+        setWhich("from");
+    }
+
+    public List<Approval.Data> getDatas() {
+        return datas;
+    }
+
+    public String getType() {
+        return type == null ? "" : type;
+
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public boolean isAllowblank() {
+        return allowblank;
+    }
+
+    public void setAllowblank(boolean allowblank) {
+        this.allowblank = allowblank;
+    }
+
+    public String getField() {
+        return field;
+    }
+
+    public void setField(String field) {
+        this.field = field;
+    }
+
+    public String getCaption() {
+        return caption;
+    }
+
+    public void setCaption(String caption) {
+        this.caption = caption;
+    }
+
+
+    public String getValues() {
+        return values == null ? "" : values;
+    }
+
+    public void setValues(String values) {
+        this.values = values;
+    }
+
+    public String getWhich() {
+        return which;
+    }
+
+    public void setWhich(String which) {
+        this.which = which;
+    }
+}

+ 63 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/DeviceInfo.java

@@ -0,0 +1,63 @@
+package com.uas.appworks.CRM.erp.model;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class DeviceInfo {
+    private boolean isForm;
+    private String title;
+    private String caption;
+    private String field;
+    private String values;
+
+    public DeviceInfo(boolean isForm, String title, String caption, String field, String values) {
+        this.isForm = isForm;
+        this.caption = caption;
+        this.field = field;
+        this.values = values;
+        this.title = title;
+    }
+
+    public boolean getIsForm() {
+        return isForm;
+    }
+
+    public void setIsForm(boolean isForm) {
+        this.isForm = isForm;
+    }
+
+    public String getCaption() {
+        return caption;
+    }
+
+    public void setCaption(String caption) {
+        this.caption = caption;
+    }
+
+    public String getField() {
+        return field;
+    }
+
+    public void setField(String field) {
+        this.field = field;
+    }
+
+    public String getValues() {
+        return values;
+    }
+
+    public void setValues(String values) {
+        this.values = values;
+    }
+
+
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+}

+ 18 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/DeviceManage.java

@@ -12,8 +12,17 @@ public class DeviceManage {
     private String name;
     private Class cazz;
     private Bundle bundle;
+    private int request;
 
 
+    public int getRequest() {
+        return request;
+    }
+
+    public DeviceManage setRequest(int request) {
+        this.request = request;
+        return this;
+    }
 
     public DeviceManage(int id, int reId, String name) {
         this.id = id;
@@ -63,8 +72,17 @@ public class DeviceManage {
         return bundle;
     }
 
+
     public DeviceManage setBundle(Bundle bundle) {
         this.bundle = bundle;
         return this;
     }
+
+    public DeviceManage addString(String key, String values) {
+        if (this.bundle == null) {
+            this.bundle = new Bundle();
+        }
+        this.bundle.putString(key, values);
+        return this;
+    }
 }

+ 973 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/model/TestStr.java

@@ -0,0 +1,973 @@
+package com.uas.appworks.CRM.erp.model;
+
+/**
+ * Created by Bitlike on 2017/12/19.
+ */
+
+public class TestStr {
+    public final static String BASE_URL = "http://192.168.253.203:8090/";
+    public final static String CYCLECOUNT_MESSAGE = "{\n" +
+            "\t\"keyField\": \"sa_id\",\n" +
+            "\t\"pfField\": \"sd_said\",\n" +
+            "\t\"sessionId\": \"951961997FFD118271BFA72A4459B7AD\",\n" +
+            "\t\"columns\": [{\n" +
+            "\t\t\"dataIndex\": \"sa_id\",\n" +
+            "\t\t\"caption\": \"ID\",\n" +
+            "\t\t\"width\": 100,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"sa_status\",\n" +
+            "\t\t\"caption\": \"状态\",\n" +
+            "\t\t\"width\": 50,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"sa_recorder\",\n" +
+            "\t\t\"caption\": \"录入人\",\n" +
+            "\t\t\"width\": 50,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"sa_seller\",\n" +
+            "\t\t\"caption\": \"实行人\",\n" +
+            "\t\t\"width\": 50,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"sa_custcode\",\n" +
+            "\t\t\"caption\": \"实行人编号\",\n" +
+            "\t\t\"width\": 100,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"sa_recorddate\",\n" +
+            "\t\t\"caption\": \"录入日期\",\n" +
+            "\t\t\"width\": 100,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"sa_code\",\n" +
+            "\t\t\"caption\": \"编号\",\n" +
+            "\t\t\"width\": 50,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": \"0,000\",\n" +
+            "\t\t\"render\": null\n" +
+            "\t}],\n" +
+            "\t\"listdata\": [{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"sa_status\": \"在录入\",\n" +
+            "\t\t\"sa_recorder\": \"林子健\",\n" +
+            "\t\t\"sa_seller\": \"陈炜\",\n" +
+            "\t\t\"sa_custcode\": \"HW0006\",\n" +
+            "\t\t\"sa_recorddate\": \"2017-12-01 00:00:00\",\n" +
+            "\t\t\"sa_id\": 23039,\n" +
+            "\t\t\"sa_code\": \"SS17120001\"\n" +
+            "\t}]\n" +
+            "}";
+
+
+    public static final String CYCLE_COUNT_ADD = "{\n" +
+            "\t\"items\": [{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"SS\",\n" +
+            "\t\t\"fd_defaultvalue\": \"默认值\",\n" +
+            "\t\t\"fd_allowblank\": false,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"DBFIND\",\n" +
+            "\t\t\"fd_defaultvalue\": \"\",\n" +
+            "\t\t\"fd_allowblank\": true,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"SS\",\n" +
+            "\t\t\"fd_defaultvalue\": \"默认值\",\n" +
+            "\t\t\"fd_allowblank\": false,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"DBFIND\",\n" +
+            "\t\t\"fd_defaultvalue\": \"\",\n" +
+            "\t\t\"fd_allowblank\": false,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"DBFIND\",\n" +
+            "\t\t\"fd_defaultvalue\": \"\",\n" +
+            "\t\t\"fd_allowblank\": true,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"SS\",\n" +
+            "\t\t\"fd_defaultvalue\": \"默认值\",\n" +
+            "\t\t\"fd_allowblank\": false,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"fd_detno\": \"de_code\",\n" +
+            "\t\t\"fd_field\": \"db_code\",\n" +
+            "\t\t\"fd_caption\": \"单据编号\",\n" +
+            "\t\t\"fd_maxlength\": 80,\n" +
+            "\t\t\"fd_type\": \"DBFIND\",\n" +
+            "\t\t\"fd_defaultvalue\": \"\",\n" +
+            "\t\t\"fd_allowblank\": true,\n" +
+            "\t\t\"fd_group\": \"分组\",\n" +
+            "\t\t\"fd_id\": 231,\n" +
+            "\t\t\"fd_appwidth\": 12,\n" +
+            "\t\t\"fd_logictype\": \"逻辑类型\",\n" +
+            "\t\t\"fd_readonly\": false,\n" +
+            "\t\t\"fd_dbfind\": \"放大镜配置\"\n" +
+            "\t}]\n" +
+            "}";
+    public static final String CYCLE_INFO = "{\n" +
+            "\t\"data\": {\n" +
+            "\t\t\"DB_ID\": 122,\n" +
+            "\t\t\"DB_CODE\": \"盘点单号\",\n" +
+            "\t\t\"DB_CENTERCODE\": \"所属部门编号\",\n" +
+            "\t\t\"DB_CENTERNAME\": \"所属部门名称\",\n" +
+            "\t\t\"DB_LINECODE\": \"所属线别\",\n" +
+            "\t\t\"DB_DEVKIND \": \"设备种类\",\n" +
+            "\t\t\"DB_INMAN \": \"录入人\",\n" +
+            "\t\t\"DB_INDATE\": \"录入日期\",\n" +
+            "\t\t\"DB_UNACTIONQTY\": 1223,\n" +
+            "\t\t\"DB_ACTIONQTY\": 1223\n" +
+            "\t}\n" +
+            "}";
+    public static final String CYCLE_DETAILS = "{\n" +
+            "    \"gridItem\": [\n" +
+            "        {\n" +
+            "            \"dataIndex\": \"da_detno\",\n" +
+            "            \"caption\": \"序号\",\n" +
+            "            \"width\": 80,\n" +
+            "            \"type\": \"numberfield\",\n" +
+            "            \"format\": null,\n" +
+            "            \"render\": \"\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"dataIndex\": \"da_id\",\n" +
+            "            \"caption\": \"ID\",\n" +
+            "            \"width\": 80,\n" +
+            "            \"type\": \"numberfield\",\n" +
+            "            \"format\": null,\n" +
+            "            \"render\": \"\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"dataIndex\": \"da_devcode\",\n" +
+            "            \"caption\": \"编号\",\n" +
+            "            \"width\": 80,\n" +
+            "            \"type\": \"numberfield\",\n" +
+            "            \"format\": null,\n" +
+            "            \"render\": \"\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"dataIndex\": \"da_attname\",\n" +
+            "            \"caption\": \"名称\",\n" +
+            "            \"width\": 80,\n" +
+            "            \"type\": \"numberfield\",\n" +
+            "            \"format\": null,\n" +
+            "            \"render\": \"\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"dataIndex\": \"da_attvalue\",\n" +
+            "            \"caption\": \"说明\",\n" +
+            "            \"width\": 80,\n" +
+            "            \"type\": \"numberfield\",\n" +
+            "            \"format\": null,\n" +
+            "            \"render\": \"\"\n" +
+            "        }\n" +
+            "    ],\n" +
+            "    \"gridData\": [\n" +
+            "        {\n" +
+            "            \"da_id\": 12,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 13,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 14,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 15,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 16,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 17,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 18,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 19,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 120,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1312,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1212,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1211,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 123,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 125,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 127,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 121213,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1112,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 121231,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 12131,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 121234124,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1212313,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1214123,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 121241224,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 121241,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"da_id\": 1213123,\n" +
+            "            \"da_devcode\": \"DE120334\",\n" +
+            "            \"da_detno\": 1,\n" +
+            "            \"da_attname\": \"分辨率\",\n" +
+            "            \"da_attvalue\": \"600大批dpi\"\n" +
+            "        }\n" +
+            "    ]\n" +
+            "}";
+    public static final String SUBMIT_CYCLE = "{\n" +
+            "    \"data\": {\n" +
+            "        \"DE_CODE\": \"设备编号\",\n" +
+            "        \"DE_NAME\": \"设备名称\",\n" +
+            "        \"DE_SPEC\": \"设备规格\",\n" +
+            "        \"DB_UNACTIONQTY\": 12\n" +
+            "    }\n" +
+            "}";
+    public static final String SCAN_DETAIL = "{\n" +
+            "\t\"formItem\": [{\n" +
+            "\t\t\"field\": \"de_code\",\n" +
+            "\t\t\"caption\": \"设备编号\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"type\": \"textfield\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"field\": \"de_maintenancedate\",\n" +
+            "\t\t\"caption\": \"最后盘点日期\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"type\": \"textfield\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"field\": \"de_startdate\",\n" +
+            "\t\t\"caption\": \"开始日期\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"type\": \"textfield\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"field\": \"de_currentuser\",\n" +
+            "\t\t\"caption\": \"当前使用人\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"type\": \"textfield\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"field\": \"de_name\",\n" +
+            "\t\t\"caption\": \"设备名称\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"type\": \"textfield\"\n" +
+            "\t}],\n" +
+            "\t\"formData\": {\n" +
+            "\t\t\"de_code\": \"DE203923\",\n" +
+            "\t\t\"de_name\": \"打印机XI4\",\n" +
+            "\t\t\"de_maintenancedate\": \"2017-12-12 00:00:00\",\n" +
+            "\t\t\"de_startdate\": \"2017-12-12 00:00:00\",\n" +
+            "\t\t\"de_currentuser\": \"小明\"\n" +
+            "\t},\n" +
+            "\t\"grid1Item\": [{\n" +
+            "\t\t\"dataIndex\": \"da_detno\",\n" +
+            "\t\t\"caption\": \"序号\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"DE120334\",\n" +
+            "\t\t\"caption\": \"设备编号\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"da_attname\",\n" +
+            "\t\t\"caption\": \"什么鬼名称\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"da_attvalue\",\n" +
+            "\t\t\"caption\": \"什么鬼的值\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t}],\n" +
+            "\t\"grid1Data\": [{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t}],\n" +
+            "\t\"grid2Item\": [{\n" +
+            "\t\t\"dataIndex\": \"da_detno\",\n" +
+            "\t\t\"caption\": \"序号\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"DE120334\",\n" +
+            "\t\t\"caption\": \"设备编号\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"da_attname\",\n" +
+            "\t\t\"caption\": \"什么鬼名称\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t},\n" +
+            "\t{\n" +
+            "\t\t\"dataIndex\": \"da_attvalue\",\n" +
+            "\t\t\"caption\": \"什么鬼的值\",\n" +
+            "\t\t\"width\": 80,\n" +
+            "\t\t\"type\": \"numberfield\",\n" +
+            "\t\t\"format\": null,\n" +
+            "\t\t\"render\": \"\"\n" +
+            "\t}],\n" +
+            "\t\"grid2Data\": [{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t},{\n" +
+            "\t\t\"da_devcode\": \"DE120334\",\n" +
+            "\t\t\"da_detno\": 1,\n" +
+            "\t\t\"da_attname\": \"分辨率\",\n" +
+            "\t\t\"da_attvalue\": \"600大批dpi\"\n" +
+            "\t}]\n" +
+            "}";
+}

+ 59 - 26
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/CommonDocDetailsActivity.java

@@ -55,6 +55,7 @@ import com.uas.appworks.OA.erp.model.CommonApprovalFlowBean;
 import com.uas.appworks.OA.erp.model.CommonDocAMBean;
 import com.uas.appworks.OA.erp.utils.approvautils.ApprovaNodeUtil;
 import com.uas.appworks.OA.erp.utils.approvautils.NodeAdapter;
+import com.uas.appworks.activity.DeviceQueryActivity;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -133,8 +134,13 @@ public class CommonDocDetailsActivity extends BaseActivity {
         commondoc_sv.smoothScrollTo(0, 0);
         super.onResume();
     }
-
+    private boolean device;
     public void initView() {
+        Intent intent = getIntent();
+        if (intent!=null){
+            device=intent.getBooleanExtra("device",false);
+        }
+
         platform = ApiUtils.getApiModel() instanceof ApiPlatform;
         setContentView(R.layout.activity_common_docui);
         initIDS();
@@ -269,7 +275,7 @@ public class CommonDocDetailsActivity extends BaseActivity {
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
-        if (!"FeePlease!FYBX".equals(mCaller)){
+        if (!"FeePlease!FYBX".equals(mCaller)&&!device){
             getMenuInflater().inflate(R.menu.menu_add_icon, menu);
         }
         return super.onCreateOptionsMenu(menu);
@@ -283,13 +289,17 @@ public class CommonDocDetailsActivity extends BaseActivity {
             finish();
         }
         if (item.getItemId() == android.R.id.home) {
-            if (ActivityUtils.isExsitMianActivity(mContext, FormListSelectActivity.class)) {
-                LogUtil.d("正常返回...");
-                onBackPressed();
+            if (device) {
+                endDevice();
             } else {
-                LogUtil.d("非正常返回...");
-                startActivity(new Intent(mContext, FormListSelectActivity.class).putExtra("caller", mCaller));
-                finish();
+                if (ActivityUtils.isExsitMianActivity(mContext, FormListSelectActivity.class)) {
+                    LogUtil.d("正常返回...");
+                    onBackPressed();
+                } else {
+                    LogUtil.d("非正常返回...");
+                    startActivity(new Intent(mContext, FormListSelectActivity.class).putExtra("caller", mCaller));
+                    finish();
+                }
             }
         }
         return true;
@@ -556,6 +566,7 @@ public class CommonDocDetailsActivity extends BaseActivity {
      * 申请单据的审批,提交,录入状态
      */
     private void SetComDocStatus(String real_status) {
+
         if (!TextUtils.isEmpty(real_status)) {
             if (real_status.equals("已审核")) {
                 status_tv.setTextColor(getApplicationContext().getResources().getColor(R.color.approval));
@@ -579,6 +590,9 @@ public class CommonDocDetailsActivity extends BaseActivity {
                 resanddel_ll.setVisibility(View.VISIBLE);
             }
         }
+        if (device){
+            resanddel_ll.setVisibility(View.GONE);
+        }
     }
 
     /**
@@ -1003,26 +1017,30 @@ public class CommonDocDetailsActivity extends BaseActivity {
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         if ((keyCode == KeyEvent.KEYCODE_BACK)) {
-            if (ActivityUtils.isExsitMianActivity(mContext, FormListSelectActivity.class)) {
-                LogUtil.d("正常返回...");
-                if ("1".equals(update)){
-                    startActivity(new Intent(mContext, FormListSelectActivity.class).putExtra("caller", mCaller)
-                            .putExtra("update", update));
+            if (device){
+                endDevice();
+            }else{
+                if (ActivityUtils.isExsitMianActivity(mContext, FormListSelectActivity.class)) {
+                    LogUtil.d("正常返回...");
+                    if ("1".equals(update)){
+                        startActivity(new Intent(mContext, FormListSelectActivity.class).putExtra("caller", mCaller)
+                                .putExtra("update", update));
+                        finish();
+                    }else{
+                        onBackPressed();
+                    }
+                } else {
+                    LogUtil.d("非正常返回..."+update);
+                    if ("1".equals(update)){
+                        FormListSelectActivity.reload=true;
+                    }else{
+                        FormListSelectActivity.reload=false;
+                    }
+                    startActivity(
+                            new Intent(mContext, FormListSelectActivity.class)
+                                    .putExtra("caller", mCaller));
                     finish();
-                }else{
-                    onBackPressed();
                 }
-            } else {
-                LogUtil.d("非正常返回..."+update);
-                if ("1".equals(update)){
-                    FormListSelectActivity.reload=true;
-                }else{
-                    FormListSelectActivity.reload=false;
-                }
-                startActivity(
-                        new Intent(mContext, FormListSelectActivity.class)
-                                .putExtra("caller", mCaller));
-                finish();
             }
             return false;
         } else {
@@ -1030,6 +1048,21 @@ public class CommonDocDetailsActivity extends BaseActivity {
         }
 
     }
+    private void endDevice(){
+        String dc_class = null;
+        if (mCaller.equals("DeviceChange!Use")) {
+            dc_class = "使用转移";
+        } else if (mCaller.equals("DeviceChange!Scrap")) {
+            dc_class = "报废";
+        } else if (mCaller.equals("DeviceChange!Maintain")) {
+            dc_class = "保养维护";
+        } else if (mCaller.equals("DeviceChange!Inspect")) {
+            dc_class = "故障送检";
+        }
+        startActivity(new Intent(ct, DeviceQueryActivity.class).putExtra(Constants.FLAG.DEVICE_CALLER, mCaller)
+                .putExtra(Constants.FLAG.DEVICE_CLASS, dc_class));
+        finish();
+    }
 
     /**
      * 图片适配器

+ 0 - 1
app_modular/appworks/src/main/java/com/uas/appworks/activity/CityIndustryServiceMainActivity.java

@@ -134,7 +134,6 @@ public class CityIndustryServiceMainActivity extends BaseMVPActivity<WorkPlatPre
     @Override
     protected void onStop() {
         super.onStop();
-        mBanner.stopAutoPlay();
     }
 
     @Override

+ 6 - 2
app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceQueryActivity.java

@@ -141,9 +141,13 @@ public class DeviceQueryActivity extends BaseMVPActivity<WorkPlatPresenter> impl
         if (TextUtils.isEmpty(mCaller)) {
             mCaller = "Device";
         }
-
+        //TODO gongpengming
         if (!TextUtils.isEmpty(mClass)) {
-            mBaseCondition = "(dc_class = \'" + mClass + "\')";
+            String dc_class="dc_class";
+            if (mCaller!=null&&mCaller.equals("DeviceChange!Maintain")){
+                dc_class="db_class";
+            }
+            mBaseCondition = "("+dc_class+" = \'" + mClass + "\')";
             mCondition = mBaseCondition;
         }
     }

BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/ic_menu_retract.png


+ 11 - 0
app_modular/appworks/src/main/res/drawable/frame_square_hint_bg.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <solid android:color="@color/white" />
+            <corners android:radius="0dp" />
+            <stroke android:width="@dimen/line" android:color="@color/text_hine" />
+            <padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
+        </shape>
+    </item>
+</selector>

+ 7 - 0
app_modular/appworks/src/main/res/drawable/text_btn_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_selected="true" android:color="@color/text_main"/>
+    <item android:state_checked="true" android:color="@color/text_main"/>
+    <item android:color="@color/white"/>
+</selector>
+

+ 3 - 2
app_modular/appworks/src/main/res/layout/action_device_cycle_count.xml

@@ -7,6 +7,7 @@
 
     <ImageView
         android:id="@+id/backImg"
+        android:padding="4dp"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:src="@drawable/back" />
@@ -17,10 +18,10 @@
         android:layout_height="match_parent"
         android:layout_alignParentRight="true"
         android:gravity="center"
-        android:src="@drawable/ic_work_module_add"
+        android:src="@drawable/more"
         android:textColor="@color/white" />
 
-    <com.core.widget.VoiceSearchView
+    <com.modular.apputils.widget.MenuVoiceSearchView
         android:id="@+id/mVoiceSearchView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"

+ 17 - 0
app_modular/appworks/src/main/res/layout/activity_device_cycle.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/mRefreshListView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="@color/gray_light"
+        android:dividerHeight="1dp"
+        android:hardwareAccelerated="true"
+        android:layerType="software"
+        android:scrollbars="none"
+        android:scrollingCache="false"
+        android:visibility="visible" />
+</RelativeLayout>

+ 12 - 0
app_modular/appworks/src/main/res/layout/activity_device_cycle_details.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+    <ListView
+        android:id="@+id/mListView"
+        android:layout_width="match_parent"
+        android:dividerHeight="@dimen/line"
+        android:divider="@color/item_line"
+        android:layout_height="wrap_content" />
+</LinearLayout>

+ 212 - 0
app_modular/appworks/src/main/res/layout/activity_device_cycle_info.xml

@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/padding">
+
+            <TextView
+                android:id="@+id/codeTag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="单号"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/codeTv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_toRightOf="@id/codeTag"
+                android:gravity="right|center_vertical"
+                android:paddingLeft="@dimen/padding"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/padding">
+
+            <TextView
+                android:id="@+id/centerTag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="所属部门"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/centerTv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_toRightOf="@id/centerTag"
+                android:gravity="right|center_vertical"
+                android:paddingLeft="@dimen/padding"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/padding">
+
+            <TextView
+                android:id="@+id/lineTag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="所属线别"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/lineTv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_toRightOf="@id/lineTag"
+                android:gravity="right|center_vertical"
+                android:paddingLeft="@dimen/padding"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/padding">
+
+            <TextView
+                android:id="@+id/kindTag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="设备种类"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/kindTv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_toRightOf="@id/kindTag"
+                android:gravity="right|center_vertical"
+                android:paddingLeft="@dimen/padding"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/padding">
+
+            <TextView
+                android:id="@+id/actionqtyTag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="已盘点"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/actionqtyTv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_toRightOf="@id/actionqtyTag"
+                android:gravity="right|center_vertical"
+                android:paddingLeft="@dimen/padding"
+                android:textColor="@color/titleBlue"
+                android:textSize="@dimen/text_main" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/padding">
+
+            <TextView
+                android:id="@+id/unactionqtyTag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="未盘点"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/unactionqtyTv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_toRightOf="@id/unactionqtyTag"
+                android:gravity="right|center_vertical"
+                android:paddingLeft="@dimen/padding"
+                android:textColor="@color/titleBlue"
+                android:textSize="@dimen/text_main" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:background="@color/item_line" />
+
+        <com.core.widget.MyListView
+            android:id="@+id/mListView"
+            android:visibility="gone"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <Button
+            android:id="@+id/cycleBtn"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="50dp"
+            android:layout_marginLeft="40dp"
+            android:layout_marginRight="40dp"
+            android:layout_marginTop="100dp"
+            android:background="@drawable/bg_bule_btn"
+            android:padding="10dp"
+            android:text="@string/cycle"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_main" />
+    </LinearLayout>
+</ScrollView>

+ 6 - 0
app_modular/appworks/src/main/res/layout/device_scan_head.xml

@@ -7,6 +7,7 @@
 
     <ImageView
         android:id="@+id/backImg"
+        android:padding="4dp"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:src="@drawable/back" />
@@ -23,6 +24,8 @@
 
     <RadioGroup
         android:id="@+id/selectRg"
+        android:paddingTop="4dp"
+        android:paddingBottom="4dp"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_centerInParent="true"
@@ -39,6 +42,7 @@
             android:layout_weight="1"
             android:background="@drawable/shape_process_item"
             android:button="@null"
+            android:textColor="@drawable/text_btn_bg"
             android:checked="true"
             android:gravity="center"
             android:text="基础信息" />
@@ -49,6 +53,7 @@
             android:layout_height="match_parent"
             android:layout_margin="1dp"
             android:layout_weight="1"
+            android:textColor="@drawable/text_btn_bg"
             android:background="@drawable/shape_process_item"
             android:button="@null"
             android:gravity="center"
@@ -60,6 +65,7 @@
             android:layout_height="match_parent"
             android:layout_margin="1dp"
             android:layout_weight="1"
+            android:textColor="@drawable/text_btn_bg"
             android:background="@drawable/shape_process_item"
             android:button="@null"
             android:gravity="center"

+ 31 - 0
app_modular/appworks/src/main/res/layout/item_cycle_count.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    android:id="@+id/item_data_inquiry_flex_rl"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:descendantFocusability="blocksDescendants">
+
+
+    <ImageView
+        android:id="@+id/item_data_inquiry_flex_iv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
+        android:paddingBottom="10dp"
+        android:paddingRight="10dp"
+        android:paddingTop="10dp"
+        android:src="@drawable/down"/>
+
+
+    <com.core.widget.MyListView
+        android:id="@+id/item_data_inquiry_flex_lv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/item_data_inquiry_flex_iv"
+        android:clickable="false"
+        android:divider="@null"
+        android:focusable="false"
+        android:scrollbars="none"/>
+</RelativeLayout>

+ 62 - 0
app_modular/appworks/src/main/res/layout/item_device_data.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:padding="3dp">
+
+    <LinearLayout
+        android:id="@+id/oneLL"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/caption1Tv"
+            android:layout_width="60dp"
+            android:layout_height="wrap_content"
+            android:paddingLeft="@dimen/padding"
+            android:text="标题"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <TextView
+            android:id="@+id/values1Tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_toRightOf="@id/caption1Tv"
+            android:paddingLeft="@dimen/padding"
+            android:text="标题"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_hine" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/twoLL"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1">
+
+        <TextView
+            android:id="@+id/caption2Tv"
+            android:layout_width="60dp"
+            android:layout_height="wrap_content"
+            android:paddingLeft="@dimen/padding"
+            android:text="标题"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <TextView
+            android:id="@+id/values2Tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_toRightOf="@id/caption2Tv"
+            android:paddingLeft="@dimen/padding"
+            android:text="标题"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_hine" />
+    </LinearLayout>
+
+
+</LinearLayout>

+ 48 - 0
app_modular/appworks/src/main/res/layout/item_device_info.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white">
+
+    <RelativeLayout
+        android:id="@+id/titleRl"
+        android:background="@color/base_bg"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <TextView
+            android:id="@+id/titleTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="left|center_vertical"
+            android:padding="10dp"
+            android:text="标题" />
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_below="@id/titleTv"
+            android:background="@color/item_line" />
+    </RelativeLayout>
+
+    <TextView
+        android:id="@+id/captionTv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/titleRl"
+        android:gravity="left|center_vertical"
+        android:padding="10dp"
+        android:text="设备编号" />
+
+    <TextView
+        android:id="@+id/valuesTv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_alignTop="@id/captionTv"
+        android:layout_toRightOf="@id/captionTv"
+        android:gravity="right|center_vertical"
+        android:padding="10dp"
+        android:text="设备编号"
+        android:textColor="@color/text_main" />
+</RelativeLayout>

+ 27 - 0
app_modular/appworks/src/main/res/layout/item_pop_device_cyclecount.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:padding="@dimen/padding">
+
+    <TextView
+        android:id="@+id/captionTv"
+        android:layout_width="70dp"
+        android:textColor="@color/text_hine"
+        android:layout_height="wrap_content"
+        android:paddingBottom="3dp"
+        android:text="" />
+
+    <EditText
+        android:id="@+id/valuesEd"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/padding"
+        android:textColor="@color/text_main"
+        android:background="@drawable/frame_square_hint_bg"
+        android:drawableRight="@drawable/ic_menu_retract"
+        android:paddingLeft="@dimen/padding" />
+
+
+</LinearLayout>

+ 29 - 0
app_modular/appworks/src/main/res/layout/item_rl_listview.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:id="@+id/expandImg"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
+        android:clickable="true"
+        android:focusable="false"
+        android:padding="@dimen/padding"
+        android:visibility="visible" />
+
+
+
+    <com.core.widget.MyListView
+        android:id="@+id/listView"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:divider="@color/white"
+        android:dividerHeight="0dp"
+        android:focusableInTouchMode="false" />
+
+</RelativeLayout>

+ 4 - 0
app_modular/appworks/src/main/res/layout/menu_device_scan.xml

@@ -13,12 +13,14 @@
         android:background="@drawable/selector_me_menu_item_bg"
         android:gravity="center"
         android:text="设备查找"
+        android:visibility="gone"
         android:textColor="@color/text_main"
         android:textSize="@dimen/text_hine" />
 
     <View
         android:layout_width="match_parent"
         android:layout_height="@dimen/line"
+        android:visibility="gone"
         android:background="@color/item_line" />
 
     <Button
@@ -83,6 +85,7 @@
     <View
         android:layout_width="match_parent"
         android:layout_height="@dimen/line"
+        android:visibility="gone"
         android:background="@color/item_line" />
 
     <Button
@@ -93,6 +96,7 @@
         android:background="@drawable/selector_me_menu_item_bg"
         android:gravity="center"
         android:text="周期盘点"
+        android:visibility="gone"
         android:textColor="@color/text_main"
         android:textSize="@dimen/text_hine" />
 </LinearLayout>

+ 60 - 0
app_modular/appworks/src/main/res/layout/pop_device_cyclecount.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:id="@+id/bottom"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:divider="@drawable/spacer_medium"
+        android:gravity="center_horizontal"
+        android:orientation="horizontal"
+        android:padding="@dimen/padding"
+        android:weightSum="7"
+        android:showDividers="middle">
+
+        <Button
+            android:id="@+id/cancelBtn"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:paddingTop="@dimen/padding"
+            android:paddingBottom="@dimen/padding"
+            android:layout_weight="2"
+            android:background="@drawable/bg_bule_btn"
+            android:text="取消"
+            android:textColor="@color/white" />
+
+        <Button
+            android:id="@+id/sureBtn"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:background="@drawable/bg_bule_btn"
+            android:text="确认"
+            android:paddingTop="@dimen/padding"
+            android:paddingBottom="@dimen/padding"
+            android:textColor="@color/white" />
+
+        <Button
+            android:id="@+id/resetBtn"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:paddingTop="@dimen/padding"
+            android:paddingBottom="@dimen/padding"
+            android:background="@drawable/bg_bule_btn"
+            android:text="重置"
+            android:textColor="@color/white" />
+    </LinearLayout>
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/mRecyclerView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@id/bottom" />
+
+
+</RelativeLayout>

+ 153 - 0
app_modular/appworks/src/main/res/layout/pop_submit_cycle.xml

@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/titleTv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_margin="@dimen/padding"
+        android:text="扫码返回"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/line"
+        android:layout_below="@id/titleTv"
+        android:background="@color/item_line" />
+
+    <TextView
+        android:id="@+id/popCodeTag"
+        android:layout_width="80dp"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@id/titleTv"
+        android:layout_below="@id/titleTv"
+        android:layout_marginTop="@dimen/padding"
+        android:text="设备编号"
+        android:textColor="@color/hintColor"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popCodeTv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignTop="@id/popCodeTag"
+        android:layout_toRightOf="@id/popCodeTag"
+        android:maxLines="2"
+        android:ellipsize="end"
+        android:layout_marginLeft="@dimen/padding"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popNameTag"
+        android:layout_width="80dp"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@id/titleTv"
+        android:layout_below="@id/popCodeTv"
+        android:layout_marginTop="@dimen/padding"
+        android:text="设备名称"
+        android:textColor="@color/hintColor"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popNameTv"
+        android:layout_width="wrap_content"
+        android:layout_marginLeft="@dimen/padding"
+        android:layout_height="wrap_content"
+        android:maxLines="2"
+        android:ellipsize="end"
+        android:layout_alignTop="@id/popNameTag"
+        android:layout_toRightOf="@id/popNameTag"
+        android:text="设备名称"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popGuiTag"
+        android:layout_width="80dp"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@id/titleTv"
+        android:layout_below="@id/popNameTv"
+        android:layout_marginTop="@dimen/padding"
+        android:text="设备规格"
+        android:textColor="@color/hintColor"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popGuiTv"
+        android:layout_width="wrap_content"
+        android:layout_marginLeft="@dimen/padding"
+        android:layout_height="wrap_content"
+        android:layout_alignTop="@id/popGuiTag"
+        android:layout_toRightOf="@id/popGuiTag"
+        android:text="设备规格:"
+        android:maxLines="2"
+        android:ellipsize="end"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popUnActNumTag"
+        android:layout_width="80dp"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@id/titleTv"
+        android:layout_below="@id/popGuiTv"
+        android:layout_marginTop="@dimen/padding"
+        android:text="未盘点数量"
+        android:textColor="@color/hintColor"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/popUnActNumTv"
+        android:layout_marginLeft="@dimen/padding"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignTop="@id/popUnActNumTag"
+        android:layout_toRightOf="@id/popUnActNumTag"
+        android:text="设备规格"
+        android:maxLines="2"
+        android:ellipsize="end"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+
+    <LinearLayout
+        android:layout_below="@id/popUnActNumTv"
+        android:layout_width="match_parent"
+        android:paddingLeft="50dp"
+        android:paddingRight="50dp"
+        android:layout_height="40dp"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="20dp"
+        android:orientation="horizontal">
+
+        <Button
+            android:id="@+id/backBtn"
+            android:layout_width="0dp"
+            android:paddingLeft="12dp"
+            android:paddingRight="12dp"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="10dp"
+            android:layout_weight="1"
+            android:background="@drawable/bg_bule_btn"
+            android:padding="@dimen/padding"
+            android:text="返回"
+            android:textColor="@color/white" />
+
+        <Button
+            android:id="@+id/nextBtn"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:layout_weight="1"
+            android:background="@drawable/bg_bule_btn"
+            android:padding="@dimen/padding"
+            android:text="继续"
+            android:paddingLeft="12dp"
+            android:paddingRight="12dp"
+            android:textColor="@color/white" />
+    </LinearLayout>
+</RelativeLayout>

+ 3 - 0
app_modular/appworks/src/main/res/values/strings.xml

@@ -82,6 +82,9 @@
     <string name="text_maintenance">养护管理</string>
     <string name="text_fault_inspection">故障送检</string>
     <string name="text_cycle_count">周期盘点</string>
+    <string name="text_cycle_count_add">添加盘点</string>
+    <string name="more_info"><u>详细信息</u></string>
+    <string name="cycle">盘点</string>
 
 
 </resources>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor