ChengJH 1 жил өмнө
parent
commit
d65ee5448c
27 өөрчлөгдсөн 1312 нэмэгдсэн , 318 устгасан
  1. 286 4
      app/src/main/java/com/uas/hystorage/activity/IndexActivity.java
  2. 45 0
      app/src/main/java/com/uas/hystorage/adapter/DlMacodeAdapter.java
  3. 87 0
      app/src/main/java/com/uas/hystorage/adapter/MyaddAdapter.java
  4. 59 0
      app/src/main/java/com/uas/hystorage/bean/AddworkorderBean.java
  5. 70 0
      app/src/main/java/com/uas/hystorage/bean/DlMacodesBean.java
  6. 69 47
      app/src/main/java/com/uas/hystorage/fragment/GdWorkSwitchFragment.java
  7. 66 0
      app/src/main/java/com/uas/hystorage/fragment/RolloutFragment.java
  8. 288 166
      app/src/main/java/com/uas/hystorage/fragment/WorkOrderSearchFragment.java
  9. 8 0
      app/src/main/java/com/uas/hystorage/global/GloableParams.java
  10. 12 1
      app/src/main/java/com/uas/hystorage/util/VolleyRequest.java
  11. 30 2
      app/src/main/res/layout/activity_index.xml
  12. 1 1
      app/src/main/res/layout/fragment_gd_material_in.xml
  13. 26 32
      app/src/main/res/layout/fragment_gd_work_switch.xml
  14. 104 0
      app/src/main/res/layout/fragment_rollout.xml
  15. 83 0
      app/src/main/res/layout/recyclerviewadd_item_layout.xml
  16. 67 54
      app/src/main/res/layout/work_order_search_fragment.xml
  17. BIN
      app/src/main/res/mipmap-xxhdpi/android_list.png
  18. 2 2
      build.gradle
  19. 2 2
      pda_libs/pulltoreflashlibrary/build/generated/source/buildConfig/debug/com/handmark/pulltorefresh/library/BuildConfig.java
  20. BIN
      pda_libs/pulltoreflashlibrary/build/intermediates/classes/debug/com/handmark/pulltorefresh/library/BuildConfig.class
  21. 1 1
      pda_libs/pulltoreflashlibrary/build/intermediates/incremental/packageDebugResources/compile-file-map.properties
  22. BIN
      pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/classes.jar
  23. BIN
      pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/full.jar
  24. 2 2
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/AndroidManifest.xml
  25. 1 1
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/output.json
  26. 2 2
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/AndroidManifest.xml
  27. 1 1
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/output.json

+ 286 - 4
app/src/main/java/com/uas/hystorage/activity/IndexActivity.java

@@ -43,7 +43,10 @@ import com.chad.library.adapter.base.BaseViewHolder;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.hystorage.R;
+import com.uas.hystorage.adapter.DlMacodeAdapter;
 import com.uas.hystorage.application.PdaApplication;
+import com.uas.hystorage.bean.AddworkorderBean;
+import com.uas.hystorage.bean.DlMacodesBean;
 import com.uas.hystorage.bean.MoreEventBusBean;
 import com.uas.hystorage.fragment.BaseFragment;
 import com.uas.hystorage.fragment.WorkOrderSearchFragment;
@@ -104,6 +107,8 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private String ifbindmake= "";
     private String ifpack= "";
     private ArrayList<ComDataBean> ComDataBeanList;
+    private ArrayList<DlMacodesBean> ComaddBeanList;
+    private ArrayList<AddworkorderBean> addworkorderBeans;
     private IpAndResourcesPortAdapter ipAndResourcesPortAdapter;
     private RecyclerView rv_line_ip_port_data;
     private String itemname;
@@ -112,6 +117,16 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private EditText ct_indexgangwei;
     private String ifinput;
     private String de_location;
+    private ImageView iv_add_data;
+    private List<DlMacodesBean> mList;
+    private DlMacodeAdapter dlMacodeAdapter;
+    private String dl_macodEdata;
+    private RecyclerView rv_line_add_port_data;
+    private ClearableEditText editadd_et;
+    private String pr_detail;
+    private String pr_sdetail;
+    private TextView index_detail_doc;
+
 
     @Override
     protected void onDestroy() {
@@ -135,12 +150,14 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         ct_indexgangwei = (EditText) findViewById(R.id.ct_indexgangwei);
       //  mFeeding = (TextView) findViewById(R.id.index_feeding);
         mCurDoc = (TextView) findViewById(R.id.index_cur_doc);
+        index_detail_doc = (TextView) findViewById(R.id.index_detail_doc);
         mUnfinish = (TextView) findViewById(R.id.index_unfinish_number);
         index_qty = findViewById(R.id.index_qty);
         mBackButton = findViewById(R.id.btn_actionbar_withback);
       //  mStaffTextView = findViewById(R.id.index_staff_info_tv);
         mScrapTextView = findViewById(R.id.index_scrap_number);
         tv_pihao=findViewById(R.id.tv_pihao);
+        iv_add_data = findViewById(R.id.iv_add_data);
 
         findViewById(R.id.index_edit).setOnClickListener(this);
         mRefreshLayout = findViewById(R.id.SmartRefreshLayout_id);
@@ -187,6 +204,13 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         getPrintTemplate();
         EventBus.getDefault().register(this);
 
+
+        iv_add_data.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                addDataList();
+            }
+        });
     }
 
     @Override
@@ -235,6 +259,8 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 return false;
             }
         });
+        mList = new ArrayList<>();
+//        setlistview();
     }
 
     @SuppressLint("NonConstantResourceId")
@@ -401,6 +427,8 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     @Override
     protected void initDatas() {
         ComDataBeanList = new ArrayList<>();
+        ComaddBeanList = new ArrayList<>();
+        addworkorderBeans = new ArrayList<>();
     }
 
     private void getDeviceline(String scCode) {
@@ -458,7 +486,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             SharedPreUtil.saveString(this,Constants.FLAG.GANG_WEI_SOURCE_CODE,sc_code);
             String sc_name = dataObject.getString("SC_NAME");
             de_location = dataObject.getString("DE_LOCATION");
-            if (de_location.length() == 0 || de_location == "") {
+            if (StringUtil.isEmpty(de_location)) {
                 de_location = "-";
             }
             de_location = "(" + de_location + ")";
@@ -488,12 +516,39 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             CommonUtil.toastNoRepeat(this, "岗位资源数据为空");
             return;
         }
-        if (!StringUtil.isEmpty(dataObject.getString("DL_MACODES"))) {
-            MACODE = dataObject.getString("DL_MACODES");
-            SharedPreUtil.saveString(this, "MA_CODE", dataObject.getString("DL_MACODES"));
+        JSONArray dataArray = dataObject.getJSONArray("DL_MACODES");
+        if (dataArray!=null) {
+            mList.clear();
+            for(Object index:dataArray){
+                JSONObject data = (JSONObject) index;
+                DlMacodesBean bean = new DlMacodesBean();
+                String DL_MACODE = data.getString("DL_MACODE") == null ? "-" : data.getString("DL_MACODE");
+                String MA_PRODCODE = data.getString("MA_PRODCODE") == null ? "-" : data.getString("MA_PRODCODE");
+                String MA_QTY = data.getString("MA_QTY") == null ? "-" : data.getString("MA_QTY");
+                String PR_DETAIL = data.getString("PR_DETAIL") == null ? "-" : data.getString("PR_DETAIL");
+                String PR_SPEC = data.getString("PR_SPEC") == null ? "-" : data.getString("PR_SPEC");
+                bean.setDL_MACODE(DL_MACODE);
+                bean.setMA_PRODCODE(MA_PRODCODE);
+                bean.setMA_QTY(MA_QTY);
+                bean.setPR_DETAIL(PR_DETAIL);
+                bean.setPR_SPEC(PR_SPEC);
+                mList.add(bean);
+            }
+            MACODE = mList.get(0).getDL_MACODE();
+            pr_detail = mList.get(0).getPR_DETAIL();
+            SharedPreUtil.saveString(this, "MA_CODE", MACODE);
             mCurDoc.setText(MACODE);
+            index_detail_doc.setText(pr_detail);
+            if (mList==null||mList.size()==0||mList.size()==1){
+                iv_add_data.setVisibility(View.GONE);
+            }else {
+                iv_add_data.setVisibility(View.VISIBLE);
+            }
+
         } else {
+            iv_add_data.setVisibility(View.GONE);
             mCurDoc.setText("");
+            index_detail_doc.setText("");
         }
         if (!StringUtil.isEmpty(dataObject.getString("MA_QTY"))) {//UNFINISHQQTY
             mUnfinish.setText(dataObject.getString("MA_QTY"));
@@ -521,6 +576,232 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
        // mStaffTextView.setText(mStaffName + (TextUtils.isEmpty(mStaffCode) ? "" : ("(" + mStaffCode + ")")));
     }
 
+    public void addDataList(){
+        ComaddBeanList.clear();
+        for (int i = 0; i < mList.size(); i++) {
+            DlMacodesBean bean = new DlMacodesBean();
+            bean.setDL_MACODE(mList.get(i).getDL_MACODE());
+            bean.setMA_PRODCODE(mList.get(i).getMA_PRODCODE());
+            bean.setMA_QTY(mList.get(i).getMA_QTY());
+            bean.setPR_DETAIL(mList.get(i).getPR_DETAIL());
+            bean.setPR_SPEC(mList.get(i).getPR_SPEC());
+            ComaddBeanList.add(bean);
+        }
+        initaddPopupWindow();
+
+
+    }
+
+
+    private void initaddPopupWindow() {
+        View contView = LayoutInflater.from(this).inflate(R.layout.index_recycle_item, null);
+        editadd_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
+        TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
+        TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
+        ImageView search_im = contView.findViewById(R.id.search_im);
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        rv_line_add_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_add_port_data.addItemDecoration(new DividerItemDecoration(this, LinearLayout.VERTICAL));
+        rv_line_add_port_data.setLayoutManager(new LinearLayoutManager(this));
+        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+        dlMacodeAdapter.setmList(ComaddBeanList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        setaddAdapter(ComaddBeanList);
+        editadd_et.requestFocus();
+
+        editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        editPW.setTouchable(true);
+        editPW.setBackgroundDrawable(new BitmapDrawable());
+        editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeListPopupWindow();
+            }
+        });
+        View parentView = getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        CommonUtil.setBackgroundAlpha(this, 0.5f);
+        editadd_et.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    String mSearchStr = editadd_et.getText().toString().trim();
+                    if (!mSearchStr.isEmpty()) {
+                        List<DlMacodesBean> thisList = new ArrayList<>();
+                        for(int i=0;i<ComaddBeanList.size();i++){
+                            if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                                thisList.add(ComaddBeanList.get(i));
+                            }
+                            if(i == ComaddBeanList.size() -1){
+                                dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                                rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                                LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                            }
+                            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                            for (int j = 0; j < lineCodeEntities.size(); j++) {
+                                lineCodeEntities.get(j).setChecked(false);
+                            }
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+
+
+                    } else {
+                        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int i = 0; i < lineCodeEntities.size(); i++) {
+                            lineCodeEntities.get(i).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+
+                    }
+                    dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                        @Override
+                        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                            List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                            dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                            for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                                ipAndPortBeans.get(i).setChecked(false);
+                            }
+                            ipAndPortBeans.get(position).setChecked(true);
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+                    });
+                    return true;
+                }
+                return false;
+            }
+        });
+
+
+
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                String mSearchStr = editadd_et.getText().toString().trim();
+                if (!mSearchStr.isEmpty()) {
+                    List<DlMacodesBean> thisList = new ArrayList<>();
+                    for(int i=0;i<ComaddBeanList.size();i++){
+                        if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                            thisList.add(ComaddBeanList.get(i));
+                        }
+                        if(i == ComaddBeanList.size() -1){
+                            dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                        }
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int j = 0; j < lineCodeEntities.size(); j++) {
+                            lineCodeEntities.get(j).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+
+
+                } else {
+                    dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                    rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                    List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                    for (int i = 0; i < lineCodeEntities.size(); i++) {
+                        lineCodeEntities.get(i).setChecked(false);
+                    }
+                    dlMacodeAdapter.notifyDataSetChanged();
+
+                }
+                dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                    @Override
+                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                        List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                        dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                        pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                            ipAndPortBeans.get(i).setChecked(false);
+                        }
+                        ipAndPortBeans.get(position).setChecked(true);
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+                });
+            }
+
+        });
+
+
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (StringUtil.isEmpty(dl_macodEdata)){
+                    CommonUtil.toastNoRepeat(getApplicationContext(),"请选择工单");
+                    return;
+                }
+                SharedPreUtil.saveString(IndexActivity.this, "MA_CODE", dl_macodEdata);
+                mCurDoc.setText(dl_macodEdata);
+                index_detail_doc.setText(pr_sdetail);
+                Log.e("itemremark",dl_macodEdata);
+                closeListPopupWindow();
+            }
+        });
+
+        //取消
+        cancle_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                closeListPopupWindow();
+            }
+        });
+
+        String mSearchStr = editadd_et.getText().toString().trim();
+        if (mSearchStr.isEmpty()) {
+            dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+            for (int i = 0; i < lineCodeEntities.size(); i++) {
+                lineCodeEntities.get(i).setChecked(false);
+            }
+            dlMacodeAdapter.notifyDataSetChanged();
+
+            dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                @Override
+                public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                    List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                    dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                    for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                        ipAndPortBeans.get(i).setChecked(false);
+                    }
+                    ipAndPortBeans.get(position).setChecked(true);
+                    dlMacodeAdapter.notifyDataSetChanged();
+                }
+            });
+        }
+
+
+
+    }
+
+    private void setaddAdapter(ArrayList<DlMacodesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        dlMacodeAdapter = new DlMacodeAdapter(mList);
+        dlMacodeAdapter.setmList(mList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        dlMacodeAdapter.notifyDataSetChanged();
+    }
+
+
+
+
+
+
+
+
     private void getRepairStep(String trim) {
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(mStringRequest,
@@ -861,6 +1142,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             mScName.setText("");
             mFeeding.setText("");
             mCurDoc.setText("");
+            index_detail_doc.setText("");
             mUnfinish.setText("");
         } else {
             return;

+ 45 - 0
app/src/main/java/com/uas/hystorage/adapter/DlMacodeAdapter.java

@@ -0,0 +1,45 @@
+package com.uas.hystorage.adapter;
+
+import android.support.annotation.Nullable;
+import android.widget.LinearLayout;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.hystorage.R;
+import com.uas.hystorage.bean.DlMacodesBean;
+
+import java.util.List;
+
+/**
+ * Created by cjh-sail on 2024-04-02
+ */
+public class DlMacodeAdapter extends BaseQuickAdapter<DlMacodesBean, BaseViewHolder> {
+
+    private List<DlMacodesBean> mmmmList;
+
+    public List<DlMacodesBean> getmList() {
+        return mmmmList;
+    }
+
+    public void setmList(List<DlMacodesBean> mList) {
+        this.mmmmList = mList;
+    }
+    public DlMacodesBean getBeanByPositon(int position){
+        return mmmmList.get(position);
+    }
+
+    public DlMacodeAdapter(@Nullable List<DlMacodesBean> data) {
+        super(R.layout.fuzzy_ipandport_item, data);
+        this.mmmmList = data;
+    }
+    @Override
+    protected void convert(BaseViewHolder helper, DlMacodesBean item) {
+        helper.setText(R.id.macode_ip__Tv,item.getDL_MACODE()+"\n"+item.getMA_PRODCODE()+"-"+item.getPR_DETAIL());
+        LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+        if (item.getChecked()) {
+            line_true.setSelected(true);
+        } else {
+            line_true.setSelected(false);
+        }
+    }
+}

+ 87 - 0
app/src/main/java/com/uas/hystorage/adapter/MyaddAdapter.java

@@ -0,0 +1,87 @@
+package com.uas.hystorage.adapter;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.support.annotation.NonNull;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.uas.hystorage.R;
+import com.uas.hystorage.bean.AddworkorderBean;
+
+import org.jetbrains.annotations.NotNull;
+
+import java.util.ArrayList;
+
+public class MyaddAdapter extends RecyclerView.Adapter<MyaddAdapter.viewHolder> {
+    private Context mContext;
+    private LayoutInflater mInflater;
+    private ArrayList<AddworkorderBean> mList;
+    public MyaddAdapter(Context context, ArrayList<AddworkorderBean> list) {
+        mContext = context;
+        mInflater = LayoutInflater.from(context);
+        mList = list;
+    }
+
+    @Override
+    public viewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        return new viewHolder(mInflater.inflate(R.layout.recyclerviewadd_item_layout, parent, false));
+    }
+
+    @Override
+    public void onBindViewHolder(@NonNull @NotNull MyaddAdapter.viewHolder viewHolder, @SuppressLint("RecyclerView") int position) {
+
+        viewHolder.item_makecode.setText("工单:"+mList.get(position).getLOTNO());
+        viewHolder.item_mouldtype.setText("数量:"+mList.get(position).getQTY());
+        viewHolder.item_data.setText("产品:"+mList.get(position).getMA_PRODCODE()
+                                    +"\n名称:"+mList.get(position).getPR_DETAIL()
+                                    +"\n规格:"+mList.get(position).getPR_SPEC());
+        viewHolder.tv_delete.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                new AlertDialog.Builder(mContext)
+                        .setTitle("提示")
+                        .setMessage("确定删除该条数据?")
+                        .setNegativeButton(R.string.cancel, null)
+                        .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                removeItem(position);
+                            }
+                        }).show();
+            }
+        });
+        // 禁止ViewHolder被复用
+        viewHolder.setIsRecyclable(false);
+    }
+
+
+    @Override
+    public int getItemCount() {
+        return mList != null ? mList.size() : 0;
+    }
+
+    public void removeItem(int position) {
+        mList.remove(position);
+        notifyDataSetChanged();
+    }
+    static class viewHolder extends RecyclerView.ViewHolder {
+        private TextView item_makecode;
+        private TextView item_mouldtype;
+        private TextView tv_delete;
+        private TextView item_data;
+
+        public viewHolder(View view) {
+            super(view);
+            item_makecode = view.findViewById(R.id.item_makecode);
+            item_mouldtype = view.findViewById(R.id.item_mouldtype);
+            item_data = view.findViewById(R.id.item_data);
+            tv_delete = view.findViewById(R.id.tv_delete);
+        }
+    }
+}

+ 59 - 0
app/src/main/java/com/uas/hystorage/bean/AddworkorderBean.java

@@ -0,0 +1,59 @@
+package com.uas.hystorage.bean;
+
+/**
+ * Created by cjh on 2022-10-10
+ */
+public class AddworkorderBean {
+    private String LOTNO;
+    private String QTY;
+    private String MA_PRODCODE;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+
+    public AddworkorderBean(){}
+
+    public AddworkorderBean(String LOTNO, String QTY) {
+        this.LOTNO = LOTNO;
+        this.QTY = QTY;
+    }
+
+    public String getMA_PRODCODE() {
+        return MA_PRODCODE;
+    }
+
+    public void setMA_PRODCODE(String MA_PRODCODE) {
+        this.MA_PRODCODE = MA_PRODCODE;
+    }
+
+    public String getPR_DETAIL() {
+        return PR_DETAIL;
+    }
+
+    public void setPR_DETAIL(String PR_DETAIL) {
+        this.PR_DETAIL = PR_DETAIL;
+    }
+
+    public String getPR_SPEC() {
+        return PR_SPEC;
+    }
+
+    public void setPR_SPEC(String PR_SPEC) {
+        this.PR_SPEC = PR_SPEC;
+    }
+
+    public String getLOTNO() {
+        return LOTNO;
+    }
+
+    public void setLOTNO(String LOTNO) {
+        this.LOTNO = LOTNO;
+    }
+
+    public String getQTY() {
+        return QTY;
+    }
+
+    public void setQTY(String QTY) {
+        this.QTY = QTY;
+    }
+}

+ 70 - 0
app/src/main/java/com/uas/hystorage/bean/DlMacodesBean.java

@@ -0,0 +1,70 @@
+package com.uas.hystorage.bean;
+
+import java.io.Serializable;
+
+public class DlMacodesBean implements Serializable {
+
+    private String DL_MACODE;
+    private String MA_PRODCODE;
+    private String MA_QTY;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+    private boolean Checked;
+
+    public DlMacodesBean(){}
+    public DlMacodesBean(String DL_MACODE, String MA_PRODCODE, String MA_QTY, String PR_DETAIL, String PR_SPEC) {
+        this.DL_MACODE = DL_MACODE;
+        this.MA_PRODCODE = MA_PRODCODE;
+        this.MA_QTY = MA_QTY;
+        this.PR_DETAIL = PR_DETAIL;
+        this.PR_SPEC = PR_SPEC;
+    }
+
+    public boolean getChecked() {
+        return Checked;
+    }
+
+    public void setChecked(boolean checked) {
+        Checked = checked;
+    }
+
+    public String getDL_MACODE() {
+        return DL_MACODE;
+    }
+
+    public void setDL_MACODE(String DL_MACODE) {
+        this.DL_MACODE = DL_MACODE;
+    }
+
+    public String getMA_PRODCODE() {
+        return MA_PRODCODE;
+    }
+
+    public void setMA_PRODCODE(String MA_PRODCODE) {
+        this.MA_PRODCODE = MA_PRODCODE;
+    }
+
+    public String getMA_QTY() {
+        return MA_QTY;
+    }
+
+    public void setMA_QTY(String MA_QTY) {
+        this.MA_QTY = MA_QTY;
+    }
+
+    public String getPR_DETAIL() {
+        return PR_DETAIL;
+    }
+
+    public void setPR_DETAIL(String PR_DETAIL) {
+        this.PR_DETAIL = PR_DETAIL;
+    }
+
+    public String getPR_SPEC() {
+        return PR_SPEC;
+    }
+
+    public void setPR_SPEC(String PR_SPEC) {
+        this.PR_SPEC = PR_SPEC;
+    }
+}

+ 69 - 47
app/src/main/java/com/uas/hystorage/fragment/GdWorkSwitchFragment.java

@@ -12,7 +12,6 @@ import android.text.Editable;
 import android.text.TextWatcher;
 import android.view.KeyEvent;
 import android.view.View;
-import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
@@ -44,6 +43,7 @@ import com.uas.hystorage.util.FastjsonUtil;
 import com.uas.hystorage.util.HttpCallback;
 import com.uas.hystorage.util.HttpParams;
 import com.uas.hystorage.util.LogUtil;
+import com.uas.hystorage.util.MyArrayAdapter;
 import com.uas.hystorage.util.StringUtil;
 import com.uas.hystorage.util.VollyRequest;
 import com.uas.hystorage.view.ClearableEditText;
@@ -92,12 +92,13 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
     private int mFocusId;
     private static final int SCAN_BARCODE_CODE = 201;
     private String ifneedmj;
-    private ClearableEditText ce_moju;
+    private AutoCompleteTextView ce_moju;
     private TextView tv_mju;
     private LinearLayout line_mju;
     private boolean chentrueorflase;
-    private TextView text_moju;
-    private LinearLayout line_moju;
+    private String mojucode;
+    private ImageView clean_iv;
+    private MyArrayAdapter autoStringAdapter;
 
     @Override
     protected int getLayout() {
@@ -128,9 +129,10 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
         mOlExChangeBtn = root.findViewById(R.id.ol_exchange_btn);
         mOlNextEt = root.findViewById(R.id.ol_next_et);
         ce_moju = root.findViewById(R.id.ce_moju);
+        clean_iv = root.findViewById(R.id.clean_iv);
+        ce_moju.requestFocus();
+        ce_moju.setThreshold(1);
         tv_mju = root.findViewById(R.id.tv_mju);
-        text_moju = root.findViewById(R.id.text_moju);
-        line_moju = root.findViewById(R.id.line_moju);
         root.findViewById(R.id.scan_code_im).setOnClickListener(this);
         root.findViewById(R.id.ol_next_im).setOnClickListener(this);
         tv_gangwei=root.findViewById(R.id.tv_gangwei);
@@ -152,6 +154,8 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
         imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
 //        mSearch.setThreshold(1);
 
+//        mojucode = SharedPreUtil.getString(mActivity, "mojucode", null);
+
     }
 
     @Override
@@ -195,42 +199,32 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
             }
         });
 
-
-
-        //----------模具模糊搜索------------------------
-        ce_moju.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+        clean_iv.setOnClickListener(new View.OnClickListener() {
             @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_DONE
-                        || actionId == EditorInfo.IME_ACTION_SEND
-                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
-                    String data = ce_moju.getText().toString().trim();
-                    fuzzySearchMould(data);
-                    return true;
-                }
-                return false;
+            public void onClick(View v) {
+                ce_moju.setText("");
+                ce_moju.requestFocus();
             }
         });
 
-        ce_moju.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) { }
+        //------------------------------模具模糊搜索------------------------
+//        if (!StringUtil.isEmpty(mojucode)){
+//            ce_moju.setText(mojucode);
+//        }
+
+        ce_moju.addTextChangedListener(inOutNoTextWatcher);
+
+        ce_moju.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
-            public void afterTextChanged(Editable s) {
-                if (s.length() >= 3) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    fuzzySearchMould(mSearchStr);
-                } else {
-                    fuzzyBeans.clear();
-                    setfuzzyAdapter(fuzzyBeans);
-                    return;
-                }
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                mSearch.requestFocus();
+                mSearch.setSelection(mSearch.getText().length());
             }
         });
-        
+
+
+
+
         
         fuzzyAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
             @Override
@@ -239,8 +233,6 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
                 String macode = bean.getMA_CODE();
                 if (chentrueorflase){
                     if (macode.length() > 0){
-                        line_moju.setVisibility(View.VISIBLE);
-                        text_moju.setText(macode);
                         mSearch.requestFocus();
                         mSearch.setSelection(mSearch.getText().length());
                         ce_moju.setText("");
@@ -308,6 +300,34 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
             }
         });
     }
+
+    private TextWatcher inOutNoTextWatcher = new TextWatcher() {
+        @Override
+        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+            //当字数超过3个,自动弹出输入提示框
+            if (charSequence.length() >= 3) {
+                LogUtil.i("mSearchStr",ce_moju.getText().toString().trim());
+                fuzzySearchMould(ce_moju.getText().toString().trim());
+
+            }
+        }
+
+        @Override
+        public void afterTextChanged(Editable editable) {
+            if (editable.length() == 0) {
+                clean_iv.setVisibility(View.GONE);
+            } else {
+                clean_iv.setVisibility(View.VISIBLE);
+            }
+        }
+    };
+
+
     //工单细查询
     private void getLastBean(String clickCode) {
 //        progressDialog.show();
@@ -445,16 +465,19 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
                                 setfuzzyAdapter(fuzzyBeans);
                                 return;
                             }
-                            FuzzyBean bean = null;
-                            if (fuzzyBeans.size() > 0) fuzzyBeans.clear();
+                            List<String> autoStrings = new ArrayList<>();
+                            autoStrings.clear();
+                            autoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, autoStrings);
+
+                            if (ce_moju != null) {
+                                ce_moju.setAdapter(autoStringAdapter);
+                            }
                             for (Object index : dataArray){
+
                                 JSONObject data = (JSONObject) index;
-                                bean = new FuzzyBean(data.getString("DE_CODE"),data.getString("DE_NAME"));
-                                fuzzyBeans.add(bean);
+//                                bean = new FuzzyBean(,data.getString("DE_NAME"));
+                                autoStringAdapter.add(data.getString("DE_CODE"));
                             }
-                            setfuzzyAdapter(fuzzyBeans);
-                            startLlS.setVisibility(View.GONE);
-                            fuzzyRv.setVisibility(View.VISIBLE);
 
                         }else {
 
@@ -495,7 +518,7 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
     private void doExChangeClick() {
         if (!StringUtil.isEmpty(ifneedmj)){
             if(!ifneedmj.equals("0")){
-                if (text_moju.getText().toString().trim().isEmpty()){
+                if (ce_moju.getText().toString().trim().isEmpty()){
                     CommonUtil.toastNoRepeat(mActivity, "请输入模具编号");
                     return;
                 }
@@ -512,7 +535,7 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
                         .addParam("ma_code", mOlIdTv.getText().toString())
                         .addParam("sc_code", sc_code)
                         .addParam("next_macode", gongdanhaoTv.getText().toString())
-                        .addParam("mouldcode",text_moju.getText().toString().trim())
+                        .addParam("mouldcode",ce_moju.getText().toString().trim())
                         .build(), new HttpCallback() {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
@@ -541,7 +564,6 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
         if (!StringUtil.isEmpty(ifneedmj)){
             if (!ifneedmj.equals("0")){
                 line_mju.setVisibility(View.VISIBLE);
-                text_moju.setVisibility(View.VISIBLE);
                 tv_mju.setTextColor(getResources().getColor(R.color.red));
                 ce_moju.requestFocus();
             }else {

+ 66 - 0
app/src/main/java/com/uas/hystorage/fragment/RolloutFragment.java

@@ -94,6 +94,12 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
     private RadioButton rb_zhuanchu;
     private RadioButton rb_chexiao;
     private String rb_changeinter;
+    private TextView tv_macode;
+    private TextView tv_maprodcode;
+    private TextView tv_maqty;
+    private TextView tv_outqty;
+    private TextView tv_unoutqty;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_rollout;
@@ -117,6 +123,13 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
         rb_zhuanchu = mActivity.findViewById(R.id.rb_zhuanchu);
         rb_chexiao = mActivity.findViewById(R.id.rb_chexiao);
 
+        tv_macode = mActivity.findViewById(R.id.tv_macode);
+        tv_maprodcode = mActivity.findViewById(R.id.tv_maprodcode);
+        tv_maqty = mActivity.findViewById(R.id.tv_maqty);
+        tv_outqty = mActivity.findViewById(R.id.tv_outqty);
+        tv_unoutqty = mActivity.findViewById(R.id.tv_unoutqty);
+
+
         rb_ok.setChecked(true);
         rb_changetext="良品";
 
@@ -197,9 +210,61 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
         adaptermFeededList = new ArrayList<>();
 
 
+        getUnreportqty();
+
+    }
+
 
 
+    //获取当前线别在线工单、当前登录人员名称、工单未报工数
+    private void getUnreportqty() {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDA_GETMAREPORTQTY)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getUnreportqty")
+                        .flag(0)
+                        .addParam("ma_code", ma_code)
+                        .addParam("sc_code",sc_code)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                            if (dataObject == null){
+//                                CommonUtil.toastNoRepeat(mActivity,);
+                                return;
+                            }
+                            tv_macode.setText(dataObject.getString("MA_CODE") == null ? "-" : dataObject.getString("MA_CODE"));
+                            tv_maprodcode.setText(dataObject.getString("MA_PRODCODE") == null ? "-" : dataObject.getString("MA_PRODCODE"));
+                            tv_maqty.setText(dataObject.getString("MA_QTY") == null ? "-" : dataObject.getString("MA_QTY"));
+                            tv_outqty.setText(dataObject.getString("OUTQTY") == null ? "-" : dataObject.getString("OUTQTY"));
+                            tv_unoutqty.setText(dataObject.getString("UNOUTQTY") == null ? "-" : dataObject.getString("UNOUTQTY"));
+
+                        }else {
+
+                        }
+                        progressDialog.dismiss();
+
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                    }
+
+                });
     }
+
+
+
+
+
+
     private PopupWindow editPW;
     private void initlinecodePopupWindow() {
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pupadd, null);
@@ -441,6 +506,7 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
                         }else {
                             CommonUtil.toastNoRepeat(mActivity, "撤销转出成功");
                         }
+                        getUnreportqty();
 
                     }
                     @Override

+ 288 - 166
app/src/main/java/com/uas/hystorage/fragment/WorkOrderSearchFragment.java

@@ -4,20 +4,21 @@ import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
-import android.support.v7.widget.DividerItemDecoration;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
 import android.text.TextWatcher;
+import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.inputmethod.EditorInfo;
+import android.widget.AdapterView;
+import android.widget.AutoCompleteTextView;
 import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
@@ -29,6 +30,8 @@ import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.hystorage.R;
 import com.uas.hystorage.activity.FunctionActivity;
 import com.uas.hystorage.activity.IndexActivity;
+import com.uas.hystorage.adapter.MyaddAdapter;
+import com.uas.hystorage.bean.AddworkorderBean;
 import com.uas.hystorage.global.GloableParams;
 import com.uas.hystorage.tools.SharedPreUtil;
 import com.uas.hystorage.util.CameraUtil;
@@ -38,9 +41,9 @@ import com.uas.hystorage.util.FastjsonUtil;
 import com.uas.hystorage.util.HttpCallback;
 import com.uas.hystorage.util.HttpParams;
 import com.uas.hystorage.util.LogUtil;
+import com.uas.hystorage.util.MyArrayAdapter;
 import com.uas.hystorage.util.StringUtil;
 import com.uas.hystorage.util.VollyRequest;
-import com.uas.hystorage.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
 
@@ -52,10 +55,9 @@ import java.util.List;
  * function:
  */
 public class WorkOrderSearchFragment extends BaseFragment {
-    private ClearableEditText mSearch;
+    private AutoCompleteTextView mSearch;
     private StringRequest mStringRequest;
     private RefreshLayout mRefreshLayout;
-    private RecyclerView fuzzyRv;
     private List<FuzzyBean> fuzzyBeans;
     private FuzzySearchAdapter fuzzyAdapter;
     private Button startBtn;
@@ -72,12 +74,16 @@ public class WorkOrderSearchFragment extends BaseFragment {
     private int mFocusId;
     private static final int SCAN_BARCODE_CODE = 201;
     private String ifneedmj;
-    private ClearableEditText ce_moju;
+    private AutoCompleteTextView ce_moju;
     private TextView tv_mju;
     private LinearLayout line_mju;
     private boolean chentrueorflase = true;
-    private TextView text_moju;
-    private LinearLayout line_moju;
+    private ArrayList<AddworkorderBean> mFilterStorageInBeans;
+    private RecyclerView recyclerView;
+    private MyArrayAdapter autoStringAdapter;
+    private ImageView clean_iv;
+    private ImageView sear_iv;
+    private MyArrayAdapter searStringAdapter;
 
     @Override
     protected int getLayout() {
@@ -95,17 +101,15 @@ public class WorkOrderSearchFragment extends BaseFragment {
         ce_moju = root.findViewById(R.id.ce_moju);
         tv_mju = root.findViewById(R.id.tv_mju);
         line_mju = root.findViewById(R.id.line_mju);
-        text_moju = root.findViewById(R.id.text_moju);
-        line_moju = root.findViewById(R.id.line_moju);
-        //模糊查询展示的工单号列表
-        fuzzyRv = root.findViewById(R.id.fuzzy_rv);
-        fuzzyRv.addItemDecoration(new DividerItemDecoration(mActivity,LinearLayout.VERTICAL));
-        fuzzyRv.setLayoutManager(new LinearLayoutManager(mActivity));
+        clean_iv = root.findViewById(R.id.clean_iv);
+        sear_iv = root.findViewById(R.id.sear_iv);
 
         fuzzyBeans = new ArrayList<>();
         fuzzyAdapter = new FuzzySearchAdapter(fuzzyBeans);
         fuzzyAdapter.setmList(fuzzyBeans);
-        fuzzyRv.setAdapter(fuzzyAdapter);
+
+        recyclerView = mActivity.findViewById(R.id.id_item_remove_recyclerview);
+
 
         mRefreshLayout.setEnableRefresh(false);
         mRefreshLayout.setEnableLoadMore(false);
@@ -124,7 +128,20 @@ public class WorkOrderSearchFragment extends BaseFragment {
 
     @Override
     protected void initEvents() {
-
+        clean_iv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                ce_moju.setText("");
+                ce_moju.requestFocus();
+            }
+        });
+        sear_iv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mSearch.setText("");
+                mSearch.requestFocus();
+            }
+        });
 
 
         mScanImageView.setOnClickListener(new View.OnClickListener() {
@@ -148,24 +165,8 @@ public class WorkOrderSearchFragment extends BaseFragment {
                 mRefreshLayout.finishRefresh();
             }
         });
-        mSearch.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 (s.length() >= 3) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    fuzzySearchMa(mSearchStr);
-                } else {
-                    fuzzyBeans.clear();
-                    setfuzzyAdapter(fuzzyBeans);
-                    return;
-                }
-            }
-        });
+        mSearch.addTextChangedListener(searchNoTextWatcher);
+
         mSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -176,102 +177,191 @@ public class WorkOrderSearchFragment extends BaseFragment {
                 return false;
             }
         });
+        mSearch.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                getLastBean(mSearch.getText().toString().trim());
+            }
+        });
         //----------模具模糊搜索------------------------
+        ce_moju.addTextChangedListener(inOutNoTextWatcher);
 
-
-
-        ce_moju.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+        ce_moju.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) { }
-            @Override
-            public void afterTextChanged(Editable s) {
-                if (s.length() >= 3) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    fuzzySearchMould(mSearchStr);
-                } else {
-                    fuzzyBeans.clear();
-                    setfuzzyAdapter(fuzzyBeans);
-                    return;
-                }
-
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                mSearch.requestFocus();
+                mSearch.setSelection(mSearch.getText().length());
             }
         });
+
+
+
+
+
+
         fuzzyAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
             @Override
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                 FuzzyBean bean = fuzzyAdapter.getBeanByPositon(position);
                 String macode = bean.getMA_CODE();
-                if (chentrueorflase){
-                    if (macode.length() > 0){
-                        line_moju.setVisibility(View.VISIBLE);
-                        text_moju.setText(macode);
-                        mSearch.requestFocus();
-                        mSearch.setSelection(mSearch.getText().length());
-                        ce_moju.setText("");
-                    }
-                }else {
-                    if (macode.length() > 0){
-                        getLastBean(macode);
-                        mSearch.setText("");
-                    }
+                if (macode.length() > 0){
+                    getLastBean(macode);
+                    mSearch.setText("");
                 }
 
 
             }
         });
 
+
+        mFilterStorageInBeans = new ArrayList<>();
+
+
+
         //启动按钮启动事件
         startBtn.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                if (!StringUtil.isEmpty(ifneedmj)){
-                    if(!ifneedmj.equals("0")){
-                        if (text_moju.getText().toString().trim().isEmpty()){
-                            CommonUtil.toastNoRepeat(mActivity, "请输入模具编号");
-                            return;
+                if (mFilterStorageInBeans==null||mFilterStorageInBeans.size()==0){
+                    CommonUtil.toastNoRepeat(mActivity, "请采集工单号");
+                    return;
+                }
+                if (mFilterStorageInBeans.size()==1){
+                    downonebangding();
+                }else {
+                    downbangding();
+                }
+
+
+
+            }
+        });
+
+
+
+
+
+
+
+
+
+
+    }
+    //多工单绑定
+    public void downbangding(){
+        if (!StringUtil.isEmpty(ifneedmj)){
+            if(!ifneedmj.equals("0")){
+                if (ce_moju.getText().toString().trim().isEmpty()){
+                    CommonUtil.toastNoRepeat(mActivity, "请输入模具编号");
+                    return;
+                }
+            }
+        }
+//        JSONArray jsonArray = new JSONArray();
+//        JSONArray jsonArray2 = new JSONArray();
+//        for (int i=0;i<mFilterStorageInBeans.size();i++){
+//            DataJsonBean bean=new DataJsonBean(mFilterStorageInBeans.get(i).getLOTNO(),"");
+//            jsonArray.add(bean);
+//            jsonArray2.add(mFilterStorageInBeans.get(i).getLOTNO());
+//        }
+        StringBuilder stringtext = new StringBuilder();
+        for (int i=0;i<mFilterStorageInBeans.size();i++){
+            stringtext.append(mFilterStorageInBeans.get(i).getLOTNO()).append(",");
+        }
+//        Log.e("alone===1",jsonArray.toString());
+//        Log.e("alone===2",jsonArray2.toString());
+        Log.e("alone===3", stringtext.toString());
+
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+//                                .url(GloableParams.ADDRESS_PDA_STARTMA)
+                        .url(GloableParams.ADDRESS_STARTMAS)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "startMa")
+                        .flag(0)
+                        .addParam("sc_code", sc_code)
+//                        .addParam("ma_code", detailOne.getString("MA_CODE"))
+                        .addParam("macodes", stringtext.toString())
+                        .addParam("mouldcode",ce_moju.getText().toString().trim())
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            CommonUtil.toastNoRepeat(mActivity,"启动成功");
+                            mFilterStorageInBeans.clear();
+                            Intent intent =  new Intent(mActivity, IndexActivity.class);
+                            intent.putExtra(Constants.FLAG.SC_CODE,sc_code);
+                            startActivity(intent);
+                        }else {
+
                         }
+                        progressDialog.dismiss();
+
                     }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                    }
+
+                });
+    }
+    //单个工单绑定
+    public void downonebangding(){
+        if (!StringUtil.isEmpty(ifneedmj)){
+            if(!ifneedmj.equals("0")){
+                if (ce_moju.getText().toString().trim().isEmpty()){
+                    CommonUtil.toastNoRepeat(mActivity, "请输入模具编号");
+                    return;
                 }
-                progressDialog.show();
-                VollyRequest.getInstance().stringRequest(mStringRequest,
-                        new HttpParams.Builder()
-                                .url(GloableParams.ADDRESS_PDA_STARTMA)
-                                .method(Request.Method.GET)
-                                .tag(TAG + "startMa")
-                                .flag(0)
-                                .addParam("sc_code", sc_code)
-                                .addParam("ma_code", detailOne.getString("MA_CODE"))
-                                .addParam("mouldcode",text_moju.getText().toString().trim())
-                                .build(), new HttpCallback() {
-                            @Override
-                            public void onSuccess(int flag, Object o) throws Exception {
-                                Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
-                                if (isSuccess){
-                                    CommonUtil.toastNoRepeat(mActivity,"启动成功");
-                                    Intent intent =  new Intent(mActivity, IndexActivity.class);
-                                    intent.putExtra(Constants.FLAG.SC_CODE,sc_code);
-                                    startActivity(intent);
-                                }else {
-
-                                }
-                                progressDialog.dismiss();
+            }
+        }
+        StringBuilder stringtext = new StringBuilder();
+        for (int i=0;i<mFilterStorageInBeans.size();i++){
+            stringtext.append(mFilterStorageInBeans.get(i).getLOTNO()).append("");
+        }
+        Log.e("alone===3", stringtext.toString());
 
-                            }
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDA_STARTMA)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "startMa")
+                        .flag(0)
+                        .addParam("sc_code", sc_code)
+                        .addParam("ma_code", stringtext.toString())
+                        .addParam("mouldcode",ce_moju.getText().toString().trim())
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            CommonUtil.toastNoRepeat(mActivity,"启动成功");
+                            mFilterStorageInBeans.clear();
+//                            SharedPreUtil.saveString(mActivity,"mojucode",ce_moju.getText().toString().trim());
+                            Intent intent =  new Intent(mActivity, IndexActivity.class);
+                            intent.putExtra(Constants.FLAG.SC_CODE,sc_code);
+                            startActivity(intent);
+                        }else {
 
-                            @Override
-                            public void onFail(int flag, String failStr) throws Exception {
-                                progressDialog.dismiss();
-                                CommonUtil.toastNoRepeat(mActivity, failStr);
+                        }
+                        progressDialog.dismiss();
 
-                            }
+                    }
 
-                        });
-            }
-        });
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                    }
 
+                });
     }
 
 
@@ -310,43 +400,12 @@ public class WorkOrderSearchFragment extends BaseFragment {
     }
 
     private void showDetailOneOrder(JSONObject dataObject) {
-//        startBtn = mActivity.findViewById(R.id.start_btn);
-//        startLl = mActivity.findViewById(R.id.start_ll);
-//        gongdanhaoTv = mActivity.findViewById(R.id.gongdanhao_tv);
-//        gongdanshuTv = mActivity.findViewById(R.id.gongdanshu_tv);
-//        yibaogongTv = mActivity.findViewById(R.id.yibaogong_tv);
-//        changpingTv = mActivity.findViewById(R.id.changping_tv);
-//        mingchenTv = mActivity.findViewById(R.id.mingchen_tv);
-//        guigeTv = mActivity.findViewById(R.id.guige_tv);
-
-//
-//        "MA_CODE":"23505Q5",   //工单号
-//                "MA_QTY":2334,        //工单数量
-//                "MA_REPORTQTY":123,   //报工数
-//                "PR_DETAIL":"433454543",   //物料名称
-//                "PR_SPEC":"3456677788",    //物料规格
-//                "MA_PRODCODE":"21345467"   //产品编号
-//
-//        "data": {
-//                    "MA_CHECKSTATUSCODE": "APPROVE",
-//                    "MA_STATUSCODE": "AUDITED",
-//                    "MA_FINISHSTATUSCODE": "UNCOMPLET",
-//                    "MA_QTY": 22,  //工单数量
-//                    "MA_REPORTYQTY": null, //报工数
-//                    "PR_DETAIL": "测试工单存在ECN", //物料名称
-//                    "PR_SPEC": null, //物料规格
-//                    "MA_PRODCODE": "UAS20181206001", 产品编号
-//                    "MA_CODE": "BZMB20181206002" //工单号
-//        }
-
         if (dataObject == null){
             CommonUtil.toastNoRepeat(mActivity,"暂无工单详细信息");
             startLlS.setVisibility(View.GONE);
-            fuzzyRv.setVisibility(View.VISIBLE);
             return;
         }else {
             startLlS.setVisibility(View.VISIBLE);
-            fuzzyRv.setVisibility(View.GONE);
             fuzzyBeans.clear();
             detailOne = dataObject;
             gongdanhaoTv.setText(dataObject.getString("MA_CODE") == null ? "-" :dataObject.getString("MA_CODE"));
@@ -357,6 +416,26 @@ public class WorkOrderSearchFragment extends BaseFragment {
             changpingTv.setText(dataObject.getString("MA_PRODCODE") == null ? "-" :dataObject.getString("MA_PRODCODE"));
             mingchenTv.setText(dataObject.getString("PR_DETAIL") == null ? "-" : dataObject.getString("PR_DETAIL"));
             guigeTv.setText(dataObject.getString("PR_SPEC") == null ? "-" :dataObject.getString("PR_SPEC")+"");
+
+            for (int i=0;i<mFilterStorageInBeans.size();i++){
+                if (mFilterStorageInBeans.get(i).getLOTNO().equals(detailOne.getString("MA_CODE"))){
+                    CommonUtil.toastNoRepeat(mActivity, "工单重复");
+                    return;
+                }
+            }
+            AddworkorderBean jltStorageInBean = new AddworkorderBean();
+            jltStorageInBean.setLOTNO(detailOne.getString("MA_CODE"));
+            jltStorageInBean.setQTY(detailOne.getString("MA_QTY"));
+            jltStorageInBean.setMA_PRODCODE(dataObject.getString("MA_PRODCODE"));
+            jltStorageInBean.setPR_DETAIL(dataObject.getString("PR_DETAIL"));
+            jltStorageInBean.setPR_SPEC(dataObject.getString("PR_SPEC"));
+            mFilterStorageInBeans.add(jltStorageInBean);
+            MyaddAdapter addadapter = new MyaddAdapter(mActivity, mFilterStorageInBeans);
+            recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+            recyclerView.setAdapter(addadapter);
+            mSearch.requestFocus();
+            mSearch.setText("");
+
         }
     }
 
@@ -368,12 +447,13 @@ public class WorkOrderSearchFragment extends BaseFragment {
         }
 
         ifneedmj = SharedPreUtil.getString(mActivity, Constants.FLAG.GANG_WEI_SOURCE_ifneedmj, null);
-
+        mSearch.setThreshold(1);
         if (!StringUtil.isEmpty(ifneedmj)){
             if (!ifneedmj.equals("0")){
                 line_mju.setVisibility(View.VISIBLE);
                 tv_mju.setTextColor(getResources().getColor(R.color.red));
                 ce_moju.requestFocus();
+                ce_moju.setThreshold(1);
             }else {
                 line_mju.setVisibility(View.GONE);
                 tv_mju.setTextColor(getResources().getColor(R.color.blue));
@@ -381,20 +461,64 @@ public class WorkOrderSearchFragment extends BaseFragment {
             }
         }
 
+
     }
 
-    private void setfuzzyAdapter(List<FuzzyBean> mList) {
-        fuzzyRv.setVisibility(View.VISIBLE);
-        LogUtil.i("mList2", JSON.toJSONString(mList));
-        if (fuzzyAdapter == null){
-            fuzzyAdapter = new FuzzySearchAdapter(mList);
-            fuzzyRv.setAdapter(fuzzyAdapter);
-        }else {
-            fuzzyAdapter.setmList(mList);
-            fuzzyAdapter.notifyDataSetChanged();
+    private TextWatcher inOutNoTextWatcher = new TextWatcher() {
+        @Override
+        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
         }
-    }
-    //模糊查询
+
+        @Override
+        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+            //当字数超过3个,自动弹出输入提示框
+            if (charSequence.length() >= 3) {
+                LogUtil.i("mSearchStr",ce_moju.getText().toString().trim());
+                fuzzySearchMould(ce_moju.getText().toString().trim());
+
+            }
+        }
+
+        @Override
+        public void afterTextChanged(Editable editable) {
+            if (editable.length() == 0) {
+                clean_iv.setVisibility(View.GONE);
+            } else {
+                clean_iv.setVisibility(View.VISIBLE);
+            }
+        }
+    };
+
+
+
+    private TextWatcher searchNoTextWatcher = new TextWatcher() {
+        @Override
+        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+            //当字数超过3个,自动弹出输入提示框
+            if (charSequence.length() >= 3) {
+                LogUtil.i("mSearchStr",mSearch.getText().toString().trim());
+                fuzzySearchMa(mSearch.getText().toString().trim());
+            }
+        }
+
+        @Override
+        public void afterTextChanged(Editable editable) {
+            if (editable.length() == 0) {
+                sear_iv.setVisibility(View.GONE);
+            } else {
+                sear_iv.setVisibility(View.VISIBLE);
+            }
+        }
+    };
+
+
+    //模糊查询工单号
     private void fuzzySearchMa(String code){
         VollyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
@@ -408,26 +532,23 @@ public class WorkOrderSearchFragment extends BaseFragment {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
                         progressDialog.dismiss();
-                        chentrueorflase = false;
                         Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
                         if (isSuccess){
                             JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(),"data");
                             if (dataArray == null || dataArray.size() == 0){
                                 CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
-                                fuzzyBeans.clear();
-                                setfuzzyAdapter(fuzzyBeans);
                                 return;
                             }
-                            FuzzyBean bean = null;
-                            if (fuzzyBeans.size() > 0) fuzzyBeans.clear();
+                            List<String> autoStrings = new ArrayList<>();
+                            autoStrings.clear();
+                            searStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, autoStrings);
+                            if (mSearch != null) {
+                                mSearch.setAdapter(searStringAdapter);
+                            }
                             for (Object index : dataArray){
                                 JSONObject data = (JSONObject) index;
-                                bean = new FuzzyBean(data.getString("MA_CODE"));
-                                fuzzyBeans.add(bean);
+                                searStringAdapter.add(data.getString("MA_CODE"));
                             }
-                            setfuzzyAdapter(fuzzyBeans);
-                            startLlS.setVisibility(View.GONE);
-                            fuzzyRv.setVisibility(View.VISIBLE);
 
                         }else {
 
@@ -458,27 +579,26 @@ public class WorkOrderSearchFragment extends BaseFragment {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
                         progressDialog.dismiss();
-                        chentrueorflase = true;
                         Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
                         if (isSuccess){
                             JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(),"data");
                             if (dataArray == null || dataArray.size() == 0){
                                 CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
-                                fuzzyBeans.clear();
-                                setfuzzyAdapter(fuzzyBeans);
                                 return;
                             }
-                            FuzzyBean bean = null;
-                            if (fuzzyBeans.size() > 0) fuzzyBeans.clear();
+                            List<String> autoStrings = new ArrayList<>();
+                            autoStrings.clear();
+                            autoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, autoStrings);
+
+                            if (ce_moju != null) {
+                                ce_moju.setAdapter(autoStringAdapter);
+                            }
                             for (Object index : dataArray){
+
                                 JSONObject data = (JSONObject) index;
-                                bean = new FuzzyBean(data.getString("DE_CODE"),data.getString("DE_NAME"));
-                                fuzzyBeans.add(bean);
+//                                bean = new FuzzyBean(,data.getString("DE_NAME"));
+                                autoStringAdapter.add(data.getString("DE_CODE"));
                             }
-                            setfuzzyAdapter(fuzzyBeans);
-                            startLlS.setVisibility(View.GONE);
-                            fuzzyRv.setVisibility(View.VISIBLE);
-
                         }else {
 
                         }
@@ -495,6 +615,8 @@ public class WorkOrderSearchFragment extends BaseFragment {
 
     }
 
+
+
     private class FuzzySearchAdapter extends BaseQuickAdapter<FuzzyBean, BaseViewHolder>{
         private List<FuzzyBean> mList;
 

+ 8 - 0
app/src/main/java/com/uas/hystorage/global/GloableParams.java

@@ -343,6 +343,7 @@ public class GloableParams {
     public static String ADDRESS_FUZZYSEARCHMOULD;
     public static String ADDRESS_GETPUNCHINGDATA;
     public static String ADDRESS_GETOPRLOG;
+    public static String ADDRESS_STARTMAS;
     /**
      * 高登
      */
@@ -1001,6 +1002,12 @@ public class GloableParams {
     private static final String ADDRESSTAIL_FUZZYSEARCHMOULD = "/api/pdashop/start/fuzzySearchMould.action";
 
 
+    /**
+     * 多工单绑定
+     */
+    private static final String ADDRESSTAIL_STARTMAS = "/api/pdashop/start/startMas.action";
+
+
 
     /***********************************************************************************************/
     /*界面文字和图片资源,控制后续数据一致*/
@@ -1571,5 +1578,6 @@ public class GloableParams {
         GloableParams.ADDRESS_FUZZYSEARCHMOULD = uriHead + GloableParams.ADDRESSTAIL_FUZZYSEARCHMOULD;
         GloableParams.ADDRESS_GETPUNCHINGDATA = uriHead + GloableParams.ADDRESSTAIL_COUNTING_GETPUNCHINGDATA;
         GloableParams.ADDRESS_GETOPRLOG = uriHead + GloableParams.ADDRESSTAIL_GETOPRLOG;
+        GloableParams.ADDRESS_STARTMAS = uriHead + GloableParams.ADDRESSTAIL_STARTMAS;
     }
 }

+ 12 - 1
app/src/main/java/com/uas/hystorage/util/VolleyRequest.java

@@ -1,6 +1,8 @@
 package com.uas.hystorage.util;
 
+import android.app.Activity;
 import android.text.TextUtils;
+import android.util.Log;
 
 import com.android.volley.AuthFailureError;
 import com.android.volley.DefaultRetryPolicy;
@@ -11,6 +13,7 @@ import com.android.volley.VolleyError;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.hystorage.R;
 import com.uas.hystorage.application.PdaApplication;
+import com.uas.hystorage.global.GloableParams;
 import com.uas.hystorage.tools.SharedPreUtil;
 import com.uas.hystorage.tools.VolleyUtil;
 
@@ -120,7 +123,15 @@ public class VolleyRequest {
                         try {
                             LogUtil.e("responErr", errorToast);
                             if (errorToast.length() >= 500) {
-                                httpCallback.onFail(httpParams.getFlag(), "请求异常");
+                                Log.e("重新登录1","重新登录");
+                                //Volley请求服务器重新登录userNames
+                                Activity activity=new Activity();
+                                String maName = SharedPreUtil.getString(activity, Constants.FLAG.ACCOUNT_NAME_CACHE, null);
+                                String userName = SharedPreUtil.getString(activity, "userNames", null);
+                                String password = SharedPreUtil.getString(activity, "passwords", null);
+                                VolleyUtil.requestUserLogin(activity, GloableParams.ADDRESS_LOGIN_APPLY, VolleyUtil.METHOD_POST,
+                                VolleyUtil.FRAGMENT_LOGIN, maName, userName, password);
+                                httpCallback.onFail(httpParams.getFlag(), "已重新登录,请再次操作");
                             } else {
                                 httpCallback.onFail(httpParams.getFlag(), errorToast);
                             }

+ 30 - 2
app/src/main/res/layout/activity_index.xml

@@ -172,7 +172,8 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="4dp"
                     android:paddingLeft="20dp"
-                    android:paddingRight="20dp">
+                    android:paddingRight="20dp"
+                    android:orientation="horizontal">
 
                     <TextView
                         style="@style/captiontext"
@@ -181,10 +182,37 @@
 
                     <TextView
                         android:id="@+id/index_cur_doc"
-                        style="@style/valuetext" />
+                        android:textColor="@color/blue"
+                        style="@style/valuetext"
+                        android:layout_weight="1"/>
+                    <ImageView
+                        android:visibility="gone"
+                        android:id="@+id/iv_add_data"
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:src="@mipmap/android_list"
+                        android:layout_marginRight="10dp"
+                        />
                 </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:paddingLeft="20dp"
+                    android:paddingRight="20dp"
+                    android:orientation="horizontal">
 
+                    <TextView
+                        style="@style/captiontext"
+                        android:layout_width="wrap_content"
+                        android:text="名称:" />
 
+                    <TextView
+                        android:id="@+id/index_detail_doc"
+                        android:textColor="@color/blue"
+                        style="@style/valuetext"
+                        android:layout_weight="1"/>
+                </LinearLayout>
                 <LinearLayout
                     android:visibility="gone"
                     android:layout_width="match_parent"

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

@@ -128,7 +128,7 @@
                 android:layout_weight="1"
                 android:hint="请输入"
                 android:textColor="@color/black"
-                android:inputType="number"
+                android:inputType="number|numberDecimal"
                 android:paddingRight="0dp"
                 android:paddingLeft="0dp"/>
         </LinearLayout>

+ 26 - 32
app/src/main/res/layout/fragment_gd_work_switch.xml

@@ -46,28 +46,6 @@
             android:textSize="14sp"
             tools:text="YS1506002" />
     </LinearLayout>
-    <LinearLayout
-        android:id="@+id/line_moju"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="5dp"
-        android:orientation="horizontal">
-        <TextView
-            android:layout_width="80dp"
-            android:layout_height="wrap_content"
-            android:text="模具:"
-            android:textColor="@color/body_text_1"
-            android:textSize="14sp" />
-        <TextView
-            android:id="@+id/text_moju"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:paddingLeft="6dp"
-            android:textColor="@color/body_text_1"
-            android:textSize="14sp"
-            tools:text="" />
-    </LinearLayout>
 
     <!--GONE-->
     <LinearLayout
@@ -296,16 +274,32 @@
                 android:textColor="@color/black"
                 android:text="模具">
             </TextView>
-            <com.uas.hystorage.view.ClearableEditText
-                android:id="@+id/ce_moju"
-                style="@style/Search"
-                android:layout_height="35dp"
-                android:background="@drawable/shape_from_edit"
-                android:hint="请采集模具编号"
-                android:padding="6dp"
-                android:imeOptions="actionSend"
-                android:gravity="left"
-                />
+            <FrameLayout
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="5">
+
+                <AutoCompleteTextView
+                    android:id="@+id/ce_moju"
+                    style="@style/Search"
+                    android:layout_height="35dp"
+                    android:background="@drawable/shape_from_edit"
+                    android:hint="请采集模具编号"
+                    android:padding="6dp"
+                    android:imeOptions="actionSend"
+                    android:gravity="left"
+                    />
+                <ImageView
+                    android:id="@+id/clean_iv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center|right"
+                    android:layout_marginRight="13dp"
+                    android:src="@drawable/wrong"
+                    android:visibility="gone"/>
+
+            </FrameLayout>
+
         </LinearLayout>
 
         <LinearLayout

+ 104 - 0
app/src/main/res/layout/fragment_rollout.xml

@@ -8,6 +8,110 @@
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+        <LinearLayout
+            android:layout_marginLeft="@dimen/dp_10"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    style="@style/inputItemCaption"
+                    android:text="工单号">
+                </TextView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:textColor="@color/black"
+                    android:id="@+id/tv_macode"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="">
+                </TextView>
+            </LinearLayout>
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    style="@style/inputItemCaption"
+                    android:text="产品编号">
+                </TextView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:textColor="@color/black"
+                    android:id="@+id/tv_maprodcode"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="">
+                </TextView>
+            </LinearLayout>
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    style="@style/inputItemCaption"
+                    android:text="工单数量">
+                </TextView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:textColor="@color/black"
+                    android:id="@+id/tv_maqty"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="">
+                </TextView>
+            </LinearLayout>
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+                    <TextView
+                        style="@style/inputItemCaption"
+                        android:text="转出良品数">
+                    </TextView>
+                    <TextView
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:textColor="@color/black"
+                        android:id="@+id/tv_outqty"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="">
+                    </TextView>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+                    <TextView
+                        style="@style/inputItemCaption"
+                        android:text="未完成数">
+                    </TextView>
+                    <TextView
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:textColor="@color/black"
+                        android:id="@+id/tv_unoutqty"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="">
+                    </TextView>
+                </LinearLayout>
+            </LinearLayout>
+
+
+        </LinearLayout>
+
         <RadioGroup
             android:id="@+id/rg_change"
             android:layout_marginTop="@dimen/dp_10"

+ 83 - 0
app/src/main/res/layout/recyclerviewadd_item_layout.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="#ffffff">
+    <LinearLayout
+        android:orientation="vertical"
+        android:padding="@dimen/dp_10"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <LinearLayout
+            android:id="@+id/item_layout"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            <LinearLayout
+                android:layout_weight="1"
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="@dimen/dp_10">
+
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:id="@+id/item_makecode"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="工单:"
+                        android:textColor="#000000"
+                        android:textSize="15sp" />
+                    <TextView
+                        android:id="@+id/item_mouldtype"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center"
+                        android:text="原膜"
+                        android:textColor="#000000"
+                        android:textSize="15sp" />
+                </LinearLayout>
+            </LinearLayout>
+
+            <TextView
+                android:padding="5dp"
+                android:layout_gravity="center"
+                android:id="@+id/tv_delete"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:background="#88ff0000"
+                android:gravity="center"
+                android:text="删除"
+                android:textColor="#ffffff"
+                android:textSize="15sp" />
+
+
+        </LinearLayout>
+        <TextView
+            android:id="@+id/item_data"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="产品:"
+            android:textColor="#000000"
+            android:textSize="15sp"
+            android:layout_marginLeft="@dimen/dp_10"/>
+
+
+
+
+
+    </LinearLayout>
+
+
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_alignParentBottom="true"
+        android:background="#55000000" />
+
+</RelativeLayout>

+ 67 - 54
app/src/main/res/layout/work_order_search_fragment.xml

@@ -7,6 +7,7 @@
     >
 
     <ScrollView
+        android:layout_weight="1"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         >
@@ -81,38 +82,33 @@
                     android:textColor="@color/black"
                     android:text="模具">
                 </TextView>
-                <com.uas.hystorage.view.ClearableEditText
-                    android:id="@+id/ce_moju"
-                    style="@style/Search"
-                    android:layout_height="35dp"
-                    android:background="@drawable/shape_from_edit"
-                    android:hint="请采集模具编号"
-                    android:padding="6dp"
-                    android:imeOptions="actionSend"
-                    android:gravity="left"
-                    />
-            </LinearLayout>
-            <LinearLayout
-                android:id="@+id/line_moju"
-                android:orientation="horizontal"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textColor="@color/black"
-                    android:text="模具编号:">
-                </TextView>
-                <TextView
-                    android:id="@+id/text_moju"
-                    android:layout_width="wrap_content"
+                <FrameLayout
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:textColor="@color/black"
-                    android:text="">
-                </TextView>
+                    android:layout_weight="5">
+                    <AutoCompleteTextView
+                        android:id="@+id/ce_moju"
+                        style="@style/Search"
+                        android:layout_height="35dp"
+                        android:background="@drawable/shape_from_edit"
+                        android:hint="请采集模具编号"
+                        android:padding="6dp"
+                        android:imeOptions="actionSend"
+                        android:gravity="left"
+                        />
+                    <ImageView
+                        android:id="@+id/clean_iv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center|right"
+                        android:layout_marginRight="13dp"
+                        android:src="@drawable/wrong"
+                        android:visibility="gone" />
+                </FrameLayout>
 
             </LinearLayout>
 
+
             <LinearLayout
                 android:orientation="horizontal"
                 android:layout_width="match_parent"
@@ -124,16 +120,31 @@
                     android:textColor="@color/red"
                     android:text="工单">
                 </TextView>
-                <com.uas.hystorage.view.ClearableEditText
-                    android:id="@+id/fl_search_actext"
-                    style="@style/Search"
-                    android:layout_height="35dp"
-                    android:background="@drawable/shape_from_edit"
-                    android:hint="请采集需要启动的工单号"
-                    android:padding="6dp"
-                    android:imeOptions="actionSend"
-                    android:gravity="left"
-                    />
+                <FrameLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="5">
+                    <AutoCompleteTextView
+                        android:id="@+id/fl_search_actext"
+                        style="@style/Search"
+                        android:layout_height="35dp"
+                        android:background="@drawable/shape_from_edit"
+                        android:hint="请采集需要启动的工单号"
+                        android:padding="6dp"
+                        android:imeOptions="actionSend"
+                        android:gravity="left"
+                        />
+
+                    <ImageView
+                        android:id="@+id/sear_iv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center|right"
+                        android:layout_marginRight="13dp"
+                        android:src="@drawable/wrong"
+                        android:visibility="gone" />
+                </FrameLayout>
+
 
             </LinearLayout>
 
@@ -159,11 +170,6 @@
                     app:srlAccentColor="@android:color/darker_gray" />
             </com.scwang.smartrefresh.layout.SmartRefreshLayout>
 
-            <android.support.v7.widget.RecyclerView
-                android:id="@+id/fuzzy_rv"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-
 
             <LinearLayout
                 android:id="@+id/start_ll"
@@ -175,18 +181,25 @@
 
                 <include layout="@layout/start_detail_one"/>
 
-                <Button
-                    android:id="@+id/start_btn"
-                    android:text="绑定"
-                    android:layout_width="match_parent"
-                    android:layout_height="40dp"
-                    style="@style/ButtonStyle"
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/textsize_20"
-                    />
             </LinearLayout>
-
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/id_item_remove_recyclerview"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/dp_10">
+            </android.support.v7.widget.RecyclerView>
         </LinearLayout>
-    </ScrollView>
 
+
+    </ScrollView>
+    <Button
+        android:id="@+id/start_btn"
+        android:text="绑定"
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        style="@style/ButtonStyle"
+        android:textColor="@color/white"
+        android:textSize="@dimen/textsize_20"
+        android:layout_marginBottom="@dimen/dp_10"
+        />
 </LinearLayout>

BIN
app/src/main/res/mipmap-xxhdpi/android_list.png


+ 2 - 2
build.gradle

@@ -44,8 +44,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 11,
-            versionName      : "v1.0.1"
+            versionCode      : 16,
+            versionName      : "v1.0.6"
     ]
 
     depsVersion = [

+ 2 - 2
pda_libs/pulltoreflashlibrary/build/generated/source/buildConfig/debug/com/handmark/pulltorefresh/library/BuildConfig.java

@@ -8,6 +8,6 @@ public final class BuildConfig {
   public static final String APPLICATION_ID = "com.handmark.pulltorefresh.library";
   public static final String BUILD_TYPE = "debug";
   public static final String FLAVOR = "";
-  public static final int VERSION_CODE = 11;
-  public static final String VERSION_NAME = "v1.0.1";
+  public static final int VERSION_CODE = 15;
+  public static final String VERSION_NAME = "v1.0.5";
 }

BIN
pda_libs/pulltoreflashlibrary/build/intermediates/classes/debug/com/handmark/pulltorefresh/library/BuildConfig.class


+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/incremental/packageDebugResources/compile-file-map.properties

@@ -1,4 +1,4 @@
-#Thu Mar 21 10:03:31 CST 2024
+#Sun Apr 07 15:19:32 CST 2024
 D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable-hdpi\\default_ptr_flip.png=D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable-hdpi-v4\\default_ptr_flip.png
 D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\anim\\slide_in_from_top.xml=D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\anim\\slide_in_from_top.xml
 D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable-xhdpi\\default_ptr_flip.png=D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\default_ptr_flip.png

BIN
pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/classes.jar


BIN
pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/full.jar


+ 2 - 2
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/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.handmark.pulltorefresh.library"
-    android:versionCode="11"
-    android:versionName="v1.0.1" >
+    android:versionCode="15"
+    android:versionName="v1.0.5" >
 
     <uses-sdk
         android:minSdkVersion="16"

+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/output.json

@@ -1 +1 @@
-[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":11,"versionName":"v1.0.1","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]
+[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":15,"versionName":"v1.0.5","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]

+ 2 - 2
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/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.handmark.pulltorefresh.library"
-    android:versionCode="11"
-    android:versionName="v1.0.1" >
+    android:versionCode="15"
+    android:versionName="v1.0.5" >
 
     <uses-sdk
         android:minSdkVersion="16"

+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/output.json

@@ -1 +1 @@
-[{"outputType":{"type":"MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":11,"versionName":"v1.0.1","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]
+[{"outputType":{"type":"MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":15,"versionName":"v1.0.5","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]