|
|
@@ -749,7 +749,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
bean.setPD_OUTQTY(jsonObject.getInt("PD_OUTQTY"));
|
|
|
bean.setV_RESQTY(jsonObject.getInt("V_RESQTY"));
|
|
|
bean.setPR_DETAIL(jsonObject.getString("PR_DETAIL"));
|
|
|
- bean.setPR_DETAIL(jsonObject.getString("PR_SPEC"));
|
|
|
+ bean.setPR_SPEC(jsonObject.getString("PR_SPEC"));
|
|
|
bean.setSelect(false);
|
|
|
itemNumberList.add(bean);
|
|
|
} catch (JSONException e) {
|
|
|
@@ -788,9 +788,38 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
edit_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)) {
|
|
|
+ try {
|
|
|
+ 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 = edit_et.getText().toString().trim();
|
|
|
+ if (!TextUtils.isEmpty(mSearchStr) && itemNumberList.size() > 0) {
|
|
|
+ List<ItemNumberBean> thisList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < itemNumberList.size(); i++) {
|
|
|
+ if (itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr)
|
|
|
+ || itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr)
|
|
|
+ || itemNumberList.get(i).getPR_SPEC().contains(mSearchStr)
|
|
|
+ ) {
|
|
|
+ thisList.add(itemNumberList.get(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (thisList.size() > 0) {
|
|
|
+ materialAdapter.setmList(thisList);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ materialAdapter.setmList(itemNumberList);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ search_im.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ try {
|
|
|
String mSearchStr = edit_et.getText().toString().trim();
|
|
|
if (!mSearchStr.isEmpty()) {
|
|
|
List<ItemNumberBean> thisList = new ArrayList<>();
|
|
|
@@ -804,42 +833,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
if (thisList.size() > 0) {
|
|
|
materialAdapter.setmList(thisList);
|
|
|
- }
|
|
|
- } else {
|
|
|
- materialAdapter.setmList(itemNumberList);
|
|
|
- }
|
|
|
-
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- search_im.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View v) {
|
|
|
- String mSearchStr = edit_et.getText().toString().trim();
|
|
|
- if (!mSearchStr.isEmpty()) {
|
|
|
- List<ItemNumberBean> thisList = new ArrayList<>();
|
|
|
- for (int i = 0; i < itemNumberList.size(); i++) {
|
|
|
- if ((!TextUtils.isEmpty(itemNumberList.get(i).getPD_PRODCODE()) && itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr))
|
|
|
- || (!TextUtils.isEmpty(itemNumberList.get(i).getPR_DETAIL()) && itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr))
|
|
|
- || (!TextUtils.isEmpty(itemNumberList.get(i).getPR_SPEC()) && itemNumberList.get(i).getPR_SPEC().contains(mSearchStr))
|
|
|
- ) {
|
|
|
- thisList.add(itemNumberList.get(i));
|
|
|
+ } else {
|
|
|
+ materialAdapter.setmList(itemNumberList);
|
|
|
}
|
|
|
}
|
|
|
- if (thisList.size() > 0) {
|
|
|
- pd_prodcode = "";
|
|
|
- //setAdapterData(thisList);
|
|
|
- materialAdapter.updateList(thisList);
|
|
|
- } else {
|
|
|
- setAdapterData(itemNumberList);
|
|
|
- // materialAdapter.setmList(itemNumberList);
|
|
|
- }
|
|
|
+ }catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
});
|
|
|
|
|
|
//确定
|