|
|
@@ -54,6 +54,7 @@ import com.uas.collection.bean.ResourcesBean;
|
|
|
import com.uas.collection.bean.StorageRechargeAloneBean;
|
|
|
import com.uas.collection.bean.TestcollectDataBean;
|
|
|
import com.uas.collection.camera.CaptureActivity;
|
|
|
+import com.uas.collection.camera.CodeUtils;
|
|
|
import com.uas.collection.global.GloableParams;
|
|
|
import com.uas.collection.tools.SharedPreUtil;
|
|
|
import com.uas.collection.util.CameraUtil;
|
|
|
@@ -139,7 +140,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
private RecyclerView rv_dataclassify;
|
|
|
private ArrayList<StorageRechargeAloneBean> passclassify;
|
|
|
private ClassifyAdapter classifyAdapter;
|
|
|
-
|
|
|
+ private ClearableEditText tv_newxin;
|
|
|
+ private ImageView storage_recharge_scan_iv;
|
|
|
+ private static final int SCAN_BARCODE_CODE = 111;
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_breakdownrepair;
|
|
|
@@ -174,6 +177,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
mSmartTable = root.findViewById(R.id.jlt_storage_in_filter_list_st);
|
|
|
rv_datapassqty = root.findViewById(R.id.rv_datapassqty);
|
|
|
rv_dataclassify = root.findViewById(R.id.rv_dataclassify);
|
|
|
+ tv_newxin = root.findViewById(R.id.tv_newxin);
|
|
|
+ storage_recharge_scan_iv = root.findViewById(R.id.storage_recharge_scan_iv);
|
|
|
// ce_length.setEnabled(false);
|
|
|
// ce_length.setFocusable(false);
|
|
|
// ce_length.setKeyListener(null);//重点
|
|
|
@@ -425,6 +430,28 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
tv_dc_emcode.requestFocus();
|
|
|
}
|
|
|
});
|
|
|
+ storage_recharge_scan_iv.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ tv_newxin.requestFocus();
|
|
|
+ if (CameraUtil.hasCamera()) {
|
|
|
+ if (root.findFocus() != null) {
|
|
|
+ mFocusId = root.findFocus().getId();
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.setClass(mActivity, CaptureActivity.class);
|
|
|
+ startActivityForResult(intent, SCAN_BARCODE_CODE);
|
|
|
+ SharedPreUtil.saveString(mActivity, Constants.STORAGEERECHADD, "NO");
|
|
|
+ } else {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择您要操作的输入框");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
stringList = new ArrayList<>();
|
|
|
//保存
|
|
|
tv_save.setOnClickListener(new View.OnClickListener() {
|
|
|
@@ -896,6 +923,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
object_1.put("SR_LOCATION", alonedatatwo);
|
|
|
}
|
|
|
|
|
|
+ }else if (alonedata.equals("弹片")||alonedata.equals("误测")||alonedata.equals("DC线")){
|
|
|
+ alonedatatwo = alonedata;
|
|
|
+ object_1.put("SR_LOCATION", alonedatatwo);
|
|
|
}else {
|
|
|
if (StringUtil.isEmpty(selectedItemtwo.get(i).getQtyce())){
|
|
|
Qtycetwo="0";
|
|
|
@@ -975,7 +1005,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
object_1.put("SR_PASSQTY", "0");//通过数量
|
|
|
object_1.put("SR_NGQTY", ec_passqtytrim);//NG数量
|
|
|
object_1.put("SR_TYPE", "性能维修");//种类(数据采集/、外观维修/性能维修)
|
|
|
- object_1.put("SR_SN", "");//SN号
|
|
|
+ object_1.put("SR_SN", tv_newxin.getText().toString().trim());//SN号
|
|
|
object_1.put("SR_REMARK", "");//备注/其他
|
|
|
object_1.put("SR_INMAN", "");//录入人
|
|
|
object_1.put("SR_INDATE", "");//录入时间
|
|
|
@@ -1025,6 +1055,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
setAdapterthree(mFeededListthree);
|
|
|
setAdapterqtytwo(passFeededListQty);
|
|
|
setclassifyAdapter(passclassify);
|
|
|
+ tv_newxin.setText("");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -1059,13 +1090,11 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("起机慢");
|
|
|
list.add("短路");
|
|
|
list.add("OCP不保护");
|
|
|
- list.add("电压跳变");
|
|
|
- list.add("拐点不良");
|
|
|
+ list.add("指示灯不亮");
|
|
|
list.add("耐压不良");
|
|
|
list.add("绝缘电阻");
|
|
|
list.add("误测");
|
|
|
list.add("能效不良");
|
|
|
- list.add("DC短路");
|
|
|
list.add("纹波小");
|
|
|
list.add("其他");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
@@ -1126,10 +1155,12 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("R");
|
|
|
list.add("LF");
|
|
|
list.add("LED");
|
|
|
- list.add("RT");
|
|
|
+ list.add("Q");
|
|
|
list.add("EC");
|
|
|
list.add("USB");
|
|
|
list.add("DC线");
|
|
|
+ list.add("弹片");
|
|
|
+ list.add("误测");
|
|
|
list.add("其他");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
@@ -1194,6 +1225,8 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
list.add("短路");
|
|
|
list.add("不出脚");
|
|
|
list.add("错件");
|
|
|
+ list.add("断板");
|
|
|
+ list.add("板卡歪");
|
|
|
list.add("其他");
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
@@ -1374,6 +1407,7 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
private void getlineDataList(){
|
|
|
List<String> linelist=new ArrayList<>();
|
|
|
+ linelist.add("检焊目检");
|
|
|
linelist.add("插件测试");
|
|
|
linelist.add("线材目检");
|
|
|
linelist.add("组装测试");
|
|
|
@@ -1742,6 +1776,9 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
if (mList.get(i).getAlonedata().equals("其他")){
|
|
|
(( SelectAdaptertwo.ListItemViewHolder) holder).ce_other.setVisibility(View.VISIBLE);
|
|
|
(( SelectAdaptertwo.ListItemViewHolder) holder).line_vis.setVisibility(View.GONE);
|
|
|
+ }else if (mList.get(i).getAlonedata().equals("弹片")||mList.get(i).getAlonedata().equals("误测")||mList.get(i).getAlonedata().equals("DC线")){
|
|
|
+ (( SelectAdaptertwo.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
+ (( SelectAdaptertwo.ListItemViewHolder) holder).line_vis.setVisibility(View.GONE);
|
|
|
}else {
|
|
|
(( SelectAdaptertwo.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
|
|
|
(( SelectAdaptertwo.ListItemViewHolder) holder).line_vis.setVisibility(View.VISIBLE);
|
|
|
@@ -2423,6 +2460,15 @@ public class BreakdownRepairFragment extends BaseFragment{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (requestCode == SCAN_BARCODE_CODE && data != null) {
|
|
|
+ if (data.getExtras() != null) {
|
|
|
+ String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
|
|
|
+ if (mFocusId == R.id.ce_de_code) {
|
|
|
+ tv_newxin.setText(result);
|
|
|
+ tv_newxin.setSelection(result.length());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|