|
|
@ -23,6 +23,7 @@ import okhttp3.RequestBody;
|
|
|
|
public class MainActivity extends BaseActivity {
|
|
|
|
public class MainActivity extends BaseActivity {
|
|
|
|
private MainVm mainVm;
|
|
|
|
private MainVm mainVm;
|
|
|
|
private AlertDialog alertDialog;
|
|
|
|
private AlertDialog alertDialog;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
@ -49,15 +50,18 @@ public class MainActivity extends BaseActivity {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
alertDialog = new AlertDialog.Builder(this)
|
|
|
|
alertDialog = new AlertDialog.Builder(this)
|
|
|
|
.setTitle("投料提示")
|
|
|
|
.setTitle("投料提示")
|
|
|
|
.setMessage("选择投料类型").setNegativeButton("取消",null)
|
|
|
|
.setMessage("是否开仓投料")
|
|
|
|
|
|
|
|
.setNegativeButton("取消", null)
|
|
|
|
.setPositiveButton("投料", new DialogInterface.OnClickListener() {
|
|
|
|
.setPositiveButton("投料", new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
|
|
|
ingredientInfo.setIsOpen(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.setNeutralButton("保存数据", new DialogInterface.OnClickListener() {
|
|
|
|
.setNeutralButton("保存数据", new DialogInterface.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
|
|
|
ingredientInfo.setIsOpen(2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).create();
|
|
|
|
}).create();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -94,8 +98,11 @@ public class MainActivity extends BaseActivity {
|
|
|
|
san_info = false;
|
|
|
|
san_info = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IngredientInfo ingredientInfo;
|
|
|
|
|
|
|
|
|
|
|
|
public void submit1(View view) {
|
|
|
|
public void submit1(View view) {
|
|
|
|
IngredientInfo ingredientInfo = new IngredientInfo();
|
|
|
|
|
|
|
|
|
|
|
|
ingredientInfo = new IngredientInfo();
|
|
|
|
ingredientInfo.setCanNumber(mainVm.getTankCode());
|
|
|
|
ingredientInfo.setCanNumber(mainVm.getTankCode());
|
|
|
|
ingredientInfo.setMaterialBarcode(mainVm.getTrayCode());
|
|
|
|
ingredientInfo.setMaterialBarcode(mainVm.getTrayCode());
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|