增加 原材料入库
parent
8c7bb7532f
commit
8918b063d9
@ -0,0 +1,82 @@
|
||||
package com.example.haiwei_mom.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemLayoutBinding;
|
||||
import com.example.haiwei_mom.qm.data.DefectBeen;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/11/17 17:15
|
||||
*/
|
||||
public class CheckAdapter extends RecyclerView.Adapter<CheckAdapter.CheckAdapterVH> {
|
||||
private Context context;
|
||||
private List<DefectBeen> list;
|
||||
private LayoutInflater from;
|
||||
private CheckItemClickCall checkItemClickCall;
|
||||
|
||||
public CheckAdapter(Context context, CheckItemClickCall checkItemClickCall) {
|
||||
this.context = context;
|
||||
this.checkItemClickCall = checkItemClickCall;
|
||||
from = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<DefectBeen> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public CheckAdapterVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemLayoutBinding inflate1 = DataBindingUtil.inflate(from, R.layout.item_layout, parent, false);
|
||||
return new CheckAdapterVH(inflate1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull CheckAdapterVH holder, int position) {
|
||||
DefectBeen defectBeen = list.get(position);
|
||||
defectBeen.setIndex(position + 1);
|
||||
ItemLayoutBinding databing = holder.getInflate1();
|
||||
databing.setVariable(BR.item, defectBeen);
|
||||
databing.itemButtom.setOnClickListener(t -> {
|
||||
checkItemClickCall.onClick(position);
|
||||
});
|
||||
|
||||
databing.executePendingBindings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list == null ? 0 : list.size();
|
||||
}
|
||||
|
||||
class CheckAdapterVH extends RecyclerView.ViewHolder {
|
||||
private ItemLayoutBinding inflate1;
|
||||
|
||||
public ItemLayoutBinding getInflate1() {
|
||||
return inflate1;
|
||||
}
|
||||
|
||||
public CheckAdapterVH(ItemLayoutBinding inflate1) {
|
||||
super(inflate1.getRoot());
|
||||
this.inflate1 = inflate1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public interface CheckItemClickCall {
|
||||
void onClick(int positon);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,270 @@
|
||||
package com.example.haiwei_mom.qm;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.example.haiwei_mom.R;
|
||||
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.qm.data.CheckViewModel;
|
||||
import com.example.haiwei_mom.qm.data.DefectBeen;
|
||||
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.List;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class CheckActivity extends BaseActivity implements CheckAdapter.CheckItemClickCall/*, AdapterView.OnItemClickListener*/, OnOptionsSelectListener/*, RepaitSubmintInfoAdapter.CheckItemClickCall*/ {
|
||||
private CheckViewModel checkViewModel;
|
||||
|
||||
// private RepairSubmintInfoDialog tipDialog;
|
||||
private CheckAdapter checkAdapter;
|
||||
private List<DefectBeen> list;
|
||||
private List<DefectBeen> submitList;// 提交缺陷列表
|
||||
private OptionsPickerView opv;
|
||||
private List<String> options1;
|
||||
private List<List<String>> options2;
|
||||
private List<List<List<String>>> options3;
|
||||
private List<DefectBeen> topDefects;
|
||||
private String stationCode;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
initView();
|
||||
Intent intent = getIntent();
|
||||
stationCode = intent.getStringExtra("stationCode");
|
||||
// 查询检测
|
||||
initStationSum();
|
||||
checkViewModel.setStationCode(stationCode);
|
||||
// binding.setTitle("质量检测 - " + intent.getStringExtra("stationName"));
|
||||
// 三联
|
||||
initOptionpb(stationCode);
|
||||
// tipDialog = new RepairSubmintInfoDialog(this, this);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
ActivityCheckBinding binding=DataBindingUtil.setContentView(this, R.layout.activity_check);
|
||||
checkViewModel = new CheckViewModel();
|
||||
|
||||
binding.setVm(checkViewModel);
|
||||
checkAdapter = new CheckAdapter(this, this);
|
||||
submitList = new ArrayList<>();
|
||||
checkAdapter.setList(submitList);
|
||||
binding.recyclerView.setAdapter(checkAdapter);
|
||||
|
||||
}
|
||||
|
||||
private void initStationSum() {
|
||||
OkGo.<MyResult>post(url + "/api/pdaQueryQuantityNumber").tag(this)
|
||||
|
||||
.params("stationCode", stationCode)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var result = response.body();
|
||||
if (result.getCode() == 200) {
|
||||
var data = result.getData();
|
||||
if (data !=null){
|
||||
// CheckSum checkSum1= gson.fromJson(data.toString(),CheckSum.class);
|
||||
// checkSum.setQUANTITY_SUM(checkSum1.getQUANTITY_SUM());
|
||||
// checkSum.setREPAIR_SUM(checkSum1.getREPAIR_SUM());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getScannerData(String code) {
|
||||
super.getScannerData(code);
|
||||
|
||||
checkViewModel.setCode(code);
|
||||
OkGo.<MyResult>post(url + "/api/check/query").tag(this)
|
||||
|
||||
.params("code", code)
|
||||
.params("station", stationCode)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var result = response.body();
|
||||
if (result.getCode() == 200) {
|
||||
checkViewModel.setName(result.getMsg());
|
||||
topDefects = gson.fromJson(gson.toJson(result.getData()), new TypeToken<List<DefectBeen>>() {
|
||||
}.getType());
|
||||
if (topDefects == null || topDefects.isEmpty()) {
|
||||
Toast.makeText(CheckActivity.this, "本工位无需检查返修情况", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
checkViewModel.setButtonVisbleState(true);
|
||||
// tipDialog.setList(topDefects);
|
||||
// tipDialog.show();
|
||||
|
||||
/*// 直接添加提交数据中submitList.addAll(defectBeens);
|
||||
checkAdapter.notifyDataSetChanged();*/
|
||||
} else {
|
||||
Toast.makeText(CheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 弹出选择框
|
||||
public void checkSelect(View view) {
|
||||
opv.show();
|
||||
}
|
||||
|
||||
// 弹出返修
|
||||
// public void selectRepair(View view) {
|
||||
// tipDialog.show();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public void checkSubmint1(View view) {
|
||||
getScannerData("B24031483025025351528");
|
||||
} // 提交
|
||||
public void checkSubmint(View view) {
|
||||
if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return;
|
||||
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) {
|
||||
@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();
|
||||
checkViewModel.setCode(null);
|
||||
checkViewModel.setName(null);
|
||||
checkViewModel.setDefect(null);
|
||||
checkViewModel.setButtonVisbleState(false);
|
||||
submitList.clear();
|
||||
checkAdapter.notifyDataSetChanged();
|
||||
initStationSum();
|
||||
} else {
|
||||
Toast.makeText(CheckActivity.this, result.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 删除缺陷
|
||||
@Override
|
||||
public void onClick(int positon) {
|
||||
Log.e("TAG", "列表点击:" + positon);
|
||||
submitList.remove(positon);
|
||||
checkAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
// 初始化-联动选择
|
||||
private void initOptionpb(String stationCode) {
|
||||
opv = new OptionsPickerBuilder(this, this).build();
|
||||
OkGo.<MyResult>get(url + "/base/qualityInspectionItem/getQualityDefects/" + stationCode).tag(this)
|
||||
.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();
|
||||
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();
|
||||
return;
|
||||
}
|
||||
options1 = new ArrayList<>();
|
||||
options2 = new ArrayList<>();
|
||||
options3 = new ArrayList<>();
|
||||
list.forEach(defect -> {
|
||||
String materialCategories = defect.getMaterialCategories();
|
||||
String materialSubclass = defect.getMaterialSubclass();
|
||||
String qualityDefectName = defect.getQualityDefectName();
|
||||
|
||||
if (!options1.contains(materialCategories)) {
|
||||
options1.add(materialCategories);
|
||||
}
|
||||
int index1 = options1.indexOf(materialCategories);
|
||||
if (options2.size() <= index1) {
|
||||
options2.add(new ArrayList<>());
|
||||
}
|
||||
if (!options2.get(index1).contains(materialSubclass)) {
|
||||
options2.get(index1).add(materialSubclass);
|
||||
}
|
||||
int index2 = options2.get(index1).indexOf(materialSubclass);
|
||||
if (options3.size() <= index1) {
|
||||
options3.add(new ArrayList<>());
|
||||
}
|
||||
if (options3.get(index1).size() <= index2) {
|
||||
options3.get(index1).add(new ArrayList<>());
|
||||
}
|
||||
if (!options3.get(index1).get(index2).contains(qualityDefectName)) {
|
||||
options3.get(index1).get(index2).add(qualityDefectName);
|
||||
}
|
||||
});
|
||||
opv.setPicker(options1, options2, options3);
|
||||
} else {
|
||||
Toast.makeText(CheckActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 三联添加
|
||||
@Override
|
||||
public void onOptionsSelect(int options1, int options2, int options3, View v) {
|
||||
String defectName = this.options3.get(options1).get(options2).get(options3);
|
||||
checkViewModel.setDefect(defectName);
|
||||
DefectBeen defectBeen = new DefectBeen();
|
||||
defectBeen.setQualityDefectName(defectName);
|
||||
DefectBeen defectBeen1 = list.get(list.indexOf(defectBeen));
|
||||
if (submitList.contains(defectBeen1)) {
|
||||
Toast.makeText(this, "已经添加了", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
submitList.add(defectBeen1);
|
||||
checkAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
// 返修添加提交数据中
|
||||
// @Override
|
||||
// public void submintRepair(int positon) {
|
||||
// DefectBeen defectBeen = topDefects.get(positon);
|
||||
// if (submitList.contains(defectBeen)) {
|
||||
// Toast.makeText(this, "已经添加了", Toast.LENGTH_SHORT).show();
|
||||
// return;
|
||||
// }
|
||||
// Log.e("TAG", "返修提交的ID:" + defectBeen.getObjId());
|
||||
// submitList.add(defectBeen);
|
||||
// checkAdapter.notifyDataSetChanged();
|
||||
// Toast.makeText(this, "添加成功", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.example.haiwei_mom.qm.data;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/11/17 16:26
|
||||
*/
|
||||
public class CheckViewModel extends BaseObservable {
|
||||
private String code;//产品条码
|
||||
private String name;//产品型号
|
||||
private List<DefectBeen> list;//缺陷列表
|
||||
private String stationCode;//人的工位编码
|
||||
private String userName;
|
||||
private String measure;//处置措施 3=放行,1=返修
|
||||
private String teamCode;//班组编号
|
||||
private boolean buttonVisbleState=false;
|
||||
private String defect;
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public String getMeasure() {
|
||||
return measure;
|
||||
}
|
||||
|
||||
public void setMeasure(String measure) {
|
||||
this.measure = measure;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public String getDefect() {
|
||||
return defect;
|
||||
}
|
||||
|
||||
public void setDefect(String defect) {
|
||||
this.defect = defect;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public List<DefectBeen> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<DefectBeen> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getStationCode() {
|
||||
return stationCode;
|
||||
}
|
||||
|
||||
public void setStationCode(String stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
}
|
||||
|
||||
public boolean isButtonVisbleState() {
|
||||
return buttonVisbleState;
|
||||
}
|
||||
|
||||
public void setButtonVisbleState(boolean buttonVisbleState) {
|
||||
this.buttonVisbleState = buttonVisbleState;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public String getTeamCode() {
|
||||
return teamCode;
|
||||
}
|
||||
|
||||
public void setTeamCode(String teamCode) {
|
||||
this.teamCode = teamCode;
|
||||
}
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
package com.example.haiwei_mom.qm.data;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2023/11/17 17:00
|
||||
*/
|
||||
public class DefectBeen extends BaseObservable {
|
||||
|
||||
|
||||
|
||||
private int index;
|
||||
private int objId;
|
||||
private String materialName;
|
||||
private String materialCategories;
|
||||
private String materialSubclass;
|
||||
|
||||
private String stationCode;
|
||||
private String qualityDefectCode;
|
||||
private String qualityDefectName;
|
||||
private String processResult;//返修结果
|
||||
private String productLineName;//pda 工位名称
|
||||
private String productLineCode;
|
||||
|
||||
private String inspectorTime;
|
||||
|
||||
public String getInspectorTime() {
|
||||
return inspectorTime;
|
||||
}
|
||||
|
||||
public void setInspectorTime(String inspectorTime) {
|
||||
this.inspectorTime = inspectorTime;
|
||||
}
|
||||
|
||||
public String getProductLineCode() {
|
||||
return productLineCode;
|
||||
}
|
||||
|
||||
public void setProductLineCode(String productLineCode) {
|
||||
this.productLineCode = productLineCode;
|
||||
}
|
||||
|
||||
public String getProductLineName() {
|
||||
return productLineName;
|
||||
}
|
||||
|
||||
public void setProductLineName(String productLineName) {
|
||||
this.productLineName = productLineName;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public String getStationCode() {
|
||||
return stationCode;
|
||||
}
|
||||
|
||||
public void setStationCode(String stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
}
|
||||
|
||||
public String getProcessResult() {
|
||||
return processResult;
|
||||
}
|
||||
|
||||
public void setProcessResult(String processResult) {
|
||||
this.processResult = processResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
DefectBeen that = (DefectBeen) o;
|
||||
|
||||
return Objects.equals(qualityDefectName, that.qualityDefectName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return qualityDefectName != null ? qualityDefectName.hashCode() : 0;
|
||||
}
|
||||
|
||||
public int getObjId() {
|
||||
return objId;
|
||||
}
|
||||
|
||||
public void setObjId(int objId) {
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public String getMaterialCategories() {
|
||||
return materialCategories;
|
||||
}
|
||||
|
||||
public void setMaterialCategories(String materialCategories) {
|
||||
this.materialCategories = materialCategories;
|
||||
}
|
||||
|
||||
public String getMaterialSubclass() {
|
||||
return materialSubclass;
|
||||
}
|
||||
|
||||
public void setMaterialSubclass(String materialSubclass) {
|
||||
this.materialSubclass = materialSubclass;
|
||||
}
|
||||
|
||||
public String getQualityDefectCode() {
|
||||
return qualityDefectCode;
|
||||
}
|
||||
|
||||
public void setQualityDefectCode(String qualityDefectCode) {
|
||||
this.qualityDefectCode = qualityDefectCode;
|
||||
}
|
||||
|
||||
public String getQualityDefectName() {
|
||||
return qualityDefectName;
|
||||
}
|
||||
|
||||
public void setQualityDefectName(String qualityDefectName) {
|
||||
this.qualityDefectName = qualityDefectName;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DefectBeen{" +
|
||||
"index=" + index +
|
||||
", objId=" + objId +
|
||||
// ", materialName='" + materialName + '\'' +
|
||||
// ", materialCategories='" + materialCategories + '\'' +
|
||||
// ", materialSubclass='" + materialSubclass + '\'' +
|
||||
", qualityDefectCode='" + qualityDefectCode + '\'' +
|
||||
", qualityDefectName='" + qualityDefectName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
<?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.CheckActivity">
|
||||
|
||||
<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="产品条码:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
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" />
|
||||
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:onClick="checkSubmint"
|
||||
android:text="提交" />
|
||||
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:onClick="checkSubmint1"
|
||||
android:text="test"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<!-- 查询数据 -->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.haiwei_mom.qm.data.DefectBeen" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="#DEE3E6"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_index"
|
||||
style="@style/item_text_style"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text='@{item.index+""}' />
|
||||
|
||||
<View
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_style"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.qualityDefectCode}" />
|
||||
|
||||
<View
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{item.qualityDefectName}" />
|
||||
|
||||
<View
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_buttom"
|
||||
style="@style/item_text_style"
|
||||
android:layout_width="63dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="删除"
|
||||
android:textColor="#E71717" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
Binary file not shown.
After Width: | Height: | Size: 466 B |
Loading…
Reference in New Issue