Bladeren bron

工作日报界面一完成 备份

FANGLH 9 jaren geleden
bovenliggende
commit
ffe98faa4e

+ 33 - 8
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddLogActivity.java

@@ -10,7 +10,9 @@ import android.text.TextUtils;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.widget.Button;
 import android.widget.EditText;
+import android.widget.ImageView;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -30,7 +32,7 @@ import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-public class AddLogActivity extends BaseActivity {
+public class AddLogActivity extends BaseActivity{
     private EditText sum_tv;
     private EditText plan_tv;
     private EditText learned_tv;
@@ -78,6 +80,8 @@ public class AddLogActivity extends BaseActivity {
             }
         }
     };
+    private Button btn_submit;
+    private ImageView im_share;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -96,7 +100,8 @@ public class AddLogActivity extends BaseActivity {
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         if (item.getItemId() == R.id.push) {
-            sendAble();
+            startActivity(new Intent(activity, WorkLogsActivity.class));
+            //sendAble();
         }
         return super.onOptionsItemSelected(item);
     }
@@ -106,18 +111,36 @@ public class AddLogActivity extends BaseActivity {
         plan_tv = (EditText) findViewById(R.id.plan_tv);
         learned_tv = (EditText) findViewById(R.id.learned_tv);
         type_tv = (TextView) findViewById(R.id.type_tv);
-        type_tv.setText("周日志");
+
+        btn_submit = (Button) findViewById(R.id.btn_Daily_submitted);
+        im_share = (ImageView) findViewById(R.id.im_Experience_sharing);
+
+        type_tv.setText("今天日报");
         type_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 showDialog();
             }
         });
+
+        btn_submit.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                sendAble();
+            }
+        });
+        im_share.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                ToastMessage("分享功能后续完善");
+            }
+        });
     }
 
     private void showDialog() {
         AlertDialog.Builder builder = new AlertDialog.Builder(ct);
-        final String[] str = {"周日志", "月日志", "年日志"};
+       // final String[] str = {"周日志", "月日志", "年日志"};
+        final String[] str = {"今天日报"};
         builder.setItems(str, new DialogInterface.OnClickListener() {
             @Override
             public void onClick(DialogInterface dialogInterface, int i) {
@@ -141,16 +164,18 @@ public class AddLogActivity extends BaseActivity {
         }
         if (!StringUtils.isEmpty(plan_tv.getText().toString())) {
             builder.append("  工作计划:\n     " + plan_tv.getText().toString() + "\n");
-        } else {
+        }
+        /*else {
             Crouton.makeText(ct, R.string.add_plan);
             return;
-        }
+        }*/
         if (!StringUtils.isEmpty(learned_tv.getText().toString())) {
             builder.append("  心得体会:\n     " + learned_tv.getText().toString() + "\n");
-        } else {
+        }
+        /*else {
             Crouton.makeText(ct, R.string.add_learned);
             return;
-        }
+        }*/
         isSbmit = true;
         sendWorkLogByErp(sum_tv.getText().toString());
         sendWorkLog(builder.deleteCharAt(builder.length() - 1).toString());

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java

@@ -630,7 +630,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener {
                 startActivity(new Intent(activity, MeetingActivity.class));
                 break;
             case R.id.worklog://工作日志
-                startActivity(new Intent(activity, WorkLogsActivity.class));
+                startActivity(new Intent(activity, AddLogActivity.class));
                 break;
             case R.id.subord_log://我的下属工作日志
                 if (isMe)

+ 2 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/WorkLogsActivity.java

@@ -66,7 +66,7 @@ public class WorkLogsActivity extends BaseActivity {
     }
 
 
-    @Override
+    /*@Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.add_item:
@@ -80,7 +80,7 @@ public class WorkLogsActivity extends BaseActivity {
     public boolean onCreateOptionsMenu(Menu menu) {
         getMenuInflater().inflate(R.menu.menu_add_icon, menu);
         return super.onCreateOptionsMenu(menu);
-    }
+    }*/
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {

BIN
WeiChat/src/main/res/drawable-hdpi/xlist.png


+ 85 - 84
WeiChat/src/main/res/layout/activity_add_log.xml

@@ -9,82 +9,119 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:orientation="horizontal">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginLeft="10dp"
-            android:gravity="center_vertical"
-            android:text="日志类型"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-
-        <TextView
-            android:id="@+id/type_tv"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_marginLeft="20dp"
-            android:drawableRight="@drawable/oa_next"
-            android:gravity="center_vertical"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-    </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="50dp"
+                    android:orientation="horizontal"
+                    android:visibility="gone">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_marginLeft="10dp"
+                        android:gravity="center_vertical"
+                        android:text="日志类型"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <TextView
+                        android:id="@+id/type_tv"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_marginLeft="20dp"
+                        android:drawableRight="@drawable/oa_next"
+                        android:gravity="center_vertical"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+                </LinearLayout>
 
     <View
         android:layout_width="match_parent"
         android:layout_height="2px"
         android:background="@color/item_line" />
-
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="18sp"
+        android:text="工作总结"
+        android:paddingLeft="10dp"
+        android:layout_marginTop="8dp"
+        />
     <EditText
         android:id="@+id/sum_tv"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:background="@null"
         android:gravity="left|start"
-        android:hint="填写工作总结"
+        android:hint="请输入今日工作总结(必填)"
         android:minLines="5"
-        android:padding="5dp"
+        android:paddingLeft="10dp"
         android:textColor="@color/text_hine"
-        android:textSize="@dimen/text_main" />
+        android:textSize="15sp"
+        android:layout_marginTop="8dp"/>
 
     <View
         android:layout_width="match_parent"
         android:layout_height="2px"
         android:background="@color/item_line" />
-
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="18sp"
+        android:text="工作计划"
+        android:paddingLeft="10dp"
+        android:layout_marginTop="8dp"
+        />
     <EditText
         android:id="@+id/plan_tv"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:background="@null"
         android:gravity="left|start"
-        android:hint="填写工作计划"
+        android:hint="请输入明日工作计划(非必填)"
         android:minLines="5"
-        android:padding="5dp"
+        android:paddingLeft="10dp"
         android:textColor="@color/text_hine"
-        android:textSize="@dimen/text_main" />
+        android:textSize="15sp" />
 
     <View
         android:layout_width="match_parent"
         android:layout_height="2px"
         android:background="@color/item_line" />
 
+   <RelativeLayout
+       android:layout_width="wrap_content"
+       android:layout_height="wrap_content"
+      >
+
+       <TextView
+           android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:text="工作心得"
+           android:paddingLeft="10dp"
+           android:layout_marginTop="8dp"
+           android:textSize="18sp"
+           />
+       <ImageButton
+           android:id="@+id/im_Experience_sharing"
+           android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:src="@drawable/icon_app_share"
+           android:layout_alignParentRight="true"
+           />
+
+   </RelativeLayout>
     <EditText
         android:id="@+id/learned_tv"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:background="@null"
         android:gravity="left|start"
-        android:hint="填写心得体会"
+        android:hint="点击分享按钮可将工作心得分享到工作圈(非必填)"
         android:minLines="5"
-        android:padding="5dp"
+        android:paddingLeft="10dp"
         android:textColor="@color/text_hine"
-        android:textSize="@dimen/text_main" />
-
+        android:textSize="15sp" />
 
     <TextView
         android:layout_width="match_parent"
@@ -98,50 +135,14 @@
         android:visibility="gone" />
 
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="50dp"
-        android:orientation="horizontal"
-        android:visibility="gone">
-
-        <ImageView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:src="@drawable/im_btn_emotion_bg" />
-
-
-        <ImageView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:src="@drawable/im_btn_emotion_bg" />
-
-        <ImageView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:src="@drawable/im_btn_emotion_bg" />
-
-        <ImageView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:src="@drawable/im_btn_emotion_bg" />
-
-        <ImageView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:src="@drawable/im_btn_emotion_bg" />
-
-        <ImageView
-            android:id="@+id/add"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:src="@drawable/actionbar_add_icon" />
-    </LinearLayout>
+    <Button
+        android:id="@+id/btn_Daily_submitted"
+        android:layout_width="250dp"
+        android:layout_height="50dp"
+        style="@style/BlueButtonStyle"
+        android:layout_gravity="center_horizontal"
+        android:textSize="20sp"
+        android:layout_marginTop="70dp"
+        android:text="提    交"/>
 </LinearLayout>
 </ScrollView>

+ 1 - 0
WeiChat/src/main/res/menu/menu_push.xml

@@ -6,6 +6,7 @@
     <item
         android:id="@+id/push"
         android:title="提交"
+        android:icon="@drawable/xlist"
         app:showAsAction="ifRoom" />
 
 </menu>