Ver Fonte

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

# Conflicts:
#	WeiChat/src/main/res/values-en/strings.xml
#	WeiChat/src/main/res/values/strings.xml
Bitliker há 8 anos atrás
pai
commit
1a40382e3d

+ 7 - 3
WeiChat/src/main/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.xzjmyk.pm.activity"
-    android:versionCode="91"
-    android:versionName="5.7.7" >
+    android:versionCode="92"
+    android:versionName="5.7.8" >
 
     <uses-sdk
         android:minSdkVersion="11"
@@ -940,7 +940,11 @@
         <activity android:name=".ui.me.InfoCodeActivity"
             android:label="@string/info_2dcode"></activity>
         <activity android:name=".ui.me.ScanInfoResultsActivity"
-            android:label="扫描结果"></activity>
+            android:label="@string/Results_of_scan"></activity>
+        <activity android:name=".ui.erp.activity.oa.ExpenseReimbursementActivity"
+            android:label="@string/Expense_reimbursement"
+            android:windowSoftInputMode="adjustPan">
+        </activity>
     </application>
 
 </manifest>

+ 674 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/ExpenseReimbursementActivity.java

@@ -0,0 +1,674 @@
+package com.xzjmyk.pm.activity.ui.erp.activity.oa;
+
+import android.annotation.TargetApi;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Handler;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
+import android.widget.TextView;
+
+import com.andreabaccega.widget.FormEditText;
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
+import com.nostra13.universalimageloader.core.ImageLoader;
+import com.xzjmyk.pm.activity.AppConstant;
+import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.oa.SelectBean;
+import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.ListUtils;
+import com.xzjmyk.pm.activity.ui.erp.view.NScrollerGridView;
+import com.xzjmyk.pm.activity.ui.tool.MultiImagePreviewActivity;
+import com.xzjmyk.pm.activity.util.CameraUtil;
+import com.xzjmyk.pm.activity.util.DisplayUtil;
+import com.xzjmyk.pm.activity.util.StringUtils;
+import com.xzjmyk.pm.activity.util.ToastUtil;
+import com.xzjmyk.pm.activity.view.MyGridView;
+import com.xzjmyk.pm.activity.view.MyListView;
+import com.xzjmyk.pm.activity.view.SquareCenterImageView;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+@TargetApi(Build.VERSION_CODES.CUPCAKE)
+/**
+ * Created by FANGlh on 2017/6/9.
+ * function:
+ */
+
+public class ExpenseReimbursementActivity extends BaseActivity implements View.OnClickListener{
+    @ViewInject(R.id.reimbursement_title_fet)
+    private FormEditText reimbursement_title_fet;
+    @ViewInject(R.id.reimbursement_type_fet)
+    private FormEditText reimbursement_type_fet;
+    @ViewInject(R.id.reimbursement_currency_fet)
+    private FormEditText reimbursement_currency_fet;
+    @ViewInject(R.id.btn_save)
+    private Button btn_save;
+    @ViewInject(R.id.gv_details_list)
+    private NScrollerGridView gv_details_list;
+    @ViewInject(R.id.sum_money_tv)
+    private TextView sum_money_tv;
+    @ViewInject(R.id.detail_table_ll)
+    private LinearLayout detail_table_ll;
+    private MyGridView mGridView;
+    private GridViewAdapter mAdapter;
+    private ArrayList<String> mPhotoList;
+    private Uri mNewPhotoUri;// 拍照和图库 获得图片的URI
+    private static final int REQUEST_CODE_CAPTURE_PHOTO = 1;// 拍照
+    private static final int REQUEST_CODE_PICK_PHOTO = 2;// 图库
+    private static final int SELECT_REIMBURSEMENT_TYPE = 3;
+    private static final int SELECT_CURRENCY = 4;
+    private PopupWindow setWindow = null;//
+    private GridDataAdapter gAdapter;
+    private String[] TypeDatas =  {"类型1","类型2","类型3","类型4","类型5"};
+    private String[] CurrencyDatas =  {"币种1","币种2","币种3","币种4","币种5"};
+    @ViewInject(R.id.details_data_tv)
+    private TextView details_data_tv;
+    private Boolean initDetailDatas_initialization = false;
+    private Button btn_sure;
+    private int VERSION_CODES;
+    @ViewInject(R.id.table_details_list)
+    private MyListView table_details_list;
+    private DetailsTableAdapter dtAdapter;
+    private List<String> detailsData;  // popwindow要展示的消费明细类型
+    private List<String> selected_detailsData; //点击后要返回的消费明细类型
+    private List<String> table_list_type; //表格里面新增的消费明细类型
+    private List<Double> table_list_money;//表格里面新增的消费明细金额
+    private double sum_money = 0.0; // 最后算的的总金额
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_expense_reimbursement);
+        ViewUtils.inject(this);
+        iniView();
+        initPicturesEvent();
+    }
+    private void iniView() {
+        VERSION_CODES = android.os.Build.VERSION.SDK_INT;
+        reimbursement_title_fet.setOnClickListener(this);
+
+        reimbursement_type_fet.setKeyListener(null);
+        reimbursement_type_fet.setFocusable(false);
+        reimbursement_type_fet.setOnClickListener(this);
+
+        reimbursement_currency_fet.setKeyListener(null);
+        reimbursement_currency_fet.setFocusable(false);
+        reimbursement_currency_fet.setOnClickListener(this);
+
+        btn_save.setOnClickListener(this);
+
+        mGridView = (MyGridView) findViewById(R.id.grid_view);
+        findViewById(R.id.add_details_tv).setOnClickListener(this);
+        findViewById(R.id.automatic_calculation_tv).setOnClickListener(this);
+        mPhotoList = new ArrayList<String>();
+        mAdapter = new GridViewAdapter();
+        mGridView.setAdapter(mAdapter);
+
+        detail_table_ll.setVisibility(View.GONE);
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()){
+            case R.id.reimbursement_type_fet:
+                doSingleSelect(TypeDatas,2,getString(R.string.Reimbursement_type),SELECT_REIMBURSEMENT_TYPE);
+                break;
+            case R.id.reimbursement_currency_fet:
+                doSingleSelect(CurrencyDatas,2,getString(R.string.currency),SELECT_CURRENCY);
+                break;
+            case R.id.add_details_tv:
+                showPopupWindow();
+                break;
+            case R.id.automatic_calculation_tv:
+                doAutoCalculateJudge();
+                break;
+            case R.id.btn_save:
+                if (reimbursement_title_fet.testValidity() ){
+
+                }
+                break;
+        }
+    }
+
+    private void doAutoCalculateJudge() {
+        sum_money = 0.0;
+        if (ListUtils.isEmpty(table_list_money)){
+            ToastMessage("请输入消费金额");
+            return;
+        }
+
+        if (table_list_type.size() > table_list_money.size()){
+            ToastMessage("请输入完整的消费明细金额");
+            return;
+        }
+        Log.i("table_list_money",table_list_money.toString()+"");
+        for (int i = 0; i < table_list_money.size(); i++) {
+            sum_money = sum_money + Double.valueOf(table_list_money.get(i));
+            if (i == (table_list_money.size() - 1)){
+                sum_money_tv.setText(CommonUtil.getTwoPointDouble(sum_money)+"");
+            }
+        }
+    }
+
+    private void showPopupWindow() {
+        if (setWindow == null) initPopupWindow();
+        setWindow.showAtLocation(getWindow().getDecorView().
+                findViewById(android.R.id.content), Gravity.BOTTOM, 0, 0);
+        if (VERSION_CODES  < 24) // API版本太高不断刷新View亮度,会有黑缝隙bug
+            DisplayUtil.backgroundAlpha(this, 0.4f);
+    }
+    private void closePopupWindow() {
+        if (setWindow != null)
+            setWindow.dismiss();
+        if (VERSION_CODES  < 24)
+            DisplayUtil.backgroundAlpha(this, 1f);
+    }
+    private void initPopupWindow() {
+        View viewContext = LayoutInflater.from(ct).inflate(R.layout.expense_details_menu, null);
+
+        setWindow = new PopupWindow(viewContext,
+                LinearLayout.LayoutParams.MATCH_PARENT,
+                LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        setWindow.setAnimationStyle(R.style.MenuAnimationFade);
+        setWindow.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.bg_popuwin));
+        setWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closePopupWindow();
+            }
+        });
+        gv_details_list = (NScrollerGridView) viewContext.findViewById(R.id.gv_details_list);
+        btn_sure = (Button) viewContext.findViewById(R.id.btn_sure);
+        initAddView();
+        initAddDatas();
+        initAddEvent();
+    }
+
+    private void initAddEvent() {
+        gv_details_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                GridDataAdapter.ViewModle modle = (GridDataAdapter.ViewModle) view.getTag();
+                // TODO 记录当下点击的位置
+                if (!ListUtils.isEmpty(selected_detailsData) && selected_detailsData.contains(detailsData.get(position))){
+                    selected_detailsData.remove(detailsData.get(position));
+                }else {
+                    selected_detailsData.add(detailsData.get(position));
+                }
+                gAdapter.setSelected_data(selected_detailsData);
+                gAdapter.notifyDataSetChanged();
+                Log.i("selected_detailsData",selected_detailsData.toString()+"ss");
+            }
+        });
+
+        btn_sure.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closePopupWindow();
+                if (ListUtils.isEmpty(selected_detailsData)) return;
+                for (int i = 0; i < selected_detailsData.size(); i++) {
+                    table_list_type.add(selected_detailsData.get(i));
+                    detailsData.remove(selected_detailsData.get(i));
+                    if (i == (selected_detailsData.size()-1)){
+                        dtAdapter.setTable_list_type(table_list_type);
+                        dtAdapter.setTable_list_money(table_list_money);
+                        dtAdapter.notifyDataSetChanged();
+                        detail_table_ll.setVisibility(View.VISIBLE);
+                        Log.i("selected_detailsData",selected_detailsData.toString()+"se");
+                        Log.i("detailsData",detailsData.toString()+"de");
+                        Log.i("table_list_type",table_list_type.toString()+"tlt");
+                    }
+                }
+                selected_detailsData.clear();
+            }
+        });
+    }
+
+    private void initAddDatas() {
+        if (!ListUtils.isEmpty(selected_detailsData)) selected_detailsData.clear();
+        //TODO 接口返回
+        if (initDetailDatas_initialization) return;
+        for (int i = 0; i < 22; i++) {
+            detailsData.add("明细" + i);
+            initDetailDatas_initialization = true;
+            Log.i("initDetailDatas","false");
+        }
+        Log.i("initDetailDatas","initDetailDatas_initialization");
+    }
+    private void initAddView() {
+        detailsData = new ArrayList<>();
+        selected_detailsData = new ArrayList<>();
+        gAdapter = new GridDataAdapter(mContext, detailsData);
+        gv_details_list.setAdapter(gAdapter);
+
+        dtAdapter = new DetailsTableAdapter();
+        table_list_type = new ArrayList<>();
+        table_list_money = new ArrayList<>();
+        table_details_list.setAdapter(dtAdapter);
+    }
+
+
+
+
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == REQUEST_CODE_CAPTURE_PHOTO) {// 拍照返回
+            if (resultCode == Activity.RESULT_OK) {
+                if (mNewPhotoUri != null) {
+                    mPhotoList.add(mNewPhotoUri.getPath());
+                    mAdapter.notifyDataSetInvalidated();
+                } else {
+                    ToastUtil.showToast(this, R.string.c_take_picture_failed);
+                }
+            }
+        }else if (requestCode == REQUEST_CODE_PICK_PHOTO) {// 选择一张图片,然后立即调用裁减
+            if (resultCode == Activity.RESULT_OK) {
+                if (data != null && data.getData() != null) {
+                    String path = CameraUtil.getImagePathFromUri(this, data.getData());
+                    mPhotoList.add(path);
+                    mAdapter.notifyDataSetInvalidated();
+                } else {
+                    ToastUtil.showToast(this, R.string.c_photo_album_failed);
+                }
+            }
+        }
+
+        if (resultCode == 0x20){
+            SelectBean b = data.getParcelableExtra("data");
+            if (b != null){
+                switch (requestCode){
+                    case SELECT_REIMBURSEMENT_TYPE:
+                        reimbursement_type_fet.setText(b.getName());
+                        break;
+                    case SELECT_CURRENCY:
+                        reimbursement_currency_fet.setText(b.getName());
+                        break;
+                    default:
+                }
+            }
+
+        }
+    }
+
+
+    private class DetailsTableAdapter extends BaseAdapter{
+        private Context context;
+        private List<String> table_list_type;
+        private List<Double> table_list_money;
+
+        public List<String> getTable_list_type() {
+            return table_list_type;
+        }
+
+        public void setTable_list_type(List<String> table_list_type) {
+            this.table_list_type = table_list_type;
+        }
+
+        public List<Double> getTable_list_money() {
+            return table_list_money;
+        }
+        public void setTable_list_money(List<Double> table_list_money) {
+            this.table_list_money = table_list_money;
+        }
+
+        @Override
+        public int getCount() {
+            return ListUtils.isEmpty(table_list_type) ? 0 : table_list_type.size();
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return ListUtils.isEmpty(table_list_type) ? 0 : table_list_type.get(position);
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return position;
+        }
+
+        @Override
+        public View getView(final int position, View convertView, ViewGroup parent) {
+            ViewHolder viewHolder = null;
+            if (convertView == null){
+                viewHolder = new ViewHolder();
+                convertView = View.inflate(ExpenseReimbursementActivity.this, R.layout.expense_details_table_item,null);
+                viewHolder.details_type = (TextView) convertView.findViewById(R.id.details_type_tv);
+                viewHolder.details_money = (FormEditText) convertView.findViewById(R.id.details_money_tv);
+                viewHolder.details_delete = (ImageView) convertView.findViewById(R.id.details_delete_im);
+                convertView.setTag(viewHolder);
+            }else {
+                viewHolder = (ViewHolder) convertView.getTag();
+            }
+            viewHolder.details_type.setText(getTable_list_type().get(position) + "");
+//            viewHolder.details_money.setText(getTable_list_money().get(position)+"");
+
+            viewHolder.details_delete.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    new android.support.v7.app.AlertDialog
+                            .Builder(mContext)
+                            .setTitle(mContext.getString(R.string.common_notice))
+                            .setMessage("确定删除该条消费明细?")
+                            .setNegativeButton(mContext.getString(R.string.common_cancel), null)
+                            .setPositiveButton(mContext.getString(R.string.common_sure), new DialogInterface.OnClickListener() {
+                                @Override
+                                public void onClick(DialogInterface dialog, int which) {
+                                   table_list_type.remove(position);
+                                   if (!ListUtils.isEmpty(table_list_money) && table_list_money.get(position) != null){
+                                       table_list_money.remove(position);
+                                   }
+                                   if (ListUtils.isEmpty(table_list_type)){
+                                       detail_table_ll.setVisibility(View.GONE);
+                                   }else {
+                                       notifyDataSetChanged();
+                                   }
+                                }
+                            }).show();
+                }
+            });
+            /*String s = viewHolder.details_money.getText().toString();
+            if (!StringUtils.isEmpty(s)){
+                double numberstrChche =  Double.parseDouble(s);
+                if (table_list_money == null){
+                    table_list_money.add(position, CommonUtil.getTwoPointDouble(numberstrChche));
+                }else {
+                    table_list_money.remove(position);
+                    table_list_money.add(position,CommonUtil.getTwoPointDouble(numberstrChche));
+                }
+            }*/
+
+            viewHolder.details_money.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {}
+                @Override
+                public void afterTextChanged(Editable s) {
+                    if (StringUtils.isEmpty(s.toString())) return;
+                    double numberstrChche =  Double.parseDouble(s.toString());
+                    money_edit_position = position;
+                    /*if (table_list_money == null ){
+                        table_list_money.add(position, CommonUtil.getTwoPointDouble(numberstrChche));
+                    }else if (table_list_money.get(position) == null){
+                        table_list_money.add(position, CommonUtil.getTwoPointDouble(numberstrChche));
+                    }else {
+                        table_list_money.remove(position);
+                        table_list_money.add(position,CommonUtil.getTwoPointDouble(numberstrChche));
+                    }*/
+
+                    if(delayRun!=null){
+                        //每次editText有变化的时候,则移除上次发出的延迟线程
+                        dthandler.removeCallbacks(delayRun);
+                    }
+                    money_editString = s.toString();
+
+                    //延迟800ms,如果不再输入字符,则执行该线程的run方法
+                    dthandler.postDelayed(delayRun, 1000);
+                }
+            });
+            return convertView;
+        }
+        class ViewHolder{
+            TextView details_type;
+            FormEditText details_money;
+            ImageView details_delete;
+
+        }
+
+        private Runnable delayRun = new Runnable() {
+
+            @Override
+            public void run() {
+                if (table_list_money == null ) {
+                    table_list_money.add(CommonUtil.getTwoPointDouble(Double.valueOf(money_editString)));
+                }else {
+                    if (money_edit_position < table_list_money.size()){
+                        table_list_money.remove(money_edit_position);
+                        table_list_money.add(money_edit_position,CommonUtil.getTwoPointDouble(Double.valueOf(money_editString)));
+                    }else if (money_edit_position == table_list_money.size()){
+                        table_list_money.add(CommonUtil.getTwoPointDouble(Double.valueOf(money_editString)));
+                    }
+                }
+            }
+        };
+    }
+    private int money_edit_position;
+    private String money_editString = "";
+    private Handler dthandler = new Handler();
+    /**
+     *新增弹出PopupWindow表格适配器
+     */
+    private class GridDataAdapter extends BaseAdapter {
+        private Context ct;
+        private List<String> mData = new ArrayList<>();
+        private LayoutInflater inflater;
+        private int selected = 0;
+        private List<String> selected_data;
+
+        public List<String> getSelected_data() {
+            return selected_data;
+        }
+        public void setSelected_data(List<String> selected_data) {
+            this.selected_data = selected_data;
+        }
+        GridDataAdapter(Context ct, List<String> data) {
+            this.ct = ct;
+            this.mData = data;
+            this.inflater = LayoutInflater.from(ct);
+        }
+        @Override
+        public int getCount() {
+            return mData.size();
+        }
+        @Override
+        public Object getItem(int position) {
+            return position;
+        }
+        @Override
+        public long getItemId(int position) {
+            return position;
+        }
+        public int getSelected() {
+            return selected;
+        }
+        public void setSelected(int selected) {
+            this.selected = selected;
+        }
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            GridDataAdapter.ViewModle modle = null;
+            if (convertView == null) {
+                convertView = inflater.inflate(R.layout.item_simple_text, parent, false);
+                modle = new GridDataAdapter.ViewModle();
+                modle.tv_text = (TextView) convertView.findViewById(R.id.tv_text);
+                convertView.setTag(modle);
+            } else {
+                modle = (GridDataAdapter.ViewModle) convertView.getTag();
+            }
+            modle.tv_text.setText(mData.get(position));
+            modle.tv_text.setSelected(false);
+            modle.tv_text.setTextColor(mContext.getResources().getColor(R.color.black));
+            if (!ListUtils.isEmpty(selected_data)){
+                    for (int i = 0;i < getSelected_data().size();i++){
+                        if (getSelected_data().get(i).equals(mData.get(position))){
+                            modle.tv_text.setSelected(true);
+                            modle.tv_text.setTextColor(mContext.getResources().getColor(R.color.white));
+                        }
+                    }
+            }
+            return convertView;
+        }
+
+        class ViewModle {
+            TextView tv_text;
+        }
+    }
+
+    /**
+     * 图片适配器
+     */
+    private class GridViewAdapter extends BaseAdapter {
+        @Override
+        public int getCount() {
+            if (mPhotoList.size() >= 9) {return 9;}
+            return mPhotoList.size() + 1;
+        }
+        @Override
+        public Object getItem(int position) {
+            return position;
+        }
+        @Override
+        public long getItemId(int position) {
+            return position;
+        }
+        @Override
+        public int getViewTypeCount() {
+            return 2;
+        }
+        @Override
+        public int getItemViewType(int position) {
+            if (mPhotoList.size() == 0) {
+                return 1;// View Type 1代表添加更多的视图
+            } else if (mPhotoList.size() < 9) {
+                if (position < mPhotoList.size()) {
+                    return 0;// View Type 0代表普通的ImageView视图
+                } else {
+                    return 1;
+                }
+            } else {
+                return 0;
+            }
+        }
+
+        @Override
+        public View getView(final int position, View convertView, ViewGroup parent) {
+            if (getItemViewType(position) == 0) {// 普通的视图
+                SquareCenterImageView imageView = new SquareCenterImageView(ct);
+                imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
+                String url = mPhotoList.get(position);
+                if (url == null) {
+                    url = "";
+                }
+                ImageLoader.getInstance().displayImage(Uri.fromFile(new File(url)).toString(), imageView);
+                return imageView;
+            } else {
+                View view = LayoutInflater.from(ct).inflate(R.layout.layout_circle_add_more_item,
+                        parent, false);
+                ImageView iconImageView = (ImageView) view.findViewById(R.id.icon_image_view);
+                TextView voiceTextTv = (TextView) view.findViewById(R.id.text_tv);
+                iconImageView.setBackgroundResource(R.drawable.add_picture);
+                voiceTextTv.setText(R.string.qzone_add_picture);
+                return view;
+            }
+        }
+    }
+
+    /**
+     * 通用跳转界面单选方法
+     * @param Datas
+     * @param type 2:单选
+     * @param title
+     * @param requestCode
+     */
+    private void doSingleSelect(String[] Datas, int type, String title, int requestCode) {
+        //TODO Datas为接口返回
+        ArrayList<SelectBean> formBeaan = new ArrayList<>();
+        SelectBean selectBean;
+        for (int i = 0; i < Datas.length; i++) {
+            selectBean = new SelectBean();
+            selectBean.setName(Datas[i]);
+            formBeaan.add(selectBean);
+        }
+        Intent intent = new Intent();
+        intent.setClass(this, SelectActivity.class);
+        intent.putExtra("type", type);
+        intent.putExtra("title", title);
+        intent.putParcelableArrayListExtra("data", formBeaan);
+        startActivityForResult(intent, requestCode);
+    }
+    private void initPicturesEvent() {
+        mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                int viewType = mAdapter.getItemViewType(position);
+
+                if (viewType == 1) {
+                    showSelectPictureDialog();//第一个
+                    //TODO 选择图片页面
+//                    startActivityForResult(new Intent(ct, PhoneSelectActivity.class), 222);
+                } else {
+                    showPictureActionDialog(position);
+                }
+            }
+        });
+    }
+    private void showSelectPictureDialog() {
+        String[] items = new String[]{getString(R.string.c_take_picture), getString(R.string.c_photo_album)};
+        AlertDialog.Builder builder = new AlertDialog.Builder(this).setSingleChoiceItems(items, 0,
+                new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        if (which == 0) {
+                            takePhoto();
+                        } else {
+                            selectPhoto();
+                        }
+                        dialog.dismiss();
+                    }
+                });
+        builder.show();
+    }
+    private void showPictureActionDialog(final int position) {
+        String[] items = new String[]{getString(R.string.look_over), getString(R.string.common_delete)};
+        AlertDialog.Builder builder = new AlertDialog.Builder(this).setTitle(R.string.pictures)
+                .setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        if (which == 0) {// 查看
+                            Intent intent = new Intent(ct, MultiImagePreviewActivity.class);
+                            intent.putExtra(AppConstant.EXTRA_IMAGES, mPhotoList);
+                            intent.putExtra(AppConstant.EXTRA_POSITION, position);
+                            intent.putExtra(AppConstant.EXTRA_CHANGE_SELECTED, false);
+                            startActivity(intent);
+                        } else {// 删除
+                            deletePhoto(position);
+                        }
+                        dialog.dismiss();
+                    }
+                });
+        builder.show();
+    }
+    private void deletePhoto(final int position) {
+        mPhotoList.remove(position);
+        mAdapter.notifyDataSetInvalidated();
+    }
+    private void takePhoto() {
+        mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, CameraUtil.MEDIA_TYPE_IMAGE);
+        CameraUtil.captureImage(this, mNewPhotoUri, REQUEST_CODE_CAPTURE_PHOTO);
+    }
+    private void selectPhoto() {
+        CameraUtil.pickImageSimple(this, REQUEST_CODE_PICK_PHOTO);
+    }
+}

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

@@ -145,6 +145,8 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
     private PullToRefreshScrollView mPullToRefreshScrollView;
     @ViewInject(R.id.oamain_sign_statistical_notice_tv)
     private TextView oamain_sign_statistical_notice_tv;
+    @ViewInject(R.id.expense_reimbursement_hd_tv)
+    private TextView expense_reimbursement_hd_tv;
     @ViewInject(R.id.meeting)
     private TextView meeting;
     @ViewInject(R.id.oamain_special_attendance_tv)
@@ -176,7 +178,10 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
     private OACalendarView calendarView;
     private String workDailyAdd;
     private long lastTime;
-
+    @ViewInject(R.id.release_switch_tv3)
+    private TextView release_switch_tv3;
+    @ViewInject(R.id.oamain_expense_reimbursement_ll)
+    private LinearLayout oamain_expense_reimbursement_ll;
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         getMenuInflater().inflate(R.menu.menu_add_icon, menu);
@@ -213,6 +218,13 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
         } else {
             oamain_sign_statistical_notice_tv.setVisibility(View.VISIBLE);
         }
+
+        int new_expense_reimbursement_notice = PreferenceUtils.getInt(MyApplication.getInstance(), Constants.NEW_EXPENSE_REIMBURSEMENT_NOTICE);
+        if (new_expense_reimbursement_notice == 1){
+            expense_reimbursement_hd_tv.setVisibility(View.INVISIBLE);
+        }else {
+            expense_reimbursement_hd_tv.setVisibility(View.VISIBLE);
+        }
         super.onResume();
     }
 
@@ -277,6 +289,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
         findViewById(R.id.my_log).setOnClickListener(this);
         findViewById(R.id.ok_scale).setOnClickListener(this);
         findViewById(R.id.oamain_sign_statistical_tv).setOnClickListener(this);
+        findViewById(R.id.oamain_expense_reimbursement_ll).setOnClickListener(this);
         mGetMoreMenuLl.setOnClickListener(this);
         mMoreMenuLl.setOnClickListener(this);
         mCancleMoreMenuLl.setOnClickListener(this);
@@ -385,6 +398,9 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
 
             }
         });
+
+        // TODO 在这里写隐藏发布版本的事项
+        doReleaeSwitch();
     }
 
     private void initView() {
@@ -429,6 +445,14 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
         //判断是否是管理员
         CommonInterface.getInstance().judgeManager(null);
         CommonInterface.getInstance().getOutSetInfo(null);
+        doShowSpecialView();
+        //获取动态表单caller
+        loadOrdersCall();
+
+    }
+
+    private void doShowSpecialView() {
+        // 考勤统计红点
         int new_function_notice = PreferenceUtils.getInt(MyApplication.getInstance(), Constants.NEW_FUNCTION_NOTICE);
         if (new_function_notice == 1) {
             oamain_sign_statistical_notice_tv.setVisibility(View.INVISIBLE);
@@ -436,19 +460,34 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
             oamain_sign_statistical_notice_tv.setVisibility(View.VISIBLE);
         }
 
+        // 报销单红点
+        int new_expense_reimbursement_notice = PreferenceUtils.getInt(MyApplication.getInstance(), Constants.NEW_EXPENSE_REIMBURSEMENT_NOTICE);
+        if (new_expense_reimbursement_notice == 1){
+            expense_reimbursement_hd_tv.setVisibility(View.INVISIBLE);
+        }else {
+            expense_reimbursement_hd_tv.setVisibility(View.VISIBLE);
+        }
+
         if (isB2b) {
             meeting.setVisibility(View.INVISIBLE);
             special_attendance.setVisibility(View.INVISIBLE);
         }
-
         if (CommonUtil.getSharedPreferencesBoolean(MyApplication.getInstance(), Constants.new_signin)) {
             tv_signin_num.setVisibility(View.GONE);
         }
         if (CommonUtil.getSharedPreferencesBoolean(MyApplication.getInstance(), Constants.new_signout)) {
             tv_signout_num.setVisibility(View.GONE);
         }
-        //获取动态表单caller
-        loadOrdersCall();
+    }
+
+    private void doReleaeSwitch() {
+        if (CommonUtil.isReleaseVersion()){
+            release_switch_tv3.setVisibility(View.VISIBLE);
+            oamain_expense_reimbursement_ll.setVisibility(View.GONE);
+        }else {
+            release_switch_tv3.setVisibility(View.GONE);
+            oamain_expense_reimbursement_ll.setVisibility(View.VISIBLE);
+        }
     }
 
 
@@ -964,6 +1003,10 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
                 startActivity(new Intent(activity, StatisticsActivity.class));
                 PreferenceUtils.putInt(Constants.NEW_FUNCTION_NOTICE, 1);
                 break;
+            case R.id.oamain_expense_reimbursement_ll:
+                startActivity(new Intent(activity,ExpenseReimbursementActivity.class));
+                PreferenceUtils.putInt(Constants.NEW_EXPENSE_REIMBURSEMENT_NOTICE, 1);
+                break;
         }
     }
 

+ 51 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/model/oa/CostFormModel.java

@@ -0,0 +1,51 @@
+package com.xzjmyk.pm.activity.ui.erp.model.oa;
+
+import java.util.List;
+
+/**
+ * Created by FANGlh on 2017/6/10.
+ * function:费用报销单消费明细Model
+ */
+
+public class CostFormModel {
+    private String cost_type;
+    private double cost_money;
+    List<CostFormModel> cfMpdel_list;
+
+    public List<CostFormModel> getCfMpdel_list() {
+        return cfMpdel_list;
+    }
+
+    public void setCfMpdel_list(List<CostFormModel> cfMpdel_list) {
+        this.cfMpdel_list = cfMpdel_list;
+    }
+
+    public CostFormModel(String cost_type, double cost_money) {
+        this.cost_type = cost_type;
+        this.cost_money = cost_money;
+    }
+
+    public String getCost_type() {
+        return cost_type;
+    }
+
+    public void setCost_type(String cost_type) {
+        this.cost_type = cost_type;
+    }
+
+    public double getCost_money() {
+        return cost_money;
+    }
+
+    public void setCost_money(double cost_money) {
+        this.cost_money = cost_money;
+    }
+
+    public static double costCalculation(List<CostFormModel> cfMpdel_list){
+        double sumCost = 0.00;
+        for (int i = 0; i < cfMpdel_list.size(); i++) {
+            sumCost = cfMpdel_list.get(i).getCost_money() + sumCost;
+        }
+            return sumCost;
+    }
+}

+ 1 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/util/Constants.java

@@ -317,6 +317,7 @@ public class Constants {
     
 
     public final static String NEW_FUNCTION_NOTICE = "NEWFUNCTIONNOTICE";
+    public final static String NEW_EXPENSE_REIMBURSEMENT_NOTICE = "NEWEXPENSEREIMBURSEMENTNOTICE";
 
 
     public static void cleanRed(Context ct) throws PackageManager.NameNotFoundException {

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


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


BIN
WeiChat/src/main/res/drawable-xxhdpi/reimbursement.png


+ 350 - 0
WeiChat/src/main/res/layout/activity_expense_reimbursement.xml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:whatever="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    >
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:fillViewport="true">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="10px"
+                android:background="@color/item_line" />
+
+            <RelativeLayout
+                style="@style/IMTbleLine2"
+                android:layout_height="40dp"
+                android:background="@color/white">
+
+                <TextView
+                    android:id="@+id/name_tv"
+                    style="@style/form_relative_left_text"
+                    android:layout_marginLeft="0dp"
+                    android:text="@string/common_title"
+                    android:textColor="@color/text_main"
+                    android:textSize="15sp" />
+
+                <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                    android:id="@+id/reimbursement_title_fet"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentRight="true"
+                    android:layout_centerVertical="true"
+                    android:layout_marginLeft="10dp"
+                    android:layout_toRightOf="@+id/name_tv"
+                    android:background="@null"
+                    android:gravity="center_vertical|right"
+                    android:hint="@string/common_input"
+                    android:padding="10dp"
+                    android:textColor="@color/dark_dark_grey"
+                    android:textSize="15sp"
+                    whatever:customRegexp="^[A-Za-z\u4e00-\u9fa5]{1,10}+$"
+                    whatever:testErrorString="限制十个之内有效中英文字符"
+                    whatever:testType="regexp"
+                    android:maxLength="10"/>
+
+                <ImageView
+                    style="@style/IMTbleLine_ArrowImg"
+                    android:layout_alignParentRight="true"
+                    android:contentDescription="@string/app_name" />
+            </RelativeLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="2px"
+                android:background="@color/item_line" />
+
+            <RelativeLayout
+                style="@style/IMTbleLine2"
+                android:layout_height="40dp"
+                android:background="@color/white">
+
+                <TextView
+                    style="@style/form_relative_left_text"
+                    android:layout_marginLeft="0dp"
+                    android:text="@string/Reimbursement_type"
+                    android:textColor="@color/text_main"
+                    android:textSize="15sp" />
+
+                <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                    android:id="@+id/reimbursement_type_fet"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentRight="true"
+                    android:background="@null"
+                    android:gravity="center_vertical|right"
+                    android:hint="@string/common_select"
+                    android:padding="10dp"
+                    android:textColor="@color/dark_dark_grey"
+                    android:textSize="15sp" />
+
+                <ImageView
+                    style="@style/IMTbleLine_ArrowImg"
+                    android:layout_alignParentRight="true"
+                    android:contentDescription="@string/app_name" />
+            </RelativeLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="2px"
+                android:background="@color/item_line" />
+
+            <RelativeLayout
+                android:id="@+id/ry_set_startTime"
+                style="@style/IMTbleLine2"
+                android:layout_height="40dp"
+                android:background="@color/white">
+
+
+                <TextView
+                    style="@style/form_relative_left_text"
+                    android:layout_marginLeft="0dp"
+                    android:text="@string/currency"
+                    android:textColor="@color/text_main"
+                    android:textSize="15sp" />
+
+                <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                    android:id="@+id/reimbursement_currency_fet"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentRight="true"
+                    android:layout_centerVertical="true"
+                    android:background="@null"
+                    android:gravity="center_vertical|right"
+                    android:hint="@string/RMB"
+                    android:padding="10dp"
+                    android:textColor="@color/dark_dark_grey"
+                    android:textSize="15sp" />
+
+                <ImageView
+                    style="@style/IMTbleLine_ArrowImg"
+                    android:layout_alignParentRight="true"
+                    android:contentDescription="@string/app_name" />
+            </RelativeLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="20px"
+                android:background="@color/item_line" />
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="2px"
+                android:background="@color/item_line" />
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                >
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/Consumer_details"
+                    android:textColor="@color/text_main"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginTop="10dp"/>
+
+                <TextView
+                    android:id="@+id/add_details_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentRight="true"
+                    android:text="@string/new_add"
+                    android:textColor="@color/blue"
+                    android:padding="10dp"
+                    android:layout_marginRight="5dp"/>
+            </RelativeLayout>
+
+                <TextView
+                    android:id="@+id/details_data_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="如下表格"
+                    android:layout_marginLeft="10dp"
+                    android:visibility="gone"
+                    />
+                <LinearLayout
+                    android:id="@+id/detail_table_ll"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical"
+                    android:layout_alignParentTop="true"
+                    android:layout_alignParentLeft="true"
+                    android:layout_alignParentStart="true">
+                    <LinearLayout
+                        android:id="@+id/detail_table_top_ll"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        android:layout_marginLeft="10dp"
+                        android:layout_marginRight="10dp">
+                        <View
+                            style="@style/expense_table_h_1dp"/>
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:orientation="horizontal">
+                            <View
+                                style="@style/expense_table_v_1dp"/>
+                            <TextView
+                                android:text="类型"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="2"
+                                android:paddingLeft="10dp"
+                                android:layout_gravity="center_vertical"/>
+                            <View
+                                style="@style/expense_table_v_1dp"/>
+                            <TextView
+                                android:text="金额"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="2"
+                                android:paddingLeft="10dp"
+                                android:layout_gravity="center_vertical"
+                                />
+                            <View
+                                style="@style/expense_table_v_1dp"/>
+                            <TextView
+                                android:text="删除"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:layout_gravity="center_vertical"
+                                android:gravity="center"/>
+                            <View
+                                style="@style/expense_table_v_1dp"
+                                />
+                        </LinearLayout>
+
+                        <View
+                            style="@style/expense_table_h_1dp"/>
+                    </LinearLayout>
+
+                    <com.xzjmyk.pm.activity.view.MyListView
+                        android:id="@+id/table_details_list"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="10dp"
+                        android:layout_marginRight="10dp">
+                    </com.xzjmyk.pm.activity.view.MyListView>
+                    <LinearLayout
+                        android:id="@+id/detail_table_bottom_ll"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="10dp"
+                        android:layout_marginRight="10dp"
+                        android:orientation="vertical">
+                        <RelativeLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content">
+
+                            <View
+                                android:id="@+id/left_view_v"
+                                style="@style/expense_table_v_1dp"/>
+
+                            <View
+                                android:id="@+id/right_view_v"
+                                android:layout_alignParentRight="true"
+                                style="@style/expense_table_v_1dp"/>
+                            <TextView
+                                android:id="@+id/automatic_calculation_tv"
+                                android:layout_toRightOf="@id/left_view_v"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="自动计算"
+                                android:layout_centerVertical="true"
+                                android:layout_marginLeft="10dp"
+                                android:textColor="@color/blue"/>
+                            <TextView
+                                android:id="@+id/sum_money_tv"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_toLeftOf="@+id/right_view_v"
+                                android:layout_alignParentRight="true"
+                                android:layout_marginRight="30dp"
+                                android:layout_centerVertical="true"
+                                android:textColor="@color/red"/>
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="总金额"
+                                android:layout_toLeftOf="@+id/sum_money_tv"
+                                android:layout_centerVertical="true"
+                                android:layout_marginRight="10dp"
+                                android:textColor="@color/text_main"/>
+                        </RelativeLayout>
+                        <View
+                            style="@style/expense_table_h_1dp"/>
+                    </LinearLayout>
+
+                </LinearLayout>
+            <View
+                android:layout_marginTop="10dp"
+                android:layout_width="match_parent"
+                android:layout_height="20px"
+                android:background="@color/item_line" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/Add_invoice"
+                android:textColor="@color/text_main"
+                android:layout_marginLeft="10dp"
+                android:layout_marginTop="10dp"/>
+
+            <LinearLayout
+                android:id="@+id/select_img_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:padding="10dp">
+
+                <com.xzjmyk.pm.activity.view.MyGridView
+                    android:id="@+id/grid_view"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:horizontalSpacing="3dp"
+                    android:listSelector="#00000000"
+                    android:numColumns="4"
+                    android:stretchMode="columnWidth"
+                    android:verticalSpacing="3dp" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/bottom_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_alignParentBottom="true"
+                android:baselineAligned="false"
+                android:gravity="bottom"
+                android:orientation="vertical"
+                android:padding="10dp"
+                android:visibility="visible">
+
+                <Button
+                    android:id="@+id/btn_save"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:layout_marginTop="10dp"
+                    android:background="@drawable/bg_bule_btn"
+                    android:padding="10dp"
+                    android:text="@string/common_submit_button"
+                    android:textColor="@color/white"
+                    android:textSize="@dimen/text_main" />
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+
+</RelativeLayout>

+ 49 - 2
WeiChat/src/main/res/layout/activity_oamain.xml

@@ -473,14 +473,61 @@
                             android:textColor="@color/white" />
                     </LinearLayout>
 
+
+                    <LinearLayout
+                        android:id="@+id/oamain_expense_reimbursement_ll"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="2dp"
+                        android:layout_weight="1"
+                        android:orientation="vertical"
+                        android:paddingLeft="5dp"
+                        android:visibility="visible">
+
+                        <FrameLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="20dp">
+
+                            <ImageView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@color/transparent"
+                                android:contentDescription="@string/app_name"
+                                android:padding="0dp"
+                                android:src="@drawable/reimbursement" />
+
+                            <TextView
+                                android:id="@+id/expense_reimbursement_hd_tv"
+                                android:layout_width="10dp"
+                                android:layout_height="10dp"
+                                android:layout_gravity="top|right"
+                                android:layout_marginRight="15dp"
+                                android:background="@drawable/hongdian"
+                                android:textColor="@android:color/white"
+                                android:textSize="10.0dip"
+                                />
+                        </FrameLayout>
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="13dp"
+                            android:layout_marginTop="5dp"
+                            android:gravity="center"
+                            android:text="@string/Expense_reimbursement"
+                            android:textColor="@color/white" />
+                    </LinearLayout>
+
                     <TextView
+                        android:id="@+id/release_switch_tv3"
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="2dp"
                         android:layout_weight="1"
                         android:gravity="center"
-                        android:textColor="@color/white" />
-
+                        android:textColor="@color/white"
+                        android:visibility="gone"/>
                     <TextView
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"

+ 57 - 0
WeiChat/src/main/res/layout/expense_details_menu.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+
+    <ScrollView
+        android:layout_marginTop="5dp"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:fillViewport="true">
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+            <com.xzjmyk.pm.activity.ui.erp.view.NScrollerGridView
+                android:id="@+id/gv_details_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:verticalSpacing="10dp"
+                android:horizontalSpacing="15dp"
+                android:paddingRight="15dp"
+                android:paddingLeft="15dp"
+                android:paddingTop="5dp"
+                android:paddingBottom="5dp"
+                android:numColumns="3">
+            </com.xzjmyk.pm.activity.ui.erp.view.NScrollerGridView>
+
+            <LinearLayout
+                android:id="@+id/bottom_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_alignParentBottom="true"
+                android:baselineAligned="false"
+                android:gravity="bottom"
+                android:orientation="vertical"
+                android:padding="10dp"
+                android:visibility="visible">
+
+                <Button
+                    android:id="@+id/btn_sure"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:background="@drawable/bg_bule_btn"
+                    android:padding="10dp"
+                    android:text="@string/common_sure"
+                    android:textColor="@color/white"
+                    android:textSize="@dimen/text_main" />
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+</LinearLayout>

+ 63 - 0
WeiChat/src/main/res/layout/expense_details_table_item.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:whatever="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:layout_marginLeft="10dp"
+    android:layout_marginRight="10dp"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+        <View
+            style="@style/expense_table_v_1dp"/>
+        <TextView
+            android:id="@+id/details_type_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:paddingLeft="10dp"
+            android:layout_gravity="center_vertical"
+            android:textColor="@color/text_main"/>
+        <View
+            style="@style/expense_table_v_1dp"/>
+
+        <com.andreabaccega.widget.FormEditText
+            android:id="@+id/details_money_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:background="@null"
+            android:hint="请输入明细金额"
+            android:layout_gravity="center_vertical"
+            android:textColor="@color/text_main"
+            android:textSize="14sp"
+            android:maxLength="10"
+            android:inputType="number"
+            android:paddingLeft="10dp"
+            whatever:customRegexp="^([0-9](\.[0-9]+)?|10)$"
+            whatever:testType="regexp"
+            whatever:testErrorString="限制输入10位有效双精度数值"
+        />
+
+        <View
+            style="@style/expense_table_v_1dp"/>
+        <ImageView
+            android:id="@+id/details_delete_im"
+            android:layout_width="0dp"
+            android:layout_height="20dp"
+            android:layout_weight="1"
+            android:paddingLeft="10dp"
+            android:layout_gravity="center_vertical"
+            android:src="@drawable/delete"/>
+        <View
+            style="@style/expense_table_v_1dp"
+            />
+    </LinearLayout>
+
+    <View
+        style="@style/expense_table_h_1dp"/>
+</LinearLayout>

+ 53 - 0
WeiChat/src/main/res/layout/plat_oamain.xml

@@ -509,6 +509,59 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/oamain_expense_reimbursement_ll"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="2dp"
+                android:layout_weight="1"
+                android:orientation="vertical"
+                android:paddingLeft="5dp"
+                android:visibility="gone">
+
+                <FrameLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="20dp">
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:background="@color/transparent"
+                        android:contentDescription="@string/app_name"
+                        android:padding="0dp"
+                        android:src="@drawable/reimbursement" />
+
+                    <TextView
+                        android:layout_width="10dp"
+                        android:layout_height="10dp"
+                        android:layout_gravity="top|right"
+                        android:layout_marginRight="15dp"
+                        android:background="@drawable/hongdian"
+                        android:textColor="@android:color/white"
+                        android:textSize="10.0dip"
+                        />
+                </FrameLayout>
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="13dp"
+                    android:layout_marginTop="5dp"
+                    android:gravity="center"
+                    android:text="@string/Expense_reimbursement"
+                    android:textColor="@color/white" />
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/release_switch_tv3"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="2dp"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:textColor="@color/white"
+                android:visibility="gone"/>
         </FrameLayout>
     </LinearLayout>
 

Diff do ficheiro suprimidas por serem muito extensas
+ 952 - 1881
WeiChat/src/main/res/values-en/strings.xml


+ 8 - 0
WeiChat/src/main/res/values-zh-rCN/strings.xml

@@ -1476,4 +1476,12 @@
     <string name="change_style">换个样式</string>
     <string name="save_to_MBphone">保存到手机</string>
     <string name="scan_2dcode">扫描二维码</string>
+    <string name="common_title">标题</string>
+    <string name="Reimbursement_type">报销类型</string>
+    <string name="Consumer_details">消费明细</string>
+    <string name="Add_invoice">添加发票</string>
+    <string name="Results_of_scan">扫描结果</string>
+    <string name="Expense_reimbursement">费用报销</string>
+    <string name="RMB">人民币</string>
+    <string name="currency">币种</string>
 </resources>

+ 8 - 0
WeiChat/src/main/res/values-zh-rTW/strings.xml

@@ -1471,4 +1471,12 @@
     <string name="change_style">換個樣式</string>
     <string name="save_to_MBphone">保存到手機</string>
     <string name="scan_2dcode">掃描二維碼</string>
+    <string name="common_title">標題</string>
+    <string name="Reimbursement_type">報銷類型</string>
+    <string name="Consumer_details">消費明細</string>
+    <string name="Add_invoice">添加發票</string>
+    <string name="Results_of_scan">掃描結果</string>
+    <string name="Expense_reimbursement">費用報銷</string>
+    <string name="RMB">人民幣</string>
+    <string name="currency">币种</string>
 </resources>

+ 9 - 0
WeiChat/src/main/res/values/strings.xml

@@ -1731,4 +1731,13 @@
     <string name="unsubscribe_able">不可退订</string>
     <string name="formal_customer">正式客户</string>
     <string name="client_yu_luru">客户预录入</string>
+    <string name="common_title">标题</string>
+    <string name="Reimbursement_type">报销类型</string>
+    <string name="Consumer_details">消费明细</string>
+    <string name="Add_invoice">添加发票</string>
+    <string name="Results_of_scan">扫描结果</string>
+    <string name="Expense_reimbursement">费用报销</string>
+    <string name="RMB">人民币</string>
+    <string name="currency">币种</string>
+
 </resources>

+ 13 - 1
WeiChat/src/main/res/values/styles.xml

@@ -946,9 +946,21 @@
         <item name="android:layout_height">match_parent</item>
         <item name="android:layout_marginTop">10dp</item>
         <item name="android:layout_marginBottom">10dp</item>
-        <item name="android:background">@color/item_line</item>
+        <item name="android:background">@color/black</item>
     </style>
 
+    <!--横线-->
+    <style name="expense_table_h_1dp">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">1dp</item>
+        <item name="android:background">@color/black</item>
+    </style>
+    <!--竖线-->
+    <style name="expense_table_v_1dp">
+        <item name="android:layout_width">1dp</item>
+        <item name="android:layout_height">30dp</item>
+        <item name="android:background">@color/black</item>
+    </style>
     <style name="AppTheme.NoActionBar">
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff