完成 保修页面

master
wangh 9 months ago
parent 0480045421
commit 37ad8fa7b8

@ -7,14 +7,16 @@
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" /> <!-- //震动权限 -->
<uses-permission android:name="android.permission.VIBRATE" /> <!-- //外部存储器权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" /> <!-- 相机权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<application
android:name=".base.MyApplication"
@ -40,14 +42,12 @@
</provider>
<activity
android:name=".check.CheckDisposalActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
android:name=".device.BxActivity"
android:exported="false" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".check.CheckDisposalActivity"
android:exported="true" />
<activity
android:name=".check.CheckSelectDetalActivity"
android:exported="false" />
@ -96,10 +96,10 @@
<activity
android:name=".HomePageActivity"
android:exported="true">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".store.MaterialOutListActivity"
@ -111,10 +111,6 @@
android:name=".MainActivity"
android:exported="true">
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
</application>

@ -14,6 +14,7 @@ import com.example.jingyuan_mes.base.MyResult;
import com.example.jingyuan_mes.check.CheckActivity;
import com.example.jingyuan_mes.check.CheckSelectActivity;
import com.example.jingyuan_mes.databinding.ActivityHomePageBinding;
import com.example.jingyuan_mes.device.BxActivity;
import com.example.jingyuan_mes.entity.MenuBeen;
import com.example.jingyuan_mes.entity.store.PdaRouters;
import com.example.jingyuan_mes.store.AssemblyOutActivity;
@ -69,6 +70,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("物料质检", CheckActivity.class);
map.put("物料质检列表", CheckSelectActivity.class);
map.put("不合格处置", CheckSelectActivity.class);
map.put("故障报修", BxActivity.class);
}
private void initRequest() {

@ -31,7 +31,7 @@ public class BaseActivity extends AppCompatActivity {
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
private MyReceiver myReceiver;
public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjNkMjIxYzYzLWEyZGEtNDFlZi1iZjRmLWVlNjQwNTQxNmM5YyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.erdvjHcWd6JDpy854nPauWeHdksSkIiv-GeRrpCjpdMBI5enOE-17ayCmTduS71_8Dg9DGtR4ZBLjLiwpuu9Jg";
public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjA4MGY0Yjc2LWYxM2EtNDM5ZC1hYTE4LTNhYjdhMzU2OTU0NiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.x3TIVswwbxV6hbV5ZUgVX2D2pxvZgHW0jN0y-NvgfipcHaaEkLak_ZeTwAdg3YMrm8GMNbHMb8_LoqEhLrjbzA";
public Context context;
public SimpleDateFormat format= new SimpleDateFormat( "yyyyMMdd_HHmmss");
@Override

@ -115,6 +115,7 @@ public class CheckDisposalActivity extends BaseActivity implements DisposalFileA
return;
}
filesList.remove(position);
files.remove(position);
fileAdapter.notifyDataSetChanged();
}

@ -87,6 +87,7 @@ public class CheckSelectActivity extends BaseActivity implements ItemClickCall {
var checkResult = list.get(position);
var checkResultId = checkResult.getCheckResultId();
var checkMode = checkResult.getCheckModeText();
Log.e("TAG", "onClick:" + checkMode);
var checkSample = checkResult.getCheckSample();
var materialBatch = checkResult.getMaterialBatch();
intent1.putExtra("checkResultId", checkResultId);

@ -0,0 +1,18 @@
package com.example.jingyuan_mes.device;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.base.BaseActivity;
public class BxActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DataBindingUtil. setContentView(this,R.layout.activity_bx);
}
}

@ -1,6 +1,9 @@
package com.example.jingyuan_mes.entity.check;
import com.bumptech.glide.load.Option;
import java.util.List;
import java.util.Optional;
/**
* @author wanghao
@ -83,8 +86,8 @@ public class CheckDisposalBeen {
}
public String getCheckMode() {
return Optional.ofNullable(checkMode).map(t->t.equals("1") ? "全检" : "抽检").orElse(null);
return checkMode.equals("1") ? "全检" : "抽检";
}
public void setCheckMode(String checkMode) {

@ -0,0 +1,262 @@
<?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="adapter1"
type="com.example.jingyuan_mes.adapter.check.DisposalFileAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".device.BxActivity">
<include
layout="@layout/toolbar"
app:title='@{title??"故障报修"}' />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="设备编号:" />
<EditText
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
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="match_parent"
android:layout_height="match_parent"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
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="match_parent"
android:layout_height="match_parent"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
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="match_parent"
android:layout_height="match_parent"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:background="@drawable/text_bg">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:background="@color/activity_bg"
android:text="故障类别:" />
<Spinner
android:layout_width="match_parent"
android:layout_height="match_parent"
android:spinnerMode="dropdown"
android:textAlignment="center" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
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="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:gravity="top|center"
android:text="故障情况:" />
<EditText
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="123" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="设备位置:" />
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RadioButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:enabled="true"
android:text="内部维修" />
<RadioButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="委外维修" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:background="@drawable/text_bg">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:background="@color/activity_bg"
android:text="外协单位:" />
<Spinner
android:layout_width="match_parent"
android:layout_height="match_parent"
android:spinnerMode="dropdown"
android:textAlignment="center" />
</LinearLayout>
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="30dp"
android:text="故障图片:"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter1}"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<ImageView
android:id="@+id/disposal_file_add"
android:layout_width="50dp"
android:layout_height="match_parent"
android:visibility="gone"
android:onClick="dispisalTackphoto"
android:src="@mipmap/ic_add_file"/>
</LinearLayout>
<Button
style="@style/button_style"
android:layout_width="380dp"
android:layout_height="55dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="10dp"
android:layout_gravity="center"
android:text="提交"/>
</LinearLayout>
</layout>
Loading…
Cancel
Save