Compare commits

...

2 Commits

Author SHA1 Message Date
wanghao cb1d9d4788 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	app/src/main/java/com/example/haiwei_mom/device/DeviceRepairInfoActivity.java
4 weeks ago
wanghao 81a0f9886b 增加 质量模块 4 weeks ago

@ -29,9 +29,15 @@
android:theme="@style/Theme.Haiweimom"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".check.CheckSelectActivity"
android:exported="false" />
<activity
android:name=".wms.semi.BindingActivity"
android:exported="false" />
<activity
android:name=".wms.semi.SeimMoveActivity"
android:exported="false" />
@ -54,7 +60,7 @@
android:name=".wms.raw.RawOutActivity"
android:exported="false" />
<activity
android:name=".qm.CheckActivity"
android:name=".qm.LtCheckActivity"
android:exported="false" />
<activity
android:name=".wms.product.ProductOutActivity"
@ -114,6 +120,9 @@
<activity
android:name=".device.BxActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">

@ -10,6 +10,7 @@ import com.example.haiwei_mom.adapter.ItemClickCall;
import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.check.CheckSelectActivity;
import com.example.haiwei_mom.data.MenuBeen;
import com.example.haiwei_mom.data.PdaRouters;
import com.example.haiwei_mom.databinding.ActivityHomePageBinding;
@ -19,11 +20,9 @@ import com.example.haiwei_mom.device.DeviceRepairListActivity;
import com.example.haiwei_mom.device.LubricationActivity;
import com.example.haiwei_mom.device.MaintainActivity;
import com.example.haiwei_mom.ipc.FeedingMaterialsActivity;
import com.example.haiwei_mom.qm.CheckActivity;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.example.haiwei_mom.qm.LtCheckActivity;
import com.example.haiwei_mom.wms.product.BindVehicleActivity;
import com.example.haiwei_mom.wms.product.ProductInActivity;
import com.example.haiwei_mom.wms.product.ProductOutActivity;
import com.example.haiwei_mom.wms.raw.RawInActivity;
import com.example.haiwei_mom.wms.raw.RawOutActivity;
import com.example.haiwei_mom.wms.raw.RawReturnActivity;
@ -68,13 +67,13 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("绑定", BindingActivity.class);
map.put("入库工装绑定", BindVehicleActivity.class);
map.put("成品批量入库", ProductInActivity.class);
map.put("成品出库", ProductOutActivity.class);
map.put("成品出库", RawOutActivity.class);
map.put("原材料入库", RawInActivity.class);
map.put("原材料出库", RawOutActivity.class);
map.put("原材料盘点", StoreCheckActivity.class);
map.put("原材料退库", RawReturnActivity.class);
map.put("制品质检", CheckActivity.class);
map.put("制品复检", CheckActivity.class);
map.put("制品质检", LtCheckActivity.class);
map.put("制品复检", LtCheckActivity.class);
map.put("机台投料", FeedingMaterialsActivity.class);
map.put("工装验证", FeedingMaterialsActivity.class);
map.put("载具绑定", FeedingMaterialsActivity.class);
@ -86,6 +85,9 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("设备巡检", DeviceCheckActivity.class);
map.put("设备保养", MaintainActivity.class);
map.put("设备润滑", LubricationActivity.class);
map.put("质检任务列表", CheckSelectActivity.class);
}
private void initRequest() {

@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.example.haiwei_mom.BR;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.adapter.ItemClickCall;
import com.example.haiwei_mom.data.check.QmsTaskItemBeen;
import com.example.haiwei_mom.databinding.ItemCheckSelectBinding;
import com.example.haiwei_mom.data.check.CheckResult;
@ -21,7 +22,7 @@ import java.util.List;
* @date 2024/1/31 15:18
*/
public class CheckSelectAdapter extends RecyclerView.Adapter<CheckSelectAdapter.MyViewHolder> {
private List<CheckResult> list;
private List<QmsTaskItemBeen> list;
private Context context;
private LayoutInflater inflater;
private ItemClickCall clickCall;
@ -31,7 +32,7 @@ public class CheckSelectAdapter extends RecyclerView.Adapter<CheckSelectAdapter.
inflater = LayoutInflater.from(context);
}
public void setList(List<CheckResult> list) {
public void setList(List<QmsTaskItemBeen> list) {
this.list = list;
}

@ -42,10 +42,10 @@ import okhttp3.MediaType;
public class BaseActivity extends AppCompatActivity implements MyScannerCall {
public static final int CAMERA_PHOTO = 1;
// public static String url = "http://10.11.184.221:6080";
public static String url = "http://10.11.184.221:6080";
// public static String url = "http://192.168.100.100:6080";//设备
// public static String url = "http://1.13.177.47:6080";
public static String url = "http://192.168.0.104:6080";
// public static String url = "http://192.168.0.108:6080";
public ProgressDialog dialog;
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");

@ -0,0 +1,110 @@
package com.example.haiwei_mom.check;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.databinding.DataBindingUtil;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.adapter.check.CheckWorkAdapter;
import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.data.check.CheckResult;
import com.example.haiwei_mom.data.check.CheckResultDetal;
import com.example.haiwei_mom.databinding.ActivityCheckBinding;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.ArrayList;
import java.util.List;
import okhttp3.RequestBody;
public class CheckActivity extends BaseActivity {
private CheckWorkAdapter adapter;
private ActivityCheckBinding binding;
private CheckResult checkResult;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_check);
adapter = new CheckWorkAdapter(this);
binding.setAdapter(adapter);
var intent = getIntent();
var id = intent.getStringExtra("id");
if (id != null) {
var visble = intent.getBooleanExtra("visble", true);
binding.checkSearchLinear.setVisibility(View.GONE);
Log.e("TAG", "传值:" + visble);
searchRequest(null, id, visble);
}
}
// 提交
public void checkSubmit(View view) {
checkResult.setMaterialBarcode(binding.checkSearchText.getText().toString());
OkGo.<MyResult>post(url + "/qms/mobile/saveCheckResultDetail")
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.upRequestBody(RequestBody.create(JSON, gson.toJson(checkResult)))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
finish();
}
myToastUitls.show( body.getMsg());
}
});
}
public void checkSearch(View view) {
var serchText = binding.checkSearchText.getText().toString();
searchRequest(serchText, null, true);
}
private void searchRequest(String serchText, String id, boolean status) {
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResultDetail")
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.params("materialBarcode", serchText)
.params("checkResultDetailId", id)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
checkResult = gson.fromJson(body.getData().toString(), CheckResult.class);
checkResult.setVisbleStatus(status);
binding.setVm(checkResult);
List<CheckResultDetal> qmsCheckResultDetailProjectList;
qmsCheckResultDetailProjectList = checkResult.getQmsCheckResultDetailProjectList();
if (qmsCheckResultDetailProjectList == null || qmsCheckResultDetailProjectList.isEmpty()) {
qmsCheckResultDetailProjectList = new ArrayList<>();
var qmsCheckRuleProjectList = checkResult.getQmsCheckRuleProjectList();
qmsCheckResultDetailProjectList.addAll(qmsCheckRuleProjectList);
checkResult.setQmsCheckResultDetailProjectList(qmsCheckResultDetailProjectList);
}
adapter.setEnabledState(status);
adapter.setList(qmsCheckResultDetailProjectList);
adapter.notifyDataSetChanged();
} else {
binding.setVm(null);
adapter.setList(null);
adapter.notifyDataSetChanged();
myToastUitls.show( body.getMsg());
}
}
});
}
}

@ -0,0 +1,153 @@
package com.example.haiwei_mom.check;
import android.os.Bundle;
import android.view.View;
import androidx.databinding.DataBindingUtil;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.adapter.check.DisposalFileAdapter;
import com.example.haiwei_mom.adapter.check.DisposalInfoAdapter;
import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.databinding.ActivityCheckDisposalBinding;
import com.example.haiwei_mom.dialog.ImgDialog;
import com.example.haiwei_mom.data.check.CheckActivitieBeen;
import com.example.haiwei_mom.data.check.CheckDisposalBeen;
import com.example.haiwei_mom.data.check.CheckInstanceFiles;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class CheckDisposalActivity extends BaseActivity implements DisposalFileAdapter.ItemClickCall {
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
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
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 int checkResultId;
private void initRequest() {
var intent = getIntent();
checkResultId = intent.getIntExtra("checkResultId", 0);
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResult4Handle").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.params("checkResultId", checkResultId)
.params("materialBatch", intent.getStringExtra("materialBatch"))
.params("checkMode", intent.getStringExtra("checkMode"))
.params("checkSample", intent.getDoubleExtra("checkSample",0))
.params("materialCode", intent.getStringExtra("materialCode"))
.params("materialName", intent.getStringExtra("materialName"))
.params("checkRuleType", intent.getStringExtra("checkRuleType"))
.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);
fileAdapter.setList(filesList);
fileAdapter.notifyDataSetChanged();
}
return;
}
myToastUitls.show( body.getMsg());
}
});
}
// 图片的点击
@Override
public void onClick(int position, boolean type) {
if (type) {
imgDialog.setRawReturn(filesList.get(position).getFaultFile());
return;
}
filesList.remove(position);
files.remove(position);
fileAdapter.notifyDataSetChanged();
}
// 点击拍照
public void dispisalTackphoto(View view) {
try {
teke_photo();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public void tekePhotoResult(String fileUrl, File file) {
super.tekePhotoResult(fileUrl, file);
CheckInstanceFiles checkInstanceFiles = new CheckInstanceFiles();
checkInstanceFiles.setFaultFile(fileUrl);
checkInstanceFiles.setState(true);
filesList.add(checkInstanceFiles);
fileAdapter.notifyDataSetChanged();
files.add(file);
}
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", checkResultId)
.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();
}
myToastUitls.show( body.getMsg());
}
});
}
}

@ -0,0 +1,112 @@
package com.example.haiwei_mom.check;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import androidx.databinding.DataBindingUtil;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.adapter.ItemClickCall;
import com.example.haiwei_mom.adapter.check.CheckSelectAdapter;
import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.data.check.QmsTaskItemBeen;
import com.example.haiwei_mom.databinding.ActivityCheckSelectBinding;
import com.example.haiwei_mom.data.check.CheckResult;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.List;
public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
private List<QmsTaskItemBeen> list;
private CheckSelectAdapter adapter;
private Intent intent1;
private boolean activityType;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityCheckSelectBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_check_select);
adapter = new CheckSelectAdapter(this, this);
binding.setAdapter(adapter);
var title = getIntent().getStringExtra("title");
binding.setTitle(title);
activityType = title.equals("物料质检列表");
intent1 = new Intent(this, activityType ? CheckSelectDetalActivity.class : CheckDisposalActivity.class);
binding.checkSelectItemSelect.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Log.e("TAG", "onItemSelected:" + position);
if (position==0) return;
// initRequest(position==5?null:position+"");
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
@Override
protected void onResume() {
super.onResume();
initTaskListRequest(null);
}
private void initTaskListRequest(String checkRuleType) {
OkGo.<MyResult>get(url + "/qms/QcInspectionMain/list").tag(this)
// .params("checkStatus", activityType ? null : "3")
// .params("checkRuleType", checkRuleType)
.execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getRows() == null) {
if (list != null) {
list.clear();
adapter.notifyDataSetChanged();
}
myToastUitls.show( body.getCode() == 200 ? "暂无数据" :body.getMsg());
return;
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<QmsTaskItemBeen>>() {
}.getType());
adapter.setList(list);
adapter.notifyDataSetChanged();
}
});
}
@Override
public void onClick(int position) {
var checkResult = list.get(position);
// var checkResultId = checkResult.getCheckResultId();
// var checkMode = checkResult.getCheckModeText();
// Log.e("TAG", "onClick:" + checkMode);
// var checkSample = checkResult.getCheckSample();
// var materialBatch = checkResult.getMaterialBatch();
// intent1.putExtra("checkResultId", checkResultId);
// intent1.putExtra("checkMode", checkMode);
// intent1.putExtra("checkSample", checkSample);
// intent1.putExtra("materialBatch", materialBatch);
// intent1.putExtra("materialCode", checkResult.getMaterialCode());
// intent1.putExtra("materialName", checkResult.getMaterialName());
// intent1.putExtra("checkRuleType", checkResult.getCheckRuleType());
startActivity(intent1);
}
}

@ -0,0 +1,119 @@
package com.example.haiwei_mom.check;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.databinding.DataBindingUtil;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.adapter.ItemClickCall;
import com.example.haiwei_mom.adapter.check.CheckSelectDetalAdapter;
import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.databinding.ActivityCheckSelectDetalBinding;
import com.example.haiwei_mom.data.check.CheckResultDetailVo;
import com.example.haiwei_mom.data.check.CheckResultDetal;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import okhttp3.RequestBody;
public class CheckSelectDetalActivity extends BaseActivity implements ItemClickCall {
private ActivityCheckSelectDetalBinding binding;
private List<CheckResultDetal> list;
private CheckSelectDetalAdapter checkSelectDetalAdapter;
private Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_check_select_detal);
checkSelectDetalAdapter = new CheckSelectDetalAdapter(this, this);
binding.setAdapter(checkSelectDetalAdapter);
intent = new Intent(this, CheckActivity.class);
}
public void checkSelectSubmit2(View view) {
submit("2");
}
public void checkSelectSubmit3(View view) {
submit("3");
}
private void submit(String status) {
Map<String, String> map = new HashMap<>();
map.put("checkResultId", String.valueOf(checkResultId));
map.put("checkStatus", status);
OkGo.<MyResult>post(url + "/qms/mobile/auditCheckResult").headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).upRequestBody(RequestBody.create(JSON, gson.toJson(map))).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
finish();
}
myToastUitls.show( body.getMsg());
}
});
}
private int checkResultId;
@Override
protected void onResume() {
super.onResume();
var intent = getIntent();
checkResultId = intent.getIntExtra("checkResultId", 0);
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResult").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).params("checkResultId", checkResultId).params("materialBatch", intent.getStringExtra("materialBatch")).params("checkMode", intent.getStringExtra("checkMode")).params("checkSample", intent.getStringExtra("checkSample")).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
CheckResultDetailVo checkResultDetailVo = gson.fromJson(body.getData().toString(), CheckResultDetailVo.class);
binding.setVm(checkResultDetailVo);
return;
}
myToastUitls.show( body.getMsg());
}
});
OkGo.<MyResult>get(url + "/qms/mobile/getCheckResultDetails").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).params("checkResultId", checkResultId).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getTotal() == 0) {
myToastUitls.show( body.getCode() == 200 ? "暂无记录" : body.getMsg());
return;
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<CheckResultDetal>>() {
}.getType());
checkSelectDetalAdapter.setList(list);
checkSelectDetalAdapter.notifyDataSetChanged();
}
});
}
@Override
public void onClick(int position) {
var checkResultDetal = list.get(position);
var checkResultDetailId = checkResultDetal.getCheckResultDetailId();
var checkStatus = checkResultDetal.getCheckStatus();
intent.putExtra("id", String.valueOf(checkResultDetailId));
intent.putExtra("visble", (checkStatus.equals("待检验") || checkStatus.equals("检验中")));
startActivity(intent);
}
}

@ -0,0 +1,279 @@
package com.example.haiwei_mom.data.check;
public class QmsTaskItemBeen {
/**
* inspectionId : 1948615722050088962
* planDetailId : 12
* inspectionNo : ZL202507250008
* templateId : 30001
* materialCode : 014001200
* materialType : null
* materialName : 12.00R2020PRKT216
* processName :
* stationName : 001
* inspectionQty : 1.00
* qualifiedQty : null
* unqualifiedQty : null
* result : null
* workshop : null
* inspectionType : 6
* status : 0
* inspector : null
* shift :
* team :
* inspectionStartTime : 2025-07-21 00:00:00
* inspectionEndTime : null
* productionOrder : 20250724104058PL0009
* batchNo : null
* barcode : 20250724LH001010015
* supplierName : null
* remark : null
* templateName :
*/
private String inspectionId;
private String planDetailId;
private String inspectionNo;
private String templateId;
private String materialCode;
private String materialType;
private String materialName;
private String processName;
private String stationName;
private String inspectionQty;
private String qualifiedQty;
private String unqualifiedQty;
private String result;
private String workshop;
private String inspectionType;
private String status;
private String inspector;
private String shift;
private String team;
private String inspectionStartTime;
private String inspectionEndTime;
private String productionOrder;
private String batchNo;
private String barcode;
private String supplierName;
private String remark;
private String templateName;
public String getInspectionId() {
return inspectionId;
}
public void setInspectionId(String inspectionId) {
this.inspectionId = inspectionId;
}
public String getPlanDetailId() {
return planDetailId;
}
public void setPlanDetailId(String planDetailId) {
this.planDetailId = planDetailId;
}
public String getInspectionNo() {
return inspectionNo;
}
public void setInspectionNo(String inspectionNo) {
this.inspectionNo = inspectionNo;
}
public String getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialType() {
return materialType;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getProcessName() {
return processName;
}
public void setProcessName(String processName) {
this.processName = processName;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getInspectionQty() {
return inspectionQty;
}
public void setInspectionQty(String inspectionQty) {
this.inspectionQty = inspectionQty;
}
public String getQualifiedQty() {
return qualifiedQty;
}
public void setQualifiedQty(String qualifiedQty) {
this.qualifiedQty = qualifiedQty;
}
public String getUnqualifiedQty() {
return unqualifiedQty;
}
public void setUnqualifiedQty(String unqualifiedQty) {
this.unqualifiedQty = unqualifiedQty;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getWorkshop() {
return workshop;
}
public void setWorkshop(String workshop) {
this.workshop = workshop;
}
public String getInspectionType() {
return inspectionType;
}
public void setInspectionType(String inspectionType) {
this.inspectionType = inspectionType;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getInspector() {
return inspector;
}
public void setInspector(String inspector) {
this.inspector = inspector;
}
public String getShift() {
return shift;
}
public void setShift(String shift) {
this.shift = shift;
}
public String getTeam() {
return team;
}
public void setTeam(String team) {
this.team = team;
}
public String getInspectionStartTime() {
return inspectionStartTime;
}
public void setInspectionStartTime(String inspectionStartTime) {
this.inspectionStartTime = inspectionStartTime;
}
public String getInspectionEndTime() {
return inspectionEndTime;
}
public void setInspectionEndTime(String inspectionEndTime) {
this.inspectionEndTime = inspectionEndTime;
}
public String getProductionOrder() {
return productionOrder;
}
public void setProductionOrder(String productionOrder) {
this.productionOrder = productionOrder;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getBarcode() {
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
}
public String getSupplierName() {
return supplierName;
}
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
}

@ -73,7 +73,7 @@ public class FeedingMaterialsActivity extends BaseActivity {
private void selectMachineStationList() {
OkGo.<MyResult>post(url + "/wms/pda/selectMachineStationList")
.params("machineId", SharedPreferencesUtils.getLong("machineId", 0L))
.params("machineId", SharedPreferencesUtils.getstring("machineNo", ""))
.execute(new MyRecultCall(dialog, this) {
@Override
@ -104,6 +104,7 @@ public class FeedingMaterialsActivity extends BaseActivity {
machinePlan.setBarCode(data);
// }
machinePlan.setStationCode(binding.feedingSelectStation.getSelectedItem().toString());
machinePlan.setUserName(SharedPreferencesUtils.getstring("user", "admin"));
OkGo.<MyResult>post("http://" + SharedPreferencesUtils.getstring("machineIp", null) +
"/api/semi_product/scan")
// .params("machineNo", machineNo)
@ -115,7 +116,9 @@ public class FeedingMaterialsActivity extends BaseActivity {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
machinePlan = gson.fromJson(body.getDataJson(), MachinePlan.class);
MachinePlan machinePlan1 = gson.fromJson(body.getDataJson(), MachinePlan.class);
machinePlan.setWorkCode(machinePlan1.getWorkCode());
machinePlan.setStationCode(machinePlan1.getStationCode());
binding.setData(machinePlan);
binding.feedingBarCode.setText(null);
// Toast.makeText(FeedingMaterialsActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();

@ -12,6 +12,15 @@ public class MachinePlan {
private String from;
private String barCode;
private String workCode;
private String UserName;
public String getUserName() {
return UserName;
}
public void setUserName(String userName) {
UserName = userName;
}
public String getStationCode() {
return stationCode;

@ -1,6 +1,5 @@
package com.example.haiwei_mom.qm;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
@ -16,21 +15,23 @@ import com.example.haiwei_mom.adapter.CheckAdapter;
import com.example.haiwei_mom.base.BaseActivity;
import com.example.haiwei_mom.base.MyRecultCall;
import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.databinding.ActivityCheckBinding;
import com.example.haiwei_mom.databinding.ActivityCheckLtBinding;
import com.example.haiwei_mom.qm.data.CheckViewModel;
import com.example.haiwei_mom.qm.data.DefectBeen;
import com.example.haiwei_mom.qm.data.QcTaskInfo;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import okhttp3.RequestBody;
public class CheckActivity extends BaseActivity implements CheckAdapter.CheckItemClickCall/*, AdapterView.OnItemClickListener*/, OnOptionsSelectListener/*, RepaitSubmintInfoAdapter.CheckItemClickCall*/ {
public class LtCheckActivity extends BaseActivity implements CheckAdapter.CheckItemClickCall/*, AdapterView.OnItemClickListener*/, OnOptionsSelectListener/*, RepaitSubmintInfoAdapter.CheckItemClickCall*/ {
private CheckViewModel checkViewModel;
// private RepairSubmintInfoDialog tipDialog;
@ -48,7 +49,7 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityCheckBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_check);
ActivityCheckLtBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_check_lt);
checkViewModel = new CheckViewModel();
binding.setVm(checkViewModel);
checkAdapter = new CheckAdapter(this, this);
@ -68,6 +69,7 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
selectGoodsInfo(code);
}
private String taskId;
// 查询物料
public void selectGoodsInfo(String code) {
OkGo.<MyResult>get(url + "/api/pdaApi/getMaterialInfo").tag(this)
@ -80,6 +82,8 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
var result = response.body();
if (result.getCode() == 200) {
QcTaskInfo qcTaskInfo=gson.fromJson(result.getDataJson(),QcTaskInfo.class);
taskId = qcTaskInfo.getTaskId();
checkViewModel.setName(qcTaskInfo.getMaterialName());
initOptionpb( qcTaskInfo.getOperation());
/* checkViewModel.setName(result.getMsg());
@ -113,21 +117,27 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
public void checkSubmint(View view) {
if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return;
Toast.makeText(context, "质检完成", Toast.LENGTH_SHORT).show();
finish();
/* checkViewModel.setList(submitList);
checkViewModel.setMeasure(submitList.isEmpty() ? "3" : "1");
checkViewModel.setUserName(SharedPreferencesUtils.getstring("loginName", "pda01"));
checkViewModel.setTeamCode(SharedPreferencesUtils.getstring("teamCode", null));
OkGo.<MyResult>post(url + "/api/checkSubmit").tag(this).upRequestBody(RequestBody.create(JSON, gson.toJson(checkViewModel))).execute(new MyRecultCall(dialog, this) {
public void checkSubmintN(View view) {
submit("N");
}
public void checkSubmintY(View view) {
submit("Y");
}
public void submit(String result) {
if (taskId == null || taskId.isEmpty()) return;
Map<String,String> map=new HashMap<>();
map.put("taskId",taskId);
map.put("result",result);
OkGo.<MyResult>post(url + "/api/pdaApi/savePdaInspectionTask")
.upRequestBody(RequestBody.create(JSON, gson.toJson(map)))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var result = response.body();
if (result.getCode() == 200) {
Toast.makeText(CheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
Toast.makeText(LtCheckActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
checkViewModel.setCode(null);
checkViewModel.setName(null);
checkViewModel.setDefect(null);
@ -136,10 +146,10 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
checkAdapter.notifyDataSetChanged();
// initStationSum();
} else {
Toast.makeText(CheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
Toast.makeText(LtCheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
}
}
});*/
});
}
// 删除缺陷
@ -153,20 +163,21 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
// 初始化-联动选择
private void initOptionpb(String stationCode) {
opv = new OptionsPickerBuilder(this, this).build();
OkGo.<MyResult>get(url + "/api/pdaApi/getDefectDetail")
OkGo.<MyResult>post(url + "/api/pdaApi/getDefectDetail")
// .params("defectType", "BZP_DEFECT")
.params("defectType", stationCode).execute(new MyRecultCall(dialog, this) {
.params("operationCode", stationCode).execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
Log.e("TAG", "onSuccess:" + body.toString());
if (body.getCode() == 200) {
Toast.makeText(CheckActivity.this, "请求成功", Toast.LENGTH_SHORT).show();
Toast.makeText(LtCheckActivity.this, "请求成功", Toast.LENGTH_SHORT).show();
list = gson.fromJson(gson.toJson(body.getData()), new TypeToken<List<DefectBeen>>() {
}.getType());
if (list == null || list.isEmpty()) {
Toast.makeText(CheckActivity.this, "缺陷列表没有维护", Toast.LENGTH_SHORT).show();
Toast.makeText(LtCheckActivity.this, "缺陷列表没有维护", Toast.LENGTH_SHORT).show();
return;
}
options1 = new ArrayList<>(list.size());
@ -202,7 +213,7 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
// opv.setPicker(options1, options2, options3);
opv.setPicker(options1);
} else {
Toast.makeText(CheckActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
Toast.makeText(LtCheckActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
}
}

@ -1,14 +1,13 @@
package com.example.haiwei_mom.wms.raw;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.widget.EditText;
import androidx.databinding.DataBindingUtil;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.adapter.RawOutDetailAdapter;
import com.example.haiwei_mom.base.BaseActivity;
@ -34,12 +33,14 @@ public class RawOutActivity extends BaseActivity implements View.OnFocusChangeLi
private EditText focusView;
private boolean sanState = true;
private RawOutSubmitBeen submitBeen;
@SuppressLint("ClickableViewAccessibility")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_raw_out);
binding.setTitle(getIntent().getStringExtra("title"));
rawOutCodeView = binding.rawOutCode;
rawOutCodeView.setOnTouchListener((v, event) -> {
if (event.getAction() == MotionEvent.ACTION_UP) {
@ -105,7 +106,6 @@ public class RawOutActivity extends BaseActivity implements View.OnFocusChangeLi
}
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {

@ -4,140 +4,202 @@
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="vm"
type="com.example.haiwei_mom.qm.data.CheckViewModel" />
type="com.example.haiwei_mom.data.check.CheckResult" />
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckWorkAdapter" />
<import type="android.view.View"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".qm.CheckActivity">
tools:context=".check.CheckActivity">
<include
layout="@layout/toolbar"
app:title="@{title}" />
app:title='@{title??"物料检验"}' />
<LinearLayout
android:id="@+id/check_search_linear"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="产品条码:" />
android:layout_height="45dp"
android:layout_margin="8dp"
android:background="@drawable/san_text_bg"
android:padding="4dp">
<EditText
android:id="@+id/check_goods_code"
style="@style/text_san"
android:id="@+id/check_search_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:imeOptions="actionSearch"
android:inputType="text"
android:lines="1"
android:text="@={vm.code}" />
android:layout_weight="1"
android:paddingLeft="10dp"
android:background="@color/white"
android:hint="请 输入/扫描 物料条码" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="checkSearch"
android:src="@mipmap/ic_search" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp"
android:orientation="horizontal">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="产品型号:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{vm.name}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:layout_height="45dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="选择缺陷:" />
android:text="检验规则:" />
<TextView
style="@style/text_info"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawableEnd="@mipmap/icon_select"
android:onClick="checkSelect"
android:paddingEnd="10dp"
android:text="@{vm.defect}"/>
<!-- <TextView-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:background="@drawable/text_bg_g"-->
<!-- android:gravity="center"-->
<!-- android:onClick="selectRepair"-->
<!-- android:text="显示\n返修"-->
<!-- android:textColor="@color/white"-->
<!-- android:textSize="15sp"-->
<!-- android:textStyle="bold"-->
<!-- android:visibility="@{vm.buttonVisbleState? View.VISIBLE : View.GONE}" />-->
</LinearLayout>
<TextView
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:text="缺陷详情"
android:textColor="@color/blue" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkRuleName}" />
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验方式:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.checkMode==null?"":(vm.checkMode+"("+vm.checkSample+"%)")}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="物料编号:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialCode}" />
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="物料名称:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验类型:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkMode}" />
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验状态:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkStatus}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_marginTop="10dp"
android:background="@color/white"
android:paddingLeft="5dp"
android:paddingRight="5dp">
<TextView
style="@style/item_title"
android:layout_width="35dp"
android:layout_height="match_parent"
android:text="序号" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="项目名称" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="值" />
<TextView
style="@style/item_title"
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="结果" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter}"
android:background="@color/white"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<Button
style="@style/button_style"
android:layout_width="200dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:onClick="checkSubmint"
android:text="提交" />
android:layout_margin="12dp"
android:visibility="@{vm.visbleStatus ? View.VISIBLE :View.GONE }"
android:text="提交"
android:onClick="checkSubmit"
style="@style/button_style"/>
</LinearLayout>
</layout>

@ -0,0 +1,224 @@
<?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"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="vm"
type="com.example.haiwei_mom.data.check.CheckDisposalBeen" />
<variable
name="adapter1"
type="com.example.haiwei_mom.adapter.check.DisposalFileAdapter" />
<variable
name="adapter2"
type="com.example.haiwei_mom.adapter.check.DisposalInfoAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context=".check.CheckDisposalActivity">
<include
layout="@layout/toolbar"
app:title='@{title??"不合格处置"}' />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginStart="40dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="40dp">
<TextView
style="@style/item_title"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="检验方式:" />
<TextView
style="@style/item_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.checkMode==null?"":(vm.checkMode+"("+vm.checkSample+"%)")}' />
<TextView
style="@style/item_title"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="检验类型:" />
<TextView
style="@style/item_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkRuleType}"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp">
<TextView
style="@style/item_title"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料编号:" />
<TextView
style="@style/item_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialCode}" />
<TextView
style="@style/item_title"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="物料名称:" />
<TextView
style="@style/item_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp">
<TextView
style="@style/item_title"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="批次数量:" />
<TextView
style="@style/item_info"
android:layout_width="95dp"
android:layout_height="match_parent"
android:paddingLeft="40dp"
android:text="@{String.valueOf(vm.batchAmount)}" />
<TextView
style="@style/item_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="质检通过数量:" />
<TextView
style="@style/item_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{String.valueOf(vm.passAmount)}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp">
<TextView
style="@style/item_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="质检不通过数量:" />
<TextView
style="@style/item_info"
android:layout_width="55dp"
android:layout_height="match_parent"
android:text="@{String.valueOf(vm.failAmount)}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="8dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="8dp"
android:background="@color/item_bg" />
<TextView
style="@style/item_title"
android:layout_width="40dp"
android:layout_height="35dp"
android:layout_marginStart="40dp"
android:text="图片:"
app:layout_constraintStart_toStartOf="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
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter1}"
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
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="8dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="8dp"
android:background="@color/item_bg" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter2}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<Button
style="@style/button_style"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_margin="20dp"
android:onClick="checkDisposalSubmit"
android:text="提交"/>
</LinearLayout>
</layout>

@ -0,0 +1,155 @@
<?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"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="vm"
type="com.example.haiwei_mom.qm.data.CheckViewModel" />
<import type="android.view.View" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".qm.LtCheckActivity">
<include
layout="@layout/toolbar"
app:title="@{title}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="产品条码:" />
<EditText
android:id="@+id/check_goods_code"
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:imeOptions="actionSearch"
android:inputType="text"
android:lines="1"
android:text="@={vm.code}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp"
android:orientation="horizontal">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="产品型号:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{vm.name}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="选择缺陷:" />
<TextView
style="@style/text_info"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawableEnd="@mipmap/icon_select"
android:onClick="checkSelect"
android:paddingEnd="10dp"
android:text="@{vm.defect}" />
<!-- <TextView-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="match_parent"-->
<!-- android:background="@drawable/text_bg_g"-->
<!-- android:gravity="center"-->
<!-- android:onClick="selectRepair"-->
<!-- android:text="显示\n返修"-->
<!-- android:textColor="@color/white"-->
<!-- android:textSize="15sp"-->
<!-- android:textStyle="bold"-->
<!-- android:visibility="@{vm.buttonVisbleState? View.VISIBLE : View.GONE}" />-->
</LinearLayout>
<TextView
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:text="缺陷详情"
android:textColor="@color/blue" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="10dp">
<Button
style="@style/button_style"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="checkSubmintY"
android:text="合格" />
<Button
style="@style/button_style"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="checkSubmintN"
android:layout_marginStart="20dp"
android:text="不合格提交" />
</LinearLayout>
</LinearLayout>
</layout>

@ -0,0 +1,46 @@
<?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"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckSelectAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".check.CheckSelectActivity"
android:orientation="vertical">
<include
layout="@layout/toolbar"
app:title='@{title??"物料检验列表"}' />
<Spinner
android:id="@+id/checkSelectItemSelect"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:entries="@array/checktype"
android:background="@drawable/spinner_bg" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adapter="@{adapter}"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</layout>

@ -0,0 +1,138 @@
<?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"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="adapter"
type="com.example.haiwei_mom.adapter.check.CheckSelectDetalAdapter" />
<variable
name="vm"
type="com.example.haiwei_mom.data.check.CheckResultDetailVo" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".check.CheckSelectDetalActivity">
<include
layout="@layout/toolbar"
app:title='@{title??"物料检验列表"}' />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="5dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="批次数量:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{String.valueOf(vm.batchAmount)}" />
<TextView
style="@style/text_title"
android:layout_width="140dp"
android:layout_height="match_parent"
android:text="质检通过数量:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{String.valueOf(vm.passAmount)}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="5dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="检验方式:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="16sp"
android:text='@{vm.checkMode==null?"":(vm.checkMode+"("+vm.checkSample+"%)")}' />
<TextView
style="@style/text_title"
android:layout_width="140dp"
android:layout_height="match_parent"
android:text="质检未通过数量:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{String.valueOf(vm.failAmount)}" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter}"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout
android:layout_width="350dp"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:orientation="horizontal">
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginEnd="20dp"
android:onClick="checkSelectSubmit2"
android:text="质检通过" />
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginStart="20dp"
android:onClick="checkSelectSubmit3"
android:text="质检不通过" />
</LinearLayout>
</LinearLayout>
</layout>

@ -99,7 +99,7 @@
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="扫描批次码:" />
android:text="扫描物料:" />
<EditText
android:id="@+id/raw_out_goods"

@ -5,16 +5,16 @@
<variable
name="vm"
type="com.example.haiwei_mom.data.check.CheckResult" />
type="com.example.haiwei_mom.data.check.QmsTaskItemBeen" />
</data>
<LinearLayout
android:id="@+id/check_select_click"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/san_text_bg"
android:orientation="vertical"
android:layout_marginTop="5dp"
android:padding="5dp">
<LinearLayout
@ -25,28 +25,59 @@
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='@{vm.checkRuleType.equals("来料检验")?"采购单号":"销售订单"}'
/>
android:text='检测类型' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.checkRuleType.equals("来料检验")?vm.poNo:vm.saleorderCode}' />
android:text='@{vm.inspectionType}' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="批次号:" />
android:text="生产日期:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.materialBatch}" />
android:text="null" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text='派工单号' />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.inspectionNo}' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="工序名称:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.processName}" />
</LinearLayout>
@ -90,27 +121,59 @@
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="检验类型:" />
android:text="物料规格:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.checkRuleType }' />
android:text='null' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="检验状态:" />
android:text="物料类型:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.checkStatus}" />
android:text="null" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="批次号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text='@{vm.batchNo }' />
<TextView
style="@style/item_title_blue"
android:layout_width="70dp"
android:layout_height="match_parent"
android:text="条码号:" />
<TextView
style="@style/item_text_13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@{vm.barcode}" />
</LinearLayout>

@ -6,4 +6,14 @@
<item></item>
<item></item>
</string-array>
<string-array name="checktype">
<item>选择检验类型</item>
<item>来料检验</item>
<item>半成品检验</item>
<item>成品检验</item>
<item>工序检验</item>
<item>所有</item>
</string-array>
</resources>
Loading…
Cancel
Save