提交 fb656aa7 authored 作者: lgd's avatar lgd

1.质量分析

2.//TODO ,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,mes质量反馈,编辑任务担当无法修改.
上级 0971ae20
...@@ -1659,7 +1659,14 @@ ...@@ -1659,7 +1659,14 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.analysis.MesAnalysisActivity"
android:configChanges="keyboardHidden|orientation"
android:label="质量分析"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.ui.activity.mes.analysis;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseActivity;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.ui.activity.mes.report.MesReportDetailActivity;
import com.wd.workoffice.ui.adapter.ReportAnalysisBadAdapter;
import com.wd.workoffice.ui.adapter.ReportBadAdapter;
import com.wd.workoffice.ui.adapter.ReportProBadAdapter;
import com.wd.workoffice.ui.adapter.ReportTopAdapter;
import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesAnalysisActivity extends WorkToolBarActivity {
@BindView(R.id.rv_top)
RecyclerView rvTop;
@BindView(R.id.rv_pro_bad)
RecyclerView rvProBad;
@BindView(R.id.ll_report)
LinearLayout llReport;
@Override
protected void initView() {
ButterKnife.bind(this);
rvProBad.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvTop.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
List<Object> topList = new ArrayList<>();
topList.add(null);
topList.add(null);
topList.add(null);
List<Object> proBadList = new ArrayList<>();
proBadList.add(null);
proBadList.add(null);
proBadList.add(null);
ReportTopAdapter topAdapter = new ReportTopAdapter(R.layout.item_mes_report_top, topList);
ReportAnalysisBadAdapter proBadAdapter = new ReportAnalysisBadAdapter(R.layout.item_mes_analysis, proBadList);
topAdapter.bindToRecyclerView(rvTop);
proBadAdapter.bindToRecyclerView(rvProBad);
}
// private void getData() {
// RtfUtils.getMesRtf().searchList("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
// @Override
// public void doOnSubscribe(Disposable d) {
// }
//
// @Override
// public void onFail(String errorMsg) {
// hideLoading();
// toast(errorMsg);
// }
//
// @Override
// public void onSuccess(BaseMesBean data) {
// hideLoading();
// if (!data.isSuccess()) {
// toast(data.getMsg());
// return;
// }
// List<SearchBean.ListBean> getList = JSON.parseObject(data.getData().toString(), SearchBean.class).getList();
// if (page == 1) {
// srlRefresh.finishRefresh();
// dataList.clear();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// dataAdapter.loadMoreComplete();
// } else {
// dataAdapter.loadMoreComplete();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// dataAdapter.loadMoreEnd();
// } else {
// page++;
// }
// }
// }); }
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_analysis;
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.bean.ProductBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class ReportAnalysisBadAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, BaseViewHolder> {
public ReportAnalysisBadAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ProductBean.RecordsBean item) {
}
}
...@@ -7,6 +7,7 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout; ...@@ -7,6 +7,7 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseFg; import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.vo.BatLayoutVo; import com.wd.workoffice.bean.vo.BatLayoutVo;
import com.wd.workoffice.ui.activity.mes.analysis.MesAnalysisActivity;
import com.wd.workoffice.ui.activity.mes.order.MesOrderActivity; import com.wd.workoffice.ui.activity.mes.order.MesOrderActivity;
import com.wd.workoffice.ui.activity.mes.report.MesReportActivity; import com.wd.workoffice.ui.activity.mes.report.MesReportActivity;
import com.wd.workoffice.ui.activity.mes.ticket.MesTicketActivity; import com.wd.workoffice.ui.activity.mes.ticket.MesTicketActivity;
...@@ -98,6 +99,7 @@ public class MesFragment extends WorkBaseFg { ...@@ -98,6 +99,7 @@ public class MesFragment extends WorkBaseFg {
startActivity(MesReportActivity.class); startActivity(MesReportActivity.class);
break; break;
case 2: case 2:
startActivity(MesAnalysisActivity.class);
break; break;
case 3: case 3:
break; break;
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF3F84CD">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_report"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15mm"
android:layout_marginTop="20mm"
app:cardCornerRadius="3dp"
app:cardElevation="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="17mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="废品重量TOP10"
android:textColor="#ff3f84cd"
android:textSize="15sp" />
<LinearLayout
android:layout_width="100mm"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/shape_mes_time"
android:gravity="center"
android:paddingVertical="4mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4mm"
android:text="2019年7月"
android:textColor="#ff637298"
android:textSize="13sp" />
<ImageView
android:layout_width="5mm"
android:layout_height="2mm"
android:scaleType="fitXY"
android:src="@mipmap/mes_time_down" />
</LinearLayout>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20mm" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30mm"
android:layout_marginTop="20mm">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="排名"
android:textColor="@color/white"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="产品名称"
android:textColor="@color/white"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="缺陷类别"
android:textColor="@color/white"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="缺陷数量"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15mm"
android:layout_marginTop="10mm"
app:cardCornerRadius="3dp"
app:cardElevation="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingHorizontal="15mm"
android:paddingVertical="17mm">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_pro_bad"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15mm" android:layout_marginHorizontal="30mm"
android:layout_marginTop="20mm"> android:layout_marginTop="20mm">
<TextView <TextView
...@@ -168,8 +168,7 @@ ...@@ -168,8 +168,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_pro_bad" android:id="@+id/rv_pro_bad"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
android:layout_marginTop="20mm" />
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="12mm">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="排名"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="产品名称"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="缺陷类别"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="缺陷数量"
android:textSize="14sp" />
</LinearLayout>
<View
style="@style/dividerX"
/>
</LinearLayout>
\ No newline at end of file
...@@ -2,28 +2,37 @@ ...@@ -2,28 +2,37 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20mm"> android:background="@color/white"
android:orientation="vertical">
<LinearLayout
<TextView android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:paddingVertical="12mm">
android:gravity="center"
android:text="排名"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="产品名称"
android:textSize="14sp" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="1"
android:text="废品重量(kg)" android:gravity="center"
android:textSize="14sp" /> android:text="排名"
</LinearLayout> android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="产品名称"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="废品重量(kg)"
android:textSize="14sp" />
</LinearLayout>
<View style="@style/dividerX" />
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论