diff --git a/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairInfoActivity.java b/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairInfoActivity.java index c2e29bb..87df603 100644 --- a/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairInfoActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairInfoActivity.java @@ -77,13 +77,19 @@ public class DeviceRepairInfoActivity extends BaseActivity { initRequest("dms_device_design_operations"); } else {// 显示完成 - if (deviceRepair.getBillsStatus().equals("1")) { + var billsStatus = deviceRepair.getBillsStatus(); + if (billsStatus.equals("0")) { + if (deviceRepair.getApproveStatus() != null && deviceRepair.getApproveStatus().equals("2")) { + binding.setStartState(true); + } + } else if (billsStatus.equals("1")) { + binding.setSubmitState(true); + binding.setOverState(true); + } else if (billsStatus.equals("2")) { binding.setSubmitState(true); - } else if (deviceRepair.getApproveStatus() != null && - deviceRepair.getBillsStatus().equals("0") && - deviceRepair.getApproveStatus().equals("2")) { - binding.setStartState(true); } + + deviceRepairPartAdapter = new DeviceRepairPartAdapter(this, position -> { deviceRepair.getParts().remove(position); deviceRepairPartAdapter.notifyDataSetChanged(); @@ -122,8 +128,11 @@ public class DeviceRepairInfoActivity extends BaseActivity { fileAdapter2.setList(overRepairLookList); binding.setAdapter2(fileAdapter2); } + outStrRequest(); // 查询外协 + initFile(); // 初始化图片 + } private void initopeSelect() { @@ -250,6 +259,7 @@ public class DeviceRepairInfoActivity extends BaseActivity { public void onSuccess(Response response) { if (response.body().getCode() == 200) { binding.setSubmitState(true); + binding.setOverState(true); binding.setStartState(false); } } diff --git a/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java b/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java index 04ddcbb..c16fc07 100644 --- a/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/device/DeviceRepairListActivity.java @@ -6,6 +6,7 @@ import androidx.databinding.DataBindingUtil; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; +import android.util.Log; import android.widget.Toast; import com.example.jingyuan_mes.R; @@ -62,6 +63,7 @@ public class DeviceRepairListActivity extends BaseActivity implements DeviceRepa @Override public void clickItemForModify(int index) { var repairInstanceId = list.get(index).getRepairInstanceId(); + Toast.makeText(context, repairInstanceId+"", Toast.LENGTH_SHORT).show(); OkGo.get(url+"/dms/mobile/getBillsFaultInstanceByRepairInstanceId/"+repairInstanceId) .headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")) .execute(new MyRecultCall(dialog,this){ @@ -84,6 +86,7 @@ public class DeviceRepairListActivity extends BaseActivity implements DeviceRepa @Override public void clickItemForSelect(int index) { var repairInstanceId = list.get(index).getRepairInstanceId(); + Toast.makeText(context, repairInstanceId+"", Toast.LENGTH_SHORT).show(); OkGo.get(url+"/dms/mobile/getBillsFaultInstance4Repair/"+repairInstanceId) .headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")) .execute(new MyRecultCall(dialog,this){ diff --git a/app/src/main/res/layout/activity_device_repair_info.xml b/app/src/main/res/layout/activity_device_repair_info.xml index 9d0e440..8e0c512 100644 --- a/app/src/main/res/layout/activity_device_repair_info.xml +++ b/app/src/main/res/layout/activity_device_repair_info.xml @@ -17,6 +17,10 @@ name="startState" type="Boolean" /> + + @@ -27,7 +31,8 @@ - @@ -487,7 +492,7 @@ android:layout_width="match_parent" android:layout_height="45dp" android:layout_marginTop="8dp" - android:visibility="@{submitState?View.VISIBLE:View.GONE}"> + android:visibility="@{overState?View.VISIBLE:View.GONE}"> @@ -547,25 +551,27 @@ + + android:text="维修完成图片" + android:textColor="@color/blue" + android:visibility="@{submitState?View.VISIBLE:View.GONE}" /> + + android:orientation="horizontal" + android:visibility="@{submitState?View.VISIBLE:View.GONE}"> + android:src="@mipmap/ic_add_file" + android:visibility="@{overState?View.VISIBLE:View.GONE}" /> +