Browse Source

提交类型 修复bug
提交内容 修改会议出现两个情况

Bitliker 8 years ago
parent
commit
32353e42bd

+ 11 - 4
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/MissionPresenter.java

@@ -85,11 +85,18 @@ public class MissionPresenter implements IMissionPresenter, OnHttpResultListener
             if (modelIntent != null&&modelIntent.getStatus()!=5)
                 modelIntent.setStatus(4);
         }
-        if (MyApplication.getInstance().isNetworkActive()) {
-            loadMissionPlan();
-        } else {
-            loadMissionByDB();
+        if (modelIntent==null){
+            if (MyApplication.getInstance().isNetworkActive()) {
+                loadMissionPlan();
+            } else {
+                loadMissionByDB();
+            }
+        }else{
+            List<MissionModel> models=new ArrayList<>();
+            models.add(modelIntent);
+            iMission.showModels(models);
         }
+
     }
 
     boolean isSubmiting = false;

+ 18 - 22
app_modular/appworks/src/main/java/com/uas/appworks/crm3_0/fragment/CustomerListDetailsFragment.java

@@ -11,6 +11,7 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baidu.cyberplayer.utils.G;
 import com.common.LogUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
@@ -41,7 +42,7 @@ public class CustomerListDetailsFragment extends BaseNetFragment {
 
     private String mCaller;
     private String mCondition;
-    private int mPageIndex = 0;
+    private int mPageIndex = 1;
     private RecyclerView mRecyclerView;
 
     @Override
@@ -160,6 +161,7 @@ public class CustomerListDetailsFragment extends BaseNetFragment {
     private ListAdapter mListAdapter;
 
     private void setAdapter(List<BillListGroupModel> groupModels) {
+        LogUtil.i("gong", "groupModels=" + JSON.toJSONString(groupModels));
         if (mListAdapter == null) {
             mListAdapter = new ListAdapter(groupModels);
             mRecyclerView.setAdapter(mListAdapter);
@@ -168,7 +170,7 @@ public class CustomerListDetailsFragment extends BaseNetFragment {
         }
     }
 
-    private class ListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+    private class ListAdapter extends RecyclerView.Adapter<ListAdapter.ViewHolder> {
         private List<BillListGroupModel> groupModels;
         private List<BillListGroupModel.BillListField> listFields;
 
@@ -192,11 +194,9 @@ public class CustomerListDetailsFragment extends BaseNetFragment {
             } else {
                 listFields.clear();
             }
+            if (ListUtils.isEmpty(groupModels)) return;
             for (BillListGroupModel groupModel : groupModels) {
                 if (!ListUtils.isEmpty(groupModel.getBillFields())) {
-                    BillListGroupModel.BillListField lineField = new BillListGroupModel.BillListField();
-                    lineField.setId(-1);
-                    listFields.add(lineField);
                     listFields.addAll(groupModel.getBillFields());
                 }
             }
@@ -208,10 +208,7 @@ public class CustomerListDetailsFragment extends BaseNetFragment {
         }
 
         @Override
-        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int type) {
-            if (type == -1) {
-                return new LineViewHolder(LayoutInflater.from(ct).inflate(R.layout.item_customer_list_details_list, viewGroup, false));
-            }
+        public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int type) {
             return new ViewHolder(LayoutInflater.from(ct).inflate(R.layout.item_customer_list_details_list, viewGroup, false));
         }
 
@@ -223,33 +220,32 @@ public class CustomerListDetailsFragment extends BaseNetFragment {
         class ViewHolder extends RecyclerView.ViewHolder {
             private TextView captionTV;
             private TextView valueTv;
-
+            private View lineView;
 
             public ViewHolder(View itemView) {
                 super(itemView);
                 captionTV = (TextView) itemView.findViewById(R.id.captionTV);
                 valueTv = (TextView) itemView.findViewById(R.id.valueTv);
+                lineView = itemView.findViewById(R.id.lineView);
+                lineView.setVisibility(View.GONE);
             }
         }
 
-        class LineViewHolder extends RecyclerView.ViewHolder {
-            public LineViewHolder(View itemView) {
-                super(itemView);
-            }
-        }
 
 
-        @Override
-        public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {
-            if (viewHolder instanceof ViewHolder) {
-                bindViewHodler((ViewHolder) viewHolder, i);
-            }
-        }
 
-        private void bindViewHodler(ViewHolder mViewHolder, int position) {
+        @Override
+        public void onBindViewHolder(ViewHolder mViewHolder, int position) {
             BillListGroupModel.BillListField field = listFields.get(position);
             mViewHolder.captionTV.setText(field.getCaption());
             mViewHolder.valueTv.setText(field.getValue());
+            if (field.getGroupIndex()!=0&&position>=1&&field.getGroupIndex()>listFields.get(position-1).getGroupIndex()){
+                mViewHolder.lineView.setVisibility(View.VISIBLE);
+            }else{
+                mViewHolder.lineView.setVisibility(View.GONE);
+            }
         }
+
+
     }
 }

+ 34 - 20
app_modular/appworks/src/main/res/layout/item_customer_list_details_list.xml

@@ -1,27 +1,41 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@style/approvalStyle"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@color/white"
-    android:paddingLeft="@dimen/padding">
+    android:orientation="vertical">
 
-    <TextView
-        android:id="@+id/captionTV"
-        style="@style/approvalItemStyle"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginRight="10dp"
-        android:layout_weight="1"
-        android:textColor="#999999"
-        android:textSize="13sp" />
+    <View
+        android:id="@+id/lineView"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/padding"
+        android:background="@color/linen"/>
+
+    <LinearLayout
+        style="@style/approvalStyle"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/white"
+        android:orientation="horizontal"
+        android:paddingLeft="@dimen/padding">
+
+        <TextView
+            android:id="@+id/captionTV"
+            style="@style/approvalItemStyle"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="10dp"
+            android:layout_weight="1"
+            android:textColor="#999999"
+            android:textSize="13sp" />
+
+        <TextView
+            android:id="@+id/valueTv"
+            style="@style/approvalItemStyle"
+            android:layout_width="0dp"
+            android:layout_weight="3"
+            android:gravity="center|left"
+            android:textColor="@color/text_main"
+            android:textSize="13sp" />
+    </LinearLayout>
 
-    <TextView
-        android:id="@+id/valueTv"
-        style="@style/approvalItemStyle"
-        android:layout_width="0dp"
-        android:layout_weight="3"
-        android:gravity="center|left"
-        android:textColor="@color/text_main"
-        android:textSize="13sp" />
 </LinearLayout>