修改 质检定量默认值

master
wangh 7 months ago
parent b376813379
commit 89b02db5af

@ -34,7 +34,7 @@ public class CheckResultDetal extends BaseObservable {
/** /**
* , * ,
*/ */
private double checkProjectResult; private String checkProjectResult;
/** /**
* *
*/ */
@ -168,11 +168,11 @@ public class CheckResultDetal extends BaseObservable {
this.checkProjectStatus = checkProjectStatus; this.checkProjectStatus = checkProjectStatus;
} }
public double getCheckProjectResult() { public String getCheckProjectResult() {
return checkProjectResult; return checkProjectResult;
} }
public void setCheckProjectResult(double checkProjectResult) { public void setCheckProjectResult(String checkProjectResult) {
this.checkProjectResult = checkProjectResult; this.checkProjectResult = checkProjectResult;
} }
@ -252,7 +252,7 @@ public class CheckResultDetal extends BaseObservable {
} }
public void textChanged(Editable s){ public void textChanged(Editable s){
double result=Double.parseDouble(s.toString()); double result=Double.parseDouble(s.toString());
checkProjectResult=result; checkProjectResult=result+"";
if (result>=downDiff && result<= upperDiff){ if (result>=downDiff && result<= upperDiff){
setCheckProjectStatus("1"); setCheckProjectStatus("1");

@ -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");
} }
} }

@ -43,7 +43,7 @@
android:inputType="number" android:inputType="number"
android:enabled="@{enabledState}" android:enabled="@{enabledState}"
android:afterTextChanged="@{item.textChanged}" android:afterTextChanged="@{item.textChanged}"
android:text='@={item.checkProjectResult+""}' /> android:text='@={item.checkProjectResult}' />
<TextView <TextView
style="@style/item_title" style="@style/item_title"

@ -103,7 +103,7 @@
style="@style/item_title_left" style="@style/item_title_left"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="物料批次:" /> android:text="物料条码:" />
<TextView <TextView
style="@style/text_info" style="@style/text_info"

Loading…
Cancel
Save