|
@ -147,42 +147,41 @@ public class OPTransferActivity extends AppCompatActivity { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
barCode.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) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
barCode.setOnEditorActionListener(new TextView.OnEditorActionListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void afterTextChanged(Editable s) { |
|
|
|
|
|
if (s.toString().length() > 0) { |
|
|
|
|
|
if (TextUtils.isEmpty(toBin.getText().toString().trim())) { |
|
|
|
|
|
ErrorMsg = "请先扫描目标库位!"; |
|
|
|
|
|
handler.sendEmptyMessage(2); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { |
|
|
|
|
|
try { |
|
|
|
|
|
if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_NEXT |
|
|
|
|
|
|| (event != null && KeyEvent.KEYCODE_ENTER == event.getKeyCode() && KeyEvent.ACTION_DOWN == event.getAction())) { |
|
|
|
|
|
if (v.toString().length() > 0) { |
|
|
|
|
|
if (TextUtils.isEmpty(toBin.getText().toString().trim())) { |
|
|
|
|
|
ErrorMsg = "请先扫描目标库位!"; |
|
|
|
|
|
handler.sendEmptyMessage(2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (rbIn.isChecked()) { |
|
|
|
|
|
for (ItemLotDetailData itemLotDetailData : dataDetailList) { |
|
|
|
|
|
if (itemLotDetailData.getInvCode().equals(barCode.getText())) { |
|
|
|
|
|
ErrorMsg = "请勿扫描重复条码!"; |
|
|
|
|
|
handler.sendEmptyMessage(3); |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
if (rbIn.isChecked()) { |
|
|
|
|
|
for (ItemLotDetailData itemLotDetailData : dataDetailList) { |
|
|
|
|
|
if (itemLotDetailData.getInvCode().equals(barCode.getText())) { |
|
|
|
|
|
ErrorMsg = "请勿扫描重复条码!"; |
|
|
|
|
|
handler.sendEmptyMessage(3); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
new Thread(new Runnable() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
CheckLotNoForStackTrans(); |
|
|
|
|
|
} |
|
|
|
|
|
}).start(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
new Thread(new Runnable() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
CheckLotNoForStackTrans(); |
|
|
|
|
|
} |
|
|
|
|
|
}).start(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
ErrorMsg = ex.getMessage(); |
|
|
|
|
|
handler.sendEmptyMessage(99); |
|
|
} |
|
|
} |
|
|
|
|
|
return false; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|