|
|
@@ -77,32 +77,34 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
|
{ |
|
|
|
kg="关闭"; |
|
|
|
} |
|
|
|
String title = "料仓操作提示!"; |
|
|
|
String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; |
|
|
|
// String title = "料仓操作提示!"; |
|
|
|
// String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; |
|
|
|
String finalKg = kg; |
|
|
|
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
if(finalKg.equals("打开")) |
|
|
|
{ |
|
|
|
//打开 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
}else |
|
|
|
{ |
|
|
|
//关闭 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); |
|
|
|
if(finalKg.equals("打开")) |
|
|
|
{ |
|
|
|
//打开 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
}else |
|
|
|
{ |
|
|
|
//关闭 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
} |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}); |
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
} |
|
|
|
// AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
// @Override |
|
|
|
// public void onClick(QMUIDialog dialog, int index) { |
|
|
|
// |
|
|
|
// dialog.dismiss(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
@@ -117,32 +119,34 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
|
{ |
|
|
|
kg="关闭"; |
|
|
|
} |
|
|
|
String title = "料仓操作提示!"; |
|
|
|
String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; |
|
|
|
// String title = "料仓操作提示!"; |
|
|
|
// String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; |
|
|
|
String finalKg = kg; |
|
|
|
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
if(finalKg.equals("打开")) |
|
|
|
{ |
|
|
|
//打开 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
}else |
|
|
|
{ |
|
|
|
//关闭 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); |
|
|
|
if(finalKg.equals("打开")) |
|
|
|
{ |
|
|
|
//打开 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
} |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}); |
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
}else |
|
|
|
{ |
|
|
|
//关闭 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
} |
|
|
|
// AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
// @Override |
|
|
|
// public void onClick(QMUIDialog dialog, int index) { |
|
|
|
// |
|
|
|
// dialog.dismiss(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
@@ -157,32 +161,34 @@ public class lc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
|
{ |
|
|
|
kg="关闭"; |
|
|
|
} |
|
|
|
String title = "料仓操作提示!"; |
|
|
|
String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; |
|
|
|
// String title = "料仓操作提示!"; |
|
|
|
// String message = "请问客官确定要将["+lcModes.get(position).materialName+"]"+kg+"?"; |
|
|
|
String finalKg = kg; |
|
|
|
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
if(finalKg.equals("打开")) |
|
|
|
{ |
|
|
|
//打开 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
}else |
|
|
|
{ |
|
|
|
//关闭 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); |
|
|
|
if(finalKg.equals("打开")) |
|
|
|
{ |
|
|
|
//打开 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_g)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", true, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
}else |
|
|
|
{ |
|
|
|
//关闭 |
|
|
|
myViewHolder.imageView.setTag(finalKg); |
|
|
|
myViewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.mipmap.shuiguan_k2)); |
|
|
|
|
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
} |
|
|
|
dialog.dismiss(); |
|
|
|
} |
|
|
|
}); |
|
|
|
ExecuteTheRecipe.WritePLC("料仓"+(position+1)+"手动开关", false, null); |
|
|
|
ToastUtils.info("料仓"+(position+1)+"开关," + finalKg); |
|
|
|
} |
|
|
|
// AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() { |
|
|
|
// @Override |
|
|
|
// public void onClick(QMUIDialog dialog, int index) { |
|
|
|
// |
|
|
|
// dialog.dismiss(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|