完成 不合格处置提交
parent
4406b63b77
commit
a09430d513
@ -0,0 +1,81 @@
|
||||
package com.example.jingyuan_mes.adapter.check;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.BindingAdapter;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.example.jingyuan_mes.BR;
|
||||
import com.example.jingyuan_mes.R;
|
||||
import com.example.jingyuan_mes.databinding.ItemCheckSelectBinding;
|
||||
import com.example.jingyuan_mes.databinding.ItemDisposalImgBinding;
|
||||
import com.example.jingyuan_mes.entity.check.CheckInstanceFiles;
|
||||
import com.example.jingyuan_mes.entity.check.CheckResult;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/11
|
||||
*/
|
||||
public class DisposalFileAdapter extends RecyclerView.Adapter<DisposalFileAdapter.MyViewHolder> {
|
||||
private List<CheckInstanceFiles> list;
|
||||
private static Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public DisposalFileAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CheckInstanceFiles> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDisposalImgBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_disposal_img, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
// @SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var outstock = list.get(position);
|
||||
var binding = holder.binding;
|
||||
// binding.setVariable(BR.vm,outstock);
|
||||
Glide.with(context)
|
||||
.load(outstock.getFaultFile())
|
||||
.into(binding.disFile);
|
||||
binding.disFile.setOnClickListener(v -> clickCall.onClick(position,true));
|
||||
binding.disposalDelect.setOnClickListener(v -> clickCall.onClick(position,false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemDisposalImgBinding binding;
|
||||
|
||||
public MyViewHolder(ItemDisposalImgBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public interface ItemClickCall {
|
||||
void onClick(int position,boolean type);
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.example.jingyuan_mes.adapter.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.jingyuan_mes.BR;
|
||||
import com.example.jingyuan_mes.R;
|
||||
import com.example.jingyuan_mes.databinding.ItemDisposalBinding;
|
||||
import com.example.jingyuan_mes.entity.check.CheckActivitieBeen;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/12 14:32
|
||||
*/
|
||||
public class DisposalInfoAdapter extends RecyclerView.Adapter<DisposalInfoAdapter.MyViewHoder> {
|
||||
|
||||
private Context context;
|
||||
private List<CheckActivitieBeen> list;
|
||||
private LayoutInflater from;
|
||||
public DisposalInfoAdapter(Context context) {
|
||||
this.context = context;
|
||||
|
||||
from = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CheckActivitieBeen> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHoder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDisposalBinding binding= DataBindingUtil.inflate(from, R.layout.item_disposal,parent,false);
|
||||
return new MyViewHoder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHoder holder, int position) {
|
||||
holder.binding.setVariable(BR.vm,list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
public static class MyViewHoder extends RecyclerView.ViewHolder{
|
||||
private ItemDisposalBinding binding;
|
||||
public MyViewHoder(ItemDisposalBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding=binding;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.example.jingyuan_mes.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.example.jingyuan_mes.R;
|
||||
import com.example.jingyuan_mes.databinding.DialogImgBinding;
|
||||
import com.example.jingyuan_mes.databinding.DialogReturnBinding;
|
||||
import com.example.jingyuan_mes.entity.store.RawReturn;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/2/22 11:07
|
||||
*/
|
||||
public class ImgDialog extends Dialog {
|
||||
private DialogImgBinding binding;
|
||||
|
||||
private Context context;
|
||||
|
||||
public void setRawReturn(String url) {
|
||||
Glide.with(context).load(url).into(binding.dialogImg);
|
||||
binding.executePendingBindings();
|
||||
show();
|
||||
|
||||
}
|
||||
|
||||
public ImgDialog(@NonNull Context context) {
|
||||
super(context,R.style.dialog_style);
|
||||
this.context=context;
|
||||
binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_img, null, false);
|
||||
setContentView(binding.getRoot());
|
||||
binding.dialogImgDis.setOnClickListener(v -> dismiss());
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.example.jingyuan_mes.entity.check;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/11 10:12
|
||||
*/
|
||||
public class CheckActivitieBeen extends BaseObservable{
|
||||
|
||||
|
||||
private String createBy;
|
||||
private String createTime;
|
||||
private String processHandleResolution;
|
||||
private int processActivityId;
|
||||
private int processStepOrder;
|
||||
private boolean editedAble;
|
||||
|
||||
|
||||
|
||||
public boolean isEditedAble() {
|
||||
return editedAble;
|
||||
}
|
||||
|
||||
public void setEditedAble(boolean editedAble) {
|
||||
this.editedAble = editedAble;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
|
||||
}
|
||||
|
||||
public String getProcessHandleResolution() {
|
||||
return processHandleResolution;
|
||||
}
|
||||
|
||||
public void setProcessHandleResolution(String processHandleResolution) {
|
||||
this.processHandleResolution = processHandleResolution;
|
||||
}
|
||||
|
||||
public int getProcessActivityId() {
|
||||
return processActivityId;
|
||||
}
|
||||
|
||||
public void setProcessActivityId(int processActivityId) {
|
||||
this.processActivityId = processActivityId;
|
||||
}
|
||||
|
||||
public int getProcessStepOrder() {
|
||||
return processStepOrder;
|
||||
}
|
||||
|
||||
public void setProcessStepOrder(int processStepOrder) {
|
||||
this.processStepOrder = processStepOrder;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.example.jingyuan_mes.entity.check;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/11 10:00
|
||||
*/
|
||||
public class CheckInstanceFiles extends BaseObservable {
|
||||
private String faultFile;
|
||||
|
||||
public String getFaultFile() {
|
||||
return faultFile;
|
||||
}
|
||||
|
||||
public void setFaultFile(String faultFile) {
|
||||
this.faultFile = faultFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CheckInstanceFiles{" +
|
||||
"faultFile='" + faultFile + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:background="@drawable/text_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="查看图片" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#e1e1e1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dialog_img"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:id="@+id/dialog_img_dis"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="关闭" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.jingyuan_mes.entity.check.CheckInstanceFiles" />
|
||||
<import type="com.bumptech.glide.Glide"/>
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="70dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:layout_height="70dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dis_file"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/disposal_delect"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:src="@mipmap/ic_cha1" />
|
||||
</FrameLayout>
|
||||
</layout>
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<external-path
|
||||
name="my_images"
|
||||
path="."/>
|
||||
<!-- <files-path name="my_images" path="images/"/>-->
|
||||
</paths>
|
Loading…
Reference in New Issue