提交 fee4a851 authored 作者: flexiblexd@163.com's avatar flexiblexd@163.com

1.工单

上级 2c98b13f
......@@ -2656,6 +2656,16 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.work.WorkTaskActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="新增"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.ui.activity.mes.work;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import com.alibaba.fastjson.JSON;
......@@ -9,17 +7,17 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkBaseActivity;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.QualityTraceabilityBean;
import com.wd.workoffice.bean.event.ChangeStatus;
import com.wd.workoffice.bean.mesBean.WokrOrderBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.mes.QualityTraceabilityDetailActivity;
import com.wd.workoffice.ui.adapter.QualityTraceabilityAdapter;
import com.wd.workoffice.ui.adapter.QualityWorkAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -137,4 +135,23 @@ public class QualityWorkActivity extends WorkToolBarActivity {
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(ChangeStatus event) {
page = 1;
param.put("pageNum", page);
getData();
}
}
package com.wd.workoffice.ui.activity.mes.work;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.bigkoo.pickerview.listener.OnTimeSelectListener;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.event.ChangeStatus;
import com.wd.workoffice.bean.mesBean.FaultTypeBean;
import com.wd.workoffice.bean.mesBean.OpmreportErrorBean;
import com.wd.workoffice.bean.mesBean.WokrOrderBean;
import com.wd.workoffice.bean.mesBean.WorkFactoryBean;
import com.wd.workoffice.bean.mesBean.WorkLocationBean;
import com.wd.workoffice.bean.mesBean.WorkMachineBean;
import com.wd.workoffice.bean.workEnum.WorkOrder;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.mes.repair.MesFaultCodeSearchActivity;
import com.wd.workoffice.ui.activity.mes.repair.MesFaultSearchActivity;
import com.wd.workoffice.ui.adapter.WorkOrderErrorAdapter;
import com.wd.workoffice.util.DialogUtils;
import com.wd.workoffice.util.PickTimeUtils;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -26,6 +46,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import flexible.xd.android_base.utils.TimeUtils;
import io.reactivex.disposables.Disposable;
......@@ -36,16 +57,16 @@ import io.reactivex.disposables.Disposable;
* github: https://github.com/FlexibleXd
**/
public class QualityWorkFragment extends WorkBaseFg {
@BindView(R.id.tv_refuse)
TextView tvRefuse;
@BindView(R.id.tv_agree)
TextView tvAgree;
@BindView(R.id.tv_save)
TextView tvSave;
@BindView(R.id.tv_submit)
TextView tvSubmit;
@BindView(R.id.ll_bottom)
LinearLayout llBottom;
@BindView(R.id.tv_no)
TextView tvNo;
@BindView(R.id.tv_name)
TextView tvName;
EditText tvName;
@BindView(R.id.tv_parent)
TextView tvParent;
@BindView(R.id.tv_type)
......@@ -56,6 +77,12 @@ public class QualityWorkFragment extends WorkBaseFg {
TextView tvLocation;
@BindView(R.id.tv_position)
TextView tvPosition;
@BindView(R.id.tv_position_code)
TextView tvPositionCode;
@BindView(R.id.tv_machine_code)
TextView tvMachineCode;
@BindView(R.id.tv_machine_name)
TextView tvMachineName;
@BindView(R.id.tv_fault)
TextView tvFault;
@BindView(R.id.tv_problem_code)
......@@ -88,18 +115,59 @@ public class QualityWorkFragment extends WorkBaseFg {
TextView tvTrueEndTime;
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.tv_position_code)
TextView tvPositionCode;
@BindView(R.id.tv_machine_code)
TextView tvMachineCode;
@BindView(R.id.tv_machine_name)
TextView tvMachineName;
@BindView(R.id.ll_location)
LinearLayout llLocation;
@BindView(R.id.ll_position)
LinearLayout llPosition;
@BindView(R.id.ll_machine_code)
LinearLayout llMachineCode;
@BindView(R.id.ll_fault)
LinearLayout llFault;
@BindView(R.id.ll_problem_code)
LinearLayout llProblemCode;
@BindView(R.id.ll_work_type)
LinearLayout llWorkType;
@BindView(R.id.ll_link_no)
LinearLayout llLinkNo;
@BindView(R.id.ll_off)
LinearLayout llOff;
@BindView(R.id.ll_grant)
LinearLayout llGrant;
@BindView(R.id.ll_plan_star_time)
LinearLayout llPlanStarTime;
@BindView(R.id.ll_plan_end_time)
LinearLayout llPlanEndTime;
@BindView(R.id.tv_ok)
TextView tvOk;
@BindView(R.id.tv_cancel)
TextView tvCancel;
@BindView(R.id.ll_off_time)
LinearLayout llOffTime;
@BindView(R.id.ll_on_time)
LinearLayout llOnTime;
@BindView(R.id.tv_finish)
TextView tvFinish;
@BindView(R.id.tv_confirm)
TextView tvConfirm;
private Map<String, Object> param;
private List<OpmreportErrorBean.ListBean> dataList;
private WorkOrderErrorAdapter dataAdapter;
private WokrOrderBean.ListBean info;
private int page = 1;
private Map<String, Object> paramMap;
private WorkFactoryBean.SitesBean chooseFactory;
private WorkLocationBean.ListBean chooseLocation;
private WorkMachineBean.ListBean chooseMachine;
private FaultTypeBean.ListBean chooseFaultTypeBean;
private FaultTypeBean.ListBean chooseFaultCode;
private String[] levelList = new String[]{"检修", "点检", "故障", "项目"};
private QMUIDialog.MenuDialogBuilder levelDialog;
private int chooseType;
private String[] okList = new String[]{"是", "否"};
private int chooseGrant = -1;
private QMUIDialog.MenuDialogBuilder grantDialog;
private QMUIDialog.MenuDialogBuilder shutDownDialog;
private JSONObject chooseLinkNo;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
......@@ -114,11 +182,133 @@ public class QualityWorkFragment extends WorkBaseFg {
protected void initView() {
ButterKnife.bind(this, getContentView());
rvData.setLayoutManager(new LinearLayoutManager(getActivity(), RecyclerView.VERTICAL, false));
levelDialog = DialogUtils.listDialog(getActivity());
levelDialog.addItems(levelList, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
tvWorkType.setText(levelList[which]);
chooseType = which + 1;
chooseLinkNo = null;
tvLinkNo.setText("");
}
});
grantDialog = DialogUtils.listDialog(getActivity());
grantDialog.addItems(okList, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
tvGrant.setText(okList[which]);
info.setMateriel(which == 0);
// chooseGrant = which;
}
});
shutDownDialog = DialogUtils.listDialog(getActivity());
shutDownDialog.addItems(okList, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
tvOff.setText(okList[which]);
info.setShutDown(which == 0);
if (which == 0) {
} else {
tvOffTime.setText("");
tvOnTime.setText("");
}
// chooseGrant = which;
}
});
switch (info.getStatus()) {// "状态 1草稿 2待审批 3处理中 4已完成待确认 5已关闭 6已驳回
case 1:
llBottom.setVisibility(View.VISIBLE);
tvOk.setVisibility(View.GONE);
tvCancel.setVisibility(View.GONE);
tvSave.setVisibility(View.VISIBLE);
tvSubmit.setVisibility(View.VISIBLE);
tvFinish.setVisibility(View.GONE);
tvConfirm.setVisibility(View.GONE);
break;
case 2:
llBottom.setVisibility(View.VISIBLE);
tvOk.setVisibility(View.VISIBLE);
tvCancel.setVisibility(View.VISIBLE);
tvSave.setVisibility(View.GONE);
tvSubmit.setVisibility(View.GONE);
tvFinish.setVisibility(View.GONE);
tvConfirm.setVisibility(View.GONE);
break;
case 3:
llBottom.setVisibility(View.VISIBLE);
tvOk.setVisibility(View.GONE);
tvCancel.setVisibility(View.GONE);
tvSave.setVisibility(View.GONE);
tvSubmit.setVisibility(View.GONE);
tvFinish.setVisibility(View.VISIBLE);
tvConfirm.setVisibility(View.GONE);
break;
case 4:
llBottom.setVisibility(View.VISIBLE);
tvOk.setVisibility(View.GONE);
tvCancel.setVisibility(View.GONE);
tvSave.setVisibility(View.GONE);
tvSubmit.setVisibility(View.GONE);
tvFinish.setVisibility(View.GONE);
tvConfirm.setVisibility(View.VISIBLE);
break;
default:
llBottom.setVisibility(View.GONE);
break;
}
}
@Override
protected void initData() {
if (!TextUtils.isEmpty(info.getSiteId())) {
chooseFactory = new WorkFactoryBean.SitesBean();
chooseFactory.setSiteName(info.getSiteName());
chooseFactory.setSiteCode(info.getSiteCode());
chooseFactory.setId(info.getSiteId());
}
if (!TextUtils.isEmpty(info.getLocationId())) {
chooseLocation = new WorkLocationBean.ListBean();
chooseLocation.setLocationCode(info.getLocationCode());
chooseLocation.setLocationName(info.getLocationName());
chooseLocation.setId(info.getLocationId());
}
if (!TextUtils.isEmpty(info.getAssetId())) {
chooseMachine = new WorkMachineBean.ListBean();
chooseMachine.setAssetCode(info.getAssetCode());
chooseMachine.setId(info.getAssetId());
chooseMachine.setDescription(info.getAssetName());
}
if (!TextUtils.isEmpty(info.getFailureCodeId())) {
chooseFaultTypeBean = new FaultTypeBean.ListBean();
chooseFaultTypeBean.setFailureCode(info.getFailureCode());
chooseFaultTypeBean.setId(info.getFailureCodeId());
chooseFaultTypeBean.setDescription(info.getFailureName());
}
if (!TextUtils.isEmpty(info.getQuestionId())) {
chooseFaultCode = new FaultTypeBean.ListBean();
chooseFaultCode.setFailureCode(info.getQuestionCode());
chooseFaultCode.setId(info.getQuestionId());
chooseFaultCode.setDescription(info.getQuestionName());
}
if (!TextUtils.isEmpty(info.getLinkedNumberId())) {
chooseLinkNo = new JSONObject();
chooseLinkNo.put("code", info.getLinkedNumber());
chooseLinkNo.put("id", info.getLinkedNumberId());
}
chooseType = info.getWorkType();
tvNo.setText(info.getWoCode());
tvName.setText(info.getDescription());
tvParent.setText(info.getParentName());
......@@ -127,30 +317,33 @@ public class QualityWorkFragment extends WorkBaseFg {
tvLocation.setText(info.getSiteName());
tvPosition.setText(info.getLocationName());
tvPositionCode.setText(info.getLocationCode());
tvMachineCode.setText(info.getAssetName());
tvMachineName.setText(info.getAssetCode());
tvMachineCode.setText(info.getAssetCode());
tvMachineName.setText(info.getAssetName());
tvFault.setText(info.getFailureName());
tvProblemCode.setText(info.getQuestionCode());
tvProblemCode.setText(info.getQuestionName());
tvWorkType.setText(getWorkType(info.getWorkType()));// 1 2 4 5
tvLinkNo.setText(info.getLinkedNumber());
tvCreateBy.setText(info.getCreateName());
tvCreateTime.setText(TimeUtils.millis2String(info.getCreateDateTime(), new SimpleDateFormat("yyyy-MM-dd")));
tvOff.setText(info.isShutDown()?"是":"否");
tvGrant.setText(info.isMateriel()?"是":"否");
tvOff.setText(info.isShutDown() ? "是" : "否");
tvGrant.setText(info.isMateriel() ? "是" : "否");
tvDetailInfo.setText(info.getDetailedInformation());
tvOffTime.setText(info.getShutdownTime());
tvOnTime.setText(info.getRecoveryTime());
tvOffTime.setText(getTimeString(info.getShutdownTime()));
tvOnTime.setText(getTimeString(info.getRecoveryTime()));
tvPlanStarTime.setText(getTimeString(info.getSchedStart()));
tvPlanEndTime.setText(getTimeString(info.getSchedFinish()));
tvPlanStarTime.setText(info.getSchedStart() ==0L?"":TimeUtils.millis2String(info.getSchedStart(),new SimpleDateFormat("yyyy-MM-dd")));
tvPlanEndTime.setText(info.getSchedFinish() ==0L?"":TimeUtils.millis2String(info.getSchedFinish(),new SimpleDateFormat("yyyy-MM-dd")) );
tvTrueStarTime.setText(info.getActStart() ==0L?"":TimeUtils.millis2String(info.getActStart(),new SimpleDateFormat("yyyy-MM-dd")));
tvTrueEndTime.setText(info.getActFinish() ==0L?"":TimeUtils.millis2String(info.getActFinish(),new SimpleDateFormat("yyyy-MM-dd")));
// tvPlanStarTime.setText(info.getSchedStart() == 0L ? "" :
// TimeUtils.millis2String(info.getSchedStart(), new SimpleDateFormat("yyyy-MM-dd")));
// tvPlanEndTime.setText(info.getSchedFinish() == 0L ? "" : TimeUtils.millis2String(info.getSchedFinish(), new SimpleDateFormat("yyyy-MM-dd")));
tvTrueStarTime.setText(info.getActStart() == 0L ? "" : TimeUtils.millis2String(info.getActStart(), new SimpleDateFormat("yyyy-MM-dd")));
tvTrueEndTime.setText(info.getActFinish() == 0L ? "" : TimeUtils.millis2String(info.getActFinish(), new SimpleDateFormat("yyyy-MM-dd")));
dataList = new ArrayList<>();
......@@ -160,7 +353,7 @@ public class QualityWorkFragment extends WorkBaseFg {
param.put("pageNum", 1);
paramMap = WorkUtils.simpleParam();
param.put("paramMap", paramMap);
paramMap.put("assetId",info.getAssetId());
paramMap.put("assetId", info.getAssetId());
getData();
}
......@@ -229,7 +422,6 @@ public class QualityWorkFragment extends WorkBaseFg {
}
}
});
}
@Override
......@@ -247,4 +439,290 @@ public class QualityWorkFragment extends WorkBaseFg {
}
@OnClick({R.id.tv_confirm, R.id.tv_finish, R.id.tv_ok, R.id.tv_cancel, R.id.ll_off_time, R.id.ll_on_time, R.id.tv_save, R.id.tv_submit, R.id.ll_location, R.id.ll_position, R.id.ll_machine_code, R.id.ll_fault, R.id.ll_problem_code, R.id.ll_work_type, R.id.ll_link_no, R.id.ll_off, R.id.ll_grant, R.id.ll_plan_star_time, R.id.ll_plan_end_time})
public void onClick(View view) {
switch (view.getId()) {
case R.id.tv_confirm:
check(6);
break;
case R.id.tv_finish:
check(5);
break;
case R.id.tv_ok:
check(3);
break;
case R.id.tv_cancel:
check(4);
break;
case R.id.tv_save:
check(1);
break;
case R.id.tv_submit:
check(2);
break;
case R.id.ll_location:
startActivityForResult(WorkOrderFacotySearchActivity.class, 10001);
break;
case R.id.ll_position:
if (chooseFactory == null) {
toast("请先选择工厂");
return;
}
startActivityForResult(WorkOrderLocationSearchActivity.class, 10002
, "id", chooseFactory.getId());
break;
case R.id.ll_machine_code:
if (chooseLocation == null) {
toast("请先选择位置");
return;
}
startActivityForResult(WorkOrderMachineSearchActivity.class, 10003
, "id", chooseLocation.getId());
break;
case R.id.ll_fault:
startActivityForResult(MesFaultSearchActivity.class, 10004);
break;
case R.id.ll_problem_code:
if (null == chooseFaultTypeBean) {
toast("请先选择故障类");
return;
}
startActivityForResult(MesFaultCodeSearchActivity.class, 10005,
"id", chooseFaultTypeBean.getId());
break;
case R.id.ll_work_type:
levelDialog.show();
break;
case R.id.ll_link_no:
if (chooseType == 0) {
toast("请先选择工作类型");
return;
}
startActivityForResult(WorkOrderNoSearchActivity.class, 10006,
"type", chooseType + "");
break;
case R.id.ll_off:
shutDownDialog.show();
break;
case R.id.ll_grant:
grantDialog.show();
break;
case R.id.ll_on_time:
if (!info.isShutDown()) {
toast("非停机状态无需选择");
return;
}
PickTimeUtils.showPick(getActivity(), new OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {
String time = TimeUtils.date2String(date, new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"));
tvOnTime.setText(time);
}
}).show();
break;
case R.id.ll_off_time:
if (!info.isShutDown()) {
toast("非停机状态无需选择");
return;
}
PickTimeUtils.showPick(getActivity(), new OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {
String time = TimeUtils.date2String(date, new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"));
tvOffTime.setText(time);
}
}).show();
break;
case R.id.ll_plan_star_time:
PickTimeUtils.showPick(getActivity(), new OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {
String time = TimeUtils.date2String(date, new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"));
tvPlanStarTime.setText(time);
}
}).show();
break;
case R.id.ll_plan_end_time:
PickTimeUtils.showPick(getActivity(), new OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {
String time = TimeUtils.date2String(date, new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"));
tvPlanEndTime.setText(time);
}
}).show();
break;
}
}
private void check(int type) {//1 保存 2 提交審核 3 通過 4 駁回 5 完成 6 确认完成
String name = tvName.getText().toString();
String detailInfo = tvDetailInfo.getText().toString();
String offTime = tvOffTime.getText().toString();
String onTime = tvOnTime.getText().toString();
String planStart = tvPlanStarTime.getText().toString();
String planEnd = tvPlanEndTime.getText().toString();
if (TextUtils.isEmpty(name)) {
toast("工单名称不能为空");
return;
}
if (chooseFactory == null) {
toast("请选择工厂");
return;
}
if (chooseLocation == null) {
toast("请选择位置名称");
return;
}
if (chooseType == 0) {
toast("请选择工作类型");
return;
}
if (chooseLinkNo == null) {
toast("请选择关联单号");
return;
}
info.setSiteName(chooseFactory.getSiteName());
info.setSiteCode(chooseFactory.getSiteCode());
info.setSiteId(chooseFactory.getId());
info.setLocationCode(chooseLocation.getLocationCode());
info.setLocationName(chooseLocation.getLocationName());
info.setLocationId(chooseLocation.getId());
info.setLinkedNumber(chooseLinkNo.getString("code"));
info.setLinkedNumberId(chooseLinkNo.getString("id"));
if (chooseMachine != null) {
info.setAssetCode(chooseMachine.getAssetCode());
info.setAssetId(chooseMachine.getId());
info.setAssetName(chooseMachine.getDescription());
}
if (chooseFaultTypeBean != null) {
info.setFailureCode(chooseFaultTypeBean.getFailureCode());
info.setFailureCodeId(chooseFaultTypeBean.getId());
info.setFailureName(chooseFaultTypeBean.getDescription());
}
if (chooseFaultCode != null) {
info.setQuestionCode(chooseFaultCode.getFailureCode());
info.setQuestionId(chooseFaultCode.getId());
info.setQuestionName(chooseFaultCode.getDescription());
}
info.setWorkType(chooseType);
info.setShutdownTime(TimeUtils.string2Millis(offTime));
info.setRecoveryTime(TimeUtils.string2Millis(onTime));
info.setSchedStart(TimeUtils.string2Millis(planStart));
info.setSchedFinish(TimeUtils.string2Millis(planEnd));
info.setDescription(name);
info.setDetailedInformation(detailInfo);
switch (type) {//1 保存 2 提交審核 3 通過 4 駁回 5完成 6 确认完成
case 1:
info.setStatus(1);
info.setIsSave(1);
break;
case 2:
info.setIsSave(2);
info.setStatus(2);
break;
case 3:
info.setIsSave(3);
break;
case 4:
info.setStatus(6);
break;
case 5:
info.setStatus(3);
break;
case 6:
info.setStatus(4);
break;
}
RtfUtils.getMesRtf().workOrderUpdate("1",
WorkUtils.convertMapToBody(JSON.parseObject(JSON.toJSONString(info)))).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.getMessage());
return;
}
EventBus.getDefault().post(new ChangeStatus());
toast("提交成功");
}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
chooseFactory = JSON.parseObject(data.getStringExtra("data"), WorkFactoryBean.SitesBean.class);
tvLocation.setText(chooseFactory.getSiteName());
chooseLocation = null;
chooseMachine = null;
tvPosition.setText("");
tvPositionCode.setText("");
tvMachineCode.setText("");
tvMachineName.setText("");
}
break;
case 10002:
if (resultCode == 10001) {
chooseLocation = JSON.parseObject(data.getStringExtra("data"), WorkLocationBean.ListBean.class);
tvPosition.setText(chooseLocation.getLocationName());
tvPositionCode.setText(chooseLocation.getLocationCode());
chooseMachine = null;
tvMachineCode.setText("");
tvMachineName.setText("");
}
break;
case 10003:
if (resultCode == 10001) {
chooseMachine = JSON.parseObject(data.getStringExtra("data"), WorkMachineBean.ListBean.class);
tvMachineCode.setText(chooseMachine.getAssetCode());
tvMachineName.setText(chooseMachine.getDescription());
}
break;
case 10004:
if (resultCode == 10001) {
chooseFaultTypeBean = JSON.parseObject(data.getStringExtra("data"), FaultTypeBean.ListBean.class);
tvFault.setText(chooseFaultTypeBean.getDescription());
chooseFaultCode = null;
tvProblemCode.setText("");
}
break;
case 10005:
if (resultCode == 10001) {
chooseFaultCode = JSON.parseObject(data.getStringExtra("data"), FaultTypeBean.ListBean.class);
tvProblemCode.setText(chooseFaultCode.getDescription());
}
break;
case 10006:
if (resultCode == 10001) {
chooseLinkNo = JSON.parseObject(data.getStringExtra("data"));
tvLinkNo.setText(chooseLinkNo.getString("code"));
}
break;
}
}
private String getTimeString(long time) {
return time == 0L ? "" : TimeUtils.millis2String(time);
}
}
......@@ -6,9 +6,13 @@ import android.text.TextUtils;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.ChangeStatus;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import com.wd.workoffice.ui.fg.MesOrderFragment;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
......@@ -71,6 +75,7 @@ public class WorkOrderDetailActivity extends WorkToolBarActivity {
for (int i = 0; i < tab.size(); i++) {
tlTab.getTabAt(i).setText(tab.get(i));
}
vpData.setOffscreenPageLimit(data.size());
}
@Override
......@@ -82,4 +87,20 @@ public class WorkOrderDetailActivity extends WorkToolBarActivity {
return R.layout.activity_order;
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(ChangeStatus event) {
finish();
}
}
package com.wd.workoffice.ui.activity.mes.work;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.FaultTypeBean;
import com.wd.workoffice.bean.mesBean.WorkFactoryBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.FauliTypeAdapter;
import com.wd.workoffice.ui.adapter.WorkDepManageAdapter;
import com.wd.workoffice.ui.adapter.WorkFactoryAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 地点索
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkOrderFacotySearchActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<WorkFactoryBean.SitesBean> clientList;
private WorkFactoryAdapter clientAdapter;
private int page = 1;
private Map<String, Object> paramMap;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
clientList = new ArrayList<>();
clientAdapter = new WorkFactoryAdapter(R.layout.item_fault_search, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
paramMap = WorkUtils.simpleParam();
// paramMap.put("parentId", getIntent().getStringExtra("id"));
param.put("paramMap", paramMap);
param.put("pageNum", 1);
getData();
}
private void getData() {
RtfUtils.getMesRtf().removes("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.getMessage());
return;
}
List<WorkFactoryBean.SitesBean> getList = JSON.parseObject(data.getData().toString(), WorkFactoryBean.class).getSites();
// if (page == 1) {
clientList.clear();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
// } else {
// clientAdapter.loadMoreComplete();
// clientList.addAll(getList);
// clientAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// clientAdapter.loadMoreEnd();
// } else {
// page++;
// }
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
// clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
// @Override
// public void onLoadMoreRequested() {
// param.put("pageNum", page);
// getData();
// }
// }, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("data", JSON.toJSONString(clientList.get(position)));
setResult(10001, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_fault_search;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
paramMap.put("siteCode", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
}
package com.wd.workoffice.ui.activity.mes.work;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.WorkFactoryBean;
import com.wd.workoffice.bean.mesBean.WorkLocationBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkFactoryAdapter;
import com.wd.workoffice.ui.adapter.WorkLocationAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 位置索
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkOrderLocationSearchActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<WorkLocationBean.ListBean> clientList;
private WorkLocationAdapter clientAdapter;
private int page = 1;
private Map<String, Object> paramMap;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
clientList = new ArrayList<>();
clientAdapter = new WorkLocationAdapter(R.layout.item_fault_search, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
paramMap = WorkUtils.simpleParam();
paramMap.put("siteId", getIntent().getStringExtra("id"));
param.put("paramMap", paramMap);
param.put("pageNum", 1);
getData();
}
private void getData() {
RtfUtils.getMesRtf().astlocations("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.getMessage());
return;
}
List<WorkLocationBean.ListBean> getList = JSON.parseObject(data.getData().toString(), WorkLocationBean.class).getList();
if (page == 1) {
clientList.clear();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
clientAdapter.loadMoreEnd();
} else {
page++;
}
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
param.put("pageNum", page);
getData();
}
}, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("data", JSON.toJSONString(clientList.get(position)));
setResult(10001, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_fault_search;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
paramMap.put("locationName", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
}
package com.wd.workoffice.ui.activity.mes.work;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.WorkLocationBean;
import com.wd.workoffice.bean.mesBean.WorkMachineBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkLocationAdapter;
import com.wd.workoffice.ui.adapter.WorkMarchineAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 设备
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkOrderMachineSearchActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<WorkMachineBean.ListBean> clientList;
private WorkMarchineAdapter clientAdapter;
private int page = 1;
private Map<String, Object> paramMap;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
clientList = new ArrayList<>();
clientAdapter = new WorkMarchineAdapter(R.layout.item_fault_search, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
paramMap = WorkUtils.simpleParam();
paramMap.put("locationId", getIntent().getStringExtra("id"));
param.put("paramMap", paramMap);
param.put("pageNum", 1);
getData();
}
private void getData() {
RtfUtils.getMesRtf().astasset("aa8faf47c93311e98334fa163e1166bd", 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.getMessage());
return;
}
List<WorkMachineBean.ListBean> getList = JSON.parseObject(data.getData().toString(), WorkMachineBean.class).getList();
if (page == 1) {
clientList.clear();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
clientAdapter.loadMoreEnd();
} else {
page++;
}
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
param.put("pageNum", page);
getData();
}
}, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("data", JSON.toJSONString(clientList.get(position)));
setResult(10001, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_fault_search;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
paramMap.put("description", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
}
package com.wd.workoffice.ui.activity.mes.work;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONPObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.WorkLinkBean;
import com.wd.workoffice.bean.mesBean.WorkMachineBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkLinkAdapter;
import com.wd.workoffice.ui.adapter.WorkMarchineAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable;
/**
* 关联单号
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkOrderNoSearchActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<JSONObject> clientList;
private WorkLinkAdapter clientAdapter;
private int page = 1;
private Map<String, Object> paramMap;
private String type;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
type = getIntent().getStringExtra("type");
clientList = new ArrayList<>();
clientAdapter = new WorkLinkAdapter(R.layout.item_fault_search, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
paramMap = WorkUtils.simpleParam();
paramMap.put("chooseLocation", getIntent().getStringExtra("id"));
param.put("paramMap", paramMap);
param.put("pageNum", 1);
getData();
}
private void getData() {
Observable<BaseMesBean> modinspo = RtfUtils.getMesRtf().modinspo("1", WorkUtils.convertMapToBody(param));
switch (type) {
case "1":
modinspo = RtfUtils.getMesRtf().modinspo("1", WorkUtils.convertMapToBody(param));
break;
case "2":
modinspo = RtfUtils.getMesRtf().spotCheckBillList("1", WorkUtils.convertMapToBody(param));
break;
case "4":
modinspo = RtfUtils.getMesRtf().opmreportErrorList("1", WorkUtils.convertMapToBody(param));
break;
case "5":
modinspo = RtfUtils.getMesRtf().pjmproject("1", WorkUtils.convertMapToBody(param));
break;
}
modinspo.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.getMessage());
return;
}
List<JSONObject> covertList = new ArrayList<>();
switch (type) {
case "1":
List<WorkLinkBean.ListBean> oneLinkList = JSON.parseObject(data.getData().toString(), WorkLinkBean.class).getList();
for (WorkLinkBean.ListBean linkBean : oneLinkList) {
JSONObject link = new JSONObject();
link.put("name", linkBean.getDescription());
link.put("code", linkBean.getInspoCode());
link.put("id", linkBean.getId());
covertList.add(link);
}
break;
case "2":
List<WorkLinkBean.ListBean> twoList = JSON.parseObject(data.getData().toString(), WorkLinkBean.class).getList();
for (WorkLinkBean.ListBean linkBean : twoList) {
JSONObject link = new JSONObject();
link.put("name", linkBean.getBillDescription());
link.put("code", linkBean.getBillNum());
link.put("id", linkBean.getId());
covertList.add(link);
}
break;
case "4":
List<WorkLinkBean.ListBean> fourList = JSON.parseObject(data.getData().toString(), WorkLinkBean.class).getList();
for (WorkLinkBean.ListBean linkBean : fourList) {
JSONObject link = new JSONObject();
link.put("name", linkBean.getDescription());
link.put("code", linkBean.getReportCode());
link.put("id", linkBean.getId());
covertList.add(link);
}
break;
case "5":
List<WorkLinkBean.ListBean> fiveList = JSON.parseObject(data.getData().toString(), WorkLinkBean.class).getList();
for (WorkLinkBean.ListBean linkBean : fiveList) {
JSONObject link = new JSONObject();
link.put("name", linkBean.getDescription());
link.put("code", linkBean.getProjectCode());
link.put("id", linkBean.getId());
covertList.add(link);
} break;
}
if (page == 1) {
clientList.clear();
clientList.addAll(covertList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(covertList);
clientAdapter.notifyDataSetChanged();
}
if (covertList.size() == 0) {
clientAdapter.loadMoreEnd();
} else {
page++;
}
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
param.put("pageNum", page);
getData();
}
}, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("data", JSON.toJSONString(clientList.get(position)));
setResult(10001, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_fault_search;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
paramMap.put("description", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.FaultTypeBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class FauliTypeAdapter extends BaseQuickAdapter<FaultTypeBean.ListBean, BaseViewHolder> {
public FauliTypeAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, FaultTypeBean.ListBean item) {
helper.setText(R.id.tv_content1, item.getFailureCode());
helper.setText(R.id.tv_content2, item.getDescription());
}
}
......@@ -30,15 +30,19 @@ public class MesServiceStandardAdapter extends BaseQuickAdapter<ServiceStandardB
@Override
protected void convert(BaseViewHolder helper, ServiceStandardBean.ListBean item) {
if (TextUtils.isEmpty(type)){
if (TextUtils.isEmpty(type)) {
helper.setText(R.id.tv_name, String.format("检查项目:%s", item.getCheckProject()));
if (!TextUtils.isEmpty(item.getStatus())) {
helper.setText(R.id.tv_status, TextUtils.equals(item.getStatus(), "1") ? "异常" : "正常");//1 异常 0正常
}
helper.setText(R.id.tv_content1, item.getProcessStandard());
helper.setText(R.id.tv_content2, item.getMeasurementUnit());
helper.setText(R.id.tv_content3, item.getFailureCode());
}else {
} else {
helper.setText(R.id.tv_name, String.format("检查项目:%s", item.getInspoProDescription()));
if (!TextUtils.isEmpty(item.getStatus())) {
helper.setText(R.id.tv_status, TextUtils.equals(item.getStatus(), "1") ? "异常" : "正常");//1 异常 0正常
}
helper.setText(R.id.tv_content1, item.getProcessStandard());
helper.setText(R.id.tv_content2, item.getUint());
helper.setText(R.id.tv_content3, item.getReportCode());
......
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.FaultTypeBean;
import com.wd.workoffice.bean.mesBean.WorkFactoryBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class WorkFactoryAdapter extends BaseQuickAdapter<WorkFactoryBean.SitesBean, BaseViewHolder> {
public WorkFactoryAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, WorkFactoryBean.SitesBean item) {
helper.setText(R.id.tv_content1, item.getSiteCode());
helper.setText(R.id.tv_content2, item.getSiteName());
}
}
package com.wd.workoffice.ui.adapter;
import com.alibaba.fastjson.JSONObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.WorkLinkBean;
import com.wd.workoffice.bean.mesBean.WorkMachineBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class WorkLinkAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder> {
public WorkLinkAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, JSONObject item) {
helper.setText(R.id.tv_content1, item.getString("name"));
helper.setText(R.id.tv_content2, item.getString("code"));
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.FaultTypeBean;
import com.wd.workoffice.bean.mesBean.WorkLocationBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class WorkLocationAdapter extends BaseQuickAdapter<WorkLocationBean.ListBean, BaseViewHolder> {
public WorkLocationAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, WorkLocationBean.ListBean item) {
helper.setText(R.id.tv_content1, item.getLocationCode());
helper.setText(R.id.tv_content2, item.getLocationName());
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.WorkLocationBean;
import com.wd.workoffice.bean.mesBean.WorkMachineBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class WorkMarchineAdapter extends BaseQuickAdapter<WorkMachineBean.ListBean, BaseViewHolder> {
public WorkMarchineAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, WorkMachineBean.ListBean item) {
helper.setText(R.id.tv_content1, item.getAssetCode());
helper.setText(R.id.tv_content2, item.getDescription());
}
}
......@@ -27,6 +27,8 @@ public class WorkOrderTaskAdapter extends BaseQuickAdapter<WorkTaskBean.ListBean
helper.setText(R.id.tv_status, WorkOrder.getNameByCode(item.getStatus()));
helper.setText(R.id.tv_desc, item.getDescription());
helper.setText(R.id.tv_time, item.getTime()+"");
helper.addOnClickListener(R.id.tv_delete);
helper.addOnClickListener(R.id.tv_edit);
}
}
......@@ -55,4 +55,14 @@ public class PickTimeUtils {
setSubCalSize(16);
return pvTime.build();
}
public static TimePickerView showPickTime(Context ctx, OnTimeSelectListener listener, boolean todayStart) {
TimePickerBuilder pvTime = new TimePickerBuilder(ctx, listener);
if (todayStart) {
pvTime.setRangDate(Calendar.getInstance(), null);
}
pvTime.setType(new boolean[]{false, false, false, true, true, true}).setTitleSize(16).setContentTextSize(16).
setSubCalSize(16);
// .setRangDate(startDate, endDate);
return pvTime.build();
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/shape_client_search"
android:gravity="center_vertical"
android:paddingHorizontal="10mm">
<ImageView
android:layout_width="15mm"
android:layout_height="15mm"
android:src="@mipmap/client_search" />
<EditText
android:id="@+id/et_key"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2mm"
android:background="@null"
android:hint="搜索"
android:textColor="#91ABBA"
android:textColorHint="#91ABBA"
android:textSize="14sp" />
</LinearLayout>
<Button
android:id="@+id/btn_search"
android:layout_width="60mm"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:background="@color/mainTextColor"
android:text="搜索"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_client"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="4mm">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -188,9 +188,11 @@
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<View style="@style/dividerX"
android:visibility="gone"/>
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -449,7 +451,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
......
......@@ -300,6 +300,7 @@
android:textSize="16sp" />
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -326,6 +327,7 @@
<View style="@style/dividerX" />
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -352,7 +354,6 @@
<View style="@style/dividerX" />
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -379,7 +380,7 @@
<View style="@style/dividerX" />
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......
......@@ -220,6 +220,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="待提交"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
......@@ -417,7 +418,8 @@
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_recover_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -434,12 +436,18 @@
<TextView
android:id="@+id/tv_recover_time"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
......
......@@ -213,7 +213,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设备故障活故障代码"
android:text="缺陷或故障代码"
android:textSize="14sp" />
<TextView
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="60mm"
android:layout_alignParentBottom="true"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="取消"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="保存"
android:textColor="@color/white" />
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom"
android:orientation="vertical"
android:paddingBottom="20mm">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/flexible_background"
android:paddingVertical="10mm"
android:paddingLeft="10mm"
android:text="基本信息"
android:textSize="16sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="任务号"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="描述"
android:textSize="14sp" />
<EditText
android:id="@+id/tv_desc"
android:layout_width="0dp"
android:layout_weight="1"
android:background="@null"
android:hint="请输入"
android:gravity="right"
android:layout_height="wrap_content"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<View style="@style/dividerX" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="估计持续时间(h)"
android:textSize="14sp" />
<EditText
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_weight="1"
android:background="@null"
android:hint="请输入"
android:gravity="right"
android:layout_height="wrap_content"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="状态"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="草稿"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
......@@ -9,32 +9,74 @@
android:layout_width="match_parent"
android:layout_height="60mm"
android:layout_alignParentBottom="true"
android:gravity="center_vertical|right"
android:orientation="horizontal"
android:visibility="gone">
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_refuse"
android:id="@+id/tv_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@drawable/shape_red_btn"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="驳回"
android:text="保存"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_agree"
android:id="@+id/tv_submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="发起审批"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="通过"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="驳回"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_finish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@drawable/shape_green_btn"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="同意"
android:text="完成"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_confirm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="确认完成"
android:textColor="@color/white" />
</LinearLayout>
<androidx.core.widget.NestedScrollView
......@@ -86,7 +128,7 @@
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -101,14 +143,17 @@
android:text="工单名称"
android:textSize="14sp" />
<TextView
<EditText
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:background="@null"
android:hint="请输入"
android:gravity="right"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<View style="@style/dividerX" />
......@@ -190,7 +235,8 @@
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -202,21 +248,28 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="地点"
android:text="工厂"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_position"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -233,14 +286,21 @@
<TextView
android:id="@+id/tv_position"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -267,7 +327,8 @@
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_machine_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -284,12 +345,18 @@
<TextView
android:id="@+id/tv_machine_code"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
......@@ -318,7 +385,9 @@
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_fault"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -335,15 +404,23 @@
<TextView
android:id="@+id/tv_fault"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_problem_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -360,15 +437,23 @@
<TextView
android:id="@+id/tv_problem_code"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_work_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -385,15 +470,24 @@
<TextView
android:id="@+id/tv_work_type"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_link_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -410,14 +504,21 @@
<TextView
android:id="@+id/tv_link_no"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -443,6 +544,7 @@
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -468,7 +570,9 @@
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_off"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -485,15 +589,23 @@
<TextView
android:id="@+id/tv_off"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_grant"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -510,15 +622,24 @@
<TextView
android:id="@+id/tv_grant"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_off_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -530,20 +651,28 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="详细信息"
android:text="停机时间"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_detail_info"
android:layout_width="wrap_content"
android:id="@+id/tv_off_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_on_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -555,44 +684,53 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="停机时间"
android:text="恢复时间"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_off_time"
android:layout_width="wrap_content"
android:id="@+id/tv_on_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="15mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="恢复时间"
android:text="详细信息"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_on_time"
android:layout_width="wrap_content"
<EditText
android:id="@+id/tv_detail_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
android:layout_marginTop="5mm"
android:background="@drawable/shape_input_white"
android:gravity="top"
android:hint="请填写详细信息…"
android:minLines="4"
android:padding="5mm"
android:textSize="16sp" />
</LinearLayout>
<View style="@style/ViewX" />
......@@ -605,7 +743,8 @@
android:text="计划信息"
android:textSize="16sp" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_plan_star_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -622,16 +761,24 @@
<TextView
android:id="@+id/tv_plan_star_time"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
<LinearLayout
android:id="@+id/ll_plan_end_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -648,16 +795,20 @@
<TextView
android:id="@+id/tv_plan_end_time"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="right"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/arrow_right_gray" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
......
......@@ -136,6 +136,18 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_add_task"
android:layout_width="150mm"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="新建工单任务"
android:textColor="@color/white" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
......@@ -123,5 +123,44 @@
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="right"
android:background="@color/white"
android:orientation="horizontal"
android:layout_marginTop="10mm"
android:paddingHorizontal="10mm">
<TextView
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:layout_marginRight="10mm"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="删除"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:background="@color/blue_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="编辑"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论