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

master
wanghao 2 days ago
parent a76d021c15
commit f48ab4e4d3

@ -77,13 +77,19 @@ public class DeviceRepairInfoActivity extends BaseActivity {
initRequest("dms_device_design_operations"); initRequest("dms_device_design_operations");
} else {// 显示完成 } 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); binding.setSubmitState(true);
} else if (deviceRepair.getApproveStatus() != null &&
deviceRepair.getBillsStatus().equals("0") &&
deviceRepair.getApproveStatus().equals("2")) {
binding.setStartState(true);
} }
deviceRepairPartAdapter = new DeviceRepairPartAdapter(this, position -> { deviceRepairPartAdapter = new DeviceRepairPartAdapter(this, position -> {
deviceRepair.getParts().remove(position); deviceRepair.getParts().remove(position);
deviceRepairPartAdapter.notifyDataSetChanged(); deviceRepairPartAdapter.notifyDataSetChanged();
@ -122,8 +128,11 @@ public class DeviceRepairInfoActivity extends BaseActivity {
fileAdapter2.setList(overRepairLookList); fileAdapter2.setList(overRepairLookList);
binding.setAdapter2(fileAdapter2); binding.setAdapter2(fileAdapter2);
} }
outStrRequest(); // 查询外协 outStrRequest(); // 查询外协
initFile(); // 初始化图片 initFile(); // 初始化图片
} }
private void initopeSelect() { private void initopeSelect() {
@ -250,6 +259,7 @@ public class DeviceRepairInfoActivity extends BaseActivity {
public void onSuccess(Response<MyResult> response) { public void onSuccess(Response<MyResult> response) {
if (response.body().getCode() == 200) { if (response.body().getCode() == 200) {
binding.setSubmitState(true); binding.setSubmitState(true);
binding.setOverState(true);
binding.setStartState(false); binding.setStartState(false);
} }
} }

@ -6,6 +6,7 @@ import androidx.databinding.DataBindingUtil;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import com.example.jingyuan_mes.R; import com.example.jingyuan_mes.R;
@ -62,6 +63,7 @@ public class DeviceRepairListActivity extends BaseActivity implements DeviceRepa
@Override @Override
public void clickItemForModify(int index) { public void clickItemForModify(int index) {
var repairInstanceId = list.get(index).getRepairInstanceId(); var repairInstanceId = list.get(index).getRepairInstanceId();
Toast.makeText(context, repairInstanceId+"", Toast.LENGTH_SHORT).show();
OkGo.<MyResult>get(url+"/dms/mobile/getBillsFaultInstanceByRepairInstanceId/"+repairInstanceId) OkGo.<MyResult>get(url+"/dms/mobile/getBillsFaultInstanceByRepairInstanceId/"+repairInstanceId)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")) .headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.execute(new MyRecultCall(dialog,this){ .execute(new MyRecultCall(dialog,this){
@ -84,6 +86,7 @@ public class DeviceRepairListActivity extends BaseActivity implements DeviceRepa
@Override @Override
public void clickItemForSelect(int index) { public void clickItemForSelect(int index) {
var repairInstanceId = list.get(index).getRepairInstanceId(); var repairInstanceId = list.get(index).getRepairInstanceId();
Toast.makeText(context, repairInstanceId+"", Toast.LENGTH_SHORT).show();
OkGo.<MyResult>get(url+"/dms/mobile/getBillsFaultInstance4Repair/"+repairInstanceId) OkGo.<MyResult>get(url+"/dms/mobile/getBillsFaultInstance4Repair/"+repairInstanceId)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")) .headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.execute(new MyRecultCall(dialog,this){ .execute(new MyRecultCall(dialog,this){

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

Loading…
Cancel
Save