修改 完成维修的查看新增的部分显示问题

master
wanghao 5 days ago
parent a76d021c15
commit f48ab4e4d3

@ -77,13 +77,19 @@ public class DeviceRepairInfoActivity extends BaseActivity {
initRequest("dms_device_design_operations");
} else {// 显示完成
if (deviceRepair.getBillsStatus().equals("1")) {
binding.setSubmitState(true);
} else if (deviceRepair.getApproveStatus() != null &&
deviceRepair.getBillsStatus().equals("0") &&
deviceRepair.getApproveStatus().equals("2")) {
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);
}
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<MyResult> response) {
if (response.body().getCode() == 200) {
binding.setSubmitState(true);
binding.setOverState(true);
binding.setStartState(false);
}
}

@ -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.<MyResult>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.<MyResult>get(url+"/dms/mobile/getBillsFaultInstance4Repair/"+repairInstanceId)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.execute(new MyRecultCall(dialog,this){

@ -17,6 +17,10 @@
name="startState"
type="Boolean" />
<variable
name="overState"
type="Boolean" />
<variable
name="submitState"
type="Boolean" />
@ -27,6 +31,7 @@
<variable
name="adapter1"
type="com.example.jingyuan_mes.adapter.check.DisposalFileAdapter" />
<variable
name="adapter2"
type="com.example.jingyuan_mes.adapter.check.DisposalFileAdapter" />
@ -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}">
<TextView
style="@style/text_title"
@ -502,7 +507,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/button_bg"
android:onClick="addRepairPart"
android:text="添加" />
@ -547,25 +551,27 @@
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:padding="5dp"
android:layout_height="300dp"
android:adapter="@{partAdapter}"
android:background="@color/white"
android:padding="5dp"
android:visibility="@{submitState?View.VISIBLE:View.GONE}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<TextView
style="@style/text_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="添加维修完成图片"
android:visibility="@{submitState?View.VISIBLE:View.GONE}"
android:textColor="@color/blue" />
android:text="维修完成图片"
android:textColor="@color/blue"
android:visibility="@{submitState?View.VISIBLE:View.GONE}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@color/white"
android:visibility="@{submitState?View.VISIBLE:View.GONE}"
android:orientation="horizontal">
android:orientation="horizontal"
android:visibility="@{submitState?View.VISIBLE:View.GONE}">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
@ -581,8 +587,10 @@
android:layout_width="50dp"
android:layout_height="match_parent"
android:onClick="overRepairTackphoto"
android:src="@mipmap/ic_add_file" />
android:src="@mipmap/ic_add_file"
android:visibility="@{overState?View.VISIBLE:View.GONE}" />
</LinearLayout>
<Button
style="@style/button_style"
android:layout_width="match_parent"
@ -590,7 +598,7 @@
android:layout_margin="20dp"
android:onClick="endRepair"
android:text="维修完成"
android:visibility="@{submitState &amp; !visState?View.VISIBLE:View.GONE}" />
android:visibility="@{overState?View.VISIBLE:View.GONE}" />
<Button
style="@style/button_style"

Loading…
Cancel
Save