|
@@ -46,6 +46,7 @@ import com.fxy.constant.BaseConfig;
|
|
import com.fxy.constant.EventCode;
|
|
import com.fxy.constant.EventCode;
|
|
import com.fxy.hk.bean.InboundBean;
|
|
import com.fxy.hk.bean.InboundBean;
|
|
import com.fxy.hk.bean.OutboundBean;
|
|
import com.fxy.hk.bean.OutboundBean;
|
|
|
|
+import com.fxy.hk.bean.RecordBean;
|
|
import com.fxy.net.MyDialogCallback;
|
|
import com.fxy.net.MyDialogCallback;
|
|
import com.fxy.net.Urls;
|
|
import com.fxy.net.Urls;
|
|
import com.fxy.putIn.TallyMainActivity;
|
|
import com.fxy.putIn.TallyMainActivity;
|
|
@@ -128,6 +129,7 @@ public class HkTrayMainActivity extends BaseActivity implements StoJNI.ScanCallB
|
|
|
|
|
|
//托盘数据
|
|
//托盘数据
|
|
private List<InboundBean> tallyDataList = new ArrayList<>();
|
|
private List<InboundBean> tallyDataList = new ArrayList<>();
|
|
|
|
+ private List<RecordBean> listRecord = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -235,7 +237,7 @@ public class HkTrayMainActivity extends BaseActivity implements StoJNI.ScanCallB
|
|
errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
|
|
errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
|
|
notDataView = emptyView;
|
|
notDataView = emptyView;
|
|
|
|
|
|
- mAdapter = new FinishWorkAdapter(tallyDataList);
|
|
|
|
|
|
+ mAdapter = new FinishWorkAdapter(listRecord);
|
|
mAdapter.setEmptyView(emptyView);
|
|
mAdapter.setEmptyView(emptyView);
|
|
mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
|
|
mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
|
@@ -446,10 +448,16 @@ public class HkTrayMainActivity extends BaseActivity implements StoJNI.ScanCallB
|
|
InboundBean inboundBean = JsonUtil.getObject(bean.data, InboundBean.class);
|
|
InboundBean inboundBean = JsonUtil.getObject(bean.data, InboundBean.class);
|
|
tvCtnQty.setText(inboundBean.getCtnQty());
|
|
tvCtnQty.setText(inboundBean.getCtnQty());
|
|
|
|
|
|
|
|
+
|
|
etContainerCode.setEnabled(false);
|
|
etContainerCode.setEnabled(false);
|
|
ibContainerCodeClear.setVisibility(View.GONE);
|
|
ibContainerCodeClear.setVisibility(View.GONE);
|
|
etCtnCode.setEnabled(true);
|
|
etCtnCode.setEnabled(true);
|
|
etCtnCode.requestFocus();
|
|
etCtnCode.requestFocus();
|
|
|
|
+
|
|
|
|
+ listRecord.clear();
|
|
|
|
+ listRecord = inboundBean.getList();
|
|
|
|
+ mAdapter.setNewData(listRecord);
|
|
|
|
+ mAdapter.notifyDataSetChanged();
|
|
} else {
|
|
} else {
|
|
showWarningToast(bean.msg);
|
|
showWarningToast(bean.msg);
|
|
}
|
|
}
|
|
@@ -483,6 +491,7 @@ public class HkTrayMainActivity extends BaseActivity implements StoJNI.ScanCallB
|
|
ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
|
|
ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
|
|
if (bean.code == 1) {
|
|
if (bean.code == 1) {
|
|
showSuccessToast(bean.msg);
|
|
showSuccessToast(bean.msg);
|
|
|
|
+
|
|
authCamera();
|
|
authCamera();
|
|
} else {
|
|
} else {
|
|
|
|
|
|
@@ -554,8 +563,10 @@ public class HkTrayMainActivity extends BaseActivity implements StoJNI.ScanCallB
|
|
if (bean.code == 1) {
|
|
if (bean.code == 1) {
|
|
showSuccessToast(bean.msg);
|
|
showSuccessToast(bean.msg);
|
|
InboundBean inboundBean = JsonUtil.getObject(bean.data, InboundBean.class);
|
|
InboundBean inboundBean = JsonUtil.getObject(bean.data, InboundBean.class);
|
|
- tallyDataList.add(inboundBean);
|
|
|
|
- mAdapter.setNewData(tallyDataList);
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ listRecord = inboundBean.getList();
|
|
|
|
+ mAdapter.setNewData(listRecord);
|
|
mAdapter.notifyDataSetChanged();
|
|
mAdapter.notifyDataSetChanged();
|
|
etCtnCode.setText("");
|
|
etCtnCode.setText("");
|
|
setEditTextNormal(etCtnCode,true);
|
|
setEditTextNormal(etCtnCode,true);
|
|
@@ -628,17 +639,15 @@ public class HkTrayMainActivity extends BaseActivity implements StoJNI.ScanCallB
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
- private class FinishWorkAdapter extends BaseQuickAdapter<InboundBean, BaseViewHolder> {
|
|
|
|
- public FinishWorkAdapter(List<InboundBean> data) {
|
|
|
|
|
|
+ private static class FinishWorkAdapter extends BaseQuickAdapter<RecordBean, BaseViewHolder> {
|
|
|
|
+ public FinishWorkAdapter(List<RecordBean> data) {
|
|
super(R.layout.item_putin_scan, data);
|
|
super(R.layout.item_putin_scan, data);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public void setNewData(List<InboundBean> tallyDataList) {
|
|
|
|
- }
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- protected void convert(BaseViewHolder helper, InboundBean item) {
|
|
|
|
|
|
+ protected void convert(BaseViewHolder helper, RecordBean item) {
|
|
helper.addOnClickListener(R.id.ib_clear);//定义setOnItemChildClickListener 事件点击
|
|
helper.addOnClickListener(R.id.ib_clear);//定义setOnItemChildClickListener 事件点击
|
|
helper.setText(R.id.tv_number, item.getCtnCode());
|
|
helper.setText(R.id.tv_number, item.getCtnCode());
|
|
helper.getView(R.id.ib_clear).setVisibility(View.GONE);
|
|
helper.getView(R.id.ib_clear).setVisibility(View.GONE);
|