提交 4bb8366a authored 作者: lgd's avatar lgd

1.往来 搜索跳转 开票

2.//TODO erp用户激活,忘记密码测试,产品下单还差附件,bat,mes,消息,我的,刷新token
上级 3de780c2
......@@ -432,6 +432,22 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.work.WorkOpenTicketActivity"
android:configChanges="keyboardHidden|orientation"
android:label="开票管理"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.work.WorkReceiveTicketActivity"
android:configChanges="keyboardHidden|orientation"
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"
......
......@@ -524,4 +524,19 @@ public interface ApiService {
@GET("/transitpart/{id}")
Observable<BaseBean> contactInfo(@Path("id") String id);
/**
* app端从往来单位进入查看收票单
*
* @return
*/
@GET("/receiptInvoiceApply/app/page/list/part")
Observable<BaseBean> receiveTicket(@QueryMap Map<String, Object> param);
/**
* app端从往来单位进入查看开票单
*
* @return
*/
@GET("/invoiceApply/app/page/list/part")
Observable<BaseBean> openTicket(@QueryMap Map<String, Object> param);
}
......@@ -30,19 +30,29 @@ public class WorkContactsDetailActivity extends WorkToolBarActivity {
LinearLayout llSettle;
@BindView(R.id.ll_client)
LinearLayout llClient;
@BindView(R.id.ll_ticket)
LinearLayout llTicket;
@BindView(R.id.ll_order)
LinearLayout llOrder;
@BindView(R.id.ll_return)
LinearLayout llReturn;
@BindView(R.id.ll_receive_ticket)
LinearLayout llReceiveTicket;
@BindView(R.id.ll_open_ticket)
LinearLayout llOpenTicket;
@BindView(R.id.ll_pay)
LinearLayout llPay;
@Override
protected void initView() {
ButterKnife.bind(this);
if (TextUtils.equals("客户", getIntent().getStringExtra("partTypeNames"))) {
llReceiveTicket.setVisibility(View.GONE);
llPay.setVisibility(View.GONE);
} else {
llReceive.setVisibility(View.GONE);
llClient.setVisibility(View.GONE);
llOpenTicket.setVisibility(View.GONE);
}
setTitle(getIntent().getStringExtra("title"));
}
@Override
......@@ -59,19 +69,26 @@ public class WorkContactsDetailActivity extends WorkToolBarActivity {
}
@OnClick({R.id.ll_info, R.id.ll_receive, R.id.ll_live, R.id.ll_settle, R.id.ll_ticket, R.id.ll_order, R.id.ll_return})
@OnClick({R.id.ll_pay,R.id.ll_info, R.id.ll_receive, R.id.ll_live, R.id.ll_settle, R.id.ll_receive_ticket, R.id.ll_open_ticket, R.id.ll_order, R.id.ll_return})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.ll_info:
startActivity(WorkContactsInfoActivity.class,"id",getIntent().getStringExtra("id"));
startActivity(WorkContactsInfoActivity.class, "id", getIntent().getStringExtra("id"));
break;
case R.id.ll_receive:
break;
case R.id.ll_pay:
break;
case R.id.ll_live:
break;
case R.id.ll_settle:
break;
case R.id.ll_ticket:
case R.id.ll_receive_ticket:
startActivity(WorkReceiveTicketActivity.class, "id", getIntent().getStringExtra("id"));
break;
case R.id.ll_open_ticket:
startActivity(WorkOpenTicketActivity.class, "id", getIntent().getStringExtra("id"));
break;
case R.id.ll_order:
break;
......@@ -79,4 +96,5 @@ public class WorkContactsDetailActivity extends WorkToolBarActivity {
break;
}
}
}
......@@ -2,9 +2,11 @@ package com.wd.workoffice.ui.activity.bat.work;
import android.text.TextUtils;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.google.android.material.tabs.TabLayout;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R;
......@@ -104,6 +106,13 @@ public class WorkContactsSearchActivity extends WorkBaseActivity implements Work
param.put("current", page);
workProPresenter.getData(param);
}, rvData);
workProductAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(WorkContactsInfoActivity.class, "id",dataList.get(position).getId()+"");
}
});
tlTab.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
......
package com.wd.workoffice.ui.activity.bat.work;
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.ProPriceBean;
import com.wd.workoffice.bean.TicketBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkTicketAdapter;
import com.wd.workoffice.util.UserKeeper;
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.disposables.Disposable;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkOpenTicketActivity extends WorkToolBarActivity {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private Map<String, Object> param;
private List<TicketBean.RecordsBean> dataList;
private WorkTicketAdapter dataAdapter;
private int page = 1;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
dataList = new ArrayList<>();
dataAdapter = new WorkTicketAdapter(R.layout.item_work_ticket, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
param = WorkUtils.pageKey();
param.put("deptId", getIntent().getStringExtra("id"));
param.put("customerId", UserKeeper.getInstance().getUserId());
param.put("current", page);
getData();
}
private void getData() {
RtfUtils.getRtf().openTicket(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;
}
List<TicketBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), TicketBean.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);
}
@Override
protected int layoutId() {
return R.layout.activity_pro_price;
}
}
package com.wd.workoffice.ui.activity.bat.work;
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.ProPriceBean;
import com.wd.workoffice.bean.TicketBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkProPriceAdapter;
import com.wd.workoffice.ui.adapter.WorkTicketAdapter;
import com.wd.workoffice.util.UserKeeper;
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.disposables.Disposable;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkReceiveTicketActivity extends WorkToolBarActivity {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private Map<String, Object> param;
private List<TicketBean.RecordsBean> dataList;
private WorkTicketAdapter dataAdapter;
private int page = 1;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
dataList = new ArrayList<>();
dataAdapter = new WorkTicketAdapter(R.layout.item_work_ticket, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
param = WorkUtils.pageKey();
param.put("supplierId", getIntent().getStringExtra("id"));
// param.put("customerId", UserKeeper.getInstance().getUserId());
param.put("current", page);
getData();
}
private void getData() {
RtfUtils.getRtf().receiveTicket(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;
}
List<TicketBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), TicketBean.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);
}
@Override
protected int layoutId() {
return R.layout.activity_pro_price;
}
}
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.ProPriceBean;
import com.wd.workoffice.bean.TicketBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class WorkTicketAdapter extends BaseQuickAdapter<TicketBean.RecordsBean, BaseViewHolder> {
public WorkTicketAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, TicketBean.RecordsBean item) {
helper.setText(R.id.tv_name, item.getSupplierName());
helper.setText(R.id.tv_tax, String.valueOf(item.getTax()));
helper.setText(R.id.tv_person, item.getApplierName());
helper.setText(R.id.tv_time, item.getCreatedTime());
helper.setText(R.id.tv_all_price, String.valueOf(item.getInvoiceSum()));
}
}
......@@ -90,7 +90,8 @@ public class WorkContactsFragment extends WorkBaseFg implements WorkContactsCont
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(WorkContactsDetailActivity.class,
"id",dataList.get(position).getId()+"","partTypeNames", partTypeNames);
"id",dataList.get(position).getId()+"",
"partTypeNames", partTypeNames,"title",dataList.get(position).getName());
}
});
}
......
......@@ -30,7 +30,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="基本信息"
android:textSize="16sp" />
......@@ -59,7 +58,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="应收账款"
android:textSize="16sp" />
......@@ -69,7 +67,28 @@
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_pay"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:text="应付账款"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
</LinearLayout>
......@@ -95,7 +114,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="现场库"
android:textSize="16sp" />
......@@ -124,7 +142,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="未结算库"
android:textSize="16sp" />
......@@ -142,10 +159,32 @@
android:layout_marginTop="10mm"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_receive_ticket"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:text="收票单"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:background="@mipmap/arrow_right_my" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_ticket"
android:id="@+id/ll_open_ticket"
style="@style/llStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -157,7 +196,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="开票单"
android:textSize="16sp" />
......@@ -186,7 +224,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="成交订单"
android:textSize="16sp" />
......@@ -215,7 +252,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="3"
android:text="退货记录"
android:textSize="16sp" />
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:layout_marginTop="10mm"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="图号TH82739857"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="#E3AD6E"
android:textSize="16sp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15mm"
android:background="#FCFCFD"
android:orientation="vertical"
android:padding="10mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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_tax"
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_person"
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_time"
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
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开票总价: "
android:textSize="12sp" />
<TextView
android:id="@+id/tv_all_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论