FANGLH 8 år sedan
förälder
incheckning
4b990ddb93

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed Jan 03 12:48:02 CST 2018
-debugName=367
+#Wed Jan 03 19:22:12 CST 2018
+debugName=402
 versionName=624
-debugCode=367
+debugCode=402
 versionCode=163

+ 9 - 0
app_core/common/src/main/assets/work_menu.json

@@ -248,6 +248,15 @@
         "menuUrl": "",
         "caller": "",
         "isHide": false
+      },
+      {
+        "isLocalMenu": true,
+        "menuName": "str_company_salary",
+        "menuIcon": "company_salary",
+        "menuActivity": "com.modular.appme.CheckWagesActivity",
+        "menuUrl": "",
+        "caller": "",
+        "isHide": false
       }
     ]
   },

+ 33 - 11
app_core/common/src/main/res/layout/input_error_msg.xml

@@ -7,7 +7,17 @@
     android:paddingLeft="10dp"
     android:paddingRight="10dp"
     android:paddingTop="10dp"
-    android:background="@drawable/pop_round_bg">
+    android:background="@drawable/pop_round_bg"
+    >
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="请输入你的问题"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main"
+        android:layout_gravity="left"
+        android:layout_marginLeft="10dp"/>
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -16,21 +26,14 @@
         android:gravity="center"
         android:orientation="horizontal">
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text=""
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
 
         <EditText
             android:id="@+id/msg_et"
+            style="@style/form_linear_customer"
             android:layout_width="match_parent"
             android:layout_height="150dp"
             android:background="@null"
-            android:maxLines="5"
             android:maxLength="100"
-            android:hint="请输入你的问题"
             android:textColor="@color/text_main"
             android:textSize="@dimen/text_main"
             android:gravity="left"
@@ -55,6 +58,23 @@
         android:layout_height="wrap_content"
         android:orientation="horizontal">
 
+        <Button
+            android:id="@+id/cancel_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="#999999"
+            android:padding="10dp"
+            android:text="取消"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_main"
+            android:layout_weight="1"
+            android:layout_alignParentBottom="true"
+            android:layout_marginBottom="10dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginTop="10dp"
+            />
+
         <Button
             android:id="@+id/sure_tv"
             android:layout_width="match_parent"
@@ -67,8 +87,10 @@
             android:layout_weight="1"
             android:layout_alignParentBottom="true"
             android:layout_marginBottom="10dp"
-            android:layout_marginLeft="20dp"
+            android:layout_marginLeft="10dp"
             android:layout_marginRight="20dp"
             android:layout_marginTop="10dp"
-            /></LinearLayout>
+            />
+
+    </LinearLayout>
 </LinearLayout>

+ 51 - 29
app_modular/appme/src/main/java/com/uas/appme/settings/activity/WagesDetailsActivity.java

@@ -6,6 +6,7 @@ import android.graphics.BitmapFactory;
 import android.os.Bundle;
 import android.os.Environment;
 import android.os.Handler;
+import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -23,6 +24,7 @@ import android.widget.Toast;
 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.DateFormatUtil;
 import com.common.data.JSONUtil;
@@ -86,12 +88,13 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
     private LinearLayout noWageLl;
     private Boolean haveData = true;
     private TextView announcement_tv;
-    private int needSignature;
+    private int needSignature = -1;
     private JSONObject dataObject;
     private int sl_result = -1;
     private String sl_remark;
     private LinearLayout error_ll;
     private TextView error_tv;
+    private boolean errorgone = false;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -118,10 +121,11 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
                 if (!StringUtil.isEmpty(gonggao))
                     announcement_tv.setText("通知公告:"+gonggao);
                 else if (gonggao == null)
-                    announcement_tv.setText("暂无通知公告");
-
+                    announcement_tv.setVisibility(View.GONE);
+                Log.i("needSignature",needSignature+"");
                 needSignature = dataObject.getInteger("sl_signature");
-                if (needSignature == 0) mBtnSignature.setText("确认签收");
+                Log.i("needSignature",needSignature+"");
+                if (needSignature != 1) mBtnSignature.setText("确认签收");
                 sl_result = dataObject.getInteger("sl_result");
                 sl_remark = dataObject.getString("sl_remark");
                 if (!StringUtil.isEmpty(sl_remark) && sl_result == -1){
@@ -175,8 +179,11 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
 
     private void showEnty() {
         haveData = false;
+        mWagesLv.setVisibility(View.GONE);
+        received_im.setVisibility(View.GONE);
         noWageLl.setVisibility(View.VISIBLE);
         mBtnSignature.setVisibility(View.GONE);
+        announcement_tv.setVisibility(View.GONE);
         Log.i("getEmSalary","showEnty");
     }
 
@@ -238,9 +245,7 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
             if (needSignature == 1)
                 showSiganWindow();
             else
-//                doSubmit();
-                doNewSubmit(null,null);
-
+                doNoSignatureSubmit();
         }else if (v.getId() == R.id.clear_im){
             pathView.clear();
         }else if (v.getId() == R.id.cancel_tv){
@@ -260,7 +265,6 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
                     BitmapFactory.Options options = new BitmapFactory.Options();
                     options.inSampleSize = 2;
                     Bitmap pathBm = BitmapFactory.decodeFile(plainpath);
-//                    doSubmit(pathBm,plainpath);
                     doNewSubmit(pathBm, plainpath);
                 } catch (IOException e) {
                     e.printStackTrace();
@@ -270,7 +274,7 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
             }
         }else if (v.getId() == R.id.sure_tv){
             if (StringUtil.isEmpty(msg_et.getText().toString())){
-                ToastMessage("请输入你的问题");
+                ToastMessage("请输入你的报错问题");
                 return;
             }
             if (!CommonUtil.isNetWorkConnected(ct)){
@@ -295,6 +299,8 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
                 }
             });
             picker.show();
+        }else if (v.getId() == R.id.cancel_tv){
+            popupWindow.dismiss();
         }
     }
 
@@ -307,6 +313,8 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
             kvModeList.clear();
             myAdapter.notifyDataSetChanged();
         }
+
+        errorgone = false;
         //        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build(true);
         HttpClient httpClient = new HttpClient.Builder("http://192.168.253.58:8080/ERP/").isDebug(true).build(true);
         httpClient.Api().send(new HttpClient.Builder()
@@ -352,7 +360,9 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
                 if (!JSONUtil.validate(o.toString()) || o == null) return;
                 LogUtil.prinlnLongMsg("salaryWrong", o.toString()+"");
                 if (o.toString().contains("success") && JSON.parseObject(o.toString()).getBoolean("success")){
-                    ToastMessage("你的问题已提交");
+                    ToastMessage("报错成功");
+                    error_ll.setVisibility(View.VISIBLE);
+                    error_tv.setText(msg_et.getText().toString());
                     popupWindow.dismiss();
                 }
 
@@ -367,10 +377,15 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
         params.addBodyParameter("sl_id",sl_id);
         params.addBodyParameter("result","true");
         params.addQueryStringParameter("master", master);
-        params.addBodyParameter("msg","");
-        Log.i("urlparams",plainpath);
-        if (needSignature == 1)
+        Log.i("urlparams",plainpath+"");
+        if (needSignature == 1 && !StringUtil.isEmpty(plainpath)){
             params.addBodyParameter("img",new File(plainpath));
+        }else {
+//            params.addHeader("Content-Type","multipart/form-data");
+            params.addBodyParameter("img","");
+        }
+//        else
+//            params.addBodyParameter("img",new File());
         final HttpUtils http = new HttpUtils();
         Log.i("urlparams",url+params+"");
 
@@ -390,6 +405,8 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
                     received_im.setVisibility(View.VISIBLE);
                     mBtnSignature.setText("已收签");
                     mBtnSignature.setEnabled(false);
+                    errorgone = true;
+                    invalidateOptionsMenu();
                     closePopupWindow();
                 }
                 progressDialog.dismiss();
@@ -411,28 +428,31 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
     }
 
     //不需要签名情况下的签收
-    private void doSubmit() {
+    private void doNoSignatureSubmit() {
 //        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build(true);
         HttpClient httpClient = new HttpClient.Builder("http://192.168.253.58:8080/ERP/").isDebug(true).build(true);
         httpClient.Api().send(new HttpClient.Builder()
-                .url("mobile/salary/salaryBack.action")
+                .url("mobile/salary/salaryBackNoSignature.action\n")
                 .add("emcode", emcode)
                 .add("sl_id",sl_id)
                 .add("result",true)
                 .add("master", master)
-                .add("msg","")
                 .method(Method.POST)
                 .build(),new ResultSubscriber<>(new ResultListener<Object>() {
             @Override
             public void onResponse(Object o) {
-                if (!JSONUtil.validate(o.toString()) || o == null) return;
                 LogUtil.prinlnLongMsg("salaryBack", o.toString()+"");
-                if (JSONUtil.validate(o.toString()) && JSON.parseObject(o.toString()).getBoolean("success")) {
+                if (!JSONUtil.validate(o.toString()) || o == null) return;
+                if (JSONUtil.validate(o.toString()) && o.toString().contains("success") && JSON.parseObject(o.toString()).getBoolean("success")) {
                     Toast.makeText(ct,"工资条签名提交成功",Toast.LENGTH_LONG).show();
                     received_im.setVisibility(View.VISIBLE);
                     mBtnSignature.setText("已收签");
                     mBtnSignature.setEnabled(false);
+                    errorgone = true;
+                    invalidateOptionsMenu();
                     closePopupWindow();
+                }else {
+                    ViewUtil.ToastMessage(ct, getString(R.string.common_save_failed));
                 }
                 progressDialog.dismiss();
             }
@@ -454,7 +474,7 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
         if (setWindow == null) initPopupWindow();
         setWindow.showAtLocation(getWindow().getDecorView().
                 findViewById(android.R.id.content), Gravity.BOTTOM, 0, 0);
-        DisplayUtil.backgroundAlpha(this, 0.4f);
+//        DisplayUtil.backgroundAlpha(this, 0.4f);
     }
 
     private void initPopupWindow() {
@@ -471,8 +491,8 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
 
         setWindow = new PopupWindow(viewContext,
                 LinearLayout.LayoutParams.MATCH_PARENT,
-                LinearLayout.LayoutParams.WRAP_CONTENT, true);
-        setWindow.setOutsideTouchable(false);
+                LinearLayout.LayoutParams.WRAP_CONTENT, false);
+        setWindow.setOutsideTouchable(true);
         setWindow.setAnimationStyle(com.uas.appworks.R.style.MenuAnimationFade);
         setWindow.setBackgroundDrawable(mContext.getResources().getDrawable(com.uas.appworks.R.drawable.bg_popuwin));
         setWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
@@ -491,10 +511,11 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
     @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
         menu.clear();
-        if(haveData && StringUtil.isEmpty(sl_remark) && sl_result == 0)
+        if(haveData && StringUtil.isEmpty(sl_remark) && sl_result == 0 && !errorgone)
             getMenuInflater().inflate(R.menu.wage_error, menu);
         else
             menu.clear();
+
         return super.onPrepareOptionsMenu(menu);
     }
     @Override
@@ -521,14 +542,15 @@ public class WagesDetailsActivity extends BaseActivity implements View.OnClickLi
         // 设置按钮的点击事件
         msg_et = (EditText) contentView.findViewById(R.id.msg_et);
         contentView.findViewById(R.id.sure_tv).setOnClickListener(this);
+        contentView.findViewById(R.id.cancel_tv).setOnClickListener(this);
 
-//        DisplayMetrics dm = getResources().getDisplayMetrics();
-//        int w_screen = dm.widthPixels;
-//        int h_screen = dm.heightPixels;
-//        w_screen = DisplayUtil.dip2px(this, 300);
-//        h_screen = DisplayUtil.dip2px(this, 250);
-//
-//        popupWindow = new PopupWindow(contentView, w_screen, h_screen, true);
+        DisplayMetrics dm = getResources().getDisplayMetrics();
+        int w_screen = dm.widthPixels;
+        int h_screen = dm.heightPixels;
+        w_screen = DisplayUtil.dip2px(this, 300);
+        h_screen = DisplayUtil.dip2px(this, 250);
+
+        popupWindow = new PopupWindow(contentView, w_screen, h_screen, true);
         popupWindow = new PopupWindow(contentView,
                 LinearLayout.LayoutParams.MATCH_PARENT,
                 LinearLayout.LayoutParams.WRAP_CONTENT, true);

+ 1 - 1
app_modular/appme/src/main/java/com/uas/appme/settings/adapter/WagesDetailsAdapter.java

@@ -48,7 +48,7 @@ public class WagesDetailsAdapter extends BaseAdapter {
         WagesHolder wHolder;
         if (convertView == null) {
             wHolder = new WagesHolder();
-            convertView = View.inflate(mContext, R.layout.item_comkey_value, null);
+            convertView = View.inflate(mContext, R.layout.item_comkey_value_salary, null);
             wHolder.key = (TextView) convertView.findViewById(R.id.item_comdoc_am_list_tv);
             wHolder.value = (TextView) convertView.findViewById(R.id.item_comdoc_am_value_tv);
             convertView.setTag(wHolder);

+ 7 - 6
app_modular/appme/src/main/res/layout/check_wages_activity.xml

@@ -14,7 +14,8 @@
         android:layout_marginRight="10dp"
         android:drawableRight="@drawable/oa_next"
         android:textSize="15sp"
-        android:hint="请选择查询日期"/>
+        android:hint="请选择查询日期"
+        android:textColor="#333333"/>
     <View
         android:layout_width="match_parent"
         android:layout_height="1px"
@@ -41,12 +42,12 @@
     android:background="@color/item_line" />
 
     <TextView
+        android:textColor="#333333"
         android:id="@+id/wages_phone_tv"
         android:layout_width="match_parent"
         android:layout_height="50dp"
         android:layout_marginLeft="10dp"
         android:layout_marginRight="10dp"
-        android:drawableRight="@drawable/oa_next"
         android:gravity="center_vertical"
         android:textSize="15sp" />
     <View
@@ -103,10 +104,10 @@
             android:padding="2dp"
             android:text="获取验证码"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_main"
+            android:textSize="13sp"
             android:layout_alignParentRight="true"
             android:layout_marginRight="10dp"
-            android:background="@drawable/bg_bule_btn"
+            android:background="#2f95dd"
             android:visibility="visible"
             android:layout_marginTop="5dp"
             />
@@ -138,8 +139,8 @@
         android:layout_height="45dp"
         android:padding="10dp"
         android:text="忘记密码?"
-        android:textColor="@color/blue"
-        android:textSize="@dimen/text_main"
+        android:textColor="#2f95dd"
+        android:textSize="12sp"
         android:layout_alignParentRight="true"
         android:layout_marginRight="10dp"
         android:layout_gravity="right"

+ 1 - 1
app_modular/appme/src/main/res/layout/item_comkey_value.xml

@@ -21,7 +21,7 @@
         android:layout_height="wrap_content"
         android:layout_weight="2"
         android:text="2016-11-25-21:22"
-        android:textColor="#2F95DD"
+        android:textColor="#2f95dd"
         />
 
 </LinearLayout>

+ 27 - 0
app_modular/appme/src/main/res/layout/item_comkey_value_salary.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <TextView
+        android:id="@+id/item_comdoc_am_list_tv"
+        android:layout_marginTop="5dp"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:text="开始时间:"
+        android:layout_marginRight="10dp"
+        android:textColor="#6E6E6E"
+        />
+
+    <TextView
+        android:id="@+id/item_comdoc_am_value_tv"
+        android:layout_marginTop="5dp"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:text="2016-11-25-21:22"
+        android:textColor="#2f95dd"
+        />
+
+</LinearLayout>

+ 4 - 3
app_modular/appme/src/main/res/layout/sigature_pop.xml

@@ -3,12 +3,13 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:background="@drawable/bg">
+    android:background="@color/white">
 
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_margin="5dp">
+        android:layout_margin="5dp"
+        android:background="@color/white">
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -85,7 +86,7 @@
                 android:layout_height="250dp"
                 android:layout_below="@+id/view3"
                 android:layout_gravity="center_horizontal"
-                android:background="@color/white" />
+                android:background="#F0F0F0" />
 
 
         </RelativeLayout>

+ 16 - 11
app_modular/appme/src/main/res/layout/wages_details_activity.xml

@@ -22,7 +22,7 @@
             android:layout_width="match_parent"
             android:layout_height="30dp"
             android:drawablePadding="5dp"
-            android:drawableRight="@drawable/rili"
+            android:drawableRight="@drawable/oa_next"
             android:gravity="center|left"
             android:paddingRight="20dp"
             android:text=""
@@ -31,11 +31,11 @@
     </LinearLayout>
     <View
         android:layout_width="match_parent"
-        android:layout_height="1dp"
+        android:layout_height="2dp"
         android:background="#FBFBFB" />
     <TextView
         android:id="@+id/announcement"
-        android:textSize="12sp"
+        android:textSize="13sp"
         android:background="@color/white"
         android:padding="10dp"
         android:layout_width="match_parent"
@@ -44,7 +44,9 @@
         android:singleLine="true"
         android:ellipsize="marquee"
         android:focusable="true"
-        android:focusableInTouchMode="true"  />
+        android:focusableInTouchMode="true"
+        android:textColor="#2f95dd"
+        />
     <View
         android:layout_width="match_parent"
         android:layout_height="10dp"
@@ -77,11 +79,12 @@
                     android:id="@+id/received_im"
                     android:layout_alignBottom="@+id/wages_lv"
                     android:layout_alignRight="@+id/wages_lv"
-                    android:layout_width="100dp"
-                    android:layout_height="100dp"
+                    android:layout_width="80dp"
+                    android:layout_height="80dp"
                     android:src="@drawable/received"
-                    android:layout_margin="30dp"
                     android:visibility="gone"
+                    android:layout_marginRight="20dp"
+                    android:layout_marginBottom="20dp"
                     />
             </RelativeLayout>
             <LinearLayout
@@ -109,7 +112,9 @@
                 android:layout_height="wrap_content"
                 android:orientation="vertical"
                 android:padding="10dp"
-                android:visibility="gone">
+                android:visibility="gone"
+                android:background="@drawable/errorbg"
+                >
                 <TextView
                     android:textColor="@color/red"
                     android:text="报错信息"
@@ -120,7 +125,6 @@
                     android:text="报错等我QQ信息"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:background="@drawable/errorbg"
                     android:padding="10dp"
                     android:textColor="#000000"/>
             </LinearLayout>
@@ -128,7 +132,8 @@
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal">
+                android:orientation="horizontal"
+                android:background="#ebe9e9">
 
                 <Button
                     android:id="@+id/btn_signature"
@@ -136,7 +141,7 @@
                     android:layout_height="wrap_content"
                     android:background="@drawable/bg_bule_btn"
                     android:padding="10dp"
-                    android:text="签"
+                    android:text="签"
                     android:textColor="@color/white"
                     android:textSize="@dimen/text_main"
                     android:layout_weight="1"