提交 0971ae20 authored 作者: lgd's avatar lgd

1.质量报表

2.//TODO ,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,mes质量反馈,编辑任务担当无法修改.
上级 2c77faf1
...@@ -1634,7 +1634,6 @@ ...@@ -1634,7 +1634,6 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity <activity
android:name=".ui.activity.mes.user.MesUserDataConditionActivity" android:name=".ui.activity.mes.user.MesUserDataConditionActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
...@@ -1643,6 +1642,24 @@ ...@@ -1643,6 +1642,24 @@
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.report.MesReportActivity"
android:configChanges="keyboardHidden|orientation"
android:label=""
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.report.MesReportDetailActivity"
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.report;
import android.graphics.Color;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseActivity;
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.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesReportActivity extends WorkBaseActivity {
@BindView(R.id.tv_report)
TextView tvReport;
@BindView(R.id.tv_bad)
TextView tvBad;
@BindView(R.id.tb_title)
Toolbar tbTitle;
@BindView(R.id.rv_top)
RecyclerView rvTop;
@BindView(R.id.rv_pro_bad)
RecyclerView rvProBad;
@BindView(R.id.rv_bad)
RecyclerView rvBad;
@BindView(R.id.ll_report)
LinearLayout llReport;
@BindView(R.id.ll_bad)
LinearLayout llBad;
private ReportBadAdapter badAdapter;
@Override
protected void initView() {
ButterKnife.bind(this);
setSupportActionBar(tbTitle);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
rvBad.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvProBad.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
rvTop.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
List<Object> badList = new ArrayList<>();
badList.add(null);
badList.add(null);
badList.add(null);
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);
badAdapter = new ReportBadAdapter(R.layout.item_mes_report_bad, badList);
ReportTopAdapter topAdapter = new ReportTopAdapter(R.layout.item_mes_report_top, badList);
ReportProBadAdapter proBadAdapter = new ReportProBadAdapter(R.layout.item_mes_report_pro_bad, badList);
badAdapter.bindToRecyclerView(rvBad);
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() {
badAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesReportDetailActivity.class);
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_report;
}
@OnClick({R.id.tv_report, R.id.tv_bad})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_report:
changView(0);
break;
case R.id.tv_bad:
changView(1);
break;
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
private void changView(int type) {
if (type == 0) {
llReport.setVisibility(View.VISIBLE);
llBad.setVisibility(View.GONE);
tvReport.setBackgroundResource(R.drawable.shape_report_choose);
tvReport.setTextColor(Color.WHITE);
tvBad.setBackgroundResource(R.drawable.shape_report);
tvBad.setTextColor(Color.parseColor("#FF4A92DE"));
} else {
llReport.setVisibility(View.GONE);
llBad.setVisibility(View.VISIBLE);
tvBad.setBackgroundResource(R.drawable.shape_report_choose);
tvBad.setTextColor(Color.WHITE);
tvReport.setBackgroundResource(R.drawable.shape_report);
tvReport.setTextColor(Color.parseColor("#FF4A92DE"));
}
}
}
package com.wd.workoffice.ui.activity.mes.report;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import butterknife.ButterKnife;
/**
* 订单追踪 详情
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesReportDetailActivity extends WorkToolBarActivity {
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_mes_order_detail;
}
}
package com.wd.workoffice.ui.adapter;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.ProductBean;
import com.wd.workoffice.bean.event.ModifyCarEvent;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.widget.AddAndReduceDoubleView;
import org.greenrobot.eventbus.EventBus;
import java.util.List;
import flexible.xd.android_base.utils.ToastUtil;
/**
* Created by flexible on 2018/8/13.
*/
public class ReportBadAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, BaseViewHolder> {
public ReportBadAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ProductBean.RecordsBean item) {
}
}
package com.wd.workoffice.ui.adapter;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.ProductBean;
import com.wd.workoffice.bean.event.ModifyCarEvent;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.widget.AddAndReduceDoubleView;
import org.greenrobot.eventbus.EventBus;
import java.util.List;
import flexible.xd.android_base.utils.ToastUtil;
/**
* Created by flexible on 2018/8/13.
*/
public class ReportProBadAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, BaseViewHolder> {
public ReportProBadAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ProductBean.RecordsBean item) {
}
}
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 ReportTopAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, BaseViewHolder> {
public ReportTopAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ProductBean.RecordsBean item) {
}
}
...@@ -8,6 +8,7 @@ import com.wd.workoffice.R; ...@@ -8,6 +8,7 @@ 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.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.ticket.MesTicketActivity; import com.wd.workoffice.ui.activity.mes.ticket.MesTicketActivity;
import com.wd.workoffice.ui.adapter.BatLayoutAdapter; import com.wd.workoffice.ui.adapter.BatLayoutAdapter;
...@@ -94,6 +95,7 @@ public class MesFragment extends WorkBaseFg { ...@@ -94,6 +95,7 @@ public class MesFragment extends WorkBaseFg {
startActivity(MesOrderActivity.class); startActivity(MesOrderActivity.class);
break; break;
case 1: case 1:
startActivity(MesReportActivity.class);
break; break;
case 2: case 2:
break; break;
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#fff6f9ff" />
<corners android:radius="14dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff1f61a7" />
<corners android:radius="4dp" />
<stroke
android:width="1dp"
android:color="#ff1f61a7" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff3f84cd" />
<corners android:radius="3dp" />
<stroke
android:width="1dp"
android:color="#ff1f61a7" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:paddingHorizontal="17mm"
android:paddingVertical="14mm">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单编号:DD10001"
android:textSize="16sp" />
</RelativeLayout>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15mm"
android:layout_marginTop="10mm"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="15mm"
android:paddingBottom="20mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单日期:"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_reason"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="产品编号"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="产品名称"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所属工序"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单数量"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报废数量"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不良率"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="工序单价"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报废损失"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
\ No newline at end of file
<?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:layout_marginTop="20mm">
<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="1"
android:gravity="center"
android:text="产品编号"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="不良率"
android:textSize="14sp" />
<ImageView
android:layout_width="4mm"
android:layout_height="10mm"
android:layout_marginLeft="5mm"
android:scaleType="fitXY"
android:src="@mipmap/arrow_right_gray" />
</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:layout_marginTop="20mm">
<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:text="废品重量(kg)"
android:textSize="14sp" />
</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:layout_marginTop="10mm"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15mm"
android:text="废品01"
android:textColor="@color/flexible_text_gray"
android:textSize="10sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="10mm"
android:background="#FF3F84CD" />
</LinearLayout>
</LinearLayout>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论