|
|
@ -43,7 +43,7 @@ public class InventoryTaskCreateActivity extends BaseActivity implements Adapter
|
|
|
|
private List<HouseLocation> list;
|
|
|
|
private List<HouseLocation> list;
|
|
|
|
private Map<String, Object> map;
|
|
|
|
private Map<String, Object> map;
|
|
|
|
private int pageNum = 1;
|
|
|
|
private int pageNum = 1;
|
|
|
|
private int pageSize = 1;
|
|
|
|
private int pageSize = 10;
|
|
|
|
private int warehouseId;
|
|
|
|
private int warehouseId;
|
|
|
|
private Intent intent;
|
|
|
|
private Intent intent;
|
|
|
|
private String warehouseName;
|
|
|
|
private String warehouseName;
|
|
|
@ -66,12 +66,13 @@ public class InventoryTaskCreateActivity extends BaseActivity implements Adapter
|
|
|
|
var inventoryCheckId = intent.getIntExtra("inventoryCheckId", -1);
|
|
|
|
var inventoryCheckId = intent.getIntExtra("inventoryCheckId", -1);
|
|
|
|
map.put("inventoryCheckId", inventoryCheckId == -1 ? null : inventoryCheckId);
|
|
|
|
map.put("inventoryCheckId", inventoryCheckId == -1 ? null : inventoryCheckId);
|
|
|
|
warehouseId = intent.getIntExtra("warehouseId", 0);
|
|
|
|
warehouseId = intent.getIntExtra("warehouseId", 0);
|
|
|
|
|
|
|
|
Log.e("TAG", "传递的值:" + warehouseId);
|
|
|
|
if (warehouseId == 0) {
|
|
|
|
if (warehouseId == 0) {
|
|
|
|
initRequest();
|
|
|
|
initRequest();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
warehouseName = intent.getStringExtra("warehouseName");
|
|
|
|
warehouseName = intent.getStringExtra("warehouseName");
|
|
|
|
list.clear();
|
|
|
|
list.clear();
|
|
|
|
createLocation(1);
|
|
|
|
createLocation(1,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -107,14 +108,14 @@ public class InventoryTaskCreateActivity extends BaseActivity implements Adapter
|
|
|
|
lpw.dismiss();
|
|
|
|
lpw.dismiss();
|
|
|
|
pageNum = 1;
|
|
|
|
pageNum = 1;
|
|
|
|
warehouseName = warehouseBeen.getWarehouseName();
|
|
|
|
warehouseName = warehouseBeen.getWarehouseName();
|
|
|
|
createLocation(pageNum);
|
|
|
|
createLocation(pageNum,true);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int total;
|
|
|
|
private int total;
|
|
|
|
|
|
|
|
|
|
|
|
// 请求库位
|
|
|
|
// 请求库位
|
|
|
|
private void createLocation(int pageNum) {
|
|
|
|
private void createLocation(int pageNum,boolean state) {
|
|
|
|
binding.inventoryCreateHouse.setText(warehouseName);
|
|
|
|
binding.inventoryCreateHouse.setText(warehouseName);
|
|
|
|
map.put("warehouseId", warehouseId);
|
|
|
|
map.put("warehouseId", warehouseId);
|
|
|
|
OkGo.<MyResult>get(url + "/wms/mobile/getLocations").tag(this)
|
|
|
|
OkGo.<MyResult>get(url + "/wms/mobile/getLocations").tag(this)
|
|
|
@ -136,7 +137,12 @@ public class InventoryTaskCreateActivity extends BaseActivity implements Adapter
|
|
|
|
Toast.makeText(context, body.getCode() == 200 ? "暂无记录" : body.getMsg(), Toast.LENGTH_SHORT).show();
|
|
|
|
Toast.makeText(context, body.getCode() == 200 ? "暂无记录" : body.getMsg(), Toast.LENGTH_SHORT).show();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//显示下拉刷新ui
|
|
|
|
binding.inventoryCreateRefresh.finishLoadMore(500);
|
|
|
|
binding.inventoryCreateRefresh.finishLoadMore(500);
|
|
|
|
|
|
|
|
if (state){
|
|
|
|
|
|
|
|
//切换仓库的 需要清理
|
|
|
|
|
|
|
|
list.clear();
|
|
|
|
|
|
|
|
}
|
|
|
|
list.addAll(gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<HouseLocation>>() {
|
|
|
|
list.addAll(gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<HouseLocation>>() {
|
|
|
|
}.getType()));
|
|
|
|
}.getType()));
|
|
|
|
adapter.notifyDataSetChanged();
|
|
|
|
adapter.notifyDataSetChanged();
|
|
|
@ -185,7 +191,7 @@ public class InventoryTaskCreateActivity extends BaseActivity implements Adapter
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pageNum++;
|
|
|
|
pageNum++;
|
|
|
|
createLocation(pageNum);
|
|
|
|
createLocation(pageNum,false);
|
|
|
|
Log.e("TAG", "onLoadMore");
|
|
|
|
Log.e("TAG", "onLoadMore");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|