完成 不合格处置提交

master
wangh 1 year ago
parent 4406b63b77
commit a09430d513

@ -48,4 +48,8 @@ dependencies {
// https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2 // https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2
implementation 'com.alibaba.fastjson2:fastjson2:2.0.45' implementation 'com.alibaba.fastjson2:fastjson2:2.0.45'
// https://mvnrepository.com/artifact/com.github.bumptech.glide/glide
implementation 'com.github.bumptech.glide:glide:4.16.0'
} }

@ -2,9 +2,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" /> <uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" /> <!-- //震动权限 -->
<uses-permission android:name="android.permission.VIBRATE" /> <!-- //外部存储器权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" /> <!-- 相机权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<application <application
android:name=".base.MyApplication" android:name=".base.MyApplication"
android:allowBackup="true" android:allowBackup="true"
@ -17,14 +28,25 @@
android:theme="@style/Theme.Jingyuanmes" android:theme="@style/Theme.Jingyuanmes"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:targetApi="31"> tools:targetApi="31">
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.example.jingyuan_mes"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<activity <activity
android:name=".check.CheckDisposalActivity" android:name=".check.CheckDisposalActivity"
android:exported="true"> android:exported="true">
<!-- <intent-filter>--> <intent-filter>
<!-- <action android:name="android.intent.action.MAIN" />--> <action android:name="android.intent.action.MAIN" />
<!-- <category android:name="android.intent.category.LAUNCHER" />--> <category android:name="android.intent.category.LAUNCHER" />
<!-- </intent-filter>--> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".check.CheckSelectDetalActivity" android:name=".check.CheckSelectDetalActivity"
@ -74,11 +96,10 @@
<activity <activity
android:name=".HomePageActivity" android:name=".HomePageActivity"
android:exported="true"> android:exported="true">
<intent-filter> <!-- <intent-filter>-->
<action android:name="android.intent.action.MAIN" /> <!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<category android:name="android.intent.category.LAUNCHER" /> <!-- </intent-filter>-->
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".store.MaterialOutListActivity" android:name=".store.MaterialOutListActivity"

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

@ -18,6 +18,7 @@ import androidx.appcompat.app.AppCompatActivity;
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils; import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
import com.google.gson.Gson; import com.google.gson.Gson;
import java.text.SimpleDateFormat;
import java.util.List; import java.util.List;
import okhttp3.MediaType; import okhttp3.MediaType;
@ -30,8 +31,9 @@ public class BaseActivity extends AppCompatActivity {
public Gson gson; public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8"); public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
private MyReceiver myReceiver; private MyReceiver myReceiver;
public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjJlZDdiYmMyLWEyZDQtNGFkOS04OGQzLWViZGE5OGJiZTQ2NyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.M_ELTmvE5fM8nafH9XWMmVlFqTN23dUpvrgzSwozx52GfdVprzzPcZ-UvY_nCobVlR2lCQnzG2k5_vKWm_Qfnw"; public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjNkMjIxYzYzLWEyZGEtNDFlZi1iZjRmLWVlNjQwNTQxNmM5YyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.erdvjHcWd6JDpy854nPauWeHdksSkIiv-GeRrpCjpdMBI5enOE-17ayCmTduS71_8Dg9DGtR4ZBLjLiwpuu9Jg";
public Context context; public Context context;
public SimpleDateFormat format= new SimpleDateFormat( "yyyyMMdd_HHmmss");
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);

@ -1,16 +1,200 @@
package com.example.jingyuan_mes.check; package com.example.jingyuan_mes.check;
import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.databinding.DataBindingUtil;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.widget.Toast;
import com.example.jingyuan_mes.R; import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.adapter.check.DisposalFileAdapter;
import com.example.jingyuan_mes.adapter.check.DisposalInfoAdapter;
import com.example.jingyuan_mes.base.BaseActivity;
import com.example.jingyuan_mes.base.MyRecultCall;
import com.example.jingyuan_mes.base.MyResult;
import com.example.jingyuan_mes.databinding.ActivityCheckDisposalBinding;
import com.example.jingyuan_mes.dialog.ImgDialog;
import com.example.jingyuan_mes.entity.check.CheckActivitieBeen;
import com.example.jingyuan_mes.entity.check.CheckDisposalBeen;
import com.example.jingyuan_mes.entity.check.CheckInstanceFiles;
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
public class CheckDisposalActivity extends AppCompatActivity { import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import okhttp3.RequestBody;
public class CheckDisposalActivity extends BaseActivity implements DisposalFileAdapter.ItemClickCall {
private static final int CAMERA_PHOTO = 1;
private DisposalFileAdapter fileAdapter;
private List<CheckInstanceFiles> filesList;
private ActivityCheckDisposalBinding binding;
private DisposalInfoAdapter infoAdapter;
private ImgDialog imgDialog;
private List<CheckActivitieBeen> infoList;
private List<File> files;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_check_disposal); binding = DataBindingUtil.setContentView(this, R.layout.activity_check_disposal);
fileAdapter = new DisposalFileAdapter(this, this);
binding.setAdapter1(fileAdapter);
infoAdapter = new DisposalInfoAdapter(this);
binding.setAdapter2(infoAdapter);
imgDialog = new ImgDialog(this);
initRequest();
}
private void initRequest() {
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResult4Handle").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).params("checkResultId", 2).params("materialBatch", "123").params("checkMode", 1).params("checkSample", "10").params("materialCode", "111").params("materialName", "物料测试").execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
CheckDisposalBeen been = gson.fromJson(body.getData().toString(), CheckDisposalBeen.class);
binding.setVm(been);
infoList = been.getQmsQualityInstanceActivities();
infoAdapter.setList(infoList);
infoAdapter.notifyDataSetChanged();
filesList = been.getQmsCheckInstanceFiles();
if (filesList == null || filesList.isEmpty()) {
binding.disposalFileAdd.setVisibility(View.VISIBLE);
filesList = new ArrayList<>();
files = new ArrayList<>();
fileAdapter.setList(filesList);
} else {
binding.disposalFileAdd.setVisibility(View.GONE);
// files = new ArrayList<>();
fileAdapter.setList(filesList);
fileAdapter.notifyDataSetChanged();
}
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}
});
}
// 图片的点击
@Override
public void onClick(int position, boolean type) {
if (type) {
imgDialog.setRawReturn(filesList.get(position).getFaultFile());
return;
}
filesList.remove(position);
fileAdapter.notifyDataSetChanged();
}
private Uri img_uri;
private File outputImage;
// 点击拍照
public void dispisalTackphoto(View view) {
try {
teke_photo();
} catch (IOException e) {
throw new RuntimeException(e);
}
} }
// 拍照
private void teke_photo() throws IOException {
outputImage = new File(getExternalCacheDir(), "output_imgage" + format.format(new Date()) + ".jpg");
outputImage.createNewFile();
if (Build.VERSION.SDK_INT >= 24) {
img_uri = FileProvider.getUriForFile(this, "com.example.jingyuan_mes", outputImage);
} else {
img_uri = Uri.fromFile(outputImage);
}
if (PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)) {
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra(MediaStore.EXTRA_OUTPUT, img_uri);
startActivityForResult(intent, CAMERA_PHOTO);
} else {
// 提示用户开户权限 拍照和读写sd卡权限
String[] perms = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA};
ActivityCompat.requestPermissions(this, perms, CAMERA_PHOTO);
}
}
// 拍照的回调
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
CheckInstanceFiles checkInstanceFiles = new CheckInstanceFiles();
var faultFile = img_uri.toString();
checkInstanceFiles.setFaultFile(faultFile);
filesList.add(checkInstanceFiles);
fileAdapter.notifyDataSetChanged();
Bitmap compressedImageBitmap = BitmapFactory.decodeFile(outputImage.getPath());
// 选择压缩质量
int quality = 10;
// 创建一个字节数组输出流
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 将Bitmap压缩成JPEG格式并将压缩后的数据保存到字节数组输出流中
compressedImageBitmap.compress(Bitmap.CompressFormat.JPEG, quality, baos);
// 将字节数组输出流中的数据转换为字节数组
byte[] compressedImageData = baos.toByteArray();
// 清空字节数组输出流
baos.reset();
// 将压缩后的字节数组保存到文件中
FileOutputStream fos = null;
try {
fos = new FileOutputStream(outputImage);
fos.write(compressedImageData);
fos.flush();
fos.close();
files.add(outputImage);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
public void checkDisposalSubmit(View view) {
var been = infoList.get(infoList.size() - 1);
OkGo.<MyResult>post(url + "/qms/mobile/handleQualityInstance").headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).params("checkResultId", "2").params("processActivityId", been.getProcessActivityId()).params("processHandleResolution", been.getProcessHandleResolution()).params("processStepOrder", been.getProcessStepOrder()).addFileParams("files", files).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
// finish();
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}
});
}
} }

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

@ -26,7 +26,7 @@ public class StockReturnDialog extends Dialog {
this.rawReturn = rawReturn; this.rawReturn = rawReturn;
binding.setVm(rawReturn); binding.setVm(rawReturn);
binding.auditReason.setText(null); binding.auditReason.setText(null);
// binding.executePendingBindings(); binding.executePendingBindings();
} }
public StockReturnDialog(@NonNull Context context,StockReturnDialogCall stockReturnDialogCall) { public StockReturnDialog(@NonNull Context context,StockReturnDialogCall stockReturnDialogCall) {

@ -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,129 @@
package com.example.jingyuan_mes.entity.check;
import java.util.List;
/**
* @author wanghao
* @date 2024/3/11 10:09
*/
public class CheckDisposalBeen {
/**
* batchAmount : 0
* passAmount : 0
* failAmount : 1
* checkMode : 1
* checkSample : 10
* materialCode : 111
* materialName :
*/
private int batchAmount;
private int passAmount;
private int failAmount;
private String checkMode;
private int checkSample;
private String materialCode;
private String materialName;
private List<CheckInstanceFiles> qmsCheckInstanceFiles;
private String checkRuleType;
private List<CheckActivitieBeen> qmsQualityInstanceActivities;
/**
* 1,2,3,4
*
* @return
*/
public String getCheckRuleType() {
if (checkRuleType==null){
return null;
}
switch (checkRuleType) {
case "1":
return "来料检验";
case "2":
return "半成品检验";
case "3":
return "成品检验";
case "4":
return "工序检验";
}
return checkRuleType;
}
public List<CheckActivitieBeen> getQmsQualityInstanceActivities() {
return qmsQualityInstanceActivities;
}
public void setQmsQualityInstanceActivities(List<CheckActivitieBeen> qmsQualityInstanceActivities) {
this.qmsQualityInstanceActivities = qmsQualityInstanceActivities;
}
public void setCheckRuleType(String checkRuleType) {
this.checkRuleType = checkRuleType;
}
public List<CheckInstanceFiles> getQmsCheckInstanceFiles() {
return qmsCheckInstanceFiles;
}
public void setQmsCheckInstanceFiles(List<CheckInstanceFiles> qmsCheckInstanceFiles) {
this.qmsCheckInstanceFiles = qmsCheckInstanceFiles;
}
public int getBatchAmount() {
return batchAmount;
}
public void setBatchAmount(int batchAmount) {
this.batchAmount = batchAmount;
}
public int getPassAmount() {
return passAmount;
}
public void setPassAmount(int passAmount) {
this.passAmount = passAmount;
}
public int getFailAmount() {
return failAmount;
}
public void setFailAmount(int failAmount) {
this.failAmount = failAmount;
}
public String getCheckMode() {
return checkMode.equals("1") ? "全检" : "抽检";
}
public void setCheckMode(String checkMode) {
this.checkMode = checkMode;
}
public int getCheckSample() {
return checkSample;
}
public void setCheckSample(int checkSample) {
this.checkSample = checkSample;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
}

@ -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 + '\'' +
'}';
}
}

@ -11,11 +11,14 @@
<variable <variable
name="vm" name="vm"
type="com.example.jingyuan_mes.entity.check.CheckResult" /> type="com.example.jingyuan_mes.entity.check.CheckDisposalBeen" />
<variable <variable
name="adapter" name="adapter1"
type="com.example.jingyuan_mes.adapter.check.CheckWorkAdapter" /> type="com.example.jingyuan_mes.adapter.check.DisposalFileAdapter" />
<variable
name="adapter2"
type="com.example.jingyuan_mes.adapter.check.DisposalInfoAdapter" />
</data> </data>
<LinearLayout <LinearLayout
@ -33,7 +36,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginTop="8dp" android:layout_marginTop="4dp"
android:layout_marginEnd="40dp"> android:layout_marginEnd="40dp">
@ -61,14 +64,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="@{vm.checkRuleType}" /> android:text="@{vm.checkRuleType}"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="40dp"> android:layout_marginEnd="40dp">
<TextView <TextView
@ -102,7 +104,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="40dp"> android:layout_marginEnd="40dp">
<TextView <TextView
@ -115,7 +116,8 @@
style="@style/item_info" style="@style/item_info"
android:layout_width="95dp" android:layout_width="95dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@{vm.checkMode}" /> android:paddingLeft="40dp"
android:text="@{String.valueOf(vm.batchAmount)}" />
<TextView <TextView
style="@style/item_title" style="@style/item_title"
@ -128,14 +130,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="@{vm.checkStatus}" /> android:text="@{String.valueOf(vm.passAmount)}" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="40dp"> android:layout_marginEnd="40dp">
@ -149,38 +150,9 @@
style="@style/item_info" style="@style/item_info"
android:layout_width="55dp" android:layout_width="55dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@{vm.checkStatus}" /> android:text="@{String.valueOf(vm.failAmount)}" />
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:layout_marginEnd="8dp"
android:background="@color/item_bg" />
<TextView
style="@style/item_title"
android:layout_width="109dp"
android:layout_height="35dp"
android:layout_marginStart="40dp"
android:text="不合格情况描述:"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:background="@drawable/san_text_bg"
android:gravity="left"
android:padding="5dp"
android:text="12312"
android:textSize="14sp" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" android:layout_height="2dp"
@ -189,21 +161,40 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:background="@color/item_bg" /> android:background="@color/item_bg" />
<TextView <TextView
style="@style/item_title" style="@style/item_title"
android:layout_width="109dp" android:layout_width="40dp"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:text="不合格情况描述:" android:text="图片:"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="70dp" android:layout_height="match_parent"
android:layout_marginLeft="40dp" android:layout_weight="1"
android:layout_marginRight="40dp" android:adapter="@{adapter1}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/> android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<ImageView
android:id="@+id/disposal_file_add"
android:layout_width="50dp"
android:layout_height="match_parent"
android:visibility="gone"
android:onClick="dispisalTackphoto"
android:src="@mipmap/ic_add_file"/>
</LinearLayout>
<View <View
@ -216,13 +207,18 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/> android:adapter="@{adapter2}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<Button <Button
style="@style/button_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_margin="20dp"/> android:layout_margin="20dp"
android:onClick="checkDisposalSubmit"
android:text="提交"/>
</LinearLayout> </LinearLayout>
</layout> </layout>

@ -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>

@ -1,63 +1,73 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools">
android:layout_width="match_parent"
android:layout_height="151dp" <data>
android:background="@color/white" <variable
android:paddingTop="5dp"> name="vm"
type="com.example.jingyuan_mes.entity.check.CheckActivitieBeen" />
<TextView </data>
android:id="@+id/textView"
style="@style/item_title" <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_marginStart="40dp"
android:text="处理人1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
style="@style/item_title"
android:layout_width="50dp"
android:layout_height="30dp"
android:text="处理人"
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
style="@style/item_title"
android:layout_width="140dp"
android:layout_height="30dp"
android:text="2024-111-11 11-11-11"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="100dp"
android:background="@drawable/san_text_bg"
android:gravity="left"
android:padding="5dp"
android:text="12312"
android:layout_marginRight="40dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" android:layout_height="151dp"
android:layout_marginStart="8dp" android:background="@color/white"
android:layout_marginEnd="8dp" android:paddingTop="5dp">
android:background="@color/item_bg"
app:layout_constraintBottom_toBottomOf="parent" <TextView
app:layout_constraintEnd_toEndOf="parent" android:id="@+id/textView"
app:layout_constraintStart_toStartOf="parent" /> style="@style/item_title"
android:layout_width="70dp"
</androidx.constraintlayout.widget.ConstraintLayout> android:layout_height="30dp"
android:layout_marginStart="40dp"
android:text='@{"处理人"+vm.processStepOrder +""}'
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
style="@style/item_title"
android:layout_width="40dp"
android:layout_height="30dp"
android:text='@{vm.createBy??"你"}'
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
style="@style/item_title"
android:layout_width="140dp"
android:layout_height="30dp"
android:text="@{vm.createTime}"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="100dp"
android:background="@drawable/san_text_bg"
android:gravity="left"
android:padding="5dp"
android:text="@={vm.processHandleResolution}"
android:enabled="@{vm.editedAble}"
android:layout_marginRight="40dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@color/item_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</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…
Cancel
Save