提交 8e3be407 authored 作者: lgd's avatar lgd

1.退件详情历史记录页面

2.//TODO ,退件详情(top流程图,审核历史(接口未知)),内部交易订单审核,审核规则,领用申请列表/参数,坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级 885a5e88
......@@ -1904,6 +1904,14 @@
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.order.ReturnApplyHistoryActivity"
android:configChanges="keyboardHidden|orientation"
android:label="审核历史"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />f
<provider
android:name="androidx.core.content.FileProvider"
......
......@@ -77,7 +77,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
observable = RtfUtils.getRtf().returnApplyList(param);
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().returnPoApplyList(param);
} else {
} else {
observable = RtfUtils.getRtf().returnApplyList(param);
}
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
......@@ -114,7 +114,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
dataAdapter.loadMoreEnd();
} else {
page++;
};
}
}
});
}
......@@ -143,9 +143,9 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
startActivity(ReturnDetailActivity.class,
"info", JSON.toJSONString(dataList.get(position)),
"orderType", orderType
,"status", getIntent().getStringExtra("status")
,"id", getIntent().getStringExtra("orderId")
,"identity", getIntent().getStringExtra("identity"));
, "status", getIntent().getStringExtra("status")
, "id", getIntent().getStringExtra("orderId")
, "identity", getIntent().getStringExtra("identity"));
}
});
}
......
package com.wd.workoffice.ui.activity.bat.order;
import android.text.TextUtils;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ReturnApplyBean;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.RetrunSendApplyAdapter;
import com.wd.workoffice.ui.adapter.ReturnHistoryAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
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 ReturnApplyHistoryActivity extends WorkToolBarActivity {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private Map<String, Object> param;
private List<ReturnApplyBean.RecordsBean> dataList;
private ReturnHistoryAdapter dataAdapter;
private int page = 1;
private String orderType;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
orderType = getIntent().getStringExtra("orderType");
dataList = new ArrayList<>();
dataAdapter = new ReturnHistoryAdapter(R.layout.item_return_history, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
param = WorkUtils.pageKey();
page = 1;
param.put("current", page);
param.put("orderId", getIntent().getStringExtra("orderId"));
param.put("productId", getIntent().getStringExtra("productId"));
getData();
}
private void getData() {
Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().returnApplyList(param);
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().returnPoApplyList(param);
} else {
observable = RtfUtils.getRtf().returnApplyList(param);
}
observable.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<ReturnApplyBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), ReturnApplyBean.class).getRecords();
if (page == 1) {
srlRefresh.finishRefresh();
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
srlRefresh.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
page = 1;
param.put("current", page);
getData();
}
});
dataAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
param.put("current", page);
getData();
}
}, rvData);
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(ReturnDetailActivity.class,
"info", JSON.toJSONString(dataList.get(position)),
"orderType", orderType
, "status", getIntent().getStringExtra("status")
, "id", getIntent().getStringExtra("orderId")
, "identity", getIntent().getStringExtra("identity"));
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_pro_price;
}
}
package com.wd.workoffice.ui.adapter;
import android.graphics.Color;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.OrderDetail;
import com.wd.workoffice.bean.ReturnApplyBean;
import java.util.List;
import androidx.annotation.Nullable;
/**
* Created by flexible on 2018/8/13.
*/
public class ReturnHistoryAdapter extends BaseQuickAdapter<ReturnApplyBean.RecordsBean, BaseViewHolder> {
public ReturnHistoryAdapter(int layoutResId, @Nullable List<ReturnApplyBean.RecordsBean> data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ReturnApplyBean.RecordsBean item) {
if (helper.getAdapterPosition() == 0) {
helper.setTextColor(R.id.tv_status, Color.parseColor("#ff359486"));
helper.setTextColor(R.id.tv_time, Color.parseColor("#ff359486"));
helper.setTextColor(R.id.tv_remark, Color.parseColor("#ff359486"));
helper.setBackgroundRes(R.id.tv_dep, R.drawable.shape_green_btn);
helper.setGone(R.id.iv_last, true);
helper.setGone(R.id.iv_simple, false);
} else {
helper.setTextColor(R.id.tv_status, helper.getConvertView().getResources().getColor(R.color.flexible_text_gray));
helper.setTextColor(R.id.tv_time, helper.getConvertView().getResources().getColor(R.color.flexible_text_gray));
helper.setTextColor(R.id.tv_remark, helper.getConvertView().getResources().getColor(R.color.flexible_text_gray));
helper.setBackgroundRes(R.id.tv_dep, R.drawable.shape_blue_btn);
helper.setGone(R.id.iv_last, false);
helper.setGone(R.id.iv_simple, true);
}
// helper.setText(R.id.tv_status, item.getOptUserName() + item.getEventCodeName());
// helper.setText(R.id.tv_time, item.getCreatedTime());
// helper.setText(R.id.tv_remark, "备注:" + item.getOptComment());
}
}
......@@ -20,7 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="邢台德龙钢铁客户"
android:textSize="16sp" />
/>
<TextView
android:id="@+id/tv_time"
......@@ -28,20 +28,20 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="#0841F0"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5mm">
android:layout_marginTop="10mm">
<TextView
android:id="@+id/tv_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp" />
/>
<TextView
android:id="@+id/tv_status"
......@@ -63,14 +63,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="退货数量:"
android:textSize="16sp" />
/>
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp" />
/>
</LinearLayout>
<LinearLayout
......@@ -82,14 +82,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="退货类别:"
android:textSize="16sp" />
/>
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp" />
/>
</LinearLayout>
<LinearLayout
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="30mm"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_last"
android:layout_width="11mm"
android:layout_height="11mm"
android:src="@mipmap/order_process" />
<View
android:id="@+id/iv_simple"
style="@style/dividerY"
android:layout_width="5mm"
android:layout_height="5mm"
android:background="@drawable/shape_circle" />
<View
style="@style/dividerY"
android:layout_width="1mm"
android:layout_height="match_parent"
android:background="@color/blue_bg" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:layout_marginRight="10mm"
android:orientation="vertical"
android:paddingVertical="5mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_dep"
android:layout_width="70mm"
android:layout_height="wrap_content"
android:background="@drawable/shape_green_btn"
android:gravity="center"
android:paddingVertical="3mm"
android:text="部门管路员"
android:textColor="@android:color/white"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginHorizontal="3mm"
android:text="销售部门管理员通过审核"
android:textColor="#ff359486"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="销售部门管理员通过审核"
android:textColor="#ff359486"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_remark"
android:layout_width="match_parent"
android:background="@drawable/shape_client_search"
android:layout_height="wrap_content"
android:layout_marginTop="5mm"
android:paddingHorizontal="3mm"
android:text="备注"
android:textColor="#ff359486"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论