Prechádzať zdrojové kódy

审批详情变更处理人去掉审批意见必填的限制

RaoMeng 6 rokov pred
rodič
commit
c48beaa222
89 zmenil súbory, kde vykonal 3937 pridanie a 0 odobranie
  1. BIN
      WeiChat/src/main/jniLibs/arm64-v8a/libbdpush_V2_9.so
  2. BIN
      WeiChat/src/main/jniLibs/armeabi-v7a/libbdpush_V2_9.so
  3. BIN
      WeiChat/src/main/jniLibs/armeabi/libbdpush_V2_9.so
  4. BIN
      WeiChat/src/main/jniLibs/autoupdatesdk-release.aar
  5. BIN
      WeiChat/src/main/jniLibs/mips/libbdpush_V2_9.so
  6. BIN
      WeiChat/src/main/jniLibs/mips64/libbdpush_V2_9.so
  7. BIN
      WeiChat/src/main/jniLibs/pushservice-6.7.3.20.jar
  8. BIN
      WeiChat/src/main/jniLibs/x86/libbdpush_V2_9.so
  9. BIN
      WeiChat/src/main/jniLibs/x86_64/libbdpush_V2_9.so
  10. BIN
      app_core/common/libs/pushservice-6.7.3.20.jar
  11. BIN
      app_core/common/src/main/res/drawable-hdpi/icon_bi.png
  12. 217 0
      app_core/common/src/main/res/layout/activity_device_query_list.xml
  13. 7 0
      app_core/network/src/main/java/com/me/network/app/base/CallBack.java
  14. 15 0
      app_core/network/src/main/java/com/me/network/app/base/HttpCallbackWithBundle.java
  15. 21 0
      app_modular/apputils/src/main/java/com/modular/apputils/adapter/ConditionQueryAdapter.java
  16. 78 0
      app_modular/apputils/src/main/java/com/modular/apputils/widget/compactcalender/BillCancelPopup.java
  17. 40 0
      app_modular/apputils/src/main/res/layout/item_bill_images.xml
  18. 69 0
      app_modular/apputils/src/main/res/layout/item_condition_input_select.xml
  19. 57 0
      app_modular/apputils/src/main/res/layout/pop_bill_input_cancel.xml
  20. 13 0
      app_modular/apputils/src/main/res/menu/menu_device_bill_detail.xml
  21. 19 0
      app_modular/apputils/src/main/res/menu/menu_maintain_bill_input.xml
  22. 109 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBatchTransferAddActivity.java
  23. 248 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBatchTransferDetailActivity.java
  24. 91 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBillDetailActivity.java
  25. 299 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBillInputActivity.java
  26. 126 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDetailActivity.java
  27. 177 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceInventoryQueryActivity.java
  28. 38 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/adapter/DeviceBatchTransferDetailAdapter.java
  29. 11 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/imp/IDeviceInventoryQueryView.java
  30. 7 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/imp/IDeviceRepairView.java
  31. 87 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceBatchTransferDetailPresenter.java
  32. 87 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceBillDetailPresenter.java
  33. 423 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceBillInputPresenter.java
  34. 135 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceDetailPresenter.java
  35. 173 0
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceInventoryQueryPresenter.java
  36. 103 0
      app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceBatchTransferActivity.java
  37. 30 0
      app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceListActivity.java
  38. 161 0
      app_modular/appworks/src/main/java/com/uas/appworks/activity/RealTimeFormActivity.java
  39. 42 0
      app_modular/appworks/src/main/java/com/uas/appworks/adapter/DeviceBillInputAdapter.java
  40. 109 0
      app_modular/appworks/src/main/java/com/uas/appworks/adapter/DeviceDetailAdapter.java
  41. 86 0
      app_modular/appworks/src/main/java/com/uas/appworks/adapter/RealTimeFormMenuAdapter.java
  42. 474 0
      app_modular/appworks/src/main/java/com/uas/appworks/datainquiry/activity/ReportStatisticsBiActivity.java
  43. 37 0
      app_modular/appworks/src/main/java/com/uas/appworks/model/bean/RealTimeFormMenuBean.java
  44. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_action_operate.png
  45. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_batch_transfer.png
  46. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_cycle_count.png
  47. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_device_query.png
  48. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_device_repair.png
  49. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_device_scan.png
  50. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_fault_check.png
  51. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_inventory_query.png
  52. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_maintain_manage.png
  53. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_require_match.png
  54. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_scrap_apply.png
  55. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_statistical_analysis.png
  56. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/ic_use_apply.png
  57. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_action_operate.png
  58. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_batch_transfer.png
  59. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_cycle_count.png
  60. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_query.png
  61. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_repair.png
  62. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_scan.png
  63. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_fault_check.png
  64. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_inventory_query.png
  65. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_maintain_manage.png
  66. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_require_match.png
  67. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_scrap_apply.png
  68. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_statistical_analysis.png
  69. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/ic_use_apply.png
  70. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_action_operate.png
  71. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_batch_transfer.png
  72. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_cycle_count.png
  73. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_device_query.png
  74. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_device_repair.png
  75. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_device_scan.png
  76. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_fault_check.png
  77. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_inventory_query.png
  78. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_maintain_manage.png
  79. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_require_match.png
  80. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_scrap_apply.png
  81. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_statistical_analysis.png
  82. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/ic_use_apply.png
  83. 75 0
      app_modular/appworks/src/main/res/layout/activity_device_batch_transfer_add.xml
  84. 69 0
      app_modular/appworks/src/main/res/layout/activity_device_batch_transfer_detail.xml
  85. 79 0
      app_modular/appworks/src/main/res/layout/activity_device_inventory_query.xml
  86. 40 0
      app_modular/appworks/src/main/res/layout/activity_real_time_form.xml
  87. 34 0
      app_modular/appworks/src/main/res/layout/item_grid_real_time_form_menu.xml
  88. 42 0
      app_modular/appworks/src/main/res/layout/item_list_device_query.xml
  89. 9 0
      app_modular/appworks/src/main/res/menu/menu_operate.xml

BIN
WeiChat/src/main/jniLibs/arm64-v8a/libbdpush_V2_9.so


BIN
WeiChat/src/main/jniLibs/armeabi-v7a/libbdpush_V2_9.so


BIN
WeiChat/src/main/jniLibs/armeabi/libbdpush_V2_9.so


BIN
WeiChat/src/main/jniLibs/autoupdatesdk-release.aar


BIN
WeiChat/src/main/jniLibs/mips/libbdpush_V2_9.so


BIN
WeiChat/src/main/jniLibs/mips64/libbdpush_V2_9.so


BIN
WeiChat/src/main/jniLibs/pushservice-6.7.3.20.jar


BIN
WeiChat/src/main/jniLibs/x86/libbdpush_V2_9.so


BIN
WeiChat/src/main/jniLibs/x86_64/libbdpush_V2_9.so


BIN
app_core/common/libs/pushservice-6.7.3.20.jar


BIN
app_core/common/src/main/res/drawable-hdpi/icon_bi.png


+ 217 - 0
app_core/common/src/main/res/layout/activity_device_query_list.xml

@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#f6f6f6"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+        <com.handmark.pulltorefresh.library.PullToRefreshListView
+            android:id="@+id/data_inquiry_list_ptlv"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:hardwareAccelerated="true"
+            android:layerType="software"
+            android:scrollbars="none"
+            android:scrollingCache="false"
+            android:visibility="visible" />
+
+        <ImageView
+            android:id="@+id/data_inquiry_list_total_spread_iv"
+            android:layout_width="match_parent"
+            android:layout_height="26dp"
+            android:layout_alignParentBottom="true"
+            android:background="#20000000"
+            android:scaleType="centerInside"
+            android:src="@drawable/ic_expansion_spread"
+            android:visibility="invisible" />
+    </RelativeLayout>
+
+    <LinearLayout
+        android:id="@+id/data_inquiry_list_total_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:background="@color/white"
+        android:orientation="vertical"
+        android:visibility="gone">
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0.5dp"
+            android:background="@color/gray_light" />
+
+        <RelativeLayout
+            android:id="@+id/data_inquiry_list_total_hide_rl"
+            android:layout_width="match_parent"
+            android:layout_height="26dp"
+            android:background="@color/background">
+
+            <ImageView
+                android:id="@+id/data_inquiry_list_total_hide_iv"
+                android:layout_width="wrap_content"
+                android:layout_height="26dp"
+                android:layout_centerInParent="true"
+                android:scaleType="centerInside"
+                android:src="@drawable/ic_expansion_retract" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginRight="10dp"
+                android:layout_toLeftOf="@id/data_inquiry_list_total_hide_iv"
+                android:gravity="center_vertical"
+                android:text="合计"
+                android:textSize="14sp" />
+
+        </RelativeLayout>
+
+        <ListView
+            android:id="@+id/data_inquiry_list_total_lv"
+            android:layout_width="match_parent"
+            android:layout_height="120dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="10dp"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </LinearLayout>
+
+    <View
+        android:id="@+id/data_inquiry_list_gray_bg"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="#20000000"
+        android:clickable="true"
+        android:visibility="gone" />
+
+    <LinearLayout
+        android:id="@+id/data_inquiry_list_fuzzy_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:visibility="gone">
+
+        <LinearLayout
+            android:id="@+id/data_inquiry_list_history_ll"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/white"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="#eeeeee"
+                android:clickable="true"
+                android:orientation="horizontal"
+                android:paddingLeft="16dp"
+                android:paddingTop="8dp"
+                android:paddingRight="16dp"
+                android:paddingBottom="8dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="@string/str_search_history"
+                    android:textSize="16sp" />
+
+                <TextView
+                    android:id="@+id/data_inquiry_history_clear_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/str_clear"
+                    android:textColor="@color/LightBlue"
+                    android:textSize="16sp" />
+            </LinearLayout>
+
+            <com.core.widget.MyListView
+                android:id="@+id/data_inquiry_list_history_data_lv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/me_menu_item_normal"
+                android:overScrollMode="never"
+                android:scrollbars="none" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/data_inquiry_list_exact_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:visibility="gone">
+
+        <LinearLayout
+            android:id="@+id/data_inquiry_list_option_ll"
+            android:layout_width="match_parent"
+            android:layout_height="260dp"
+            android:background="@color/white"
+            android:orientation="vertical">
+
+            <ListView
+                android:id="@+id/data_inquiry_list_option_lv"
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1"
+                android:overScrollMode="never"
+                android:scrollbars="none" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/background"
+                android:clickable="true"
+                android:orientation="horizontal"
+                android:padding="10dp">
+
+                <TextView
+                    android:id="@+id/data_inquiry_list_option_cancel_tv"
+                    android:layout_width="0dp"
+                    android:layout_height="35dp"
+                    android:layout_marginLeft="30dp"
+                    android:layout_weight="1"
+                    android:background="@drawable/selector_cancel_bg"
+                    android:gravity="center"
+                    android:text="@string/cancel"
+                    android:textColor="@color/selector_cancel_text_color"
+                    android:textSize="14sp" />
+
+                <TextView
+                    android:id="@+id/data_inquiry_list_option_reset_tv"
+                    android:layout_width="0dp"
+                    android:layout_height="35dp"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:layout_weight="1"
+                    android:background="@drawable/selector_confirm_bg"
+                    android:gravity="center"
+                    android:text="@string/reset"
+                    android:textColor="@color/white"
+                    android:textSize="14sp" />
+
+                <TextView
+                    android:id="@+id/data_inquiry_list_option_confirm_tv"
+                    android:layout_width="0dp"
+                    android:layout_height="35dp"
+                    android:layout_marginRight="30dp"
+                    android:layout_weight="1"
+                    android:background="@drawable/selector_confirm_bg"
+                    android:gravity="center"
+                    android:text="@string/app_dialog_ok"
+                    android:textColor="@color/white"
+                    android:textSize="14sp" />
+            </LinearLayout>
+        </LinearLayout>
+    </LinearLayout>
+
+</RelativeLayout>

+ 7 - 0
app_core/network/src/main/java/com/me/network/app/base/CallBack.java

@@ -0,0 +1,7 @@
+package com.me.network.app.base;
+
+/**
+ * 所有回调接口的父类
+ */
+public interface CallBack {
+}

+ 15 - 0
app_core/network/src/main/java/com/me/network/app/base/HttpCallbackWithBundle.java

@@ -0,0 +1,15 @@
+package com.me.network.app.base;
+
+import android.os.Bundle;
+
+/**
+ * 可以附带信息的回调
+ *
+ * @param <T>
+ */
+public interface HttpCallbackWithBundle<T> extends CallBack {
+
+    void onSuccess(int flag, T t, Bundle bundle) throws Exception;
+
+    void onFail(int flag, String failStr) throws Exception;
+}

+ 21 - 0
app_modular/apputils/src/main/java/com/modular/apputils/adapter/ConditionQueryAdapter.java

@@ -0,0 +1,21 @@
+package com.modular.apputils.adapter;
+
+import android.content.Context;
+
+import com.modular.apputils.R;
+import com.modular.apputils.adapter.BillAdapter;
+import com.modular.apputils.model.BillGroupModel;
+
+import java.util.List;
+
+public class ConditionQueryAdapter extends BillAdapter {
+
+    public ConditionQueryAdapter(Context ct, List<BillGroupModel> mBillGroupModels, OnAdapterListener mOnAdapterListener) {
+        super(ct, mBillGroupModels, mOnAdapterListener);
+    }
+
+    @Override
+    protected int getInputLayout() {
+        return R.layout.item_condition_input_select;
+    }
+}

+ 78 - 0
app_modular/apputils/src/main/java/com/modular/apputils/widget/compactcalender/BillCancelPopup.java

@@ -0,0 +1,78 @@
+package com.modular.apputils.widget.compactcalender;
+
+import android.content.Context;
+import android.view.View;
+import android.view.animation.Animation;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import com.modular.apputils.R;
+
+import razerdp.basepopup.BasePopupWindow;
+import razerdp.util.InputMethodUtils;
+
+/**
+ * Created by RaoMeng on 2019/11/15
+ * Desc: 取消拜访弹出框
+ */
+public class BillCancelPopup extends BasePopupWindow implements View.OnClickListener {
+    private Context mContext;
+    private EditText mRemarkEditText;
+    private TextView mCancelTextView, mConfirmTextView;
+    private OnCancelListener mOnCancelListener;
+
+    public BillCancelPopup(Context context, OnCancelListener onCancelListener) {
+        super(context);
+        mContext = context;
+        this.mOnCancelListener = onCancelListener;
+
+        setAllowDismissWhenTouchOutside(false);
+        initViews(context);
+
+        mCancelTextView.setOnClickListener(this);
+        mConfirmTextView.setOnClickListener(this);
+    }
+
+    private void initViews(Context context) {
+        mRemarkEditText = findViewById(R.id.pop_bill_cancel_remark_et);
+        mCancelTextView = findViewById(R.id.pop_bill_cancel_cancel_tv);
+        mConfirmTextView = findViewById(R.id.pop_bill_cancel_confirm_tv);
+    }
+
+    @Override
+    public View onCreateContentView() {
+        return createPopupById(R.layout.pop_bill_input_cancel);
+    }
+
+    @Override
+    protected Animation onCreateShowAnimation() {
+        return getDefaultScaleAnimation(true);
+    }
+
+    @Override
+    protected Animation onCreateDismissAnimation() {
+        return getDefaultScaleAnimation(false);
+    }
+
+    @Override
+    public void onClick(View view) {
+        int i = view.getId();
+        if (i == R.id.pop_bill_cancel_cancel_tv) {
+            InputMethodUtils.close(mRemarkEditText);
+            dismiss();
+            if (mRemarkEditText != null) {
+                mRemarkEditText.setText("");
+            }
+        } else if (i == R.id.pop_bill_cancel_confirm_tv) {
+            InputMethodUtils.close(mRemarkEditText);
+            if (mOnCancelListener != null) {
+                mOnCancelListener.onCancelConfirm("");
+            }
+        } else {
+        }
+    }
+
+    public interface OnCancelListener {
+        void onCancelConfirm(String remark);
+    }
+}

+ 40 - 0
app_modular/apputils/src/main/res/layout/item_bill_images.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white"
+    android:minHeight="50dp"
+    android:padding="@dimen/padding">
+
+
+    <TextView
+        android:id="@+id/captionTv"
+        android:layout_width="60dp"
+        android:layout_height="wrap_content"
+        android:text="商机阶段"
+        android:textColor="@color/text_hine"
+        android:textSize="@dimen/text_hine"
+        app:layout_constraintLeft_toLeftOf="parent" />
+
+
+    <TextView
+        android:id="@+id/muchInputTv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="3dp"
+        android:gravity="top"
+        android:text="*"
+        android:textColor="@color/red"
+        android:textSize="15sp"
+        android:visibility="visible"
+        app:layout_constraintLeft_toRightOf="@id/captionTv"
+        app:layout_constraintTop_toTopOf="@id/captionTv" />
+
+    <com.core.widget.view.MyGridView
+        android:id="@+id/ffGv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:numColumns="3"
+        app:layout_constraintTop_toBottomOf="@id/captionTv" />
+</android.support.constraint.ConstraintLayout>

+ 69 - 0
app_modular/apputils/src/main/res/layout/item_condition_input_select.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white"
+    android:minHeight="45dp"
+    android:padding="6dp">
+
+
+    <TextView
+        android:id="@+id/captionTv"
+        android:layout_width="60dp"
+        android:layout_height="wrap_content"
+        android:text="商机阶段"
+        android:textColor="@color/text_hine"
+        android:textSize="@dimen/text_hine"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+
+    <TextView
+        android:id="@+id/muchInputTv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="3dp"
+        android:layout_marginTop="8dp"
+        android:text="*"
+        android:textColor="@color/red"
+        android:visibility="visible"
+        app:layout_constraintLeft_toRightOf="@id/captionTv" />
+
+    <FrameLayout
+        android:id="@+id/selectfl"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <ImageView
+            android:id="@+id/selectIv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:src="@drawable/oa_next"
+            android:visibility="gone" />
+    </FrameLayout>
+
+
+    <EditText
+        android:id="@+id/valuesEd"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/padding"
+        android:background="@drawable/shape_corner_white_bg"
+        android:gravity="right|center"
+        android:hint="请输入"
+        android:padding="6dp"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_hine"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintLeft_toRightOf="@id/muchInputTv"
+        app:layout_constraintRight_toLeftOf="@id/selectfl"
+        app:layout_constraintTop_toTopOf="parent" />
+</android.support.constraint.ConstraintLayout>

+ 57 - 0
app_modular/apputils/src/main/res/layout/pop_bill_input_cancel.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center"
+    android:layout_margin="26dp"
+    android:background="@drawable/shape_b2b_gray_light_line_bg"
+    android:orientation="vertical">
+
+    <EditText
+        android:id="@+id/pop_bill_cancel_remark_et"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_margin="10dp"
+        android:background="@drawable/shape_from_edit"
+        android:gravity="left|top"
+        android:hint="请输入取消拜访计划的原因..."
+        android:maxHeight="300dp"
+        android:minHeight="120dp"
+        android:padding="6dp"
+        android:textSize="14sp"
+        tools:text="XXXXXXXXXXXXXXXXXXXXXX
+        XXXXXXXXXXXXXXXXXXXXXXXXXXXX
+        XXXXXXXXXXXXXXXXXX" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingBottom="10dp">
+
+        <TextView
+            android:id="@+id/pop_bill_cancel_cancel_tv"
+            android:layout_width="0dp"
+            android:layout_height="32dp"
+            android:layout_marginLeft="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_cancel_bg"
+            android:gravity="center"
+            android:text="@string/cancel"
+            android:textColor="@color/selector_cancel_text_color"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/pop_bill_cancel_confirm_tv"
+            android:layout_width="0dp"
+            android:layout_height="32dp"
+            android:layout_marginLeft="30dp"
+            android:layout_marginRight="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/common_sure"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+    </LinearLayout>
+</LinearLayout>

+ 13 - 0
app_modular/apputils/src/main/res/menu/menu_device_bill_detail.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <item
+        android:id="@+id/menu_device_input_unsubmit"
+        android:title="@string/unsubmit"
+        app:showAsAction="always" />
+    <item
+        android:id="@+id/menu_device_input_delete"
+        android:title="@string/delete"
+        app:showAsAction="always" />
+</menu>

+ 19 - 0
app_modular/apputils/src/main/res/menu/menu_maintain_bill_input.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <item
+        android:id="@+id/save"
+        android:title="保存"
+        app:showAsAction="always" />
+    <item
+        android:id="@+id/saveAndSubmit"
+        android:title="提交"
+        app:showAsAction="always" />
+    <item
+        android:id="@+id/list"
+        android:icon="@drawable/xlist"
+        android:title="查看列表"
+        app:showAsAction="always" />
+
+</menu>

+ 109 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBatchTransferAddActivity.java

@@ -0,0 +1,109 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.content.Intent;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.Menu;
+import android.view.View;
+import android.widget.TextView;
+
+import com.core.app.Constants;
+import com.modular.apputils.activity.BillInputActivity;
+import com.modular.apputils.adapter.BillAdapter;
+import com.modular.apputils.adapter.ConditionQueryAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillPresenter;
+import com.uas.appworks.R;
+
+import java.util.List;
+import java.util.Map;
+
+public class DeviceBatchTransferAddActivity extends BillInputActivity implements View.OnClickListener {
+    protected TextView mCancelBtn, mResetBtn, mConfirmBtn;
+
+    @Override
+    public BillAdapter newBillAdapter(List<BillGroupModel> groupModels) {
+        return new ConditionQueryAdapter(ct, groupModels, this);
+    }
+
+    @Override
+    protected void setLayout() {
+        setContentView(R.layout.activity_device_batch_transfer_add);
+
+        needItemDecoration = false;
+        mCancelBtn = findViewById(R.id.device_batch_transfer_add_cancel_tv);
+        mResetBtn = findViewById(R.id.device_batch_transfer_add_reset_tv);
+        mConfirmBtn = findViewById(R.id.device_batch_transfer_add_confirm_tv);
+
+        mCancelBtn.setOnClickListener(this);
+        mResetBtn.setOnClickListener(this);
+        mConfirmBtn.setOnClickListener(this);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return false;
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.device_batch_transfer_add_cancel_tv) {
+            finish();
+        } else if (id == R.id.device_batch_transfer_add_reset_tv) {
+            List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
+            for (int j = 0; j < showBillModels.size(); j++) {
+                showBillModels.get(j).setValue("");
+                showBillModels.get(j).setDisplay("");
+            }
+            mBillAdapter.notifyDataSetChanged();
+        } else if (id == R.id.device_batch_transfer_add_confirm_tv) {
+            List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
+            if (showBillModels != null) {
+                Map<String, Object> queryMap = mBillPresenter.analysisForm(showBillModels);
+                if (queryMap == null) {
+                    return;
+                }
+                String db_kind = null, db_dmcode = null, db_wslinecode = null;
+                for (Object key : queryMap.keySet()) {
+                    if (queryMap.get(key) == null) {
+                        continue;
+                    }
+                    String display = queryMap.get(key).toString();
+                    if ("db_kind".equals(key)) {
+                        db_kind = display;
+                    }
+                    if ("db_dmcode".equals(key)) {
+                        db_dmcode = display;
+                    }
+                    if ("db_wslinecode".equals(key)) {
+                        db_wslinecode = display;
+                    }
+                }
+                if ("领用".equals(db_kind)) {
+                    if (TextUtils.isEmpty(db_dmcode) || TextUtils.isEmpty(db_wslinecode)) {
+                        toast("类型为领用时,机型和仓库必填");
+                        return;
+                    }
+                } else if ("退仓".equals(db_kind)) {
+                    if (TextUtils.isEmpty(db_wslinecode)) {
+                        toast("类型为退仓时,仓库必填");
+                        return;
+                    }
+                }
+            }
+            mBillPresenter.saveAndSubmit(mBillAdapter.getBillGroupModels(),
+                    "mobile/device/saveDeviceInventory.action", "mobile/device/saveDeviceInventory.action");
+        }
+    }
+
+    @Override
+    public void commitSuccess(int keyValue, String code) {
+        Log.d("raomeng", keyValue + "->" + code);
+
+        startActivity(new Intent(ct, DeviceBatchTransferDetailActivity.class)
+                .putExtra(Constants.Intents.CALLER, code)
+                .putExtra(Constants.Intents.TITLE, getToolBarTitle())
+                .putExtra(Constants.Intents.ID, keyValue));
+    }
+}

+ 248 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBatchTransferDetailActivity.java

@@ -0,0 +1,248 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.Manifest;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.Menu;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.core.app.Constants;
+import com.core.utils.ToastUtil;
+import com.modular.apputils.activity.BillDetailsActivity;
+import com.modular.apputils.adapter.BillDetailsAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillDetailsPresenter;
+import com.uas.appworks.CRM.erp.adapter.DeviceBatchTransferDetailAdapter;
+import com.uas.appworks.CRM.erp.presenter.DeviceBatchTransferDetailPresenter;
+import com.uas.appworks.R;
+import com.uas.appworks.activity.DeviceListActivity;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+
+public class DeviceBatchTransferDetailActivity extends BillDetailsActivity implements View.OnClickListener, BillDetailsAdapter.OnBillItemClickListener {
+    private RecyclerView mFormRecyclerView;
+    private LinearLayout mOperateLayout;
+    private TextView mResetView, mScanView, mSubmitView;
+    protected BillDetailsAdapter mFormAdapter;
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.activity_device_batch_transfer_detail;
+    }
+
+    @Override
+    public BillDetailsAdapter newBillDetailsAdapter(List<BillGroupModel> groupModels) {
+        return new DeviceBatchTransferDetailAdapter(ct, groupModels);
+    }
+
+    @Override
+    public BillDetailsPresenter newBillDetailsPresenter() {
+        return new DeviceBatchTransferDetailPresenter(ct, this);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return false;
+    }
+
+    @Override
+    protected void initView() {
+        super.initView();
+        mResetView = findViewById(R.id.device_batch_transfer_detail_reset_tv);
+        mScanView = findViewById(R.id.device_batch_transfer_detail_scan_tv);
+        mSubmitView = findViewById(R.id.device_batch_transfer_detail_submit_tv);
+        mOperateLayout = findViewById(R.id.device_batch_transfer_detail_operate_ll);
+
+        mFormRecyclerView = findViewById(R.id.device_batch_transfer_detail_form_rv);
+        mFormRecyclerView.setLayoutManager(new LinearLayoutManager(ct));
+
+        mResetView.setOnClickListener(this);
+        mScanView.setOnClickListener(this);
+        mSubmitView.setOnClickListener(this);
+    }
+
+    @Override
+    public void updateStatus(String status) {
+        if (status == null) {
+            return;
+        }
+        if ("在录入".equals(status)) {
+            mOperateLayout.setVisibility(View.VISIBLE);
+        } else {
+            mOperateLayout.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void setAdapter(List<BillGroupModel> groupModels) {
+        List<BillGroupModel> mFormList = new ArrayList<>(), mGridList = new ArrayList<>();
+        if (groupModels != null) {
+            for (int i = 0; i < groupModels.size(); i++) {
+                BillGroupModel billGroupModel = groupModels.get(i);
+                if (billGroupModel == null) {
+                    continue;
+                }
+                if (billGroupModel.isForm()) {
+                    mFormList.add(billGroupModel);
+                } else {
+                    mGridList.add(billGroupModel);
+                }
+            }
+        }
+        if (mFormAdapter == null) {
+            mFormAdapter = new BillDetailsAdapter(ct, mFormList);
+            mFormRecyclerView.setAdapter(mFormAdapter);
+        } else {
+            mFormAdapter.updateGroupModels(mFormList);
+            mFormAdapter.notifyDataSetChanged();
+        }
+        super.setAdapter(mGridList);
+        if (mBillDetailsAdapter != null) {
+            mBillDetailsAdapter.setOnBillItemClickListener(this);
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.device_batch_transfer_detail_reset_tv) {
+            ((DeviceBatchTransferDetailPresenter) mBillDetailsPresenter).transferReset();
+        } else if (id == R.id.device_batch_transfer_detail_scan_tv) {
+            requestPermission(Manifest.permission.CAMERA, new Runnable() {
+                @Override
+                public void run() {
+                    startActivityForResult(new Intent(DeviceBatchTransferDetailActivity.this, CaptureActivity.class)
+                            , 0x66);
+                }
+            }, new Runnable() {
+                @Override
+                public void run() {
+                    ToastUtil.showToast(ct, R.string.not_camera_permission);
+                }
+            });
+        } else if (id == R.id.device_batch_transfer_detail_submit_tv) {
+            ((DeviceBatchTransferDetailPresenter) mBillDetailsPresenter).transferSubmit();
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (requestCode == 0x66 && 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);
+                    Log.d("raomeng", result);
+                    if (!TextUtils.isEmpty(result)) {
+                        ((DeviceBatchTransferDetailPresenter) mBillDetailsPresenter).transferScan(result);
+                    }
+                }
+            }
+        } else {
+            super.onActivityResult(requestCode, resultCode, data);
+        }
+    }
+
+    @Override
+    public void onBillItemClick(int position, BillGroupModel.BillModel billModel) {
+        String field = billModel.getField();
+        if ("num".equals(field) || "remain".equals(field)) {
+            String dr_id = null, db_wsid = null, dr_dename = null, dr_despec = null;
+
+            List<BillGroupModel.BillModel> formShowModels = mFormAdapter.getShowBillModels();
+            if (formShowModels != null && formShowModels.size() > 0) {
+                for (int i = 0; i < formShowModels.size(); i++) {
+                    if ("db_wsid".equals(formShowModels.get(i).getField())) {
+                        db_wsid = formShowModels.get(i).getValue();
+                        break;
+                    }
+                }
+            }
+            if (db_wsid == null) {
+                List<BillGroupModel.BillModel> hideFormModels = mFormAdapter.getHideBillModels();
+                for (int i = 0; i < hideFormModels.size(); i++) {
+                    if ("db_wsid".equals(hideFormModels.get(i).getField())) {
+                        db_wsid = hideFormModels.get(i).getValue();
+                        break;
+                    }
+                }
+            }
+
+            BillGroupModel billGroupModel = mBillDetailsAdapter.getBillGroupModel(billModel.getGroupIndex());
+            List<BillGroupModel.BillModel> showBillFields = billGroupModel.getShowBillFields();
+            if (showBillFields != null && showBillFields.size() > 0) {
+                for (int i = 0; i < showBillFields.size(); i++) {
+                    BillGroupModel.BillModel showModel = showBillFields.get(i);
+                    String showField = showModel.getField();
+                    String showValue = showModel.getValue();
+                    String dr_idKey = TextUtils.isEmpty(mBillDetailsPresenter.detailKeyField) ? "dr_id" : mBillDetailsPresenter.detailKeyField;
+                    if (dr_idKey.equals(showField)) {
+                        dr_id = showValue;
+                        if ("num".equals(field)) {
+                            break;
+                        }
+                    } else if ("dr_dename".equals(showField)) {
+                        dr_dename = showValue;
+                    } else if ("dr_despec".equals(showField)) {
+                        dr_despec = showValue;
+                    }
+                }
+            }
+            if (dr_id == null
+                    || ("remain".equals(field) && (dr_dename == null || dr_despec == null))) {
+                List<BillGroupModel.BillModel> hideBillFields = billGroupModel.getHideBillFields();
+                for (int i = 0; i < hideBillFields.size(); i++) {
+                    BillGroupModel.BillModel hideModel = hideBillFields.get(i);
+                    String hideField = hideModel.getField();
+                    String hideValue = hideModel.getValue();
+                    String dr_idKey = TextUtils.isEmpty(mBillDetailsPresenter.detailKeyField) ? "dr_id" : mBillDetailsPresenter.detailKeyField;
+                    if (dr_idKey.equals(hideField)) {
+                        dr_id = hideModel.getValue();
+                        if ("num".equals(field)) {
+                            break;
+                        }
+                    } else if ("dr_dename".equals(hideField)) {
+                        dr_dename = hideValue;
+                    } else if ("dr_despec".equals(hideField)) {
+                        dr_despec = hideValue;
+                    }
+                }
+            }
+
+            String condition;
+            if ("num".equals(field)) {
+                condition = (dr_id == null ? " 1 = 1" : " upper(dc_sourceid) = \'" + dr_id + "\'");
+            } else {
+                condition = " upper(ws_id) = \'" + (db_wsid == null ? "" : db_wsid)
+                        + "\' and upper(de_name) = \'" + (dr_dename == null ? "" : dr_dename)
+                        + (TextUtils.isEmpty(dr_despec) ? "\' " : "\' and upper(de_spec) = \'" + dr_despec + "\' ");
+            }
+            Log.d("raomeng", condition);
+            Intent intent = new Intent(DeviceBatchTransferDetailActivity.this, DeviceListActivity.class);
+            intent.putExtra(Constants.FLAG.DEVICE_CALLER, billModel.getRenderer())
+                    .putExtra(Constants.FLAG.DEVICE_WHICH_PAGE, Constants.FLAG.DEVICE_FROM_COMMON)
+                    .putExtra(Constants.FLAG.DEVICE_CONDITION, condition)
+                    .putExtra("status", billModel.getCaption());
+            startActivity(intent);
+        }
+    }
+
+    @Override
+    public void showToast(String message) {
+        ToastUtil.showToast(ct, message);
+        if ("提交成功".equals(message)) {
+            setResult(RESULT_OK);
+        }
+    }
+}

+ 91 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBillDetailActivity.java

@@ -0,0 +1,91 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.text.TextUtils;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.modular.apputils.activity.BillDetailsActivity;
+import com.modular.apputils.adapter.BillDetailsAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillDetailsPresenter;
+import com.modular.apputils.widget.VeriftyDialog;
+import com.uas.appworks.CRM.erp.presenter.DeviceBillDetailPresenter;
+import com.uas.appworks.R;
+import com.uas.appworks.adapter.DeviceDetailAdapter;
+
+import java.util.List;
+
+/**
+ * Created by RaoMeng on 2019/6/26
+ * Desc: 设备管理详情页
+ */
+public class DeviceBillDetailActivity extends BillDetailsActivity implements DeviceDetailAdapter.OnAdapterListener {
+
+    @Override
+    public BillDetailsAdapter newBillDetailsAdapter(List<BillGroupModel> groupModels) {
+        return new DeviceDetailAdapter(ct, groupModels, this);
+    }
+
+    @Override
+    public BillDetailsPresenter newBillDetailsPresenter() {
+        return new DeviceBillDetailPresenter(ct, this);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        if (!TextUtils.isEmpty(status) && !"已审核".equals(status)) {
+            getMenuInflater().inflate(com.modular.apputils.R.menu.menu_device_bill_detail, menu);
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        final String caller = mBillDetailsPresenter.getCaller();
+        if (R.id.menu_device_input_unsubmit == item.getItemId()) {
+            new VeriftyDialog.Builder(ct)
+                    .setTitle(getString(com.modular.apputils.R.string.app_name))
+                    .setContent("是否确定反提交该单据?")
+                    .build(new VeriftyDialog.OnDialogClickListener() {
+                        @Override
+                        public void result(boolean clickSure) {
+                            if (clickSure) {
+                                setResult(0x111);
+                                if ("DeviceChange!Inspect".equals(caller)) {
+                                    mBillDetailsPresenter.unSubmit(status, "mobile/device/deviceInspectRes.action");
+                                } else {
+                                    mBillDetailsPresenter.unSubmit(status);
+                                }
+                            }
+                        }
+                    });
+            return true;
+        } else if (R.id.menu_device_input_delete == item.getItemId()) {
+            new VeriftyDialog.Builder(ct)
+                    .setTitle(getString(com.modular.apputils.R.string.app_name))
+                    .setContent("是否确定删除该单据?")
+                    .build(new VeriftyDialog.OnDialogClickListener() {
+                        @Override
+                        public void result(boolean clickSure) {
+                            if (clickSure) {
+                                if ("DeviceChange!Inspect".equals(caller)) {
+                                    toast("送检单不允许删除");
+                                } else {
+                                    setResult(0x111);
+                                    ((DeviceBillDetailPresenter) mBillDetailsPresenter).deleteBill();
+                                }
+                            }
+                        }
+                    });
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public void toOpenEnclosure(int position, BillGroupModel.BillModel model) {
+        mBillDetailsPresenter.openEnclosure(model.getEnclusureId());
+    }
+}

+ 299 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceBillInputActivity.java

@@ -0,0 +1,299 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.text.TextUtils;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.common.data.StringUtil;
+import com.core.app.Constants;
+import com.core.model.SelectBean;
+import com.core.utils.CommonUtil;
+import com.modular.apputils.activity.BillInputActivity;
+import com.modular.apputils.activity.SelectNetAcitivty;
+import com.modular.apputils.adapter.BillAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillPresenter;
+import com.uas.appworks.CRM.erp.imp.IDeviceRepairView;
+import com.uas.appworks.CRM.erp.presenter.DeviceBillInputPresenter;
+import com.uas.appworks.R;
+import com.uas.appworks.activity.DeviceQueryActivity;
+import com.uas.appworks.adapter.DeviceBillInputAdapter;
+
+import java.util.List;
+import java.util.concurrent.locks.Condition;
+
+/**
+ * Created by RaoMeng on 2019/6/26
+ * Desc: 设备管理单据录入页面
+ */
+public class DeviceBillInputActivity extends BillInputActivity implements IDeviceRepairView {
+    private boolean isAccept = true;//是否接单
+
+    @Override
+    public BillAdapter newBillAdapter(List<BillGroupModel> groupModels) {
+        return new DeviceBillInputAdapter(ct, groupModels, this);
+    }
+
+    @Override
+    public BillPresenter newBillPresenter() {
+        return new DeviceBillInputPresenter(ct, this);
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        if ("DeviceChange!Maintain".equals(mBillPresenter.getFormCaller())) {
+            getMenuInflater().inflate(com.modular.apputils.R.menu.menu_maintain_bill_input, menu);
+            return true;
+        } else {
+            return super.onCreateOptionsMenu(menu);
+        }
+    }
+
+    @Override
+    public void updateOptionMenu(boolean isAccept) {
+        this.isAccept = isAccept;
+        supportInvalidateOptionsMenu();
+    }
+
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        MenuItem saveItem = menu.findItem(R.id.saveAndSubmit);
+        if ("DeviceChange!Repair".equals(mBillPresenter.getFormCaller()) && !isAccept) {
+            saveItem.setTitle("接单");
+        } else {
+            saveItem.setTitle("提交");
+        }
+        return super.onPrepareOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == R.id.list) {
+            if (!CommonUtil.isRepeatClick()) {
+                String caller = mBillPresenter.getFormCaller();
+                String dc_class = null;
+                if (caller.equals("DeviceChange!Use")) {
+                    dc_class = "使用转移";
+                } else if (caller.equals("DeviceChange!Scrap")) {
+                    dc_class = "报废申请";
+                } else if (caller.equals("DeviceChange!Maintain")) {
+                    dc_class = "保养维护";
+                } else if (caller.equals("DeviceChange!Inspect")) {
+                    dc_class = "故障送检";
+                }
+                startActivity(new Intent(ct, DeviceQueryActivity.class)
+                        .putExtra(Constants.FLAG.DEVICE_CALLER, caller)
+                        .putExtra(Constants.FLAG.DEVICE_CLASS, dc_class)
+                        .putExtra(Constants.FLAG.DEVICE_WHICH_PAGE, Constants.FLAG.DEVICE_FROM_COMMON));
+            }
+            return true;
+        } else if (item.getItemId() == R.id.saveAndSubmit) {
+            setResult(0x111);
+            if ("DeviceChange!Repair".equals(mBillPresenter.getFormCaller()) && !isAccept) {
+                ((DeviceBillInputPresenter) mBillPresenter).deviceRepairTaking();
+                return true;
+            } else {
+                return super.onOptionsItemSelected(item);
+            }
+        } else if (item.getItemId() == R.id.save) {
+            ((DeviceBillInputPresenter) mBillPresenter).saveMaintenance(mBillAdapter.getBillGroupModels());
+            return true;
+        } else {
+            return super.onOptionsItemSelected(item);
+        }
+    }
+
+    @Override
+    public void toSelect(int position, BillGroupModel.BillModel model) {
+        String formCaller = mBillPresenter.getFormCaller();
+        String field = model.getField();
+
+        if ("DeviceChange!Maintain".equals(formCaller)) {
+            if ("dd_ordercode".equals(field)) {
+                ordercodeSelect(position, model, "1devcode", "ProdOthDevice", "pr_code", "2prodcode");
+            } else if ("dd_othcode".equals(field)) {
+                ordercodeSelect(position, model, "2decode", "WareHouse!Dev", "wh_code", "1whcode");
+            } else if ("dc_devcode".equals(field)) {
+                devcodeDbSelect(position, model);
+            } else {
+                super.toSelect(position, model);
+            }
+        } else if ("DeviceChange!Inspect".equals(formCaller)) {
+            if ("dc_devcode".equals(field)) {
+                devcodeDbSelect(position, model);
+            } else {
+                super.toSelect(position, model);
+            }
+        } else if ("DeviceChange!Scrap".equals(formCaller)) {
+            if ("dc_devcode".equals(field)) {
+                devcodeDbSelect(position, model);
+            } else {
+                super.toSelect(position, model);
+            }
+        } else if ("DeviceChange!Use".equals(formCaller)) {
+            if ("dc_devcode".equals(field)) {
+                devcodeDbSelect(position, model);
+            } else {
+                super.toSelect(position, model);
+            }
+        } else if ("DeviceChange!Repair".equals(formCaller)) {
+            if ("dd_ordercode".equals(field)) {
+                ordercodeSelect(position, model, "1devcode", "ProdOthDevice", "pr_code", "2prodcode");
+            } else if ("dd_othcode".equals(field)) {
+                ordercodeSelect(position, model, "2decode", "WareHouse!Dev", "wh_code", "1whcode");
+            } else {
+                super.toSelect(position, model);
+            }
+        } else {
+            super.toSelect(position, model);
+        }
+    }
+
+    private void devcodeDbSelect(int position, BillGroupModel.BillModel model) {
+        String decop = decopDisplay(model);
+        String condition = "";
+        if (!TextUtils.isEmpty(decop)) {
+            condition = " de_cop = \'" + decop + "\'";
+        }
+        selectDf(position, model, null, condition);
+    }
+
+    //养护管理和设备维修,类型+编号+新设备/仓库编号的特殊处理
+    private void ordercodeSelect(int position, BillGroupModel.BillModel model, String field1, String gCaller, String corekey, String field2) {
+        String ddtypeDisplay = ddtypeDisplay(model);
+        if (TextUtils.isEmpty(ddtypeDisplay)) {
+            toast("请先选择类型");
+            return;
+        }
+        Bundle extras = new Bundle();
+        if ("DEVICE".equals(ddtypeDisplay)) {
+            extras.putString("gCaller", "DeviceNew");
+            extras.putString("corekey", "de_code");
+            extras.putString("fieldKey", field1);
+            selectDf(position, model, extras, "");
+        } else if ("PROD".equals(ddtypeDisplay)) {
+            extras.putString("gCaller", gCaller);
+            extras.putString("corekey", corekey);
+            extras.putString("fieldKey", field2);
+            selectDf(position, model, extras, "");
+        }
+    }
+
+    private void selectDf(int position, BillGroupModel.BillModel model, Bundle extras, String condition) {
+        if ("DF".equals(model.getType()) || "SF".equals(model.getType())) {
+            findBydbFind(model, condition, extras);
+        } else {
+            super.toSelect(position, model);
+        }
+    }
+
+    private String ddtypeDisplay(BillGroupModel.BillModel model) {
+        int groupIndex = model.getGroupIndex();
+        BillGroupModel billGroupModel = mBillAdapter.getBillGroupModel(groupIndex);
+        List<BillGroupModel.BillModel> showBillFields = billGroupModel.getShowBillFields();
+        for (int i = 0; i < showBillFields.size(); i++) {
+            BillGroupModel.BillModel billModel = showBillFields.get(i);
+            if ("dd_type".equals(billModel.getField())) {
+                return TextUtils.isEmpty(billModel.getValue()) ? "" : billModel.getDisplay();
+            }
+        }
+        return "";
+    }
+
+    private String decopDisplay(BillGroupModel.BillModel model) {
+        int groupIndex = model.getGroupIndex();
+        BillGroupModel billGroupModel = mBillAdapter.getBillGroupModel(groupIndex);
+        List<BillGroupModel.BillModel> showBillFields = billGroupModel.getShowBillFields();
+        List<BillGroupModel.BillModel> hideBillFields = billGroupModel.getHideBillFields();
+        for (int i = 0; i < showBillFields.size(); i++) {
+            BillGroupModel.BillModel billModel = showBillFields.get(i);
+            if ("dc_cop".equals(billModel.getField())) {
+                return TextUtils.isEmpty(billModel.getValue()) ? "" : billModel.getDisplay();
+            }
+        }
+        for (int i = 0; i < hideBillFields.size(); i++) {
+            BillGroupModel.BillModel billModel = hideBillFields.get(i);
+            if ("dc_cop".equals(billModel.getField())) {
+                return TextUtils.isEmpty(billModel.getValue()) ? "" : billModel.getDisplay();
+            }
+        }
+        return "";
+    }
+
+    @Override
+    public void commitSuccess(final int keyValue, String code) {
+        ToastMessage("提交成功!");
+        setResult(0x111);
+        new Handler().postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                if (mContext == null) return;
+                //使用新界面
+                startActivity(new Intent(ct, DeviceBillDetailActivity.class)
+                        .putExtra(Constants.Intents.CALLER, mBillPresenter.getFormCaller())
+                        .putExtra(Constants.Intents.TITLE, getToolBarTitle())
+                        .putExtra(Constants.Intents.INPUT_CLASS, DeviceBillInputActivity.class)
+                        .putExtra(Constants.Intents.ID, keyValue)
+                        .putExtra("device", true)
+                        .putExtra(Constants.Intents.SHOW_HEADER, true));
+                finish();
+                overridePendingTransition(com.modular.apputils.R.anim.anim_activity_in, com.modular.apputils.R.anim.anim_activity_out);
+            }
+        }, 2000);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (data != null && (requestCode == REQUESTCODE_C || requestCode == REQUESTCODE_C_NET)
+                && ("DeviceChange!Maintain".equals(mBillPresenter.getFormCaller()) || "DeviceChange!Repair".equals(mBillPresenter.getFormCaller()))) {
+            SelectBean mSelectBeanC = data.getParcelableExtra("data");
+            if (mSelectBeanC != null) {
+                if (requestCode == REQUESTCODE_C) {
+                    int position = mSelectBeanC.getIndex();
+                    String value = StringUtil.isEmpty(mSelectBeanC.getShowName()) ? "" : mSelectBeanC.getShowName();
+                    String display = StringUtil.isEmpty(mSelectBeanC.getJson()) ? "" : mSelectBeanC.getJson();
+                    updateTypeC(position, value, display);
+                } else if (requestCode == REQUESTCODE_C_NET) {
+                    int position = data.getIntExtra("id", -1);
+                    if (position >= 0) {
+                        String value = StringUtil.isEmpty(mSelectBeanC.getName()) ? "" : mSelectBeanC.getName();
+                        String display = StringUtil.isEmpty(mSelectBeanC.getName()) ? "" : mSelectBeanC.getName();
+                        updateTypeC(position, value, display);
+                    }
+                }
+            }
+        } else {
+            super.onActivityResult(requestCode, resultCode, data);
+        }
+    }
+
+    private void updateTypeC(int position, String value, String display) {
+        List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
+        BillGroupModel.BillModel billModel = showBillModels.get(position);
+        if ("dd_type".equals(billModel.getField()) && !display.equals(billModel.getDisplay())) {
+            //如果选择的类型发生了变化,则清空 编号+名称+新设备/仓库编号+新设备/仓库名称
+            BillGroupModel billGroupModel = mBillAdapter.getBillGroupModel(billModel.getGroupIndex());
+            if (billGroupModel != null) {
+                List<BillGroupModel.BillModel> showBillFields = billGroupModel.getShowBillFields();
+                if (showBillFields != null && showBillFields.size() > 0) {
+                    for (int i = 0; i < showBillFields.size(); i++) {
+                        BillGroupModel.BillModel model = showBillFields.get(i);
+                        if ("dd_ordercode".equals(model.getField())
+                                || "dd_ordername".equals(model.getField())
+                                || "dd_othcode".equals(model.getField())
+                                || "dd_othname".equals(model.getField())) {
+                            model.setValue("");
+                            model.setDisplay("");
+                        }
+                    }
+                    mBillAdapter.notifyDataSetChanged();
+                }
+            }
+        }
+        mBillAdapter.updateBillModelValues(position, value, display);
+    }
+}

+ 126 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDetailActivity.java

@@ -0,0 +1,126 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.content.Intent;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.PopupWindow;
+
+import com.common.data.StringUtil;
+import com.common.system.DisplayUtil;
+import com.core.app.Constants;
+import com.modular.apputils.activity.BillDetailsActivity;
+import com.modular.apputils.adapter.BillDetailsAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillDetailsPresenter;
+import com.uas.appworks.CRM.erp.presenter.DeviceDetailPresenter;
+import com.uas.appworks.R;
+import com.uas.appworks.adapter.DeviceDetailAdapter;
+
+import java.util.List;
+
+
+public class DeviceDetailActivity extends BillDetailsActivity implements View.OnClickListener, DeviceDetailAdapter.OnAdapterListener {
+    private PopupWindow menuPop = null;
+
+    @Override
+    public BillDetailsAdapter newBillDetailsAdapter(List<BillGroupModel> groupModels) {
+        return new DeviceDetailAdapter(ct, groupModels, this);
+    }
+
+    @Override
+    public BillDetailsPresenter newBillDetailsPresenter() {
+        return new DeviceDetailPresenter(ct, this);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.menu_operate, menu);
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == R.id.menu_operate_iv) {
+            showMuenPop(getWindow().findViewById(R.id.menu_operate_iv));
+            return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    private void showMuenPop(View v) {
+        if (menuPop == null) {
+            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.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, 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.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);
+        }
+        DisplayUtil.backgroundAlpha(ct, 0.4f);
+        menuPop.showAsDropDown(v, 0, DisplayUtil.dip2px(ct, 10));
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        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(Constants.FLAG.MODEL,
+                            ((DeviceDetailPresenter) mBillDetailsPresenter).mDevice));
+            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(Constants.FLAG.MODEL,
+                            ((DeviceDetailPresenter) mBillDetailsPresenter).mDevice));
+            dismissMenuPop();
+        } else if (R.id.popMaintenanceBtn == id) {
+            startActivity(new Intent(ct, DeviceBillInputActivity.class)
+                    .putExtra(Constants.Intents.TITLE, StringUtil.getMessage(R.string.text_maintenance))
+                    .putExtra(Constants.Intents.CALLER, "DeviceChange!Maintain")
+                    .putExtra(Constants.FLAG.MODEL, ((DeviceDetailPresenter) mBillDetailsPresenter).mDevice));
+            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(Constants.FLAG.MODEL,
+                            ((DeviceDetailPresenter) mBillDetailsPresenter).mDevice));
+            dismissMenuPop();
+        }
+    }
+
+    private void dismissMenuPop() {
+        if (menuPop != null) {
+            menuPop.dismiss();
+        }
+    }
+
+    @Override
+    public void toOpenEnclosure(int position, BillGroupModel.BillModel model) {
+        mBillDetailsPresenter.openEnclosure(model.getEnclusureId());
+    }
+
+    private void endOfError(String exceptionInfo) {
+        setResult(0x22, new Intent().putExtra("data", exceptionInfo));
+        finish();
+    }
+}

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

@@ -0,0 +1,177 @@
+package com.uas.appworks.CRM.erp.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.Menu;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.common.data.StringUtil;
+import com.core.app.Constants;
+import com.modular.apputils.activity.BillInputActivity;
+import com.modular.apputils.adapter.BillAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillPresenter;
+import com.uas.appworks.CRM.erp.imp.IDeviceInventoryQueryView;
+import com.uas.appworks.CRM.erp.presenter.DeviceInventoryQueryPresenter;
+import com.uas.appworks.R;
+import com.modular.apputils.adapter.ConditionQueryAdapter;
+import com.uas.appworks.activity.DeviceListActivity;
+import com.uas.appworks.datainquiry.adapter.DataInquiryFlexAdapter;
+import com.uas.appworks.datainquiry.bean.DataInquiryFlexBean;
+
+import org.jivesoftware.smack.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by RaoMeng on 2019/7/5
+ * Desc: 批量转移新增页面
+ */
+public class DeviceInventoryQueryActivity extends BillInputActivity implements View.OnClickListener, IDeviceInventoryQueryView {
+    protected TextView mCancelBtn, mResetBtn, mConfirmBtn;
+    protected ListView mDataListView;
+    protected DataInquiryFlexAdapter mDeviceQueryFlexAdapter;
+    private List<DataInquiryFlexBean> mDeviceQueryFlexBeans;
+
+    @Override
+    public BillAdapter newBillAdapter(List<BillGroupModel> groupModels) {
+        return new ConditionQueryAdapter(ct, groupModels, this);
+    }
+
+    @Override
+    public BillPresenter newBillPresenter() {
+        return new DeviceInventoryQueryPresenter(ct, this);
+    }
+
+    @Override
+    protected void setLayout() {
+        setContentView(R.layout.activity_device_inventory_query);
+
+        needItemDecoration = false;
+        mDataListView = findViewById(R.id.device_inventory_query_rv);
+        mCancelBtn = findViewById(R.id.device_inventory_query_cancel_tv);
+        mResetBtn = findViewById(R.id.device_inventory_query_reset_tv);
+        mConfirmBtn = findViewById(R.id.device_inventory_query_confirm_tv);
+
+        mDeviceQueryFlexBeans = new ArrayList<>();
+        mDeviceQueryFlexAdapter = new DataInquiryFlexAdapter(mContext, mDeviceQueryFlexBeans, false);
+        mDataListView.setAdapter(mDeviceQueryFlexAdapter);
+
+        mCancelBtn.setOnClickListener(this);
+        mResetBtn.setOnClickListener(this);
+        mConfirmBtn.setOnClickListener(this);
+
+        mDataListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                DataInquiryFlexBean flexBean = mDeviceQueryFlexBeans.get(position);
+                if (flexBean == null) {
+                    return;
+                }
+                List<DataInquiryFlexBean.RowBean.RowChildBean> allRowBeans = flexBean.getAllRowBeans();
+                String runStatus = "";
+                for (int i = 0; i < allRowBeans.size(); i++) {
+                    DataInquiryFlexBean.RowBean.RowChildBean rowChildBean = allRowBeans.get(i);
+                    if ("de_runstatus".equals(rowChildBean.getField())) {
+                        runStatus = rowChildBean.getValue();
+                    }
+                }
+
+                String condition = flexBean.getCondition()
+                        + (TextUtils.isEmpty(runStatus) ? "" :
+                        " and (upper(de_runstatus) = upper(\'" + runStatus + "\'))");
+
+                Intent intent = new Intent(DeviceInventoryQueryActivity.this, DeviceListActivity.class);
+                intent.putExtra(Constants.FLAG.DEVICE_CALLER, "DeviceAppQueryDetail")
+                        .putExtra(Constants.FLAG.DEVICE_WHICH_PAGE, Constants.FLAG.DEVICE_FROM_COMMON)
+                        .putExtra(Constants.FLAG.DEVICE_CONDITION, condition)
+                        .putExtra("status", runStatus);
+                startActivity(intent);
+            }
+        });
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return false;
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.device_inventory_query_cancel_tv) {
+            finish();
+        } else if (id == R.id.device_inventory_query_reset_tv) {
+            List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
+            for (int j = 0; j < showBillModels.size(); j++) {
+                showBillModels.get(j).setValue("");
+                showBillModels.get(j).setDisplay("");
+            }
+            mBillAdapter.notifyDataSetChanged();
+        } else if (id == R.id.device_inventory_query_confirm_tv) {
+            List<BillGroupModel.BillModel> showBillModels = mBillAdapter.getShowBillModels();
+            String condition = "1 = 1";
+            if (showBillModels != null) {
+                Map<String, Object> queryMap = mBillPresenter.analysisForm(showBillModels);
+                if (queryMap == null) {
+                    return;
+                }
+                String prcode = null, decode = null, dename = null;
+                condition = "";
+                for (Object key : queryMap.keySet()) {
+                    if (queryMap.get(key) == null) {
+                        continue;
+                    }
+                    String display = queryMap.get(key).toString();
+                    if ("de_prodcode".equals(key)) {
+                        prcode = display;
+                    }
+                    if ("de_code".equals(key)) {
+                        decode = display;
+                    }
+                    if ("de_name".equals(key)) {
+                        dename = display;
+                    }
+                    if (!TextUtils.isEmpty(display)) {
+                        condition = condition + "(upper(" + key
+                                + ") like upper(\'%" + display
+                                + "%\')) and ";
+                    }
+                }
+                if (TextUtils.isEmpty(prcode) && TextUtils.isEmpty(decode) && TextUtils.isEmpty(dename)) {
+                    toast("物料编号、设备编号、设备名称需填一项");
+                    return;
+                }
+                if (condition.length() >= 4) {
+                    condition = condition.substring(0, condition.length() - 4);
+                    condition = "(" + condition + ")";
+                }
+            }
+            ((DeviceInventoryQueryPresenter) mBillPresenter).obtainStatusList("DeviceAppQuery", condition);
+        }
+    }
+
+    @Override
+    public void setQueryResult(List<DataInquiryFlexBean> deviceQueryFlexBeans, List<List<DataInquiryFlexBean.RowBean.RowChildBean>> rowLists) {
+        mDeviceQueryFlexBeans.clear();
+        mDeviceQueryFlexAdapter.setRowChildBeans(new ArrayList<List<DataInquiryFlexBean.RowBean.RowChildBean>>());
+
+        if (deviceQueryFlexBeans != null && rowLists != null) {
+            mDeviceQueryFlexBeans.addAll(deviceQueryFlexBeans);
+            mDeviceQueryFlexAdapter.addRowChildBeans(rowLists);
+        }
+
+        mDeviceQueryFlexAdapter.notifyDataSetChanged();
+        if (mDeviceQueryFlexBeans.size() == 0) {
+            toast("设备不存在或未审核");
+        }
+    }
+}

+ 38 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/adapter/DeviceBatchTransferDetailAdapter.java

@@ -0,0 +1,38 @@
+package com.uas.appworks.CRM.erp.adapter;
+
+import android.content.Context;
+import android.text.SpannableStringBuilder;
+
+import com.core.utils.SpanUtils;
+import com.modular.apputils.adapter.BillDetailsAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.uas.appworks.R;
+
+import java.util.List;
+
+public class DeviceBatchTransferDetailAdapter extends BillDetailsAdapter {
+
+    private SpanUtils mSpanUtils;
+
+    public DeviceBatchTransferDetailAdapter(Context ct, List<BillGroupModel> mBillGroupModels) {
+        super(ct, mBillGroupModels);
+    }
+
+    @Override
+    protected void bindText(BillDetailsAdapter.TextViewHolder mViewHolder, BillGroupModel.BillModel billModel, int position) {
+        super.bindText(mViewHolder, billModel, position);
+        String field = billModel.getField();
+        if ("num".equals(field) || "remain".equals(field)) {
+            mSpanUtils = new SpanUtils();
+            SpannableStringBuilder stringBuilder = mSpanUtils
+                    .append(billModel.getValue())
+                    .setUnderline()
+                    .setForegroundColor(ct.getResources().getColor(R.color.blue))
+                    .create();
+            mViewHolder.valuesTv.setText(stringBuilder == null ? billModel.getValue() : stringBuilder);
+            mViewHolder.valuesTv.setBackgroundColor(ct.getResources().getColor(R.color.pale_blue));
+        } else {
+            mViewHolder.valuesTv.setBackgroundColor(ct.getResources().getColor(R.color.white));
+        }
+    }
+}

+ 11 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/imp/IDeviceInventoryQueryView.java

@@ -0,0 +1,11 @@
+package com.uas.appworks.CRM.erp.imp;
+
+import com.modular.apputils.presenter.imp.IBill;
+import com.uas.appworks.datainquiry.bean.DataInquiryFlexBean;
+
+import java.util.List;
+
+public interface IDeviceInventoryQueryView extends IBill {
+    void setQueryResult(List<DataInquiryFlexBean> mDeviceQueryFlexBeans
+            , List<List<DataInquiryFlexBean.RowBean.RowChildBean>> rowLists);
+}

+ 7 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/imp/IDeviceRepairView.java

@@ -0,0 +1,7 @@
+package com.uas.appworks.CRM.erp.imp;
+
+import com.modular.apputils.presenter.imp.IBill;
+
+public interface IDeviceRepairView extends IBill {
+    void updateOptionMenu(boolean isAccept);
+}

+ 87 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceBatchTransferDetailPresenter.java

@@ -0,0 +1,87 @@
+package com.uas.appworks.CRM.erp.presenter;
+
+import android.content.Context;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.common.data.JSONUtil;
+import com.modular.apputils.listener.OnSmartHttpListener;
+import com.modular.apputils.network.Parameter;
+import com.modular.apputils.network.Tags;
+import com.modular.apputils.presenter.BillDetailsPresenter;
+import com.modular.apputils.presenter.imp.IBillDetails;
+
+public class DeviceBatchTransferDetailPresenter extends BillDetailsPresenter implements OnSmartHttpListener {
+    private static final int BATCH_TRANSFER_RESET = 0x77;
+    private static final int BATCH_TRANSFER_SCAN = 0x78;
+    private static final int BATCH_TRANSFER_SUBMIT = 0x79;
+
+    public DeviceBatchTransferDetailPresenter(Context ct, IBillDetails mIBillDetails) {
+        super(ct, mIBillDetails);
+    }
+
+
+    public void transferReset() {
+        mIBillDetails.showLoading();
+        requestCompanyHttp(new Parameter.Builder()
+                        .url("mobile/device/resetDeviceInventory.action")
+                        .addParams("caller", mCaller)
+                        .addParams("id", mId)
+                        .record(BATCH_TRANSFER_RESET)
+                , this);
+    }
+
+    public void transferScan(String deviceCode) {
+        mIBillDetails.showLoading();
+        requestCompanyHttp(new Parameter.Builder()
+                        .url("mobile/device/scanDeviceInventory.action")
+                        .addParams("caller", mCaller)
+                        .addParams("id", mId)
+                        .addParams("decode", deviceCode)
+                        .record(BATCH_TRANSFER_SCAN)
+                , this);
+    }
+
+    public void transferSubmit() {
+        mIBillDetails.showLoading();
+        requestCompanyHttp(new Parameter.Builder()
+                        .url("mobile/device/submitDeviceInventory.action")
+                        .addParams("caller", mCaller)
+                        .addParams("id", mId)
+                        .record(BATCH_TRANSFER_SUBMIT)
+                , this);
+    }
+
+    @Override
+    public void onSuccess(int what, String message, Tags tag) throws Exception {
+        JSONObject resultObject = JSON.parseObject(message);
+        switch (what) {
+            case BATCH_TRANSFER_RESET:
+                mStatusKey = "";
+                handlerMultiBill(resultObject);
+                mIBillDetails.showToast("重置成功");
+                break;
+            case BATCH_TRANSFER_SCAN:
+                mStatusKey = "";
+                handlerMultiBill(resultObject);
+                mIBillDetails.showToast("扫描成功");
+                break;
+            case BATCH_TRANSFER_SUBMIT:
+                mStatusKey = "";
+                handlerMultiBill(resultObject);
+                mIBillDetails.showToast("提交成功");
+                break;
+        }
+        mIBillDetails.dimssLoading();
+    }
+
+    @Override
+    public void onFailure(int what, String message, Tags tag) throws Exception {
+        mIBillDetails.dimssLoading();
+        if (JSONUtil.validateJSONObject(message)) {
+            mIBillDetails.showToast(JSONUtil.getText(message, "exceptionInfo"));
+        } else {
+            mIBillDetails.showToast(message);
+        }
+    }
+}

+ 87 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceBillDetailPresenter.java

@@ -0,0 +1,87 @@
+package com.uas.appworks.CRM.erp.presenter;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.widget.Toast;
+
+import com.alibaba.fastjson.JSONObject;
+import com.core.app.Constants;
+import com.core.utils.CommonUtil;
+import com.me.network.app.base.HttpParams;
+import com.me.network.app.http.HttpRequest;
+import com.me.network.app.http.Method;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.presenter.BillDetailsPresenter;
+import com.modular.apputils.presenter.imp.IBillDetails;
+import com.modular.apputils.utils.BillTypeChangeUtils;
+import com.uas.appworks.R;
+
+public class DeviceBillDetailPresenter extends BillDetailsPresenter {
+    private final static int DELETE_BILL = 0x111;
+
+    public DeviceBillDetailPresenter(Context ct, IBillDetails mIBillDetails) {
+        super(ct, mIBillDetails);
+    }
+
+    @Override
+    protected void handlerMultiBill(JSONObject resultObject) {
+        handlerMultiBill(resultObject, true, "基础信息");
+    }
+
+    @Override
+    protected BillGroupModel.BillModel getBillModelByObject(JSONObject object) {
+        BillGroupModel.BillModel billModel = super.getBillModelByObject(object);
+
+        //附件格式处理
+        String value = billModel.getValue(), enclosureId = "";
+        if ((BillTypeChangeUtils.getItemViewType(billModel.getType()) == 2 || "detailAttach".equals(billModel.getRenderer()))
+                && !TextUtils.isEmpty(value)) {
+            int lastIndex = value.lastIndexOf(";");
+            if (lastIndex != -1) {
+                String name = value.substring(0, lastIndex);
+                enclosureId = value.substring(lastIndex + 1);
+                value = name;
+            }
+        }
+        billModel.setValue(value);
+        billModel.setEnclusureId(enclosureId);
+
+        return billModel;
+    }
+
+    public void deleteBill() {
+        mIBillDetails.showLoading();
+        HttpRequest.getInstance().sendRequest(CommonUtil.getAppBaseUrl(ct),
+                new HttpParams.Builder()
+                        .url("mobile/commondelete.action")
+                        .method(Method.GET)
+                        .flag(DELETE_BILL)
+                        .addParam("caller", mCaller)
+                        .addParam("id", mId)
+                        .addParam("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"))
+                        .addHeader("Cookie", CommonUtil.getErpCookie(ct))
+                        .build(), this);
+    }
+
+    @Override
+    public void onSuccess(int flag, Object o) throws Exception {
+        switch (flag) {
+            case DELETE_BILL:
+                mIBillDetails.dimssLoading();
+                Toast.makeText(ct, R.string.delete_all_succ, Toast.LENGTH_LONG).show();
+                mIBillDetails.finish(Constants.Intents.RESULT_RESPONSE_CODE, null);
+                break;
+        }
+    }
+
+    @Override
+    public void onFail(int flag, String failStr) throws Exception {
+        mIBillDetails.dimssLoading();
+        mIBillDetails.showToast(failStr);
+    }
+
+    @Override
+    protected void loadFilePaths(String attachs) {
+
+    }
+}

+ 423 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceBillInputPresenter.java

@@ -0,0 +1,423 @@
+package com.uas.appworks.CRM.erp.presenter;
+
+import android.content.Context;
+import android.content.Intent;
+import android.support.annotation.Nullable;
+import android.text.TextUtils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
+import com.core.app.Constants;
+import com.core.utils.CommonUtil;
+import com.me.network.app.base.HttpCallback;
+import com.me.network.app.base.HttpParams;
+import com.me.network.app.http.HttpRequest;
+import com.me.network.app.http.Method;
+import com.modular.apputils.adapter.BillAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.network.Tags;
+import com.modular.apputils.presenter.BillPresenter;
+import com.modular.apputils.presenter.imp.IBill;
+import com.uas.appworks.CRM.erp.imp.IDeviceRepairView;
+import com.uas.appworks.model.Device;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by RaoMeng on 2019/7/6
+ * Desc: 设备管理录入表单presenter类
+ */
+public class DeviceBillInputPresenter extends BillPresenter {
+    private Device mDevice;
+
+    @Override
+    public void start(Intent intent) {
+        if (intent != null) {
+            mDevice = intent.getParcelableExtra(Constants.FLAG.MODEL);
+        }
+        super.start(intent);
+    }
+
+    public DeviceBillInputPresenter(Context ct, IDeviceRepairView iBill) {
+        super(ct, iBill);
+    }
+
+    @Override
+    protected List<BillGroupModel> handlerMultiBill(JSONObject resultObject) {
+        return handlerMultiBill(resultObject, true, "基础信息");
+    }
+
+    @Override
+    protected List<BillGroupModel> handleTabGroupModels
+            (Map<String, BillGroupModel> gridGroupModelMap, String dgcaller, String dgtitle) {
+        if (mId <= 0) {
+            if ("DeviceChange!Maintain".equals(mCaller) && "DeviceChange!Maintain".equals(dgcaller)) {
+                //保养维护->保养项目 新增时不可添加保养项目
+                return new ArrayList<>();
+            } else {
+                return super.handleTabGroupModels(gridGroupModelMap, dgcaller, dgtitle);
+            }
+        }
+        if ("DeviceChange!Maintain".equals(mCaller)) {
+            if ("DeviceChange!Maintain".equals(dgcaller)) {
+                //保养维护->保养项目
+                List<BillGroupModel> billGroupModels = new ArrayList<>();
+                if (gridGroupModelMap != null && !gridGroupModelMap.isEmpty()) {
+                    for (Map.Entry<String, BillGroupModel> entry : gridGroupModelMap.entrySet()) {
+                        BillGroupModel entryValue = entry.getValue();
+                        if (entryValue != null && !"明细0".equals(entry.getKey())) {
+                            entryValue.setBillCaller(dgcaller);
+                            entryValue.setLastInType(false);
+                            billGroupModels.add(entryValue);
+                        }
+                    }
+                }
+                return billGroupModels;
+            } else if ("DeviceChange!Maintaindetail".equals(dgcaller)) {
+                //保养维护->保养用料
+                return getMaterialGroup(gridGroupModelMap, dgcaller);
+            } else {
+                return super.handleTabGroupModels(gridGroupModelMap, dgcaller, dgtitle);
+            }
+        } else if ("DeviceChange!Repair".equals(mCaller)) {
+            //设备维修
+            if ("DeviceChange!Repair".equals(dgcaller)) {
+                //配件用料
+                return getMaterialGroup(gridGroupModelMap, dgcaller);
+            }
+            return super.handleTabGroupModels(gridGroupModelMap, dgcaller, dgtitle);
+        } else {
+            return super.handleTabGroupModels(gridGroupModelMap, dgcaller, dgtitle);
+        }
+    }
+
+    @Override
+    public void onSuccess(int what, String message, Tags tag) throws Exception {
+        if (what == SAVE_MAINTENANCE_BILL) {
+            iBill.dimssLoading();
+            iBill.showToast("保存成功");
+            try {
+                JSONObject resultObject = JSON.parseObject(message);
+
+                handlerMultiBill(resultObject);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        } else {
+            super.onSuccess(what, message, tag);
+        }
+    }
+
+    /**
+     * 用料从表明细,如果是列表自带的明细行,类型和编号字段不可编辑
+     *
+     * @param gridGroupModelMap
+     * @param dgcaller
+     * @return
+     */
+    private List<BillGroupModel> getMaterialGroup
+    (Map<String, BillGroupModel> gridGroupModelMap, String dgcaller) {
+        List<BillGroupModel> billGroupModels = new ArrayList<>();
+        if (gridGroupModelMap != null && !gridGroupModelMap.isEmpty()) {
+            for (Map.Entry<String, BillGroupModel> entry : gridGroupModelMap.entrySet()) {
+                BillGroupModel entryValue = entry.getValue();
+                if (entryValue != null) {
+                    //有值的明细组,类型+编号不可编辑
+                    if (!"明细0".equals(entry.getKey())) {
+                        List<BillGroupModel.BillModel> showBillFields = entryValue.getShowBillFields();
+                        List<BillGroupModel.BillModel> hideBillFields = entryValue.getHideBillFields();
+                        String editable = null;
+                        if (hideBillFields != null) {
+                            for (int i = 0; i < hideBillFields.size(); i++) {
+                                String field = hideBillFields.get(i).getField();
+                                if ("dd_source".equals(field)) {
+                                    String value = hideBillFields.get(i).getValue();
+                                    if (TextUtils.isEmpty(value) || "否".equals(value) || "0".equals(value)) {
+                                        editable = "";
+                                    } else {
+                                        editable = "F";
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                        if (editable == null) {
+                            if (showBillFields != null) {
+                                for (int i = 0; i < showBillFields.size(); i++) {
+                                    String field = showBillFields.get(i).getField();
+                                    if ("dd_source".equals(field)) {
+                                        String value = showBillFields.get(i).getValue();
+                                        if (TextUtils.isEmpty(value) || "否".equals(value) || "0".equals(value)) {
+                                            editable = "";
+                                        } else {
+                                            editable = "F";
+                                        }
+                                        break;
+                                    }
+                                }
+                            }
+                        }
+                        if (showBillFields != null) {
+                            for (int i = 0; i < showBillFields.size(); i++) {
+                                String field = showBillFields.get(i).getField();
+                                if ("dd_type".equals(field) || "dd_ordercode".equals(field)) {
+                                    showBillFields.get(i).setEditable(editable);
+                                }
+                            }
+                        }
+                        entryValue.setDeleteAble(!"F".equals(editable));
+                    }
+                    entryValue.setBillCaller(dgcaller);
+                    billGroupModels.add(entryValue);
+                }
+            }
+        }
+        return billGroupModels;
+    }
+
+    @Override
+    protected BillGroupModel.BillModel getBillModelByObject(JSONObject object) {
+        BillGroupModel.BillModel billModel = super.getBillModelByObject(object);
+        String field = billModel.getField();
+
+        //设备维修单,如果dc_repairaccept(接单状态)为空,则是未接单状态;如果有值,则是已接单状态
+        //未接单状态下,需要将顶部Menu修改为【接单】按钮
+        if ("DeviceChange!Repair".equals(mCaller) && "dc_repairaccept".equals(field)) {
+            if (TextUtils.isEmpty(billModel.getValue().trim())) {
+                //未接单
+                ((IDeviceRepairView) iBill).updateOptionMenu(false);
+            } else {
+                //已接单
+                ((IDeviceRepairView) iBill).updateOptionMenu(true);
+            }
+        }
+
+        if (mId <= 0) {
+            if ("dc_emcode".equals(field)) {
+                billModel.setValue(CommonUtil.getEmcode());
+            } else if ("dc_emname".equals(field)) {
+                billModel.setValue(CommonUtil.getName());
+            }
+            if (mDevice != null) {
+                if ("dc_devcode".equals(field)) {
+                    billModel.setValue(mDevice.getCode());
+                } else if ("dc_devname".equals(field)) {
+                    billModel.setValue(mDevice.getName());
+                } else if ("dc_oldcentercode".equals(field)) {
+                    billModel.setValue(mDevice.getCenterCode());
+                } else if ("dc_oldcentername".equals(field)) {
+                    billModel.setValue(mDevice.getCenterName());
+                } else if ("dc_workshop".equals(field)) {
+                    billModel.setValue(mDevice.getWorkshop());
+                } else if ("dc_oldlinecode".equals(field)) {
+                    billModel.setValue(mDevice.getLineCode());
+                }
+            }
+            return billModel;
+        }
+
+        if ("DeviceChange!Maintain".equals(mCaller)) {
+            if ("dc_devcode".equals(field) || "dc_kind".equals(field)) {
+                billModel.setEditable("F");
+            }
+            return billModel;
+        } else {
+            return billModel;
+        }
+    }
+
+    @Override
+    public void saveAndSubmit
+            (List<BillGroupModel.BillModel> formFields, List<List<BillGroupModel.BillModel>> gridBillMap, String
+                    saveUrl, String updateUrl) {
+        super.saveAndSubmit(formFields, gridBillMap,
+                "mobile/device/saveAndSubmitDeviceChange.action", "mobile/device/updateAndSubmitDeviceChange.action");
+
+    }
+
+    @Override
+    protected void saveAndSubmit
+            (List<BillGroupModel.BillModel> formFields, List<BillGroupModel.GridTab> otherGridList,
+             int flag, String saveUrl, String updateUrl) {
+        super.saveAndSubmit(formFields, otherGridList, flag,
+                "mobile/device/saveAndSubmitDeviceChange.action", "mobile/device/updateAndSubmitDeviceChange.action");
+    }
+
+    @Nullable
+    @Override
+    public List<Map<String, Object>> analysisGrid
+            (List<List<BillGroupModel.BillModel>> gridBillMap) {
+        if ("DeviceChange!Repair".equals(mCaller) || "DeviceChange!Maintain".equals(mCaller)) {
+            String dd_type = null, dd_qty = "", dd_ordercode = null, dd_othcode = null;
+            List<Map<String, Object>> gridStoreList = new ArrayList<>();
+            for (int i = 0; i < gridBillMap.size(); i++) {
+                List<BillGroupModel.BillModel> modelList = gridBillMap.get(i);
+                if (!ListUtils.isEmpty(modelList)) {
+                    Map<String, Object> gridStore = new HashMap<>();
+                    for (BillGroupModel.BillModel billModel : modelList) {
+                        if (TextUtils.isEmpty(billModel.getValue())
+                                && ("necessaryField".equals(billModel.getAllowBlank())
+                                || "F".equals(billModel.getAllowBlank())) && billModel.getIsdefault() == -1) {
+                            iBill.showToast(billModel.getCaption() + "为必填项");
+                            iBill.dimssLoading();
+                            return null;
+                        }
+                        if (isEnclosureNeedSubmit(billModel)) {
+                            pushEnclosure(billModel);
+                            return null;
+                        }
+                        gridStore.put(billModel.getField(), billModel.getDisplay());
+
+                        String field = billModel.getField();
+                        if ("dd_type".equals(field)) {
+                            dd_type = billModel.getDisplay();
+                        }
+                        if ("dd_qty".equals(field)) {
+                            dd_qty = billModel.getValue();
+                        }
+                        if ("dd_ordercode".equals(field)) {
+                            dd_ordercode = billModel.getValue();
+                        }
+                        if ("dd_othcode".equals(field)) {
+                            dd_othcode = billModel.getValue();
+                        }
+                    }
+                    if ("PROD".equals(dd_type)) {
+                        try {
+                            double qty = TextUtils.isEmpty(dd_qty) ? 0 : Double.parseDouble(dd_qty);
+                            if (qty > 0 && (TextUtils.isEmpty(dd_ordercode) || TextUtils.isEmpty(dd_othcode))) {
+                                iBill.showToast("明细" + (i + 1) + "中 设备 和 新设备/仓库编号 不能为空");
+                                iBill.dimssLoading();
+                                return null;
+                            }
+                        } catch (Exception exception) {
+
+                        }
+                    }
+                    gridStoreList.add(gridStore);
+                }
+            }
+
+            return gridStoreList;
+        } else {
+            return super.analysisGrid(gridBillMap);
+        }
+    }
+
+    /**
+     * 接单
+     */
+    public void deviceRepairTaking() {
+        iBill.showLoading();
+        HttpRequest.getInstance().sendRequest(CommonUtil.getAppBaseUrl(ct),
+                new HttpParams.Builder()
+                        .url("mobile/device/deviceRepairTaking.action")
+                        .method(Method.POST)
+                        .addParam("caller", mCaller)
+                        .addParam("id", mId)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        iBill.dimssLoading();
+                        iBill.showToast("接单成功");
+                        try {
+                            String result = o.toString();
+                            JSONObject resultObject = JSON.parseObject(result);
+
+                            handlerMultiBill(resultObject);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                        ((IDeviceRepairView) iBill).updateOptionMenu(true);
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        iBill.dimssLoading();
+                        iBill.showToast(failStr);
+                    }
+                });
+    }
+
+    /**
+     * 养护管理保存
+     */
+    public void saveMaintenance(List<BillGroupModel> billGroupModels) {
+        iBill.showLoading();
+        BillField billField = new BillField(billGroupModels).invoke();
+        List<BillGroupModel.BillModel> formFields = billField.getFormFields();
+        List<List<BillGroupModel.BillModel>> gridBillMap = billField.getGridBillMap();
+        List<BillGroupModel.GridTab> otherGridList = billField.getOtherGridList();
+
+        Map<String, Object> formStore = analysisForm(formFields);
+        if (formStore == null) {
+            iBill.dimssLoading();
+            return;
+        }
+
+        String formStoreStr = JSON.toJSONString(formStore);
+
+        Map<String, Object> params = new HashMap<>();
+
+        if (otherGridList == null || otherGridList.size() <= 0) {
+            List<Map<String, Object>> gridStoreList = analysisGrid(gridBillMap);
+            if (gridStoreList == null) {
+                iBill.dimssLoading();
+                return;
+            }
+            String gridStoreStr = JSON.toJSONString(gridStoreList);
+            params.put("gridStore", gridStoreStr);
+        } else {
+            List<Map<String, Object>> otherGridStoreList = getOtherGirdList(otherGridList);
+            if (otherGridStoreList == null) {
+                iBill.dimssLoading();
+                return;
+            }
+            String otherGridStoreListStr = JSON.toJSONString(otherGridStoreList);
+            params.put("othergridStore", otherGridStoreListStr);
+        }
+        params.put("caller", mCaller);
+        params.put("keyid", String.valueOf(mId));
+        params.put("id", String.valueOf(mId));
+        params.put("formStore", formStoreStr);
+        String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+        String emCode = CommonUtil.getEmcode();
+        params.put("sessionId", sessionId);
+        params.put("master", CommonUtil.getMaster());
+        params.put("sessionUser", emCode);
+
+        HttpRequest.getInstance().sendRequest(CommonUtil.getAppBaseUrl(ct),
+                new HttpParams.Builder()
+                        .url("mobile/device/saveOrUpdateDeviceChange.action")
+                        .method(Method.POST)
+                        .setParams(params)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        iBill.dimssLoading();
+                        iBill.showToast("保存成功");
+                        try {
+                            String result = o.toString();
+                            JSONObject resultObject = JSON.parseObject(result);
+                            //这里要更新一下单据id
+                            setmId(JSONUtil.getInt(resultObject, "id"));
+                            handlerMultiBill(resultObject);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        iBill.dimssLoading();
+                        iBill.showToast(failStr);
+                    }
+                });
+    }
+}

+ 135 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceDetailPresenter.java

@@ -0,0 +1,135 @@
+package com.uas.appworks.CRM.erp.presenter;
+
+import android.Manifest;
+import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
+
+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.core.app.AppConstant;
+import com.core.base.BaseActivity;
+import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
+import com.core.widget.CustomProgressDialog;
+import com.me.network.app.base.HttpCallback;
+import com.me.network.app.base.HttpParams;
+import com.me.network.app.http.HttpRequest;
+import com.me.network.app.http.Method;
+import com.modular.apputils.model.BillGroupModel;
+import com.modular.apputils.network.FileDownloader;
+import com.modular.apputils.presenter.BillDetailsPresenter;
+import com.modular.apputils.presenter.imp.IBillDetails;
+import com.modular.apputils.utils.BillTypeChangeUtils;
+import com.modular.apputils.utils.ImageViewUtils;
+import com.modular.apputils.utils.OpenFilesUtils;
+import com.uas.appworks.R;
+import com.uas.appworks.model.Device;
+
+import java.io.File;
+
+import retrofit2.http.HTTP;
+
+public class DeviceDetailPresenter extends BillDetailsPresenter {
+
+    public Device mDevice;
+    private String decode;
+
+    public DeviceDetailPresenter(Context ct, IBillDetails mIBillDetails) {
+        super(ct, mIBillDetails);
+    }
+
+    @Override
+    public void start(Intent intent) {
+        mIBillDetails.setTitle(ct.getString(R.string.str_device_info));
+        if (intent != null) {
+            decode = intent.getStringExtra("decode");
+            LogUtil.i("decode=" + decode);
+        }
+        mDevice = new Device();
+        getDeviceInfo();
+    }
+
+    private void getDeviceInfo() {
+        mIBillDetails.showLoading();
+        HttpRequest.getInstance().sendRequest(CommonUtil.getAppBaseUrl(ct),
+                new HttpParams.Builder()
+                        .url("mobile/device/getDeviceInfo.action")
+                        .method(Method.GET)
+                        .addParam("decode", decode)
+//                        .addParam("decode", "a001")
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            mIBillDetails.dimssLoading();
+                            String result = o.toString();
+                            JSONObject resultObject = JSON.parseObject(result);
+                            handlerMultiBill(resultObject, true, "基础信息");
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        mIBillDetails.dimssLoading();
+                        mIBillDetails.showToast(failStr);
+                    }
+                });
+    }
+
+    @Override
+    protected BillGroupModel.BillModel getBillModelByObject(JSONObject object) {
+        BillGroupModel.BillModel billModel = super.getBillModelByObject(object);
+
+        //附件格式处理
+        String value = billModel.getValue(), enclosureId = "";
+        if ((BillTypeChangeUtils.getItemViewType(billModel.getType()) == 2 || "detailAttach".equals(billModel.getRenderer()))
+                && !TextUtils.isEmpty(value)) {
+            String[] valueArr = value.split(";");
+            if (valueArr != null && valueArr.length >= 2) {
+                value = valueArr[0];
+                enclosureId = valueArr[1];
+            }
+        }
+        billModel.setValue(value);
+        billModel.setEnclusureId(enclosureId);
+
+        //设备管理特殊处理
+        mDevice.setCode(decode);
+        String field = billModel.getField();
+        switch (field) {
+            case "de_workshop":
+                mDevice.setWorkshop(value);
+                break;
+            case "de_name":
+                mDevice.setName(value);
+                break;
+            case "de_code":
+                if (!TextUtils.isEmpty(value)) {
+                    mDevice.setCode(value);
+                }
+                break;
+            case "de_currentlinecode":
+                mDevice.setLineCode(value);
+                break;
+            case "de_currentcentercode":
+                mDevice.setCenterCode(value);
+                break;
+            case "de_currentcentername":
+                mDevice.setCenterName(value);
+                break;
+        }
+
+        return billModel;
+    }
+
+    @Override
+    protected void loadFilePaths(String attachs) {
+
+    }
+}

+ 173 - 0
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/presenter/DeviceInventoryQueryPresenter.java

@@ -0,0 +1,173 @@
+package com.uas.appworks.CRM.erp.presenter;
+
+import android.content.Context;
+import android.os.Bundle;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.data.JSONUtil;
+import com.core.utils.CommonUtil;
+import com.me.network.app.base.HttpCallback;
+import com.me.network.app.base.HttpCallbackWithBundle;
+import com.me.network.app.base.HttpParams;
+import com.me.network.app.http.HttpRequest;
+import com.me.network.app.http.Method;
+import com.modular.apputils.presenter.BillPresenter;
+import com.modular.apputils.presenter.imp.IBill;
+import com.uas.appworks.CRM.erp.imp.IDeviceInventoryQueryView;
+import com.uas.appworks.datainquiry.bean.DataInquiryFlexBean;
+import com.uas.appworks.datainquiry.bean.SchemeConditionBean;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class DeviceInventoryQueryPresenter extends BillPresenter implements HttpCallbackWithBundle {
+    private static final int OBTAIN_STATUS_LIST = 0x123;
+
+    public DeviceInventoryQueryPresenter(Context ct, IDeviceInventoryQueryView iBill) {
+        super(ct, iBill);
+    }
+
+    public void obtainStatusList(String caller, String condition) {
+        Map<String, Object> params = new HashMap<>();
+        params.put("caller", caller);
+        params.put("condition", condition);
+        params.put("page", 1);
+        params.put("pageSize", 100);
+        params.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
+        params.put("master", CommonUtil.getMaster());
+        params.put("sessionUser", CommonUtil.getEmcode());
+
+        LinkedHashMap<String, Object> header = new LinkedHashMap<>();
+        header.put("Cookie", CommonUtil.getErpCookie(ct));
+
+        iBill.showLoading();
+        Bundle bundle = new Bundle();
+        bundle.putString("condition", condition);
+        HttpRequest.getInstance().sendRequest(CommonUtil.getAppBaseUrl(ct),
+                new HttpParams.Builder()
+                        .flag(OBTAIN_STATUS_LIST)
+                        .url("mobile/common/list.action")
+                        .method(Method.GET)
+                        .setParams(params)
+                        .setBundle(bundle)
+                        .addHeader("Cookie", CommonUtil.getErpCookie(ct))
+                        .build(), (HttpCallbackWithBundle) this);
+    }
+
+    @Override
+    public void onSuccess(int flag, Object o, Bundle bundle) throws Exception {
+        iBill.dimssLoading();
+        try {
+            /**
+             * 列表数据解析
+             */
+            JSONObject resultObject = JSON.parseObject(o.toString());
+            JSONArray listdataArray = resultObject.getJSONArray("listdata");
+            JSONArray columnsArray = resultObject.getJSONArray("columns");
+            if (listdataArray == null || listdataArray.size() == 0) {
+                ((IDeviceInventoryQueryView) iBill).setQueryResult(null, null);
+                return;
+            }
+            if (columnsArray == null || columnsArray.size() == 0) {
+                ((IDeviceInventoryQueryView) iBill).setQueryResult(null, null);
+                return;
+            }
+            List<SchemeConditionBean> columnsConditionBeans = new ArrayList<>();
+            for (int i = 0; i < columnsArray.size(); i++) {
+                JSONObject columnsObject = columnsArray.getJSONObject(i);
+                if (columnsObject != null) {
+                    int width = JSONUtil.getInt(columnsObject, "width");
+                    SchemeConditionBean columnsConditionBean = new SchemeConditionBean();
+                    columnsConditionBean.setCaption(JSONUtil.getText(columnsObject, "caption"));
+                    columnsConditionBean.setField(JSONUtil.getText(columnsObject, "dataIndex"));
+                    columnsConditionBean.setWidth(JSONUtil.getInt(columnsObject, "width"));
+                    columnsConditionBean.setType(JSONUtil.getText(columnsObject, "type"));
+
+                    columnsConditionBeans.add(columnsConditionBean);
+                }
+            }
+
+            if (columnsConditionBeans.size() == 0) {
+                ((IDeviceInventoryQueryView) iBill).setQueryResult(null, null);
+                return;
+            }
+
+            List<List<DataInquiryFlexBean.RowBean.RowChildBean>> rowChildBeans = new ArrayList<>();
+            List<DataInquiryFlexBean.RowBean.RowChildBean> mRowChildBeans, mAllRowChildBeans;
+            List<DataInquiryFlexBean> mDeviceQueryFlexBeans = new ArrayList<>();
+            String queryCondition = "";
+            if (bundle != null) {
+                queryCondition = bundle.getString("condition");
+            }
+            for (int i = 0; i < listdataArray.size(); i++) {
+                mRowChildBeans = new ArrayList<>();
+                mAllRowChildBeans = new ArrayList<>();
+                JSONObject listdataObject = listdataArray.getJSONObject(i);
+                if (listdataObject != null) {
+                    DataInquiryFlexBean deviceQueryFlexBean = new DataInquiryFlexBean();
+                    deviceQueryFlexBean.setCondition(queryCondition);
+                    deviceQueryFlexBean.setIsFlex(true);
+
+                    List<DataInquiryFlexBean.RowBean> rowBeans = new ArrayList<>();
+
+                    for (int j = 0; j < columnsConditionBeans.size(); j++) {
+                        int width = columnsConditionBeans.get(j).getWidth();
+                        String field = columnsConditionBeans.get(j).getField();
+                        String type = columnsConditionBeans.get(j).getType();
+                        String caption = columnsConditionBeans.get(j).getCaption();
+
+                        String value = JSONUtil.getText(listdataObject, field);
+                        if (value != null) {
+                            DataInquiryFlexBean.RowBean.RowChildBean rowChildBean = new DataInquiryFlexBean.RowBean.RowChildBean();
+                            rowChildBean.setCaption(caption);
+                            rowChildBean.setValue(value);
+                            rowChildBean.setField(field);
+                            rowChildBean.setWidth(width);
+
+                            mAllRowChildBeans.add(rowChildBean);
+                            if (width > 0) {
+                                mRowChildBeans.add(rowChildBean);
+                            }
+                        }
+                    }
+                    rowChildBeans.add(mAllRowChildBeans);
+
+                    for (int k = 0; k < mRowChildBeans.size(); k++) {
+                        DataInquiryFlexBean.RowBean rowBean = new DataInquiryFlexBean.RowBean();
+
+                        List<DataInquiryFlexBean.RowBean.RowChildBean> childBeans = new ArrayList<>();
+                        DataInquiryFlexBean.RowBean.RowChildBean rowChildBean1 = mRowChildBeans.get(k);
+                        childBeans.add(rowChildBean1);
+                        if (rowChildBean1.getWidth() <= 100 && k < (mRowChildBeans.size() - 1)) {
+                            DataInquiryFlexBean.RowBean.RowChildBean rowChildBean2 = mRowChildBeans.get(k + 1);
+                            if (rowChildBean2.getWidth() <= 100) {
+                                childBeans.add(rowChildBean2);
+                                k++;
+                            }
+                        }
+                        rowBean.setRowChildBeans(childBeans);
+
+                        rowBeans.add(rowBean);
+                    }
+                    deviceQueryFlexBean.setAllRowBeans(mAllRowChildBeans);
+                    deviceQueryFlexBean.setRowBeans(rowBeans);
+                    mDeviceQueryFlexBeans.add(deviceQueryFlexBean);
+                }
+            }
+            ((IDeviceInventoryQueryView) iBill).setQueryResult(mDeviceQueryFlexBeans, rowChildBeans);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public void onFail(int flag, String failStr) throws Exception {
+        iBill.dimssLoading();
+        iBill.showToast(failStr);
+    }
+}

+ 103 - 0
app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceBatchTransferActivity.java

@@ -0,0 +1,103 @@
+package com.uas.appworks.activity;
+
+import android.content.Intent;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.AdapterView;
+
+import com.core.app.Constants;
+import com.uas.appworks.CRM.erp.activity.DeviceBatchTransferAddActivity;
+import com.uas.appworks.CRM.erp.activity.DeviceBatchTransferDetailActivity;
+import com.uas.appworks.R;
+import com.uas.appworks.datainquiry.bean.DataInquiryFlexBean;
+import com.uas.appworks.datainquiry.bean.SchemeConditionBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DeviceBatchTransferActivity extends DeviceQueryActivity {
+
+    @Override
+    protected void setActionTitle(View view) {
+        mFilterImageView.setImageResource(R.drawable.more);
+        super.setActionTitle(view);
+    }
+
+    @Override
+    protected void initConditions() {
+        SchemeConditionBean schemeConditionBean
+                = initCondition("申请单号", "db_code", "S");
+        mConditionBeans.add(schemeConditionBean);
+        mfuzzyConditionBeans.add(schemeConditionBean);
+
+        schemeConditionBean = initCondition("类型", "db_kind", "S");
+        mConditionBeans.add(schemeConditionBean);
+        mfuzzyConditionBeans.add(schemeConditionBean);
+
+        schemeConditionBean = initCondition("录入人", "db_inman", "S");
+        mConditionBeans.add(schemeConditionBean);
+        mfuzzyConditionBeans.add(schemeConditionBean);
+    }
+
+    @Override
+    protected void itemClickEvent(AdapterView<?> parent, int position) {
+        int reallyPosition = (int) parent.getItemIdAtPosition(position);
+        DataInquiryFlexBean inquiryFlexBean = mDeviceQueryFlexBeans.get(reallyPosition);
+        if (inquiryFlexBean != null) {
+            List<DataInquiryFlexBean.RowBean.RowChildBean> allRowBeans = inquiryFlexBean.getAllRowBeans();
+            if (allRowBeans != null) {
+                int id = -1;
+                String caller = "";
+                for (int i = 0; i < allRowBeans.size(); i++) {
+                    DataInquiryFlexBean.RowBean.RowChildBean rowChildBean = allRowBeans.get(i);
+                    if ("db_id".equals(rowChildBean.getField())) {
+                        try {
+                            id = TextUtils.isEmpty(rowChildBean.getValue()) ? -1 : Integer.parseInt(rowChildBean.getValue());
+                        } catch (Exception e) {
+                            id = -1;
+                        }
+                    } else if ("db_kind".equals(rowChildBean.getField())) {
+                        String value = rowChildBean.getValue();
+                        if ("领用".equals(value)) {
+                            caller = "DeviceMobile!Receive";
+                        } else if ("转移".equals(value)) {
+                            caller = "DeviceMobile!Transfer";
+                        } else if ("退仓".equals(value)) {
+                            caller = "DeviceMobile!Return";
+                        }
+                    }
+                }
+
+                if (id != -1) {
+                    startActivityForResult(new Intent(ct, DeviceBatchTransferDetailActivity.class)
+                                    .putExtra(Constants.Intents.CALLER, caller)
+                                    .putExtra(Constants.Intents.TITLE, getString(R.string.text_batch_transfer))
+                                    .putExtra(Constants.Intents.ID, id)
+                            , 0x123);
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onClick(View view) {
+        int id = view.getId();
+        if (id == R.id.data_inquiry_filter_iv) {
+            Intent intent = new Intent(DeviceBatchTransferActivity.this, DeviceBatchTransferAddActivity.class);
+            intent.putExtra(Constants.Intents.CALLER, "DeviceBatch!UseNew");
+            intent.putExtra(Constants.Intents.TITLE, "批量领用转移");
+            startActivity(intent);
+        } else {
+            super.onClick(view);
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (requestCode == 0x123) {
+            refreshDataList();
+        } else {
+            super.onActivityResult(requestCode, resultCode, data);
+        }
+    }
+}

+ 30 - 0
app_modular/appworks/src/main/java/com/uas/appworks/activity/DeviceListActivity.java

@@ -0,0 +1,30 @@
+package com.uas.appworks.activity;
+
+import android.content.Intent;
+import android.view.View;
+import android.widget.AdapterView;
+
+import com.core.app.Constants;
+
+public class DeviceListActivity extends DeviceQueryActivity {
+
+    @Override
+    protected void setActionTitle(View view) {
+        Intent intent = getIntent();
+        if (intent != null) {
+            mCondition = intent.getStringExtra(Constants.FLAG.DEVICE_CONDITION);
+            String status = intent.getStringExtra("status");
+            setTitle(status);
+        }
+    }
+
+    @Override
+    public boolean needNavigation() {
+        return true;
+    }
+
+    @Override
+    protected void itemClickEvent(AdapterView<?> parent, int position) {
+        //不需要item点击事件
+    }
+}

+ 161 - 0
app_modular/appworks/src/main/java/com/uas/appworks/activity/RealTimeFormActivity.java

@@ -0,0 +1,161 @@
+package com.uas.appworks.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.data.JSONUtil;
+import com.core.api.wxapi.ApiPlatform;
+import com.core.api.wxapi.ApiUtils;
+import com.core.app.Constants;
+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.Result2Listener;
+import com.me.network.app.http.rx.ResultSubscriber;
+import com.uas.appworks.R;
+import com.uas.appworks.adapter.RealTimeFormMenuAdapter;
+import com.uas.appworks.model.bean.RealTimeFormMenuBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author RaoMeng
+ * @describe 实时看板菜单页面
+ * @date 2017/10/25 18:46
+ * <p>
+ * 共用:设备管理->统计分析
+ */
+
+public class RealTimeFormActivity extends BaseActivity {
+    private RecyclerView mRecyclerView;
+    private GridLayoutManager mGridLayoutManager;
+    private RealTimeFormMenuAdapter mRealTimeFormMenuAdapter;
+    private List<RealTimeFormMenuBean> mRealTimeFormMenuBeen;
+    private int[] mGridColors = new int[]{R.color.data_inquiry_gird_menu_color1, R.color.data_inquiry_gird_menu_color2
+            , R.color.data_inquiry_gird_menu_color3, R.color.data_inquiry_gird_menu_color4, R.color.data_inquiry_gird_menu_color5,
+            R.color.data_inquiry_gird_menu_color6};
+    private LinearLayout mEmptyLayout;
+    private TextView mEmptyTextView;
+    private boolean isB2b;
+    private String mTitle;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_real_time_form);
+        initView();
+        initData();
+        mRealTimeFormMenuAdapter.setOnItemClickListener(new RealTimeFormMenuAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(View view, int position) {
+                String url = CommonUtil.getAppBaseUrl(RealTimeFormActivity.this)
+                        + "mobile/mobileRealTimeCharts.action?numId=" + mRealTimeFormMenuAdapter.getRealTimeFormMenuBeen().get(position).getId();
+                String title = mRealTimeFormMenuAdapter.getRealTimeFormMenuBeen().get(position).getTitle();
+                Intent intent = new Intent("com.modular.main.WebViewCommActivity");
+                intent.putExtra("url", url);
+                intent.putExtra("title", title);
+                intent.putExtra("whichPage", "real_time");
+                intent.putExtra("ORIENTATION_PORTRAIT", false);
+                intent.putExtra("cookie", true);
+                startActivity(intent);
+            }
+        });
+    }
+
+    private void initView() {
+        Intent intent = getIntent();
+        if (intent != null) {
+            mTitle = intent.getStringExtra(Constants.Intents.TITLE);
+        }
+        setTitle(TextUtils.isEmpty(mTitle) ? getString(R.string.real_time_form) : mTitle);
+        isB2b = ApiUtils.getApiModel() instanceof ApiPlatform;
+        mRecyclerView = (RecyclerView) findViewById(R.id.real_time_form_rv);
+        mEmptyLayout = (LinearLayout) findViewById(R.id.real_time_form_empty_ll);
+        mEmptyTextView = (TextView) findViewById(R.id.real_time_form_msg_tv);
+
+        mGridLayoutManager = new GridLayoutManager(this, 3, LinearLayoutManager.VERTICAL, false);
+        mRecyclerView.setLayoutManager(mGridLayoutManager);
+        mRealTimeFormMenuBeen = new ArrayList<>();
+        mRealTimeFormMenuAdapter = new RealTimeFormMenuAdapter(this, mRealTimeFormMenuBeen);
+        mRecyclerView.setAdapter(mRealTimeFormMenuAdapter);
+    }
+
+    private void initData() {
+//        final String realTimeCache = CommonUtil.getSharedPreferences(this, Constants.REAL_TIME_CACHE);
+//        if (!TextUtils.isEmpty(realTimeCache) && JSONUtil.validate(realTimeCache)) {
+//            JSONArray realTimeArray = JSON.parseArray(realTimeCache);
+//            if (realTimeArray != null && realTimeArray.size() > 0) {
+//                for (int i = 0; i < realTimeArray.size(); i++) {
+//                    RealTimeFormMenuBean realTimeFormMenuBean = new RealTimeFormMenuBean();
+//                    JSONObject realTimeObject = realTimeArray.getJSONObject(i);
+//                    realTimeFormMenuBean.setId(JSONUtil.getInt(realTimeObject, "ID"));
+//                    realTimeFormMenuBean.setTitle(JSONUtil.getText(realTimeObject, "TITLE"));
+//                    realTimeFormMenuBean.setColor(mGridColors[(i) % mGridColors.length]);
+//
+//                    mRealTimeFormMenuBeen.add(realTimeFormMenuBean);
+//                }
+//            }
+//
+//            mRealTimeFormMenuAdapter.notifyDataSetChanged();
+//        } else {
+        progressDialog.show();
+        HttpClient mHttpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(RealTimeFormActivity.this)).build();
+        String url = "mobile/getRealTimeSubs.action";
+        if (getString(R.string.text_statistical_analysis).equals(mTitle)) {
+            url = "mobile/device/getDeviceSubs.action";
+        }
+        mHttpClient.Api().send(new HttpClient.Builder()
+                .url(url)
+                .add("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"))
+                .header("Cookie", CommonUtil.getErpCookie(ct))
+                .method(Method.GET)
+                .build(), new ResultSubscriber<Object>(new Result2Listener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                progressDialog.dismiss();
+                String result = o.toString();
+                JSONObject object = JSON.parseObject(result);
+
+                JSONArray subsArray = object.getJSONArray("subs");
+                if (subsArray != null && subsArray.size() > 0) {
+                    for (int i = 0; i < subsArray.size(); i++) {
+                        RealTimeFormMenuBean realTimeFormMenuBean = new RealTimeFormMenuBean();
+                        JSONObject realTimeObject = subsArray.getJSONObject(i);
+                        realTimeFormMenuBean.setId(JSONUtil.getInt(realTimeObject, "ID"));
+                        realTimeFormMenuBean.setTitle(JSONUtil.getText(realTimeObject, "TITLE"));
+                        realTimeFormMenuBean.setColor(mGridColors[(i) % mGridColors.length]);
+
+                        mRealTimeFormMenuBeen.add(realTimeFormMenuBean);
+                    }
+                    mRealTimeFormMenuAdapter.notifyDataSetChanged();
+                } else {
+                    ToastUtil.showToast(RealTimeFormActivity.this, "数据为空");
+                    mEmptyLayout.setVisibility(View.VISIBLE);
+                    mEmptyTextView.setText("数据为空");
+                }
+            }
+
+            @Override
+            public void onFailure(Object t) {
+                progressDialog.dismiss();
+                ToastUtil.showToast(RealTimeFormActivity.this, "数据获取失败");
+                mEmptyLayout.setVisibility(View.VISIBLE);
+                mEmptyTextView.setText("数据获取失败");
+            }
+        }));
+//        }
+    }
+}

+ 42 - 0
app_modular/appworks/src/main/java/com/uas/appworks/adapter/DeviceBillInputAdapter.java

@@ -0,0 +1,42 @@
+package com.uas.appworks.adapter;
+
+import android.content.Context;
+import android.text.TextUtils;
+
+import com.modular.apputils.adapter.BillAdapter;
+import com.modular.apputils.model.BillGroupModel;
+
+import java.util.List;
+
+public class DeviceBillInputAdapter extends BillAdapter {
+
+    public DeviceBillInputAdapter(Context ct, List<BillGroupModel> mBillGroupModels, OnAdapterListener mOnAdapterListener) {
+        super(ct, mBillGroupModels, mOnAdapterListener);
+    }
+
+    @Override
+    protected void setInputText(InputViewHolder mInputViewHolder, BillGroupModel.BillModel model) {
+        if ("dd_source".equals(model.getField())) {
+            //针对dd_source特殊处理,如果有值,则展示【是】,没值则展示否
+            String value = model.getValue();
+            int source = 0;
+            try {
+                source = Integer.parseInt(value);
+            } catch (Exception e) {
+                if (!TextUtils.isEmpty(value) && !"0".equals(value)) {
+                    source = 1;
+                } else {
+                    source = 0;
+                }
+                e.printStackTrace();
+            }
+            if (source <= 0) {
+                mInputViewHolder.valuesEd.setText("否");
+            } else {
+                mInputViewHolder.valuesEd.setText("是");
+            }
+        } else {
+            super.setInputText(mInputViewHolder, model);
+        }
+    }
+}

+ 109 - 0
app_modular/appworks/src/main/java/com/uas/appworks/adapter/DeviceDetailAdapter.java

@@ -0,0 +1,109 @@
+package com.uas.appworks.adapter;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.common.data.ListUtils;
+import com.modular.apputils.adapter.BillDetailsAdapter;
+import com.modular.apputils.model.BillGroupModel;
+import com.uas.appworks.R;
+
+import java.util.List;
+
+/**
+ * Created by RaoMeng on 2019/6/24
+ * Desc: 设备查询详情页adapter
+ */
+public class DeviceDetailAdapter extends BillDetailsAdapter implements View.OnClickListener {
+    protected OnAdapterListener mOnAdapterListener;
+
+    public DeviceDetailAdapter(Context ct, List<BillGroupModel> mBillGroupModels, OnAdapterListener mOnAdapterListener) {
+        super(ct, mBillGroupModels);
+        this.mOnAdapterListener = mOnAdapterListener;
+    }
+
+    @Override
+    public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        if (viewType == 2) {
+            return new EnclosureViewHolder(parent, R.layout.item_bill_enclosure);
+        } else {
+            return super.onCreateViewHolder(parent, viewType);
+        }
+    }
+
+    @Override
+    public void onBindViewHolder(BaseViewHolder holder, int position) {
+        BillGroupModel.BillModel model = null;
+        if (mShowBillModels != null && mShowBillModels.size() > position) {
+            model = mShowBillModels.get(position);
+        }
+        if (holder instanceof EnclosureViewHolder) {
+            bindEnclosureView((EnclosureViewHolder) holder, model, position);
+        } else {
+            super.onBindViewHolder(holder, position);
+        }
+    }
+
+    private void bindEnclosureView(EnclosureViewHolder mInputViewHolder, BillGroupModel.BillModel model, int position) {
+        if (model != null) {
+            mInputViewHolder.captionTv.setText(model.getCaption());
+            mInputViewHolder.muchInputTv.setVisibility(model.getAllowBlank().equals("F") ? View.VISIBLE : View.GONE);
+            mInputViewHolder.valueTv.setText(model.getValue());
+            mInputViewHolder.valueTv.setTag(com.modular.apputils.R.id.tag_key, position);
+            mInputViewHolder.valueTv.setOnClickListener(this);
+        }
+    }
+
+    //附件类型
+    class EnclosureViewHolder extends BaseViewHolder {
+        public TextView captionTv;
+        public TextView muchInputTv;
+        public TextView valueTv;
+
+        public EnclosureViewHolder(ViewGroup parent, int layoutId) {
+            super(parent, layoutId);
+        }
+
+        @Override
+        public void initView(View view) {
+            captionTv = view.findViewById(com.modular.apputils.R.id.captionTv);
+            muchInputTv = view.findViewById(com.modular.apputils.R.id.muchInputTv);
+            valueTv = view.findViewById(com.modular.apputils.R.id.enclosure_values_tv);
+        }
+    }
+
+    @Override
+    protected void setInputValue(TextViewHolder mViewHolder, BillGroupModel.BillModel model) {
+        if ("dd_source".equals(model.getField())) {
+            //针对dd_source特殊处理,如果有值,则展示【是】,没值则展示否
+            String value = model.getValue();
+            if (TextUtils.isEmpty(value)) {
+                mViewHolder.valuesTv.setText("否");
+            } else {
+                mViewHolder.valuesTv.setText("是");
+            }
+        } else {
+            super.setInputValue(mViewHolder, model);
+        }
+    }
+
+    @Override
+    public void onClick(View view) {
+        if (view.getId() == com.modular.apputils.R.id.enclosure_values_tv) {
+            //查看附件
+            if (view.getTag(com.modular.apputils.R.id.tag_key) != null && view.getTag(com.modular.apputils.R.id.tag_key) instanceof Integer) {
+                int position = (int) view.getTag(com.modular.apputils.R.id.tag_key);
+                if (mOnAdapterListener != null && position >= 0 && position < ListUtils.getSize(mShowBillModels)) {
+                    mOnAdapterListener.toOpenEnclosure(position, mShowBillModels.get(position));
+                }
+            }
+        }
+    }
+
+    public interface OnAdapterListener {
+        void toOpenEnclosure(int position, BillGroupModel.BillModel model);
+    }
+}

+ 86 - 0
app_modular/appworks/src/main/java/com/uas/appworks/adapter/RealTimeFormMenuAdapter.java

@@ -0,0 +1,86 @@
+package com.uas.appworks.adapter;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.core.widget.CircleTextView;
+import com.uas.appworks.R;
+import com.uas.appworks.model.bean.RealTimeFormMenuBean;
+
+import java.util.List;
+
+/**
+ * @author RaoMeng
+ * @describe 实时看板菜单适配器
+ * @date 2017/10/25 19:05
+ */
+
+public class RealTimeFormMenuAdapter extends RecyclerView.Adapter<RealTimeFormMenuAdapter.RealTimeMenuViewHolder> {
+    private Context mContext;
+    private List<RealTimeFormMenuBean> mRealTimeFormMenuBeen;
+    private OnItemClickListener mOnItemClickListener;
+
+    public RealTimeFormMenuAdapter(Context context, List<RealTimeFormMenuBean> realTimeFormMenuBeen) {
+        mContext = context;
+        mRealTimeFormMenuBeen = realTimeFormMenuBeen;
+    }
+
+    public List<RealTimeFormMenuBean> getRealTimeFormMenuBeen() {
+        return mRealTimeFormMenuBeen;
+    }
+
+    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
+        mOnItemClickListener = onItemClickListener;
+    }
+
+    @Override
+    public RealTimeMenuViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        View view = LayoutInflater.from(mContext).inflate(R.layout.item_grid_real_time_form_menu, parent, false);
+        return new RealTimeMenuViewHolder(view);
+    }
+
+    @Override
+    public void onBindViewHolder(RealTimeMenuViewHolder holder, final int position) {
+        String title = mRealTimeFormMenuBeen.get(position).getTitle();
+        holder.contentTextView.setText(title);
+        if (title != null && title.length() >= 1) {
+            holder.iconTextView.setText(title.substring(0, 1));
+        }
+        holder.iconTextView.setMyBackgroundColor(mContext.getResources().getColor(mRealTimeFormMenuBeen.get(position).getColor()));
+        holder.menuLinearLayout.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mOnItemClickListener.onItemClick(v, position);
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return mRealTimeFormMenuBeen == null ? 0 : mRealTimeFormMenuBeen.size();
+    }
+
+
+    public static class RealTimeMenuViewHolder extends RecyclerView.ViewHolder {
+        private CircleTextView iconTextView;
+        private TextView contentTextView;
+        private LinearLayout menuLinearLayout;
+
+        public RealTimeMenuViewHolder(View itemView) {
+            super(itemView);
+
+            iconTextView = (CircleTextView) itemView.findViewById(R.id.real_time_form_menu_icon);
+            contentTextView = (TextView) itemView.findViewById(R.id.real_time_form_menu_content);
+            menuLinearLayout = (LinearLayout) itemView.findViewById(R.id.real_time_form_menu_ll);
+        }
+    }
+
+    public interface OnItemClickListener {
+        void onItemClick(View view, int position);
+    }
+}

+ 474 - 0
app_modular/appworks/src/main/java/com/uas/appworks/datainquiry/activity/ReportStatisticsBiActivity.java

@@ -0,0 +1,474 @@
+package com.uas.appworks.datainquiry.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.LinearLayout;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.common.LogUtil;
+import com.common.data.StringUtil;
+import com.core.app.Constants;
+import com.core.base.BaseActivity;
+import com.core.net.http.ViewUtil;
+import com.core.utils.CommonUtil;
+import com.core.widget.DrawableCenterTextView;
+import com.core.widget.EmptyLayout;
+import com.core.widget.view.Activity.CommonWebviewActivity;
+import com.core.widget.view.MyGridView;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.uas.appworks.R;
+import com.uas.appworks.datainquiry.adapter.DataInquiryMenuGridAdapter;
+import com.uas.appworks.datainquiry.adapter.ReportStatisticsMenuListAdapter;
+import com.uas.appworks.datainquiry.bean.DataInquiryGirdItemBean;
+import com.uas.appworks.datainquiry.bean.GridMenuReportStatisticsBean;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by RaoMeng on 2017/8/3.
+ * 报表统计业务菜单页面
+ */
+public class ReportStatisticsBiActivity extends BaseActivity {
+    private final int GET_MENU_DATA = 0x16;
+    public static final int GET_CLICK_URL = 0x17;
+    private PullToRefreshListView mMenuListView;
+    private List<GridMenuReportStatisticsBean> mGridMenuReportStatisticsBeans;
+    private ReportStatisticsMenuListAdapter mReportStatisticsMenuListAdapter;
+    private DataInquiryMenuGridAdapter mDataInquiryMenuGridAdapter;
+    private List<DataInquiryGirdItemBean> mDataInquiryGirdItemBeans;
+    private LinearLayout mRecentBrowseLl;
+    private View mReportStatisticsModulView;
+    private TextView mReportStatisticsModulTitleTv;
+    private MyGridView mReportStatisticsModulGv;
+    private DrawableCenterTextView mSearchTextView;
+    private String mCurrentMaster;
+    private String mCurrentUser;
+    private EmptyLayout mEmptyLayout;
+    boolean flag = false;
+    private int[] mColors = new int[]{R.color.data_inquiry_gird_menu_color1, R.color.data_inquiry_gird_menu_color2
+            , R.color.data_inquiry_gird_menu_color3, R.color.data_inquiry_gird_menu_color4, R.color.data_inquiry_gird_menu_color5,
+            R.color.data_inquiry_gird_menu_color6};
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_data_inquiry);
+        setTitle("BI服务");
+
+        initViews();
+        initEvents();
+        initDatas();
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        refreshRecentHeader();
+    }
+
+    private void initDatas() {
+        String reportQueryMenuCache = CommonUtil.getSharedPreferences(this,
+                mCurrentUser + mCurrentMaster + com.uas.appworks.datainquiry.Constants.CONSTANT.REPORT_BI_MENU_CACHE);
+        if (reportQueryMenuCache != null) {
+            try {
+                JSONObject resultObject = new JSONObject(reportQueryMenuCache);
+                JSONArray dataArray = resultObject.optJSONArray("data");
+                if (dataArray == null || dataArray.length() == 0) {
+                    if (!CommonUtil.isNetWorkConnected(this)) {
+                        ToastMessage(getString(R.string.networks_out));
+                    } else {
+                        progressDialog.show();
+                        getMenuData();
+                    }
+                } else {
+                    analysisMenuData(reportQueryMenuCache);
+                }
+            } catch (Exception e) {
+
+            }
+        } else {
+            if (!CommonUtil.isNetWorkConnected(this)) {
+                ToastMessage(getString(R.string.networks_out));
+            } else {
+                progressDialog.show();
+                getMenuData();
+            }
+        }
+    }
+
+    private void initEvents() {
+        mMenuListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
+            @Override
+            public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+                if (!CommonUtil.isNetWorkConnected(ReportStatisticsBiActivity.this)) {
+                    ToastMessage(getString(R.string.networks_out));
+                    if (mMenuListView.isRefreshing()) {
+                        mMenuListView.postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                mMenuListView.onRefreshComplete();
+                            }
+                        }, 500);
+                    }
+                } else {
+                    flag = true;
+                    getMenuData();
+                }
+            }
+
+            @Override
+            public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
+
+            }
+        });
+
+        mReportStatisticsModulGv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                DataInquiryGirdItemBean dataInquiryGirdItemBean = mDataInquiryMenuGridAdapter.getObjects().get(position);
+
+                String iconText = dataInquiryGirdItemBean.getIconText();
+                String dataInquiryMenuRecentCache = CommonUtil.getSharedPreferences(ReportStatisticsBiActivity.this,
+                        mCurrentUser + mCurrentMaster + com.uas.appworks.datainquiry.Constants.CONSTANT.REPORT_BI_MENU_RECENT_CACHE);
+                List<DataInquiryGirdItemBean> recentBrowse = new ArrayList<DataInquiryGirdItemBean>();
+                if (!TextUtils.isEmpty(dataInquiryMenuRecentCache)) {
+                    try {
+                        recentBrowse = JSON.parseArray(dataInquiryMenuRecentCache, DataInquiryGirdItemBean.class);
+
+                        for (int i = 0; i < recentBrowse.size(); i++) {
+                            if (iconText != null && iconText.equals(recentBrowse.get(i).getIconText())) {
+                                recentBrowse.remove(i);
+                            }
+                        }
+                    } catch (Exception e) {
+
+                    }
+                }
+
+                recentBrowse.add(0, dataInquiryGirdItemBean);
+
+                String recentJson = JSON.toJSON(recentBrowse).toString();
+                CommonUtil.setSharedPreferences(ReportStatisticsBiActivity.this
+                        , mCurrentUser + mCurrentMaster + com.uas.appworks.datainquiry.Constants.CONSTANT.REPORT_BI_MENU_RECENT_CACHE
+                        , recentJson);
+
+//                mDataInquiryGirdItemBeans.clear();
+//                mDataInquiryGirdItemBeans.addAll(recentBrowse);
+//                mDataInquiryMenuGridAdapter.notifyDataSetChanged();
+
+                for (int i = 0; i < mGridMenuReportStatisticsBeans.size(); i++) {
+                    List<GridMenuReportStatisticsBean.ListBean> reportlist = mGridMenuReportStatisticsBeans.get(i).getList();
+                    for (int j = 0; j < reportlist.size(); j++) {
+                        if (dataInquiryGirdItemBean.getIconText().equals(reportlist.get(j).getTitle())) {
+                            String caller = reportlist.get(j).getCaller();
+                            String title=reportlist.get(j).getTitle();
+                            
+                            clickItem(caller,title);
+//                            Intent intent = new Intent();
+//                            intent.setClass(ReportStatisticsBiActivity.this, ReportQueryCriteriaActivity.class);
+//                            intent.putExtra("reportinfo", reportlist.get(j));
+//                             ReportStatisticsActivity.this.startActivity(intent);
+                            return;
+                        }
+                    }
+                }
+            }
+        });
+
+        mSearchTextView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent intent = new Intent();
+                intent.setClass(ReportStatisticsBiActivity.this, ReportQuerySearchActivity.class);
+                intent.putExtra("whichPage", "BI");
+                startActivity(intent);
+            }
+        });
+    }
+
+    private void initViews() {
+        mMenuListView = (PullToRefreshListView) findViewById(R.id.data_inquiry_menu_lv);
+        mSearchTextView = (DrawableCenterTextView) findViewById(R.id.data_inquiry_menu_search_tv);
+
+        mGridMenuReportStatisticsBeans = new ArrayList<>();
+        mReportStatisticsMenuListAdapter = new ReportStatisticsMenuListAdapter(this, mGridMenuReportStatisticsBeans);
+        mMenuListView.setAdapter(mReportStatisticsMenuListAdapter);
+        mReportStatisticsMenuListAdapter.setmHandler(mHandler);
+        mReportStatisticsMenuListAdapter.setBiServer(true);
+
+        mRecentBrowseLl = (LinearLayout) View.inflate(this, R.layout.item_list_data_inquiry_menu, null);
+        mReportStatisticsModulView = (View) mRecentBrowseLl.findViewById(R.id.data_inquiry_modul_view);
+        mReportStatisticsModulTitleTv = (TextView) mRecentBrowseLl.findViewById(R.id.data_inquiry_modul_title_tv);
+        mReportStatisticsModulGv = (MyGridView) mRecentBrowseLl.findViewById(R.id.data_inquiry_modul_gv);
+
+        mDataInquiryGirdItemBeans = new ArrayList<>();
+        mDataInquiryMenuGridAdapter = new DataInquiryMenuGridAdapter(this, mDataInquiryGirdItemBeans);
+        mReportStatisticsModulGv.setAdapter(mDataInquiryMenuGridAdapter);
+
+        mReportStatisticsModulView.setBackgroundColor(getResources().getColor(R.color.black));
+        mReportStatisticsModulTitleTv.setText("最近浏览");
+
+        mEmptyLayout = new EmptyLayout(this, mMenuListView.getRefreshableView());
+        mEmptyLayout.setShowLoadingButton(false);
+        mEmptyLayout.setShowEmptyButton(false);
+        mEmptyLayout.setShowErrorButton(false);
+        mEmptyLayout.setEmptyMessage("数据为空");
+
+        AbsListView.LayoutParams layoutParams = new AbsListView.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, AbsListView.LayoutParams.WRAP_CONTENT);
+        mRecentBrowseLl.setLayoutParams(layoutParams);
+
+        mCurrentMaster = CommonUtil.getSharedPreferences(this, "erp_master");
+        mCurrentUser = CommonUtil.getSharedPreferences(this, "erp_username");
+    }
+
+    private void refreshRecentHeader() {
+        getRecentBrowse();
+        ListView refreshableView = mMenuListView.getRefreshableView();
+        int headerViewsCount = refreshableView.getHeaderViewsCount();
+        Log.d("headerViewsCount", headerViewsCount + "");
+        if (mDataInquiryGirdItemBeans.size() == 0) {
+            if (headerViewsCount == 2) {
+                refreshableView.removeHeaderView(mRecentBrowseLl);
+            }
+        } else {
+            if (headerViewsCount == 1) {
+                refreshableView.addHeaderView(mRecentBrowseLl);
+            }
+        }
+        flag = false;
+    }
+
+    private synchronized void getRecentBrowse() {
+        try {
+            String reportRecentMenuRecentCache = CommonUtil.getSharedPreferences(this,
+                    mCurrentUser + mCurrentMaster + com.uas.appworks.datainquiry.Constants.CONSTANT.REPORT_BI_MENU_RECENT_CACHE);
+            if (!TextUtils.isEmpty(reportRecentMenuRecentCache)) {
+                List<GridMenuReportStatisticsBean> reportStatisticsBeans = mReportStatisticsMenuListAdapter.getObjects();
+                mDataInquiryGirdItemBeans.clear();
+
+                List<DataInquiryGirdItemBean> recentBrowse = JSON.parseArray(reportRecentMenuRecentCache, DataInquiryGirdItemBean.class);
+                List<DataInquiryGirdItemBean> resultBrowse = new ArrayList<>();
+                for (int i = 0; i < recentBrowse.size(); i++) {
+                    DataInquiryGirdItemBean inquiryGirdItemBean = recentBrowse.get(i);
+                    boolean isExist = false;
+                    if (reportStatisticsBeans != null) {
+                        loop:
+                        for (int j = 0; j < reportStatisticsBeans.size(); j++) {
+                            List<GridMenuReportStatisticsBean.ListBean> reportList = reportStatisticsBeans.get(j).getList();
+                            if (reportList != null) {
+                                for (int k = 0; k < reportList.size(); k++) {
+                                    if (inquiryGirdItemBean.getIconText().equals(reportList.get(k).getTitle())) {
+                                        isExist = true;
+                                        inquiryGirdItemBean.setColor(mColors[(j) % mColors.length]);
+                                        break loop;
+                                    }
+                                }
+                            }
+                        }
+
+                        if (i < 9 && isExist) {
+                            mDataInquiryGirdItemBeans.add(inquiryGirdItemBean);
+                            resultBrowse.add(recentBrowse.get(i));
+                        }
+                    }
+
+                }
+
+                String recentJson = JSON.toJSON(resultBrowse).toString();
+                CommonUtil.setSharedPreferences(ReportStatisticsBiActivity.this
+                        , mCurrentUser + mCurrentMaster + com.uas.appworks.datainquiry.Constants.CONSTANT.REPORT_BI_MENU_RECENT_CACHE
+                        , recentJson);
+
+                mDataInquiryMenuGridAdapter.notifyDataSetChanged();
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    private void getMenuData() {
+//        String url = CommonUtil.getAppBaseUrl(this) + "mobile/qry/getReport.action";
+//        Map<String, Object> params = new HashMap<>();
+//        params.put("emcode", CommonUtil.getSharedPreferences(ct, "erp_username"));
+//        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+//        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+//        ViewUtil.httpSendRequest(this, url, params, mHandler, headers, GET_MENU_DATA, null, null, "get");
+
+        //common/getSearchByTree.action
+        String url = CommonUtil.getAppBaseUrl(this) + "common/getSearchByTree.action";
+        Map<String, Object> params = new HashMap<>();
+        params.put("emcode", CommonUtil.getSharedPreferences(ct, "erp_username"));
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(this, url, params, mHandler, headers, GET_MENU_DATA, null, null, "get");
+
+    }
+
+    public void clickItem(String caller,String title) {
+        progressDialog.show();
+        String url = CommonUtil.getAppBaseUrl(this) + "common/bi/getToken.action";
+        Map<String, Object> params = new HashMap<>();
+        params.put("emcode", CommonUtil.getSharedPreferences(ct, "erp_username"));
+        params.put("caller", caller);
+        params.put("master", CommonUtil.getMaster());
+        Bundle bundle = new Bundle();
+        bundle.putString("mTitle", title);
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(this, url, params, mHandler, headers, GET_CLICK_URL, null, bundle, "get");
+    }
+
+
+    private Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case GET_CLICK_URL:
+                    progressDialog.dismiss();
+                    String data = msg.getData().getString("result");
+                    LogUtil.d("arison", "data:" + data);
+                    String url = JSON.parseObject(data).getString("data");
+                    if (!StringUtil.isEmpty(url)) {
+                        startActivity(new Intent(mContext, CommonWebviewActivity.class)
+                                .putExtra("title", msg.getData().getString("mTitle"))
+                                .putExtra("scan_url", url));
+                    }
+                    break;
+                case GET_MENU_DATA:
+                    if (progressDialog.isShowing()) {
+                        progressDialog.dismiss();
+                    }
+                    if (mMenuListView.isRefreshing()) {
+                        mMenuListView.onRefreshComplete();
+                    }
+                    String result = msg.getData().getString("result");
+                    if (result != null) {
+                        CommonUtil.setSharedPreferences(ReportStatisticsBiActivity.this,
+                                mCurrentUser + mCurrentMaster + com.uas.appworks.datainquiry.Constants.CONSTANT.REPORT_BI_MENU_CACHE,
+                                result);
+                    }
+                    mGridMenuReportStatisticsBeans.clear();
+                    analysisMenuData(result);
+                    break;
+                case Constants.APP_SOCKETIMEOUTEXCEPTION:
+                    if (progressDialog.isShowing())
+                        progressDialog.dismiss();
+                    if (mMenuListView.isRefreshing())
+                        mMenuListView.onRefreshComplete();
+                    ToastMessage(msg.getData().getString("result"));
+                    mEmptyLayout.setErrorMessage(msg.getData().getString("result"));
+                    mEmptyLayout.showError();
+                    break;
+            }
+        }
+    };
+
+    private void analysisMenuData(String result) {
+        if (result != null) {
+            LogUtil.prinlnLongMsg("menudata", result);
+            try {
+                JSONObject resultObject = new JSONObject(result);
+                JSONArray dataArray = resultObject.optJSONArray("data");
+                if (dataArray != null) {
+                    for (int i = 0; i < dataArray.length(); i++) {
+                        JSONObject dataObject = dataArray.optJSONObject(i);
+                        if (dataObject != null) {
+                            GridMenuReportStatisticsBean gridMenuReportStatisticsBean
+                                    = new GridMenuReportStatisticsBean();
+                            String modelName = optStringNotNull(dataObject, "modelName");
+                            gridMenuReportStatisticsBean.setModelName(modelName);
+                            JSONArray listArray = dataObject.optJSONArray("list");
+                            List<GridMenuReportStatisticsBean.ListBean> listBeans = new ArrayList<>();
+                            if (listArray != null) {
+                                for (int j = 0; j < listArray.length(); j++) {
+                                    JSONObject listObject = listArray.optJSONObject(j);
+                                    if (listObject != null) {
+                                        GridMenuReportStatisticsBean.ListBean listBean = new GridMenuReportStatisticsBean.ListBean();
+                                        String caller = optStringNotNull(listObject, "caller");
+                                        String title = optStringNotNull(listObject, "title");
+                                        String reportName = optStringNotNull(listObject, "reportName");
+
+                                        listBean.setCaller(caller);
+                                        listBean.setReportName(reportName);
+                                        listBean.setTitle(title);
+
+                                        listBeans.add(listBean);
+                                    }
+                                }
+                                gridMenuReportStatisticsBean.setList(listBeans);
+                            }
+                            mGridMenuReportStatisticsBeans.add(gridMenuReportStatisticsBean);
+                        }
+                    }
+                    mReportStatisticsMenuListAdapter.notifyDataSetChanged();
+
+                    if (mGridMenuReportStatisticsBeans.size() == 0) {
+                        mSearchTextView.setVisibility(View.GONE);
+                        mEmptyLayout.showEmpty();
+                    } else {
+                        mSearchTextView.setVisibility(View.VISIBLE);
+                    }
+
+                    if (flag) {
+                        refreshRecentHeader();
+                    }
+                } else {
+                    mEmptyLayout.showEmpty();
+                    mSearchTextView.setVisibility(View.GONE);
+                }
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public String optStringNotNull(JSONObject json, String key) {
+        if (json.isNull(key)) {
+            return "";
+        } else {
+            return json.optString(key, "");
+        }
+    }
+
+
+    public static void setListViewHeightBasedOnChildren(ListView listView) {
+        ListAdapter listAdapter = listView.getAdapter();
+        if (listAdapter == null) {
+            return;
+        }
+        int totalHeight = 0;
+        for (int i = 0; i < listAdapter.getCount(); i++) {
+            View listItem = listAdapter.getView(i, null, listView);
+            listItem.measure(0, 0);
+            totalHeight += listItem.getMeasuredHeight();
+        }
+
+        ViewGroup.LayoutParams params = listView.getLayoutParams();
+
+        params.height = totalHeight
+                + (listView.getDividerHeight() * (listAdapter.getCount() - 1));
+        listView.setLayoutParams(params);
+    }
+}

+ 37 - 0
app_modular/appworks/src/main/java/com/uas/appworks/model/bean/RealTimeFormMenuBean.java

@@ -0,0 +1,37 @@
+package com.uas.appworks.model.bean;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2017/10/25 19:07
+ */
+
+public class RealTimeFormMenuBean {
+    private int mId;
+    private int mColor;
+    private String mTitle;
+
+    public int getId() {
+        return mId;
+    }
+
+    public void setId(int id) {
+        mId = id;
+    }
+
+    public int getColor() {
+        return mColor;
+    }
+
+    public void setColor(int color) {
+        mColor = color;
+    }
+
+    public String getTitle() {
+        return mTitle;
+    }
+
+    public void setTitle(String title) {
+        mTitle = title;
+    }
+}

BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_action_operate.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_batch_transfer.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_cycle_count.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_device_query.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_device_repair.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_device_scan.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_fault_check.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_inventory_query.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_maintain_manage.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_require_match.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_scrap_apply.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_statistical_analysis.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/ic_use_apply.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_action_operate.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_batch_transfer.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_cycle_count.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_query.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_repair.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_device_scan.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_fault_check.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_inventory_query.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_maintain_manage.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_require_match.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_scrap_apply.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_statistical_analysis.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/ic_use_apply.png


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 75 - 0
app_modular/appworks/src/main/res/layout/activity_device_batch_transfer_add.xml

@@ -0,0 +1,75 @@
+<?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:fitsSystemWindows="true"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:id="@+id/mRootLL"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:focusable="true"
+        android:focusableInTouchMode="true">
+
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/mRecyclerView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:focusableInTouchMode="false" />
+
+        <FrameLayout
+            android:id="@+id/bill_input_top_fl"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/white"
+            android:visibility="gone" />
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/background"
+        android:clickable="true"
+        android:orientation="horizontal"
+        android:padding="10dp">
+
+        <TextView
+            android:id="@+id/device_batch_transfer_add_cancel_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_cancel_bg"
+            android:gravity="center"
+            android:text="@string/cancel"
+            android:textColor="@color/selector_cancel_text_color"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/device_batch_transfer_add_reset_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/reset"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/device_batch_transfer_add_confirm_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginRight="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/app_dialog_ok"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+    </LinearLayout>
+</LinearLayout>

+ 69 - 0
app_modular/appworks/src/main/res/layout/activity_device_batch_transfer_detail.xml

@@ -0,0 +1,69 @@
+<?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">
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/device_batch_transfer_detail_form_rv"
+        android:layout_width="match_parent"
+        android:layout_height="210dp"
+        android:background="@color/white" />
+
+    <LinearLayout
+        android:id="@+id/device_batch_transfer_detail_operate_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/background"
+        android:clickable="true"
+        android:orientation="horizontal"
+        android:padding="6dp"
+        android:visibility="gone">
+
+        <TextView
+            android:id="@+id/device_batch_transfer_detail_reset_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/reset"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/device_batch_transfer_detail_scan_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/user_scan"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/device_batch_transfer_detail_submit_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginRight="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/common_submit_button"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginLeft="30dp"
+        android:layout_marginRight="30dp"
+        android:background="#33A2EE" />
+
+    <include layout="@layout/activity_bill_details" />
+</LinearLayout>

+ 79 - 0
app_modular/appworks/src/main/res/layout/activity_device_inventory_query.xml

@@ -0,0 +1,79 @@
+<?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:fitsSystemWindows="true"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:id="@+id/mRootLL"
+        android:layout_width="match_parent"
+        android:layout_height="220dp"
+        android:focusable="true"
+        android:focusableInTouchMode="true">
+
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/mRecyclerView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:focusableInTouchMode="false" />
+
+        <FrameLayout
+            android:id="@+id/bill_input_top_fl"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/white"
+            android:visibility="gone" />
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/background"
+        android:clickable="true"
+        android:orientation="horizontal"
+        android:padding="10dp">
+
+        <TextView
+            android:id="@+id/device_inventory_query_cancel_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_cancel_bg"
+            android:gravity="center"
+            android:text="@string/cancel"
+            android:textColor="@color/selector_cancel_text_color"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/device_inventory_query_reset_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/reset"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/device_inventory_query_confirm_tv"
+            android:layout_width="0dp"
+            android:layout_height="35dp"
+            android:layout_marginRight="30dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/app_dialog_ok"
+            android:textColor="@color/white"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <ListView
+        android:id="@+id/device_inventory_query_rv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+</LinearLayout>

+ 40 - 0
app_modular/appworks/src/main/res/layout/activity_real_time_form.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/me_menu_item_normal">
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/real_time_form_rv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:overScrollMode="never"
+        android:padding="20dp" />
+
+    <LinearLayout
+        android:id="@+id/real_time_form_empty_ll"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_centerInParent="true"
+        android:background="@color/white"
+        android:gravity="center"
+        android:orientation="vertical"
+        android:visibility="gone">
+
+        <pl.droidsonroids.gif.GifImageView
+            android:layout_width="110dp"
+            android:layout_height="110dp"
+            android:scaleType="fitEnd"
+            android:src="@drawable/gif_empty_view" />
+
+        <TextView
+            android:id="@+id/real_time_form_msg_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="90dp"
+            android:text="看板数据为空"
+            android:textColor="@color/empty_text_color"
+            android:textSize="14sp" />
+    </LinearLayout>
+</FrameLayout>

+ 34 - 0
app_modular/appworks/src/main/res/layout/item_grid_real_time_form_menu.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/real_time_form_menu_ll"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/me_menu_item_normal"
+    android:gravity="center"
+    android:orientation="vertical"
+    android:padding="10dp">
+
+    <com.core.widget.CircleTextView
+        android:id="@+id/real_time_form_menu_icon"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:gravity="center"
+        android:textColor="@color/white"
+        android:textSize="18sp"
+        app:backgroundColor="#4d70a6"
+        tools:text="B" />
+
+    <TextView
+        android:id="@+id/real_time_form_menu_content"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:ellipsize="end"
+        android:gravity="center_horizontal"
+        android:lines="2"
+        android:textSize="14sp"
+        tools:text="BOM" />
+</LinearLayout>

+ 42 - 0
app_modular/appworks/src/main/res/layout/item_list_device_query.xml

@@ -0,0 +1,42 @@
+<?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:descendantFocusability="blocksDescendants"
+    android:background="#f6f6f6"
+    android:paddingLeft="8dp"
+    android:paddingRight="8dp"
+    android:paddingTop="4dp"
+    android:paddingBottom="4dp"
+    >
+
+    <RelativeLayout
+        android:id="@+id/item_data_inquiry_flex_rl"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/shape_b2b_change_account">
+
+        <ImageView
+            android:id="@+id/item_data_inquiry_flex_iv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentBottom="true"
+            android:paddingTop="10dp"
+            android:paddingRight="10dp"
+            android:paddingBottom="10dp"
+            android:src="@drawable/ic_menu_retract"
+            android:visibility="gone" />
+
+
+        <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>
+</RelativeLayout>

+ 9 - 0
app_modular/appworks/src/main/res/menu/menu_operate.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+    <item
+        android:id="@+id/menu_operate_iv"
+        android:icon="@drawable/ic_action_operate"
+        android:title="操作"
+        app:showAsAction="always" />
+</menu>