Commit 320deecd by 罗翻

增加备件列表,物流信息等页面

parent 1619ccba
......@@ -17,6 +17,9 @@ public interface OrderPartContract {
}
abstract class Presenter extends BaseListPresenter<View> {
/**
* 查询备件列表
*/
public abstract void queryPartList();
/**
......
......@@ -63,7 +63,9 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
@Override
public void queryPartList() {
ApiFactory.queryPart(mOrderId, mType).subscribe(baseObserver(
(Consumer<List<OrderPart>>) orderPart -> datas.set(orderPart)
(Consumer<List<OrderPart>>) orderPart -> {
datas.set(orderPart);
}
, responeThrowable -> datas.set(Constants.FAILED)));
}
......@@ -74,7 +76,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle.putInt(Constants.ORDER_ID, mOrderId);
bundle.putInt(Constants.TYPE, Constants.APPLY_PART);
mView.startActivity(CommonSubmiteActivity.class, bundle);
MobclickAgent.onEvent(MyApplication.getContext(),"applyApply");
MobclickAgent.onEvent(MyApplication.getContext(), "applyApply");
} else if (mType == 2) {
dumpToReturnPart(Constants.BYMYSELF, null);
}
......@@ -87,7 +89,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle.putInt(Constants.PART_ID, partId);
bundle.putInt(Constants.TYPE, Constants.REFUSE_PART);
mView.startActivity(CommonSubmiteActivity.class, bundle);
MobclickAgent.onEvent(MyApplication.getContext(),"refuseApply");
MobclickAgent.onEvent(MyApplication.getContext(), "refuseApply");
}
@Override
......@@ -102,7 +104,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
}
bundle.putInt(Constants.TYPE, type);
mView.startActivity(ReturnPartActivity.class, bundle);
MobclickAgent.onEvent(MyApplication.getContext(),"returnApply");
MobclickAgent.onEvent(MyApplication.getContext(), "returnApply");
}
@Override
......@@ -111,19 +113,19 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle.putString(Constants.COURIER_NUM, courierNum);
bundle.putString(Constants.SHIPPER_CODE, shipperCode);
mView.startActivity(LogisticsInfoActivity.class, bundle);
MobclickAgent.onEvent(MyApplication.getContext(),"queryLogistics");
MobclickAgent.onEvent(MyApplication.getContext(), "queryLogistics");
}
public Observable<Boolean> cancleApply(int partId) {
mView.showDialog();
MobclickAgent.onEvent(MyApplication.getContext(),"cancleApply");
MobclickAgent.onEvent(MyApplication.getContext(), "cancleApply");
return ApiFactory.cancleApply(partId, mUserName);
}
@Override
public Observable receivePart(int partId) {
mView.showDialog();
MobclickAgent.onEvent(MyApplication.getContext(),"receiveApply");
MobclickAgent.onEvent(MyApplication.getContext(), "receiveApply");
return ApiFactory.receivePart(partId, mUserName);
}
}
......@@ -82,9 +82,9 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
public void receiveOrderSuccess() {
int num = mTotalRows - 1;
mView.showToast(R.string.receive_order_success);
EventBus.getDefault().post(new SwtichFragment(1));
mView.dumpBack();
mDisPosable = Observable.timer(300, TimeUnit.MILLISECONDS).subscribe(aLong -> {
EventBus.getDefault().post(new SwtichFragment(1));
EventBus.getDefault().post(new RefreshTab(0));
EventBus.getDefault().post(new RefreshReceivingNum(num < 0 ? 0 : num));
EventBus.getDefault().post(new RefreshApoiment(-1));
......
......@@ -308,4 +308,11 @@ public class LRecyclerView<M, B> extends FrameLayout {
public List<M> getDatas() {
return mCoreAdapter.getDatas();
}
/**
* 滑动到底部.
*/
public void scrollBottom() {
recyclerview.smoothScrollToPosition(mCoreAdapter.getItemCount() - 1);
}
}
......@@ -73,6 +73,8 @@
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:textColor="@color/default_text_color"
android:ellipsize="end"
android:maxLines="5"
android:textSize="14sp" />
</LinearLayout>
......@@ -163,6 +165,8 @@
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:textColor="@color/default_text_color"
android:ellipsize="end"
android:maxLines="5"
android:textSize="14sp" />
</LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment