提交 0a57e1a8 authored 作者: lgd's avatar lgd

1.采购设备详情+审核

2.//TODO (设备采购,维修列表接口,新增维修的部门接口,接单),坩埚下单,下单时间选择器当前时间验证,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级 5d22fd3b
...@@ -2043,6 +2043,15 @@ ...@@ -2043,6 +2043,15 @@
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.work.DeviceBuyDetailActivity"
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.bean.event;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class CheckDeviceEvent {
public CheckDeviceEvent() {
}
}
...@@ -1785,10 +1785,27 @@ public interface ApiService { ...@@ -1785,10 +1785,27 @@ public interface ApiService {
Observable<BaseBean> equipmentPurchaseList(@QueryMap Map<String, Object> param); Observable<BaseBean> equipmentPurchaseList(@QueryMap Map<String, Object> param);
/** /**
* 获取设备采购 * 下单设备采购
* *
* @return * @return
*/ */
@POST("/equipmentPurchase") @POST("/equipmentPurchase")
Observable<BaseBean> addEquipmentPurchase(@Body RequestBody requestBody); Observable<BaseBean> addEquipmentPurchase(@Body RequestBody requestBody);
/**
* 设备采购明细列表(不分页)
*
* @return
*/
@GET("/equipmentPurchaseItem/list")
Observable<BaseBean> equipmentPurchaseItemList(@Query("equipmentPurchaseId") String id);
/**
* 设备采购明细列表(不分页)
*
* @return
*/
@PUT("/equipmentPurchase/audit")
Observable<BaseBean> equipmentPurchaseAudit(@Body RequestBody requestBody);
} }
package com.wd.workoffice.ui.activity.bat.work;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.DeviceBean;
import com.wd.workoffice.bean.DeviceBuyBean;
import com.wd.workoffice.bean.SendApplyBean;
import com.wd.workoffice.bean.SendApplyDetailBean;
import com.wd.workoffice.bean.event.CheckDeviceEvent;
import com.wd.workoffice.bean.event.CheckSendEvent;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.bean.workEnum.PagePermissionType;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.DeviceDetailAdapter;
import com.wd.workoffice.ui.adapter.SendApplyDetailAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import androidx.appcompat.app.AlertDialog;
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 DeviceBuyDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_refuse)
TextView tvRefuse;
@BindView(R.id.tv_agree)
TextView tvAgree;
@BindView(R.id.ll_bottom)
LinearLayout llBottom;
@BindView(R.id.tv_code)
TextView tvCode;
@BindView(R.id.tv_status)
TextView tvStatus;
@BindView(R.id.tv_receive_dep)
TextView tvReceiveDep;
@BindView(R.id.tv_order_people)
TextView tvOrderPeople;
@BindView(R.id.tv_order_dep)
TextView tvOrderDep;
@BindView(R.id.tv_order_time)
TextView tvOrderTime;
@BindView(R.id.tv_price)
TextView tvPrice;
@BindView(R.id.tv_remark)
TextView tvRemark;
@BindView(R.id.rv_data)
RecyclerView rvData;
private List<DeviceBean.RecordsBean> dataList;
private DeviceDetailAdapter dataAdapter;
private Map<String, Object> param;
private DeviceBuyBean.RecordsBean info;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
private void changePermission() {
if (!WorkUtils.hasPermission(PagePermissionType.EQUIPMENT_PURCHASE_REPAIR_UPDATE.getPermission())) {
tvRefuse.setVisibility(View.GONE);
tvAgree.setVisibility(View.GONE);
}
}
@Override
protected void initData() {
info = JSON.parseObject(getIntent().getStringExtra("info"), DeviceBuyBean.RecordsBean.class);
getData(info.getId() + "");
tvCode.setText(info.getId());
tvStatus.setText(WorkUtils.getDeviceStatus(info.getStatus()));
tvReceiveDep.setText(info.getReceiveDeptName());
tvOrderPeople.setText(info.getLaunchUserName());
tvOrderDep.setText(info.getLaunchDeptName());
tvOrderTime.setText(info.getCreatedTime());
tvPrice.setText(info.getCreatedTime());
tvRemark.setText(info.getRemark());
if (info.getStatus() == 100) {
llBottom.setVisibility(View.VISIBLE);
changePermission();
} else {
llBottom.setVisibility(View.GONE);
}
dataList = new ArrayList<>();
dataAdapter = new DeviceDetailAdapter(R.layout.item_device_detail, dataList);
dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>();
param.put("id", info.getId());
}
private void getData(String id) {
RtfUtils.getRtf().equipmentPurchaseItemList(id).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
List<DeviceBean.RecordsBean> dataBean = JSON.parseArray(data.getData().toString(), DeviceBean.RecordsBean.class);
dataList.addAll(dataBean);
dataAdapter.notifyDataSetChanged();
}
});
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_device_buy_detail;
}
@OnClick({R.id.tv_refuse, R.id.tv_agree})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_refuse:
checkDialog(220);
break;
case R.id.tv_agree:
checkDialog(200);
break;
}
}
private void checkDialog(int status) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
View view = LayoutInflater.from(this).inflate(R.layout.view_check, null);
TextView tvOk = view.findViewById(R.id.tv_ok);
TextView tvDesc = view.findViewById(R.id.tv_desc);
tvDesc.setText(status == 1 ? "通过" : "拒绝");
TextView tvNum = view.findViewById(R.id.tv_num);
TextView tvCancel = view.findViewById(R.id.tv_cancel);
EditText etRemark = view.findViewById(R.id.et_content);
etRemark.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
tvNum.setText(s.length() + "/140");
}
});
builder.setView(view);
AlertDialog addCartDialog = builder.create();
tvOk.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (TextUtils.isEmpty(etRemark.getText().toString())) {
toast("请填写备注");
return;
}
check(status, etRemark.getText().toString());
addCartDialog.dismiss();
}
});
tvCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
addCartDialog.dismiss();
}
});
addCartDialog.show();
}
private void check(int status, String remark) {
param.put("status", status);
param.put("auditRemark", remark);
param.put("id", info.getId());
RtfUtils.getRtf().equipmentPurchaseAudit(WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
toast("操作成功");
EventBus.getDefault().post(new CheckDeviceEvent());
finish();
}
});
}
}
...@@ -97,7 +97,6 @@ public class WorkDeviceBuyConfirmActivity extends WorkToolBarActivity { ...@@ -97,7 +97,6 @@ public class WorkDeviceBuyConfirmActivity extends WorkToolBarActivity {
private Map<String, Object> param; private Map<String, Object> param;
private Map<String, Object> expandInfo; private Map<String, Object> expandInfo;
private List<JSONObject> orderItems; private List<JSONObject> orderItems;
private Integer choosePosition;
@Override @Override
protected void initView() { protected void initView() {
......
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.DeviceBean;
import com.wd.workoffice.util.MathUtils;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class DeviceDetailAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, BaseViewHolder> {
public DeviceDetailAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, DeviceBean.RecordsBean item) {
helper.setText(R.id.tv_name, item.getEquipmentName());
helper.setText(R.id.tv_price,item.getUnitPrice());
helper.setText(R.id.tv_num, item.getQuantity() );
}
}
...@@ -11,6 +11,7 @@ import com.wd.workoffice.app.BaseBean; ...@@ -11,6 +11,7 @@ import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkBaseFg; import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.DeviceBuyBean; import com.wd.workoffice.bean.DeviceBuyBean;
import com.wd.workoffice.bean.RepairBean; import com.wd.workoffice.bean.RepairBean;
import com.wd.workoffice.bean.event.CheckDeviceEvent;
import com.wd.workoffice.bean.event.CheckOrderEvent; import com.wd.workoffice.bean.event.CheckOrderEvent;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
...@@ -166,7 +167,7 @@ public class DeviceBuyCheckListFragment extends WorkBaseFg { ...@@ -166,7 +167,7 @@ public class DeviceBuyCheckListFragment extends WorkBaseFg {
} }
@Subscribe @Subscribe
public void refresh(CheckOrderEvent event) { public void refresh(CheckDeviceEvent event) {
page = 1; page = 1;
param.put("current", page); param.put("current", page);
getData(); getData();
......
...@@ -3,6 +3,7 @@ package com.wd.workoffice.ui.fg; ...@@ -3,6 +3,7 @@ package com.wd.workoffice.ui.fg;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
...@@ -11,14 +12,17 @@ import com.wd.workoffice.app.BaseBean; ...@@ -11,14 +12,17 @@ import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkBaseFg; import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.DeviceBuyBean; import com.wd.workoffice.bean.DeviceBuyBean;
import com.wd.workoffice.bean.RepairBean; import com.wd.workoffice.bean.RepairBean;
import com.wd.workoffice.bean.event.CheckDeviceEvent;
import com.wd.workoffice.bean.event.CheckOrderEvent; import com.wd.workoffice.bean.event.CheckOrderEvent;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.bat.order.CrucibleOrderDetailActivity; import com.wd.workoffice.ui.activity.bat.order.CrucibleOrderDetailActivity;
import com.wd.workoffice.ui.activity.bat.work.DeviceBuyDetailActivity;
import com.wd.workoffice.ui.adapter.DeviceBuyAdapter; import com.wd.workoffice.ui.adapter.DeviceBuyAdapter;
import com.wd.workoffice.ui.adapter.DeviceRepairAdapter; import com.wd.workoffice.ui.adapter.DeviceRepairAdapter;
import com.wd.workoffice.util.UserKeeper; import com.wd.workoffice.util.UserKeeper;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
...@@ -64,7 +68,7 @@ public class DeviceBuyListFragment extends WorkBaseFg { ...@@ -64,7 +68,7 @@ public class DeviceBuyListFragment extends WorkBaseFg {
param = WorkUtils.pageKey(); param = WorkUtils.pageKey();
if (!TextUtils.isEmpty(state)) if (!TextUtils.isEmpty(state))
param.put("status", state); param.put("status", state);
param.put("receiveDeptId", UserKeeper.getInstance().getUserDepId()); // param.put("receiveDeptId", UserKeeper.getInstance().getUserDepId());
page = 1; page = 1;
param.put("current", page); param.put("current", page);
dataList = new ArrayList<>(); dataList = new ArrayList<>();
...@@ -139,11 +143,9 @@ public class DeviceBuyListFragment extends WorkBaseFg { ...@@ -139,11 +143,9 @@ public class DeviceBuyListFragment extends WorkBaseFg {
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(CrucibleOrderDetailActivity.class, startActivity(DeviceBuyDetailActivity.class,
"identity",identity, "info", JSON.toJSONString(dataList.get(position)));
"type","1", }
"id", dataList.get(position).getId() + "",
"status", dataList.get(position).getStatus() + ""); }
}); });
} }
...@@ -166,7 +168,7 @@ public class DeviceBuyListFragment extends WorkBaseFg { ...@@ -166,7 +168,7 @@ public class DeviceBuyListFragment extends WorkBaseFg {
} }
@Subscribe @Subscribe
public void refresh(CheckOrderEvent event) { public void refresh(CheckDeviceEvent event) {
page = 1; page = 1;
param.put("current", page); param.put("current", page);
getData(); getData();
......
<?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_vertical|right"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_refuse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@drawable/shape_red_btn"
android:paddingHorizontal="20mm"
android:paddingVertical="5mm"
android:text="拒绝"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_agree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10mm"
android:background="@drawable/shape_green_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">
<View style="@style/ViewX" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingVertical="10mm">
<View
android:layout_width="8mm"
android:layout_height="18mm"
android:background="@color/red_btn_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:text="基本信息"
android:textSize="15sp" />
</LinearLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_receive_dep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_order_people"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_order_dep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_order_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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="15sp" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1mm"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="备注"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_remark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3mm"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
</LinearLayout>
<View style="@style/ViewX" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingVertical="10mm">
<View
android:layout_width="8mm"
android:layout_height="18mm"
android:background="@color/red_btn_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:text="设备明细"
android:textSize="15sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
<?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"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FCFCFD"
android:orientation="vertical"
android:padding="10mm">
<RelativeLayout
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:layout_alignParentLeft="true"
android:text="设备名字"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
</RelativeLayout>
<RelativeLayout
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:layout_alignParentLeft="true"
android:text="单价"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
</RelativeLayout>
<RelativeLayout
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:layout_alignParentLeft="true"
android:text="数量"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论