Browse Source

Revert "功能模块调整"

This reverts commit f81e83900b3d49cde85b92f04e2c380b9485a339.

Revert "UAS-MES工序管理模块功能调整"

This reverts commit 8849cb15a7173c2d701d3b372e2d18eba2efd3a0.
shuij 3 years ago
parent
commit
d9e9133e9e
22 changed files with 236 additions and 952 deletions
  1. 1 1
      app/build.gradle
  2. 1 2
      app/src/main/AndroidManifest.xml
  3. 13 30
      app/src/main/java/com/uas/gdstorage/activity/FunctionActivity.java
  4. 3 3
      app/src/main/java/com/uas/gdstorage/activity/HomeActivity.java
  5. 74 58
      app/src/main/java/com/uas/gdstorage/activity/IndexActivity.java
  6. 0 3
      app/src/main/java/com/uas/gdstorage/fragment/ChargingSummaryFragment.java
  7. 1 1
      app/src/main/java/com/uas/gdstorage/fragment/GdMaterialInFragment.java
  8. 1 1
      app/src/main/java/com/uas/gdstorage/fragment/GdTimeReportFragment.java
  9. 1 1
      app/src/main/java/com/uas/gdstorage/fragment/GdWorkPauseFragment.java
  10. 1 1
      app/src/main/java/com/uas/gdstorage/fragment/GdWorkStartFragment.java
  11. 0 50
      app/src/main/java/com/uas/gdstorage/fragment/ReportDetailFragment.java
  12. 0 152
      app/src/main/java/com/uas/gdstorage/fragment/StepReceiveFragment.java
  13. 0 160
      app/src/main/java/com/uas/gdstorage/fragment/StepTransferFragment.java
  14. 15 35
      app/src/main/java/com/uas/gdstorage/global/GloableParams.java
  15. 0 5
      app/src/main/java/com/uas/gdstorage/util/Constants.java
  16. 18 32
      app/src/main/java/com/uas/gdstorage/view/ClearableEditText.java
  17. 104 138
      app/src/main/res/layout/activity_index.xml
  18. 0 164
      app/src/main/res/layout/fragment_report_detail.xml
  19. 0 53
      app/src/main/res/layout/fragment_step_receive.xml
  20. 0 59
      app/src/main/res/layout/fragment_step_transfer.xml
  21. 1 1
      app/src/main/res/layout/work_order_search_fragment.xml
  22. 2 2
      app/src/main/res/values/strings.xml

+ 1 - 1
app/build.gradle

@@ -16,7 +16,7 @@ android {
     compileSdkVersion rootProject.ext.android.compileSdkVersion
     buildToolsVersion rootProject.ext.android.buildToolsVersion
     defaultConfig {
-        applicationId "com.uas.mes"
+        applicationId "com.uas.gdstorage"
         minSdkVersion rootProject.ext.android.minSdkVersion
         targetSdkVersion rootProject.ext.android.targetSdkVersion
         versionCode rootProject.ext.android.versionCode

+ 1 - 2
app/src/main/AndroidManifest.xml

@@ -52,7 +52,6 @@
             android:name=".activity.FunctionActivity"
             android:label="@string/title_activity_function"
             android:screenOrientation="portrait"
-            android:launchMode="singleTask"
             android:windowSoftInputMode="adjustUnspecified|stateHidden" />
         <activity
             android:name=".activity.SearchMaterialActivity"
@@ -71,7 +70,7 @@
 
         <provider xmlns:tools="http://schemas.android.com/tools"
             android:name="android.support.v4.content.FileProvider"
-            android:authorities="com.uas.mes.fileprovider"
+            android:authorities="com.uas.gdstorage.fileprovider"
             android:exported="false"
             android:grantUriPermissions="true"
             tools:replace="android:authorities">

+ 13 - 30
app/src/main/java/com/uas/gdstorage/activity/FunctionActivity.java

@@ -14,17 +14,14 @@ import android.widget.TextView;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.gdstorage.R;
 import com.uas.gdstorage.fragment.BaseFragment;
-import com.uas.gdstorage.fragment.ChargingSummaryFragment;
 import com.uas.gdstorage.fragment.GdMaterialInFragment;
+import com.uas.gdstorage.fragment.GdStaffChangeFragment;
 import com.uas.gdstorage.fragment.GdTimeReportFragment;
 import com.uas.gdstorage.fragment.GdWorkPauseFragment;
+import com.uas.gdstorage.fragment.GdWorkStartFragment;
 import com.uas.gdstorage.fragment.GdWorkSwitchFragment;
 import com.uas.gdstorage.fragment.IndexSettingFragment;
 import com.uas.gdstorage.fragment.QualityManageFragment;
-import com.uas.gdstorage.fragment.ReportDetailFragment;
-import com.uas.gdstorage.fragment.StepReceiveFragment;
-import com.uas.gdstorage.fragment.StepTransferFragment;
-import com.uas.gdstorage.fragment.WorkOrderSearchFragment;
 import com.uas.gdstorage.global.GloableParams;
 import com.uas.gdstorage.interfaces.BackHandlerInterface;
 import com.uas.gdstorage.tools.DataSourceManager;
@@ -80,12 +77,15 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
         if (savedInstanceState == null) {
             Bundle mbundle = new Bundle();
             switch (funName) {
-                //工单绑定
+                //上料
+                case GloableParams.GRIDNAME_IN_MATERIAL:
+                    mFragment = new GdMaterialInFragment();
+                    break;
+                //工单启动
                 case GloableParams.GRIDNAME_WORK_START:
-                    //mFragment = new GdWorkStartFragment();
-                    mFragment=new WorkOrderSearchFragment();
+                    mFragment = new GdWorkStartFragment();
                     break;
-                //解除绑定
+                //工单暂停
                 case GloableParams.GRIDNAME_WORK_PAUSE:
                     mFragment = new GdWorkPauseFragment();
                     break;
@@ -93,30 +93,13 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
                 case GloableParams.GRIDNAME_WORK_SWITCH:
                     mFragment = new GdWorkSwitchFragment();
                     break;
-                //接料
-                case GloableParams.GRIDNAME_IN_MATERIAL:
-                    mFragment = new GdMaterialInFragment();
-                    break;
-                //报工
+                //实时报工
                 case GloableParams.GRIDNAME_TIME_REPORT:
                     mFragment = new GdTimeReportFragment();
                     break;
-                //报工明细
-                case GloableParams.GRIDNAME_TIME_REPORT_DETAIL:
-                    mFragment = new ReportDetailFragment();
-                    break;
-                //物料明细
-                case GloableParams.GRIDNAME_TIME_METRIAL_DETAIL:
-                    mFragment = new ChargingSummaryFragment();
-                    mbundle.putString(Constants.FLAG.MA_TITLE,"物料明细");
-                    break;
-                //工序移交
-                case GloableParams.GRIDNAME_STEP_TRANSFER:
-                    mFragment = new StepTransferFragment();
-                    break;
-                //工序接收
-                case GloableParams.GRIDNAME_STEP_RECEIVE:
-                    mFragment = new StepReceiveFragment();
+                //人员换岗
+                case GloableParams.GRIDNAME_STAFF_CHANGE:
+                    mFragment = new GdStaffChangeFragment();
                     break;
                 case GloableParams.HOME_QUALITY_MANAGE:
                     mFragment = new QualityManageFragment();

+ 3 - 3
app/src/main/java/com/uas/gdstorage/activity/HomeActivity.java

@@ -126,11 +126,11 @@ public class HomeActivity extends BaseActivity implements AdapterView.OnItemClic
     public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
         String itemName = (String) gridItemList.get(position).get(DataSourceManager.KEY_GRID_ITEMNAME);
         switch (itemName) {
-            case GloableParams.HOME_DISPATCH_MANAGE://工序管理
+            case GloableParams.HOME_DISPATCH_MANAGE:
                 startActivity(new Intent(HomeActivity.this, IndexActivity.class));
                 break;
-            case GloableParams.HOME_QUALITY_MANAGE://品质管理
-            case GloableParams.GRIDNAME_SETTING://设置
+            case GloableParams.HOME_QUALITY_MANAGE:
+            case GloableParams.GRIDNAME_SETTING:
                 Intent intent = new Intent(HomeActivity.this, FunctionActivity.class);
                 intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, itemName);
                 startActivity(intent);

+ 74 - 58
app/src/main/java/com/uas/gdstorage/activity/IndexActivity.java

@@ -1,10 +1,12 @@
 package com.uas.gdstorage.activity;
 
 import android.app.Activity;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.graphics.drawable.BitmapDrawable;
 import android.support.annotation.NonNull;
+import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
 import android.view.Gravity;
 import android.view.KeyEvent;
@@ -61,11 +63,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private ArrayList<HashMap<String, Object>> gridItemList;
     private GridView menuGridView;
     private TextView actionbarTextVeiw;
-    private TextView tv_metrimal_name;
     private PopupWindow mExitPopupWindow;
-    private TextView mPositionR, mFeeding, mCurDoc, mUnfinish, tv_pihao,
-            mEmCodeTv, mEmNameTv, mScName, mStaffTextView, mScrapTextView;
-    private String sc_code = null, mStaffName, mStaffCode,sc_name;
+    private TextView mPositionR, mFeeding, mCurDoc, mUnfinish, mEmCodeTv, mEmNameTv, mScName, mStaffTextView, mScrapTextView;
+    private String sc_code = null, mStaffName, mStaffCode;
     private RefreshLayout mRefreshLayout;
     private PopupWindow editPW;
     private String MACODE = null; //工单编号
@@ -76,7 +76,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
 
     @Override
     protected void onDestroy() {
-//        SharedPreUtil.removeAll(getApplicationContext());
+//      SharedPreUtil.removeAll(getApplicationContext());
         VolleyUtil.distoryVolley();
         super.onDestroy();
     }
@@ -86,19 +86,17 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         setContentView(R.layout.activity_index);
         mEmCodeTv = findViewById(R.id.em_code_tv);
         mEmNameTv = findViewById(R.id.em_name_tv);
-        tv_metrimal_name=findViewById(R.id.tv_metrimal_name);
         actionbarTextVeiw = (TextView) findViewById(R.id.actionbar);
         actionbarTextVeiw.setText("UAS车间工作站管理");
         menuGridView = (GridView) findViewById(R.id.grid_menu);
         mPositionR = (TextView) findViewById(R.id.index_position_resource);
         mScName = (TextView) findViewById(R.id.scname_tv);
-      //  mFeeding = (TextView) findViewById(R.id.index_feeding);
+        mFeeding = (TextView) findViewById(R.id.index_feeding);
         mCurDoc = (TextView) findViewById(R.id.index_cur_doc);
         mUnfinish = (TextView) findViewById(R.id.index_unfinish_number);
         mBackButton = findViewById(R.id.btn_actionbar_withback);
-      //  mStaffTextView = findViewById(R.id.index_staff_info_tv);
+        mStaffTextView = findViewById(R.id.index_staff_info_tv);
         mScrapTextView = findViewById(R.id.index_scrap_number);
-        tv_pihao=findViewById(R.id.tv_pihao);
 
         findViewById(R.id.index_edit).setOnClickListener(this);
         mRefreshLayout = findViewById(R.id.SmartRefreshLayout_id);
@@ -375,7 +373,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             sc_code = dataObject.getString("SC_CODE");
             SharedPreUtil.saveString(this, "SC_CODE", sc_code);
             mPositionR.setText(sc_code);
-            SharedPreUtil.saveString(this,Constants.FLAG.GANG_WEI_SOURCE_CODE,sc_code);
+
             String sc_name = dataObject.getString("SC_NAME");
             if (sc_name.length() == 0 || sc_name == "") {
                 sc_name = "-";
@@ -383,16 +381,15 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             sc_name = "(" + sc_name + ")";
 
             mScName.setText(sc_name);
-            SharedPreUtil.saveString(this,Constants.FLAG.GANG_WEI_SOURCE_NAME,sc_name);
         } else {
             CommonUtil.toastNoRepeat(this, "岗位资源数据为空");
             return;
         }
-//        if (!StringUtil.isEmpty(dataObject.getString("LI_NAME"))) {
-//            mFeeding.setText(dataObject.getString("LI_NAME"));
-//        } else {
-//            mFeeding.setText("-");
-//        }
+        if (!StringUtil.isEmpty(dataObject.getString("LI_NAME"))) {
+            mFeeding.setText(dataObject.getString("LI_NAME"));
+        } else {
+            mFeeding.setText("-");
+        }
         if (!StringUtil.isEmpty(dataObject.getString("DL_MACODE"))) {
             MACODE = dataObject.getString("DL_MACODE");
             SharedPreUtil.saveString(this, "MA_CODE", dataObject.getString("DL_MACODE"));
@@ -407,21 +404,11 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             mUnfinish.setText("");
         }
 
-        if (!StringUtil.isEmpty(dataObject.getString("SC_STEPCODE"))) {
-            tv_pihao.setText(dataObject.getString("SC_STEPCODE"));
-        } else {
-            tv_pihao.setText("");
-        }
-        //待设置
-        tv_metrimal_name.setText("K002雾化棒半成品_金桔柠檬0mg");
-
-
         mScrapTextView.setText(FastjsonUtil.getText(dataObject, "MA_ONLINESCRAPQTY"));
+
         mStaffName = FastjsonUtil.getText(dataObject, "UO_EMNAME");
-        mStaffCode = TextUtils.isEmpty(FastjsonUtil.getText(dataObject, "UO_EMCODE"))?
-                SharedPreUtil.getString(this, Constants.FLAG.CACHE_USER_EMCODE, "")
-                :FastjsonUtil.getText(dataObject, "UO_EMCODE");
-       // mStaffTextView.setText(mStaffName + (TextUtils.isEmpty(mStaffCode) ? "" : ("(" + mStaffCode + ")")));
+        mStaffCode = FastjsonUtil.getText(dataObject, "UO_EMCODE");
+        mStaffTextView.setText(mStaffName + (TextUtils.isEmpty(mStaffCode) ? "" : ("(" + mStaffCode + ")")));
     }
 
 
@@ -430,13 +417,22 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         super.onResume();
         mEmCodeTv.setText("(" + SharedPreUtil.getString(this, Constants.FLAG.CACHE_USER_EMCODE, "-") + ")");
         mEmNameTv.setText(SharedPreUtil.getString(this, Constants.FLAG.CACHE_USER_EMNAME, "-"));
-        //新增---给上线人员设置默认值
-        mStaffCode =SharedPreUtil.getString(this, Constants.FLAG.CACHE_USER_EMCODE, "");
-        sc_code=SharedPreUtil.getString(this,Constants.FLAG.GANG_WEI_SOURCE_CODE,"");
-        sc_name=SharedPreUtil.getString(this,Constants.FLAG.GANG_WEI_SOURCE_NAME,"");
-        mPositionR.setText(sc_code);
-        mScName.setText(sc_name);
-
+       /* Intent intent = getIntent();
+        boolean needClear = intent.getBooleanExtra(Constants.FLAG.NEED_CLEAR_SCCODE,false);
+        String fromSc_Code = intent.getStringExtra(Constants.FLAG.SC_CODE);
+        LogUtil.i("getDevicelineneedClear",needClear+"");
+        LogUtil.i("getDevicelinefromSc_Code",fromSc_Code+"");
+        if (!StringUtil.isEmpty(fromSc_Code) && !needClear){
+            getDeviceline(fromSc_Code);
+        }else if (!StringUtil.isEmpty(fromSc_Code) && needClear){
+            sc_code = null;
+            mPositionR.setText("");
+            mFeeding.setText("");
+            mCurDoc.setText("");
+            mUnfinish.setText("");
+        }else {
+            return;
+        }*/
     }
 
     @Override
@@ -464,40 +460,60 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
         String itemName = (String) gridItemList.get(position).get(DataSourceManager.KEY_GRID_ITEMNAME);
         //岗位
-        String station = mPositionR.getText().toString().trim();//岗位资源
+        String station = mPositionR.getText().toString().trim();
         if (StringUtil.isEmpty(station)) {
-            CommonUtil.toastNoRepeat(this, "请先采集岗位资源");
-            return;
+            if (GloableParams.GRIDNAME_STAFF_CHANGE.equals(itemName)) {
+                goFragment(position);
+            } else {
+                CommonUtil.toastNoRepeat(this, "请先采集岗位资源");
+                return;
+            }
         } else {
-            //工单暂停,工单切换,实时报工
-            if (TextUtils.isEmpty(mStaffCode) && (GloableParams.GRIDNAME_WORK_PAUSE.equals(itemName)
-                    || GloableParams.GRIDNAME_WORK_SWITCH.equals(itemName)
-                    || GloableParams.GRIDNAME_TIME_REPORT.equals(itemName)
-                    || GloableParams.GRIDNAME_TIME_REPORT_DETAIL.equals(itemName))) {
-                CommonUtil.toastNoRepeat(this, "当前没有上线人员,请先进行人员上线");
+            if (GloableParams.GRIDNAME_STAFF_UP.equals(itemName)) {
+                if (!TextUtils.isEmpty(mStaffCode)) {
+                    CommonUtil.toastNoRepeat(this, "请先将当前上线人员下线");
+                } else {
+                    mStaffUpPopup.showPopupWindow();
+                }
+            } else if (GloableParams.GRIDNAME_STAFF_DOWN.equals(itemName)) {
+                if (TextUtils.isEmpty(mStaffCode)) {
+                    CommonUtil.toastNoRepeat(this, "当前无上线人员");
+                } else {
+                    new AlertDialog.Builder(this)
+                            .setTitle("提示")
+                            .setMessage("确认将当前上线人员:" + mStaffName + "  下线?")
+                            .setNegativeButton(R.string.cancel, null)
+                            .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                                @Override
+                                public void onClick(DialogInterface dialog, int which) {
+                                    staffDown();
+                                }
+                            }).show();
+                }
             } else {
-                //工单号为空,启动工单
-                String workOrder = mCurDoc.getText().toString().trim();
-                //工步移交和工步接收
-                if(GloableParams.GRIDNAME_STEP_TRANSFER.equals(itemName)
-                 ||GloableParams.GRIDNAME_STEP_RECEIVE.equals(itemName)){
-                    goFragment(position);
-                }else{
-                    if (StringUtil.isEmpty(workOrder)){
-                        //工单启动,人员换岗
-                        if (GloableParams.GRIDNAME_WORK_START.equals(itemName)) {
+                if (TextUtils.isEmpty(mStaffCode) && (GloableParams.GRIDNAME_WORK_PAUSE.equals(itemName)
+                        || GloableParams.GRIDNAME_WORK_SWITCH.equals(itemName)
+                        || GloableParams.GRIDNAME_TIME_REPORT.equals(itemName))) {
+                    CommonUtil.toastNoRepeat(this, "当前没有上线人员,请先进行人员上线");
+                } else {
+                    //工单
+                    String workOrder = mCurDoc.getText().toString().trim();
+                    if (StringUtil.isEmpty(workOrder)) {
+                        if (GloableParams.GRIDNAME_WORK_START.equals(itemName)
+                                || GloableParams.GRIDNAME_STAFF_CHANGE.equals(itemName)) {
                             goFragment(position);
                         } else {
-                            CommonUtil.toastNoRepeat(this, "暂无在线工单,可点击工单绑定进行操作");
+                            CommonUtil.toastNoRepeat(this, "暂无在线工单,可点击工单启动进行操作");
                         }
                     } else {
-                        if (GloableParams.GRIDNAME_WORK_START.equals(itemName)) {//工单启动
-                            CommonUtil.toastNoRepeat(this, "已有在线工单不需要进行工单绑定");
+                        if (GloableParams.GRIDNAME_WORK_START.equals(itemName)) {
+                            CommonUtil.toastNoRepeat(this, "已有在线工单不需要进行工单启动");
                         } else {
                             goFragment(position);
                         }
                     }
                 }
+
             }
         }
 

+ 0 - 3
app/src/main/java/com/uas/gdstorage/fragment/ChargingSummaryFragment.java

@@ -31,7 +31,6 @@ public class ChargingSummaryFragment extends BaseFragment {
     private ChargingSummaryAdapter mChargingSummaryAdapter;
     private List<ChargingSummaryBean> mChargingSummaryBeans;
     private String mSccode;
-    private String title;
 
     @Override
     protected int getLayout() {
@@ -45,8 +44,6 @@ public class ChargingSummaryFragment extends BaseFragment {
         Bundle arguments = getArguments();
         if (arguments != null) {
             mSccode = arguments.getString(Constants.FLAG.SC_CODE, "");
-            title=arguments.getString(Constants.FLAG.MA_TITLE,"上料汇总");
-            setTitle(title);
         }
         mRefreshLayout = root.findViewById(R.id.charging_summary_srl);
         mRecyclerView = root.findViewById(R.id.charging_summary_rv);

+ 1 - 1
app/src/main/java/com/uas/gdstorage/fragment/GdMaterialInFragment.java

@@ -92,7 +92,7 @@ public class GdMaterialInFragment extends BaseFragment implements View.OnClickLi
     @Override
     protected void initViews() {
 
-        ((FunctionActivity) mActivity).setTitle("料");
+        ((FunctionActivity) mActivity).setTitle("料");
 
         ((FunctionActivity) mActivity).setMoreBtnVisible(true);
 

+ 1 - 1
app/src/main/java/com/uas/gdstorage/fragment/GdTimeReportFragment.java

@@ -64,7 +64,7 @@ public class GdTimeReportFragment extends BaseFragment {
 
     @Override
     protected void initViews() {
-        ((FunctionActivity) getActivity()).setTitle("报工");
+        ((FunctionActivity) getActivity()).setTitle("实时报工");
         mOlIdTv = root.findViewById(R.id.ol_id_tv);
         mOlNUmbersTv = root.findViewById(R.id.olun_numbers_tv);
         mOlNameTv = root.findViewById(R.id.ol_name_tv);

+ 1 - 1
app/src/main/java/com/uas/gdstorage/fragment/GdWorkPauseFragment.java

@@ -68,7 +68,7 @@ public class GdWorkPauseFragment extends BaseFragment {
 
     @Override
     protected void initViews() {
-        ((FunctionActivity) getActivity()).setTitle("解除绑定");
+        ((FunctionActivity) getActivity()).setTitle("工单暂停");
 
         mOlIdTv = root.findViewById(R.id.ol_id_tv);
         mOlNUmbersTv = root.findViewById(R.id.olun_numbers_tv);

+ 1 - 1
app/src/main/java/com/uas/gdstorage/fragment/GdWorkStartFragment.java

@@ -60,7 +60,7 @@ public class GdWorkStartFragment extends BaseFragment implements View.OnClickLis
 
     @Override
     protected void initViews() {
-        ((FunctionActivity) mActivity).setTitle("工单绑定");
+        ((FunctionActivity) getActivity()).setTitle("工单启动");
         ((FunctionActivity) mActivity).setSearchBtnVisible(true);
         mActivity.findViewById(R.id.btn_actionbar_right).setOnClickListener(this);
         mRefreshLayout = root.findViewById(R.id.SmartRefreshLayout_id);

+ 0 - 50
app/src/main/java/com/uas/gdstorage/fragment/ReportDetailFragment.java

@@ -1,50 +0,0 @@
-package com.uas.gdstorage.fragment;
-
-import android.view.KeyEvent;
-import android.view.View;
-import com.uas.gdstorage.R;
-import com.uas.gdstorage.activity.FunctionActivity;
-import com.uas.gdstorage.util.LogUtil;
-
-public class ReportDetailFragment extends BaseFragment {
-
-    private Boolean canReturn = true;
-
-    @Override
-    protected int getLayout() {
-        return R.layout.fragment_report_detail;
-    }
-
-    @Override
-    protected void initViews() {
-        ((FunctionActivity) getActivity()).setTitle("报工明细");
-    }
-    @Override
-    protected void initEvents() {
-        mActivity.findViewById(R.id.btn_actionbar_withback).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                LogUtil.i(TAG,"按了左上角返回键");
-                if(canReturn){
-                    getActivity().finish();
-                }
-                progressDialog.dismiss();
-            }
-        });
-
-    }
-
-    @Override
-    protected void initDatas() {
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        return false;
-    }
-
-    @Override
-    public boolean onFragmentBackPressed() {
-        return false;
-    }
-}

+ 0 - 152
app/src/main/java/com/uas/gdstorage/fragment/StepReceiveFragment.java

@@ -1,152 +0,0 @@
-package com.uas.gdstorage.fragment;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.text.TextUtils;
-import android.view.KeyEvent;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.android.volley.Request;
-import com.uas.gdstorage.R;
-import com.uas.gdstorage.global.GloableParams;
-import com.uas.gdstorage.listener.MyEditorActionListener;
-import com.uas.gdstorage.util.CameraUtil;
-import com.uas.gdstorage.util.CommonUtil;
-import com.uas.gdstorage.util.FastjsonUtil;
-import com.uas.gdstorage.util.HttpCallback;
-import com.uas.gdstorage.util.HttpParams;
-import com.uas.gdstorage.util.VollyRequest;
-import com.uas.gdstorage.view.ClearableEditText;
-import com.uuzuche.lib_zxing.activity.CaptureActivity;
-import com.uuzuche.lib_zxing.activity.CodeUtils;
-
-/**
- * Created by RaoMeng on 2020/4/26
- * Desc: 工步接收
- */
-public class StepReceiveFragment extends BaseFragment {
-    private static final int SCAN_BARCODE_CODE = 111;
-    private ClearableEditText mBarcodeEditText;
-    private ImageView mScanImageView;
-    private TextView mResultTextView;
-
-    @Override
-    protected int getLayout() {
-        return R.layout.fragment_step_receive;
-    }
-
-    @Override
-    protected void initViews() {
-        setTitle("工步接收");
-
-        mBarcodeEditText = root.findViewById(R.id.step_receive_barcode_et);
-        mScanImageView = root.findViewById(R.id.step_receive_scan_iv);
-        mResultTextView = root.findViewById(R.id.step_receive_result_tv);
-    }
-
-    @Override
-    protected void initEvents() {
-        mScanImageView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (CameraUtil.hasCamera()) {
-                    Intent intent = new Intent();
-                    intent.setClass(mActivity, CaptureActivity.class);
-                    startActivityForResult(intent, SCAN_BARCODE_CODE);
-                } else {
-                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
-                }
-            }
-        });
-
-        CommonUtil.setEditorActionListener(mBarcodeEditText, new MyEditorActionListener() {
-            @Override
-            public void MyEditorAction(String text, int actionId, KeyEvent event) {
-                stepReceive(text);
-            }
-        });
-    }
-
-    @Override
-    protected void initDatas() {
-
-    }
-
-    private void stepReceive(String barcode) {
-        if (TextUtils.isEmpty(barcode)) {
-            return;
-        }
-        mResultTextView.setText("");
-        progressDialog.show();
-        VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
-                .url(GloableParams.ADDRESS_WIPSTEPTURN_ACCEPT)
-                .method(Request.Method.POST)
-                .addParam("lotno", barcode)
-                .build(), new HttpCallback() {
-            @Override
-            public void onSuccess(int flag, Object o) throws Exception {
-                progressDialog.dismiss();
-                CommonUtil.toastNoRepeat(mActivity, "接收成功");
-                try {
-                    String result = o.toString();
-                    JSONObject resultObject = JSON.parseObject(result);
-                    JSONObject dataObject = resultObject.getJSONObject("data");
-                    if (dataObject != null) {
-                        mResultTextView.setText(
-                                "批号:" + FastjsonUtil.getText(dataObject, "LOTNO")
-                                        + "\n数量:" + FastjsonUtil.getText(dataObject, "QTY")
-                                        + "\n接收成功"
-                        );
-                    }
-                    mBarcodeEditText.setText("");
-                    mBarcodeEditText.requestFocus();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-            @Override
-            public void onFail(int flag, String failStr) throws Exception {
-                progressDialog.dismiss();
-                mResultTextView.setText(failStr);
-                CommonUtil.toastNoRepeat(mActivity, failStr);
-                mBarcodeEditText.setText("");
-                mBarcodeEditText.requestFocus();
-            }
-        });
-    }
-
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-
-        if (resultCode != Activity.RESULT_OK) {
-            return;
-        }
-
-        if (requestCode == SCAN_BARCODE_CODE && data != null) {
-            if (data.getExtras() != null) {
-                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
-                mBarcodeEditText.setText(result);
-                mBarcodeEditText.setSelection(result.length());
-                stepReceive(result);
-            }
-        }
-    }
-
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        return false;
-    }
-
-    @Override
-    public boolean onFragmentBackPressed() {
-        return false;
-    }
-}

+ 0 - 160
app/src/main/java/com/uas/gdstorage/fragment/StepTransferFragment.java

@@ -1,160 +0,0 @@
-package com.uas.gdstorage.fragment;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.text.TextUtils;
-import android.view.KeyEvent;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.android.volley.Request;
-import com.uas.gdstorage.R;
-import com.uas.gdstorage.global.GloableParams;
-import com.uas.gdstorage.listener.MyEditorActionListener;
-import com.uas.gdstorage.util.CameraUtil;
-import com.uas.gdstorage.util.CommonUtil;
-import com.uas.gdstorage.util.FastjsonUtil;
-import com.uas.gdstorage.util.HttpCallback;
-import com.uas.gdstorage.util.HttpParams;
-import com.uas.gdstorage.util.VollyRequest;
-import com.uas.gdstorage.view.ClearableEditText;
-import com.uuzuche.lib_zxing.activity.CaptureActivity;
-import com.uuzuche.lib_zxing.activity.CodeUtils;
-
-/**
- * Created by RaoMeng on 2020/4/26
- * Desc: 工步移交
- */
-public class StepTransferFragment extends BaseFragment {
-    private static final int SCAN_BARCODE_CODE = 111;
-
-    private ClearableEditText mBarcodeEditText;
-    private ImageView mScanImageView;
-    private TextView mResultTextView;
-    private CheckBox mCancelCheckBox;
-
-    @Override
-    protected int getLayout() {
-        return R.layout.fragment_step_transfer;
-    }
-
-    @Override
-    protected void initViews() {
-        setTitle("工步移交");
-
-        mBarcodeEditText = root.findViewById(R.id.step_transfer_barcode_et);
-        mScanImageView = root.findViewById(R.id.step_transfer_scan_iv);
-        mResultTextView = root.findViewById(R.id.step_transfer_result_tv);
-        mCancelCheckBox = root.findViewById(R.id.step_transfer_cancel_cb);
-    }
-
-    @Override
-    protected void initEvents() {
-        mScanImageView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (CameraUtil.hasCamera()) {
-                    Intent intent = new Intent();
-                    intent.setClass(mActivity, CaptureActivity.class);
-                    startActivityForResult(intent, SCAN_BARCODE_CODE);
-                } else {
-                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
-                }
-            }
-        });
-
-        CommonUtil.setEditorActionListener(mBarcodeEditText, new MyEditorActionListener() {
-            @Override
-            public void MyEditorAction(String text, int actionId, KeyEvent event) {
-                stepSend(text);
-            }
-        });
-    }
-
-    @Override
-    protected void initDatas() {
-
-    }
-
-    private void stepSend(String barcode) {
-        if (TextUtils.isEmpty(barcode)) {
-            return;
-        }
-        mResultTextView.setText("");
-        progressDialog.show();
-        VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
-                .url(GloableParams.ADDRESS_WIPSTEPTURN_SEND)
-                .method(Request.Method.POST)
-                .addParam("lotno", barcode)
-                .addParam("cancel", String.valueOf(mCancelCheckBox.isChecked()))
-                .build(), new HttpCallback() {
-            @Override
-            public void onSuccess(int flag, Object o) throws Exception {
-                progressDialog.dismiss();
-                String msg = "移交成功";
-                if (mCancelCheckBox.isChecked()) {
-                    msg = "撤销移交成功";
-                }
-                CommonUtil.toastNoRepeat(mActivity, msg);
-                try {
-                    String result = o.toString();
-                    JSONObject resultObject = JSON.parseObject(result);
-                    JSONObject dataObject = resultObject.getJSONObject("data");
-                    if (dataObject != null) {
-                        mResultTextView.setText(
-                                "批号:" + FastjsonUtil.getText(dataObject, "LOTNO")
-                                        + "\n数量:" + FastjsonUtil.getText(dataObject, "QTY")
-                                        + "\n" + msg
-                        );
-                    }
-                    mBarcodeEditText.setText("");
-                    mBarcodeEditText.requestFocus();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-
-            @Override
-            public void onFail(int flag, String failStr) throws Exception {
-                progressDialog.dismiss();
-                mResultTextView.setText(failStr);
-                CommonUtil.toastNoRepeat(mActivity, failStr);
-                mBarcodeEditText.setText("");
-                mBarcodeEditText.requestFocus();
-            }
-        });
-    }
-
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-
-        if (resultCode != Activity.RESULT_OK) {
-            return;
-        }
-
-        if (requestCode == SCAN_BARCODE_CODE && data != null) {
-            if (data.getExtras() != null) {
-                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
-                mBarcodeEditText.setText(result);
-                mBarcodeEditText.setSelection(result.length());
-                stepSend(result);
-            }
-        }
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        return false;
-    }
-
-    @Override
-    public boolean onFragmentBackPressed() {
-        return false;
-    }
-}

+ 15 - 35
app/src/main/java/com/uas/gdstorage/global/GloableParams.java

@@ -252,8 +252,6 @@ public class GloableParams {
     public static String ADDRESS_SPOTCHECK_SAVEQUACOMPLAIN;
     public static String ADDRESS_SPOTCHECK_SAVEQUALITYFEEDBACK;
     public static String ADDRESS_SPOTCHECK_SAVEMAKEQUALITYYC;
-    public static String ADDRESS_WIPSTEPTURN_SEND;
-    public static String ADDRESS_WIPSTEPTURN_ACCEPT;
 
     /**
      * 高登
@@ -716,19 +714,11 @@ public class GloableParams {
     private static final String ADDRESSTAIL_PAD_FEEDEDLOADDING = "/api/pdashop/loading/loading.action";
     //获取当前账号可使用的岗位资源
     private static final String ADDRESSTAIL_PAD_GETSOURCEBYEMP = "/api/pdashop/getSourceByEmp.action";
-    /**
-     * 工步移交
-     */
-    private static final String ADDRESSTAIL_WIPSTEPTURN_SEND = "/api/pdashop/wipStepTurn/send.action";
-    /**
-     * 工步接收
-     */
-    private static final String ADDRESSTAIL_WIPSTEPTURN_ACCEPT = "/api/pdashop/wipStepTurn/accept.action";
 
     /***********************************************************************************************/
     /*界面文字和图片资源,控制后续数据一致*/
     //home主页面
-    public static final String HOME_DISPATCH_MANAGE = "工管理";
+    public static final String HOME_DISPATCH_MANAGE = "派工管理";
     public static final String HOME_QUALITY_MANAGE = "品质管理";
     public static final String GRIDNAME_SETTING = "设置";
     public static String[] homeMenuNames = {HOME_DISPATCH_MANAGE, HOME_QUALITY_MANAGE,GRIDNAME_SETTING};
@@ -736,29 +726,22 @@ public class GloableParams {
             R.drawable.ic_quality_manage,R.drawable.mainmenu_usersetting};
 
     //index界面
-
-    public static final String GRIDNAME_WORK_START = "工单绑定";
-    public static final String GRIDNAME_WORK_PAUSE = "解除绑定";
+    public static final String GRIDNAME_IN_MATERIAL = "上料";
+    public static final String GRIDNAME_WORK_START = "工单启动";
+    public static final String GRIDNAME_WORK_PAUSE = "工单暂停";
     public static final String GRIDNAME_WORK_SWITCH = "工单切换";
-    public static final String GRIDNAME_IN_MATERIAL = "接料";
-    public static final String GRIDNAME_TIME_REPORT = "报工";
-    public static final String GRIDNAME_TIME_REPORT_DETAIL = "报工明细";
-    public static final String GRIDNAME_TIME_METRIAL_DETAIL = "物料明细";
-    public static final String GRIDNAME_STEP_TRANSFER = "工步移交";
-    public static final String GRIDNAME_STEP_RECEIVE = "工步接收";
-   // public static final String GRIDNAME_STAFF_CHANGE = "人员换岗";
-    //public static final String GRIDNAME_STAFF_UP = "人员上线";
-  //  public static final String GRIDNAME_STAFF_DOWN = "人员下线";
-    public static String[] indexMainGridNames = {GRIDNAME_WORK_START,
-            GRIDNAME_WORK_PAUSE, GRIDNAME_WORK_SWITCH, GRIDNAME_IN_MATERIAL, GRIDNAME_TIME_REPORT,
-           GRIDNAME_TIME_REPORT_DETAIL,GRIDNAME_TIME_METRIAL_DETAIL,
-           GRIDNAME_STEP_TRANSFER,GRIDNAME_STEP_RECEIVE};
+    public static final String GRIDNAME_TIME_REPORT = "实时报工";
+    public static final String GRIDNAME_STAFF_CHANGE = "人员换岗";
+    public static final String GRIDNAME_STAFF_UP = "人员上线";
+    public static final String GRIDNAME_STAFF_DOWN = "人员下线";
+    public static String[] indexMainGridNames = {GRIDNAME_IN_MATERIAL, GRIDNAME_WORK_START,
+            GRIDNAME_WORK_PAUSE, GRIDNAME_WORK_SWITCH, GRIDNAME_TIME_REPORT, GRIDNAME_STAFF_CHANGE
+            , GRIDNAME_STAFF_UP, GRIDNAME_STAFF_DOWN};
 
-    public static int[] indexMainGridImgs = {
-            R.drawable.start, R.drawable.pause, R.drawable.swich,
-            R.drawable.feeded,R.drawable.report,
-            R.drawable.ic_staff_up,R.drawable.ic_staff_down,
-            R.drawable.ic_storage_out,R.drawable.ic_storage_in};
+    public static int[] indexMainGridImgs = {R.drawable.feeded,
+            R.drawable.start, R.drawable.pause, R.drawable.swich
+            , R.drawable.report, R.drawable.staffchange
+            , R.drawable.ic_staff_up, R.drawable.ic_staff_down};
 
     //INDEX:出入库管理Index
     public static final String GRIDNAME_CODEBAR_COLLECT = "入库";
@@ -1113,8 +1096,5 @@ public class GloableParams {
         GloableParams.ADDRESS_SPOTCHECK_SAVEQUACOMPLAIN = uriHead + GloableParams.ADDRESSTAIL_SPOTCHECK_SAVEQUACOMPLAIN;
         GloableParams.ADDRESS_SPOTCHECK_SAVEQUALITYFEEDBACK = uriHead + GloableParams.ADDRESSTAIL_SPOTCHECK_SAVEQUALITYFEEDBACK;
         GloableParams.ADDRESS_SPOTCHECK_SAVEMAKEQUALITYYC = uriHead + GloableParams.ADDRESSTAIL_SPOTCHECK_SAVEMAKEQUALITYYC;
-        GloableParams.ADDRESS_WIPSTEPTURN_SEND = uriHead + GloableParams.ADDRESSTAIL_WIPSTEPTURN_SEND;
-        GloableParams.ADDRESS_WIPSTEPTURN_ACCEPT = uriHead + GloableParams.ADDRESSTAIL_WIPSTEPTURN_ACCEPT;
-
     }
 }

+ 0 - 5
app/src/main/java/com/uas/gdstorage/util/Constants.java

@@ -214,14 +214,9 @@ public interface Constants {
         String SC_CODE = "PDA_GD_SC_CODE";
         String MA_CODE = "PDA_GD_MA_CODE";
         String NEED_CLEAR_SCCODE = "NEED_CLEAR_SCCODE";
-        String MA_TITLE = "ma_title";
 
         //报工单位
         String REPORT_UNIT = "cache_report_unit";
-        //岗位资源CODE码
-        String GANG_WEI_SOURCE_CODE = "gang_wei_source_code";
-        //岗位资源名称
-        String GANG_WEI_SOURCE_NAME = "gang_wei_source_name";
     }
 
     /**

+ 18 - 32
app/src/main/java/com/uas/gdstorage/view/ClearableEditText.java

@@ -10,8 +10,8 @@ import android.text.TextWatcher;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
-import com.uas.gdstorage.R;
 
+import com.uas.gdstorage.R;
 
 /**
  * @注释:输入框右边的清除按钮
@@ -22,7 +22,6 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
     private OnFocusChangeListener mOnFocusChangeListener;
     private OnTouchListener mOnTouchListener;
     Context context;
-    private boolean isClearVisiable = false;
 
     public ClearableEditText(Context context) {
         super(context);
@@ -39,15 +38,10 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
         init(context);
     }
 
-    public void setClearVisiable(boolean clearVisiable) {
-        isClearVisiable = clearVisiable;
-        setClearIconVisible(clearVisiable);
-    }
-
-    private void init(Context pContext) {
+    private void init(Context pContext){
         context = pContext;
         //封装drawable对象,系统默认图标:R.drawable.abc_ic_clear_mtrl_alpha
-        Drawable drawable = ContextCompat.getDrawable(context, R.drawable.wrong);
+        Drawable drawable = ContextCompat.getDrawable(context, R.drawable.wrong );
         Drawable wrappedDrawable = DrawableCompat.wrap(drawable);
         //简单着色
         DrawableCompat.setTint(wrappedDrawable, getCurrentHintTextColor());
@@ -65,19 +59,18 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
     }
 
     private void setClearIconVisible(final boolean visible) {
-        boolean isVisible = isClearVisiable || visible;
-        mClearTextIcon.setVisible(isVisible, false);
+        mClearTextIcon.setVisible(visible, false);
         final Drawable[] compoundDrawables = getCompoundDrawables();
         //在edittext右侧设置图标
         setCompoundDrawables(
                 compoundDrawables[0],
                 compoundDrawables[1],
-                isVisible ? mClearTextIcon : null,
+                visible ? mClearTextIcon : null,
                 compoundDrawables[3]);
     }
 
     //设置警告标志可见
-    public void setWarnIconVisible() {
+    public void setWarnIconVisible(){
         Drawable warnDrawable = ContextCompat.getDrawable(context, R.drawable.warn);
         Drawable wrapWarnDrawable = DrawableCompat.wrap(warnDrawable);
         warnDrawable = wrapWarnDrawable;
@@ -95,17 +88,15 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
                 compoundDrawables[3]);
 
     }
-
     //设置警告标志可见
-    public void setSmallWarnIconVisible() {
+    public void setSmallWarnIconVisible(){
         Drawable warnDrawable = ContextCompat.getDrawable(context, R.drawable.warn);
         Drawable wrapWarnDrawable = DrawableCompat.wrap(warnDrawable);
         warnDrawable = wrapWarnDrawable;
         int f = context.getResources().getDimensionPixelSize(R.dimen.hint_pic_small);
         warnDrawable.setBounds(0, 0, f, f);
 
-        final Drawable[] compoundDrawables = getCompoundDrawables();
-        mClearTextIcon.setBounds(0, 0, mClearTextIcon.getIntrinsicHeight(), mClearTextIcon.getIntrinsicWidth());
+        final Drawable[] compoundDrawables = getCompoundDrawables(); mClearTextIcon.setBounds(0, 0, mClearTextIcon.getIntrinsicHeight(), mClearTextIcon.getIntrinsicWidth());
 
         //在edittext右侧设置图标
         setCompoundDrawables(
@@ -115,8 +106,7 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
                 compoundDrawables[3]);
 
     }
-
-    private void dismissOkIcon(final boolean visible) {
+    private void dismissOkIcon(final boolean visible){
         mClearTextIcon.setVisible(visible, false);
         final Drawable[] compoundDrawables = getCompoundDrawables();
         //在edittext右侧设置图标
@@ -128,9 +118,8 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
     }
 
     boolean isOk = false;
-
     //设置成功标志可见
-    public void setOkIconVisible() {
+    public void setOkIconVisible(){
         isOk = true;
         Drawable warnDrawable = ContextCompat.getDrawable(context, R.drawable.ok);
         Drawable wrapWarnDrawable = DrawableCompat.wrap(warnDrawable);
@@ -153,13 +142,14 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
     public void onFocusChange(View v, boolean hasFocus) {
         if (hasFocus) {
             setClearIconVisible(getText().length() > 0);
-        } else {
+        }
+        else {
             //如果不是正确图片,则焦点消失清空图片
-            if (!isOk) {
+            if(!isOk){
                 setClearIconVisible(false);
             }
             //如果是正确图片,则焦点消失后图片也不消失,显示正确图片
-            else {
+            else{
                 setOkIconVisible();
             }
         }
@@ -170,14 +160,12 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
 
 
     /**
-     * 输入框获取焦点
-     */
-    private void editTextGetFocus() {
+     * 输入框获取焦点*/
+    private void editTextGetFocus(){
         setFocusable(true);
         setFocusableInTouchMode(true);
         requestFocus();
     }
-
     @Override
     public boolean onTouch(View v, MotionEvent event) {
         final int x = (int) event.getX();
@@ -188,7 +176,7 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
                 //EditText本身获得焦点
                 editTextGetFocus();
                 //外界btn使EditText自动获取焦点
-                if (etFocus != null) {
+                if(etFocus!=null){
                     etFocus.setFoucus();
                 }
             }
@@ -198,8 +186,7 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
     }
 
     EditTextFocus etFocus;
-
-    public interface EditTextFocus {
+    public interface EditTextFocus{
         void setFoucus();
     }
 
@@ -216,7 +203,6 @@ public class ClearableEditText extends AppCompatEditText implements View.OnTouch
     public void afterTextChanged(Editable s) {
 
     }
-
     @Override
     public final void onTextChanged(final CharSequence s, final int start, final int before, final int count) {
         //如果文字被修改,则OK消失

+ 104 - 138
app/src/main/res/layout/activity_index.xml

@@ -8,6 +8,10 @@
     android:focusableInTouchMode="true">
 
 
+    <include
+        android:id="@+id/include_menuactionbar"
+        layout="@layout/index_actionbar" />
+
     <com.scwang.smartrefresh.layout.SmartRefreshLayout
         android:id="@+id/SmartRefreshLayout_id"
         android:layout_width="match_parent"
@@ -15,90 +19,84 @@
         android:layout_below="@id/include_menuactionbar"
         android:layout_centerInParent="true">
 
+        <com.scwang.smartrefresh.layout.header.ClassicsHeader
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            app:srlAccentColor="@android:color/darker_gray" />
+
         <android.support.v4.widget.NestedScrollView
             android:layout_width="match_parent"
             android:layout_height="match_parent">
 
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
                 android:orientation="vertical">
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:orientation="vertical">
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
 
                     <LinearLayout
-                        android:layout_width="match_parent"
+                        android:layout_width="0dp"
                         android:layout_height="wrap_content"
-                        android:gravity="center_vertical">
+                        android:layout_weight="7"
+                        android:orientation="vertical"
+                        android:padding="8dp">
+
                         <LinearLayout
-                            android:layout_width="0dp"
+                            android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_weight="1"
-                            android:orientation="vertical"
-                            android:layout_marginLeft="12dp"
-                            android:padding="8dp">
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
 
-                            <LinearLayout
-                                android:layout_width="match_parent"
+                            <TextView
+                                android:id="@+id/em_name_tv"
+                                android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:gravity="center_vertical"
-                                android:orientation="horizontal">
+                                android:textColor="#333333" />
 
-                                <TextView
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:text="账号:"
-                                    android:textColor="#333333"
-                                    android:textSize="12sp" />
-
-                                <TextView
-                                    android:id="@+id/em_name_tv"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:textColor="#333333"
-                                    android:textSize="12sp"
-                                    tools:text="吴雨潇" />
+                            <TextView
+                                android:id="@+id/em_code_tv"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="10dp"
+                                android:textColor="#333333" />
+                        </LinearLayout>
 
-                                <TextView
-                                    android:id="@+id/em_code_tv"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginLeft="10dp"
-                                    android:textColor="#333333"
-                                    android:textSize="12sp" />
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="4dp">
 
-                            </LinearLayout>
+                            <TextView
+                                style="@style/captiontext"
+                                android:text="上线人员:" />
 
+                            <TextView
+                                android:id="@+id/index_staff_info_tv"
+                                style="@style/valuetext" />
                         </LinearLayout>
+
                         <LinearLayout
-                            android:layout_width="0dp"
+                            android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-
-                            android:layout_weight="1"
                             android:orientation="horizontal">
+
                             <LinearLayout
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_marginTop="4dp"
-                                android:gravity="center_vertical"
-                                >
+                                android:layout_marginTop="4dp">
 
                                 <TextView
                                     style="@style/captiontext"
-                                    android:text="岗位:"
-                                    android:textColor="#333333"
-                                    android:textSize="12sp" />
+                                    android:text="岗位:" />
 
                                 <TextView
                                     android:id="@+id/index_position_resource"
                                     style="@style/valuetext"
-                                    android:layout_width="wrap_content"
-                                    android:textColor="#333333"
-                                    android:textSize="12sp"
-                                    tools:text="3AAA" />
+                                    android:layout_width="wrap_content" />
 
                                 <TextView
                                     android:id="@+id/scname_tv"
@@ -107,100 +105,78 @@
                                     android:paddingLeft="10dp" />
                             </LinearLayout>
 
+
                         </LinearLayout>
-                        <ImageView
-                            android:id="@+id/index_edit"
-                            android:layout_width="20dp"
-                            android:layout_height="24dp"
-                            android:src="@drawable/edit_easyicon"
-                            android:layout_marginRight="10dp"/>
-                    </LinearLayout>
 
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="4dp">
 
+                            <TextView
+                                style="@style/captiontext"
+                                android:text="线别:" />
 
-                </LinearLayout>
+                            <TextView
+                                android:id="@+id/index_feeding"
+                                style="@style/valuetext" />
+                        </LinearLayout>
 
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingLeft="20dp"
-                    android:paddingRight="20dp">
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="4dp">
 
-                    <LinearLayout
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="4dp"
-                        android:layout_weight="1">
+                            <TextView
+                                style="@style/captiontext"
+                                android:text="工单:" />
+
+                            <TextView
+                                android:id="@+id/index_cur_doc"
+                                style="@style/valuetext" />
+                        </LinearLayout>
 
-                        <TextView
-                            style="@style/captiontext"
-                            android:layout_width="wrap_content"
-                            android:text="工单:" />
 
-                        <TextView
-                            android:id="@+id/index_cur_doc"
-                            style="@style/valuetext" />
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="4dp">
+
+                            <TextView
+                                style="@style/captiontext"
+                                android:text="未完数:" />
+
+                            <TextView
+                                android:id="@+id/index_unfinish_number"
+                                style="@style/valuetext"
+                                android:layout_width="0dp"
+                                android:layout_weight="1" />
+
+                            <TextView
+                                style="@style/captiontext"
+                                android:text="报废数:" />
+
+                            <TextView
+                                android:id="@+id/index_scrap_number"
+                                style="@style/valuetext"
+                                android:layout_width="0dp"
+                                android:layout_weight="1" />
+                        </LinearLayout>
                     </LinearLayout>
 
                     <LinearLayout
-                        android:layout_width="0dp"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="4dp"
-                        android:layout_weight="1">
+                        android:id="@+id/index_edit"
+                        android:layout_width="50dp"
+                        android:layout_height="80dp"
+                        android:layout_marginTop="50dp">
 
-                        <TextView
-                            style="@style/captiontext"
-                            android:text="批号:" />
-
-                        <TextView
-                            android:id="@+id/tv_pihao"
-                            style="@style/valuetext" />
+                        <ImageView
+                            android:layout_width="20dp"
+                            android:layout_height="24dp"
+                            android:src="@drawable/edit_easyicon" />
                     </LinearLayout>
-                    <View
-                        android:layout_width="20dp"
-                        android:layout_height="wrap_content"/>
-
-                </LinearLayout>
-
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="10dp"
-                    android:paddingLeft="20dp"
-                    android:paddingRight="20dp">
-
-                    <TextView
-                        style="@style/captiontext"
-                        android:layout_width="wrap_content"
-                        android:text="未完数:" />
-
-                    <TextView
-                        android:id="@+id/index_unfinish_number"
-                        style="@style/valuetext"
-                        android:layout_width="0dp"
-                        android:layout_weight="1" />
-
-                    <TextView
-                        style="@style/captiontext"
-                        android:text="报废数: " />
 
-                    <TextView
-                        android:id="@+id/index_scrap_number"
-                        style="@style/valuetext"
-                        android:layout_width="0dp"
-                        android:layout_weight="1" />
-                    <View
-                        android:layout_width="20dp"
-                        android:layout_height="wrap_content"/>
                 </LinearLayout>
-                <TextView
-                    android:id="@+id/tv_metrimal_name"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:padding="15dp"
-                    android:layout_marginLeft="5dp"
-                    tools:text="K002雾化棒半成品_金桔柠檬0mg"/>
 
                 <com.uas.gdstorage.view.MyGridView
                     android:id="@+id/grid_menu"
@@ -209,21 +185,11 @@
 
             </LinearLayout>
 
-
         </android.support.v4.widget.NestedScrollView>
 
         <com.scwang.smartrefresh.layout.footer.ClassicsFooter
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             app:srlAccentColor="@android:color/darker_gray" />
-
-        <com.scwang.smartrefresh.layout.header.ClassicsHeader
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            app:srlAccentColor="@android:color/darker_gray" />
     </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-
-    <include
-        android:id="@+id/include_menuactionbar"
-        layout="@layout/index_actionbar" />
 </RelativeLayout>

+ 0 - 164
app/src/main/res/layout/fragment_report_detail.xml

@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:padding="8dp">
-
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            >
-            <LinearLayout
-                android:layout_width="0dp"
-                android:layout_weight="7"
-                android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:padding="12dp">
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-                    <TextView
-                        android:id="@+id/em_name_tv"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textColor="#333333"
-                        />
-                    <TextView
-                        android:id="@+id/em_code_tv"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textColor="#333333"
-                        android:layout_marginLeft="10dp"
-                        />
-                </LinearLayout>
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal"
-                    android:layout_marginTop="10dp">
-
-                        <TextView
-                            android:text="岗位:"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:textColor="#333333"
-                            />
-                        <TextView
-                            android:id="@+id/ol_resource_tv"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:textColor="#333333"
-                            android:text="CC"
-                            />
-                        <TextView
-                            android:text="非上料的岗位资源名称CCCCCCCCCCCCCCCC"
-                            android:id="@+id/scname_tv"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:textColor="#333333"
-                            android:layout_marginLeft="10dp"/>
-                </LinearLayout>
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:layout_marginTop="10dp">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="未完数:"
-                        android:textColor="#333333" />
-
-                    <TextView
-                        android:id="@+id/unfinish_number_tv"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:textColor="#333333" />
-                </LinearLayout>
-            </LinearLayout>
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="14dp"
-            android:layout_marginBottom="4dp"
-            android:orientation="horizontal">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:width="80dp"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="账号"
-                android:textColor="@color/red"
-                android:textSize="14sp" />
-
-            <com.uas.gdstorage.view.ClearableEditText
-                android:id="@+id/account_et"
-                style="@style/EditTextStyle"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:hint="请输入"
-                android:textColor="@color/black"
-                android:textSize="14sp" />
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="4dp"
-            android:layout_marginBottom="4dp"
-            android:orientation="horizontal">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:width="80dp"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="密码"
-                android:textColor="@color/red"
-                android:textSize="14sp" />
-
-            <com.uas.gdstorage.view.ClearableEditText
-                android:id="@+id/password_et"
-                style="@style/EditTextStyle"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:hint="请输入"
-                android:textColor="@color/black"
-                android:textSize="14sp" />
-        </LinearLayout>
-
-        <CheckBox
-            android:id="@+id/ischecked_ck"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_margin="10dp"
-            android:text="切换人员岗位资源不变"
-            android:checked="false"
-            />
-
-        <Button
-            android:id="@+id/surechange_brn"
-            style="@style/ButtonStyle"
-            android:text="确认切换人员" />
-    </LinearLayout>
-</LinearLayout>

+ 0 - 53
app/src/main/res/layout/fragment_step_receive.xml

@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:padding="12dp">
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/bg_line_edittext">
-
-            <com.uas.gdstorage.view.ClearableEditText
-                android:id="@+id/step_receive_barcode_et"
-                style="@style/EditTextStyle"
-                android:layout_weight="1"
-                android:background="@null"
-                android:focusable="true"
-                android:focusableInTouchMode="true"
-                android:hint="请采集批号"
-                android:imeOptions="actionSend"
-                android:textColor="@color/black" />
-
-            <ImageView
-                android:id="@+id/step_receive_scan_iv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:layout_marginRight="10dp"
-                android:clickable="false"
-                android:src="@drawable/ic_edittext_scan" />
-        </LinearLayout>
-    </LinearLayout>
-
-    <TextView
-        android:id="@+id/step_receive_result_tv"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:padding="18dp"
-        android:textColor="@color/blue_800"
-        android:textSize="16sp"
-        android:textStyle="bold"
-        tools:text="采集结果是xxxxxxxxxxxxx" />
-</LinearLayout>

+ 0 - 59
app/src/main/res/layout/fragment_step_transfer.xml

@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:padding="12dp">
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/bg_line_edittext">
-
-            <com.uas.gdstorage.view.ClearableEditText
-                android:id="@+id/step_transfer_barcode_et"
-                style="@style/EditTextStyle"
-                android:layout_weight="1"
-                android:background="@null"
-                android:focusable="true"
-                android:focusableInTouchMode="true"
-                android:hint="请采集批号"
-                android:imeOptions="actionSend"
-                android:textColor="@color/black" />
-
-            <ImageView
-                android:id="@+id/step_transfer_scan_iv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:layout_marginRight="10dp"
-                android:clickable="false"
-                android:src="@drawable/ic_edittext_scan" />
-        </LinearLayout>
-
-        <CheckBox
-            android:id="@+id/step_transfer_cancel_cb"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="撤销" />
-    </LinearLayout>
-
-    <TextView
-        android:id="@+id/step_transfer_result_tv"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:padding="18dp"
-        android:textColor="@color/blue_800"
-        android:textSize="16sp"
-        android:textStyle="bold"
-        tools:text="采集结果是xxxxxxxxxxxxx" />
-</LinearLayout>

+ 1 - 1
app/src/main/res/layout/work_order_search_fragment.xml

@@ -63,7 +63,7 @@
 
                 <Button
                     android:id="@+id/start_btn"
-                    android:text="绑定"
+                    android:text="启动"
                     android:layout_width="match_parent"
                     android:layout_height="40dp"
                     style="@style/ButtonStyle"

+ 2 - 2
app/src/main/res/values/strings.xml

@@ -1,6 +1,6 @@
 <resources>
-    <string name="app_name">UAS-MES</string>
-    <string name="app_name_test">UAS-MES</string>
+    <string name="app_name">高登制程</string>
+    <string name="app_name_test">高登制程</string>
     <string name="hello_world">Hello world!</string>
     <string name="action_settings">Settings</string>
     <string name="title_activity_connect_server_fragment">ConnectServerFragment</string>