提交 2fde70bc authored 作者: lgd's avatar lgd

1.开票新增,开票审核

2.//TODO erp用户激活测试,忘记/重置密码测试,回款付款测试,产品下单还差附件,mes,消息,刷新token
上级 75dfafec
...@@ -699,7 +699,7 @@ ...@@ -699,7 +699,7 @@
<activity <activity
android:name=".ui.activity.bat.work.WorkFinancialReceiveTicketAddActivity" android:name=".ui.activity.bat.work.WorkFinancialReceiveTicketAddActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:label="票" android:label="票"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
...@@ -720,6 +720,22 @@ ...@@ -720,6 +720,22 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.work.WorkFinancialTicketSubmitActivity"
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.WorkFinancialReceiveTicketSubmitActivity"
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.workEnum; package com.wd.workoffice.bean.workEnum;
import java.util.Arrays;
import java.util.List;
/** /**
* author : flexible * author : flexible
* email : lgd19940421@163.com * email : lgd19940421@163.com
* github: https://github.com/FlexibleXd * github: https://github.com/FlexibleXd
**/ **/
public enum OrderType { public enum OrderType {
ALL("全部类型",""), SALE("销售订单","SO"), OUT_BUY("外采购流程","PO"), ALL("全部类型",""), SALE("销售订单","SO"), OUT_BUY("外采购订单","PO"),
SUPPLIER("供应订单","FO"), CRUCIBLE("坩埚订单","CO"), IN("内部交易订单","IO"), SUPPLIER("供应订单","FO"), CRUCIBLE("坩埚订单","CO"), IN("内部交易订单","IO"),
BUILD("组装订单","AO"); BUILD("组装订单","AO");
......
...@@ -522,48 +522,100 @@ public interface ApiService { ...@@ -522,48 +522,100 @@ public interface ApiService {
* *
* @return * @return
*/ */
@GET("/invoiceApply/so/exam") @PUT("/invoiceApply/so/exam")
Observable<BaseBean> soExam(@QueryMap Map<String, Object> param); Observable<BaseBean> soExam(@Body RequestBody requestBody);
/** /**
* ao开票审核 * ao开票审核
* *
* @return * @return
*/ */
@GET("/invoiceApply/ao/exam") @PUT("/invoiceApply/ao/exam")
Observable<BaseBean> aoExam(@QueryMap Map<String, Object> param); Observable<BaseBean> aoExam(@Body RequestBody requestBody);
/** /**
* ao开票审核 * po开票审核
* *
* @return * @return
*/ */
@GET("/invoiceApply/po/exam") @PUT("/invoiceApply/po/exam")
Observable<BaseBean> poExam(@QueryMap Map<String, Object> param); Observable<BaseBean> poExam(@Body RequestBody requestBody);
/** /**
* co开票审核 * co开票审核
* *
* @return * @return
*/ */
@GET("/invoiceApply/co/exam") @PUT("/invoiceApply/co/exam")
Observable<BaseBean> coExam(@QueryMap Map<String, Object> param); Observable<BaseBean> coExam(@Body RequestBody requestBody);
/** /**
* Fo收票审核 * Fo收票审核
* *
* @return * @return
*/ */
@GET("/receiptInvoiceApply/fo/exam") @PUT("/receiptInvoiceApply/fo/exam")
Observable<BaseBean> receiveFoExam(@QueryMap Map<String, Object> param); Observable<BaseBean> receiveFoExam(@Body RequestBody requestBody);
/** /**
* po收票审核 * po收票审核
* *
* @return * @return
*/ */
@GET("/receiptInvoiceApply/po/exam") @PUT("/receiptInvoiceApply/po/exam")
Observable<BaseBean> receivePoExam(@QueryMap Map<String, Object> param); Observable<BaseBean> receivePoExam(@Body RequestBody requestBody);
/**
* so开票申请
*
* @return
*/
@POST("/invoiceApply/so")
Observable<BaseBean> soApply(@Body RequestBody requestBody);
/**
* fo开票申请
*
* @return
*/
@POST("/invoiceApply/ao")
Observable<BaseBean> aoApply(@Body RequestBody requestBody);
/**
* po开票申请
*
* @return
*/
@POST("/invoiceApply/po")
Observable<BaseBean> poApply(@Body RequestBody requestBody);
/**
* co开票申请
*
* @return
*/
@POST("/invoiceApply/co")
Observable<BaseBean> coApply(@Body RequestBody requestBody);
/**
* fo开票申请
*
* @return
*/
@POST("/receiptInvoiceApply/fo")
Observable<BaseBean> foReceipApply(@Body RequestBody requestBody);
/**
* po开票申请
*
* @return
*/
@POST("/receiptInvoiceApply/po")
Observable<BaseBean> poReceiptApply(@Body RequestBody requestBody);
/** /**
* 外采购收票分页列表 * 外采购收票分页列表
...@@ -739,6 +791,7 @@ public interface ApiService { ...@@ -739,6 +791,7 @@ public interface ApiService {
@POST("/moneyPayApply/apply") @POST("/moneyPayApply/apply")
Observable<BaseBean> moneyPayApply(@Body RequestBody requestBody); Observable<BaseBean> moneyPayApply(@Body RequestBody requestBody);
/** /**
* 为开票查询的订单 * 为开票查询的订单
* customerId * customerId
...@@ -761,6 +814,9 @@ public interface ApiService { ...@@ -761,6 +814,9 @@ public interface ApiService {
@GET("/package-order/item/page/list") @GET("/package-order/item/page/list")
Observable<BaseBean> packageTicketOrder(@QueryMap Map<String, Object> param); Observable<BaseBean> packageTicketOrder(@QueryMap Map<String, Object> param);
/** /**
* 为外采购查询的订单 * 为外采购查询的订单
* customerId * customerId
...@@ -784,4 +840,30 @@ public interface ApiService { ...@@ -784,4 +840,30 @@ public interface ApiService {
@GET("/crucibleSaleOrder/forInvoice") @GET("/crucibleSaleOrder/forInvoice")
Observable<BaseBean> crucibleTicketOrder(@QueryMap Map<String, Object> param); Observable<BaseBean> crucibleTicketOrder(@QueryMap Map<String, Object> param);
/**
* 外采购订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/purchaseOrder/item/page/list")
Observable<BaseBean> purchaseOutTicketOrder(@QueryMap Map<String, Object> param);
/**
* 供应订单
* customerId
* launchDeptId
* searchValue
*
* @return
*/
@GET("/supplierOrder/item/page/list")
Observable<BaseBean> supplierTicketOrder(@QueryMap Map<String, Object> param);
} }
...@@ -66,8 +66,13 @@ public class StoreSaleClientActivity extends WorkToolBarActivity { ...@@ -66,8 +66,13 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
clientList = new ArrayList<>(); clientList = new ArrayList<>();
clientAdapter = new StoreClientAdapter(R.layout.item_store_client, clientList); clientAdapter = new StoreClientAdapter(R.layout.item_store_client, clientList);
clientAdapter.bindToRecyclerView(rvClient); clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageKey(); param = WorkUtils.pageKey();
param.put("partTypeCode", getIntent().getStringExtra("code")); if (TextUtils.isEmpty(getIntent().getStringExtra("flag"))) {
param.put("partTypeCode", getIntent().getStringExtra("code"));
} else {
param.put("searchType", getIntent().getStringExtra("code"));
}
getData(); getData();
} }
...@@ -76,7 +81,7 @@ public class StoreSaleClientActivity extends WorkToolBarActivity { ...@@ -76,7 +81,7 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
if (TextUtils.isEmpty(getIntent().getStringExtra("flag"))) { if (TextUtils.isEmpty(getIntent().getStringExtra("flag"))) {
observable = RtfUtils.getRtf().getClient(param); observable = RtfUtils.getRtf().getClient(param);
} else { } else {
// param.put("depId", UserKeeper.getInstance().getUserDepId()); // param.put("deptId", getIntent().getStringExtra("depId"));
observable = RtfUtils.getRtf().getClientOut(param); observable = RtfUtils.getRtf().getClientOut(param);
} }
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
...@@ -97,28 +102,36 @@ public class StoreSaleClientActivity extends WorkToolBarActivity { ...@@ -97,28 +102,36 @@ public class StoreSaleClientActivity extends WorkToolBarActivity {
toast(data.getMessage()); toast(data.getMessage());
return; return;
} }
ClientBean clientBean = JSON.parseObject(data.getData().toString(), ClientBean.class); List<ClientBean.RecordsBean> dataList = new ArrayList<>();
List<ClientBean.RecordsBean> dataList; if (TextUtils.isEmpty(getIntent().getStringExtra("flag"))) {
if (clientBean == null) { ClientBean clientBean = JSON.parseObject(data.getData().toString(), ClientBean.class);
dataList = new ArrayList<>(); dataList.addAll(clientBean.getRecords());
if (page == 1) {
clientList.clear();
clientList.addAll(dataList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(dataList);
clientAdapter.notifyDataSetChanged();
}
if (dataList.size() == 0) {
clientAdapter.loadMoreEnd();
} else {
page++;
}
} else { } else {
dataList = clientBean.getRecords(); dataList.addAll(JSON.parseArray(data.getData().toString(), ClientBean.RecordsBean.class));
} clientAdapter.loadMoreEnd();
if (page == 1) {
clientList.clear(); clientList.clear();
clientList.addAll(dataList); clientList.addAll(dataList);
clientAdapter.notifyDataSetChanged(); clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(dataList);
clientAdapter.notifyDataSetChanged();
} }
if (dataList.size() == 0) { if (TextUtils.isEmpty(getIntent().getStringExtra("flag"))) {
clientAdapter.loadMoreEnd();
} else {
page++;
} }
toast("搜索成功");
} }
}); });
} }
......
...@@ -17,6 +17,7 @@ import com.wd.workoffice.app.WorkToolBarActivity; ...@@ -17,6 +17,7 @@ import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProPriceBean; import com.wd.workoffice.bean.ProPriceBean;
import com.wd.workoffice.bean.TicketAddBean; import com.wd.workoffice.bean.TicketAddBean;
import com.wd.workoffice.bean.TicketDetailBean; import com.wd.workoffice.bean.TicketDetailBean;
import com.wd.workoffice.bean.event.CheckTicketEvent;
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.store.StoreSaleCarActivity; import com.wd.workoffice.ui.activity.bat.store.StoreSaleCarActivity;
...@@ -24,6 +25,9 @@ import com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter; ...@@ -24,6 +25,9 @@ import com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import com.wd.workoffice.widget.AddAndReduceView; import com.wd.workoffice.widget.AddAndReduceView;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -100,6 +104,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -100,6 +104,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
clientList.get(position).setCarPrice(etPrice.getText().toString()); clientList.get(position).setCarPrice(etPrice.getText().toString());
clientAdapter.notifyItemChanged(position); clientAdapter.notifyItemChanged(position);
addCart(data, num.getNumber(), etPrice.getText().toString()); addCart(data, num.getNumber(), etPrice.getText().toString());
tvNum.setText("共 ".concat(clientList.size() + "").concat(" 件"));
addCartDialog.dismiss(); addCartDialog.dismiss();
} }
}); });
...@@ -143,21 +148,37 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -143,21 +148,37 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
clientAdapter.bindToRecyclerView(rvProduct); clientAdapter.bindToRecyclerView(rvProduct);
param = WorkUtils.pageKey(); param = WorkUtils.pageKey();
param.put("current", 1); param.put("current", 1);
param.put("customerId", getIntent().getStringExtra("customerId")); if (TextUtils.isEmpty(getIntent().getStringExtra("supplier"))) {
param.put("launchDeptId", getIntent().getStringExtra("depId")); param.put("customerId", getIntent().getStringExtra("customerId"));
param.put("launchDeptId", getIntent().getStringExtra("depId"));
} else {
param.put("supplierId", getIntent().getStringExtra("customerId"));
param.put("receiveDeptId", getIntent().getStringExtra("depId"));
}
getData(); getData();
} }
private void getData() { private void getData() {
Observable<BaseBean> observable; Observable<BaseBean> observable;
if (TextUtils.equals("销售订单", getIntent().getStringExtra("orderType"))) { if (TextUtils.isEmpty(getIntent().getStringExtra("supplier"))) {
observable = RtfUtils.getRtf().saleTicketOrder(param); if (TextUtils.equals("销售订单", getIntent().getStringExtra("orderType"))) {
} else if (TextUtils.equals("组装订单", getIntent().getStringExtra("orderType"))) { observable = RtfUtils.getRtf().saleTicketOrder(param);
observable = RtfUtils.getRtf().packageTicketOrder(param); } else if (TextUtils.equals("组装订单", getIntent().getStringExtra("orderType"))) {
} else if (TextUtils.equals("外采购订单", getIntent().getStringExtra("orderType"))) { observable = RtfUtils.getRtf().packageTicketOrder(param);
observable = RtfUtils.getRtf().purchaseTicketOrder(param); } else if (TextUtils.equals("外采购订单", getIntent().getStringExtra("orderType"))) {
observable = RtfUtils.getRtf().purchaseTicketOrder(param);
} else {
observable = RtfUtils.getRtf().crucibleTicketOrder(param);
}
} else { } else {
observable = RtfUtils.getRtf().crucibleTicketOrder(param); if (TextUtils.equals("供应订单", getIntent().getStringExtra("orderType"))) {
observable = RtfUtils.getRtf().supplierTicketOrder(param);
} else if (TextUtils.equals("外采购订单", getIntent().getStringExtra("orderType"))) {
observable = RtfUtils.getRtf().purchaseOutTicketOrder(param);
} else {
observable = RtfUtils.getRtf().supplierTicketOrder(param);
}
} }
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
...@@ -210,7 +231,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -210,7 +231,7 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
openDialog(clientList.get(position),position); openDialog(clientList.get(position), position);
} }
}); });
} }
...@@ -229,9 +250,19 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -229,9 +250,19 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
toast("购物车没有产品"); toast("购物车没有产品");
return; return;
} }
startActivity(StoreSaleCarActivity.class, "pro", JSON.toJSONString(carList), if (TextUtils.isEmpty(getIntent().getStringExtra("supplier"))) {
"subProcess", getIntent().getStringExtra("subProcess"), "customerId", getIntent().getStringExtra("transitPartId"), startActivity(WorkFinancialTicketSubmitActivity.class, "orderType", getIntent().getStringExtra("orderType"),
"receiveDeptId", getIntent().getStringExtra("depId"), "code", getIntent().getStringExtra("code")); "depId", getIntent().getStringExtra("depId"), "customerId", getIntent().getStringExtra("customerId"),
"customerName", getIntent().getStringExtra("customerName"),
"info", JSON.toJSONString(carList));
} else {
startActivity(WorkFinancialReceiveTicketSubmitActivity.class, "orderType", getIntent().getStringExtra("orderType"),
"depId", getIntent().getStringExtra("depId"), "customerId", getIntent().getStringExtra("customerId"),
"customerName", getIntent().getStringExtra("customerName"),
"info", JSON.toJSONString(carList));
}
break; break;
case R.id.btn_search: case R.id.btn_search:
param.put("name", etKey.getText().toString()); param.put("name", etKey.getText().toString());
...@@ -241,4 +272,21 @@ public class WorkChooseProductActivity extends WorkToolBarActivity { ...@@ -241,4 +272,21 @@ public class WorkChooseProductActivity extends WorkToolBarActivity {
break; break;
} }
} }
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckTicketEvent event) {
finish();
}
} }
...@@ -4,16 +4,21 @@ import android.content.DialogInterface; ...@@ -4,16 +4,21 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.CheckTicketEvent;
import com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity; import com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity;
import com.wd.workoffice.util.DialogUtils; import com.wd.workoffice.util.DialogUtils;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
...@@ -33,15 +38,15 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity { ...@@ -33,15 +38,15 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_order) @BindView(R.id.tv_order)
TextView tvOrder; TextView tvOrder;
@BindView(R.id.rl_order) @BindView(R.id.rl_order)
RelativeLayout rlOrder; LinearLayout rlOrder;
@BindView(R.id.tv_dep) @BindView(R.id.tv_dep)
TextView tvDep; TextView tvDep;
@BindView(R.id.rl_dep) @BindView(R.id.rl_dep)
RelativeLayout rlDep; LinearLayout rlDep;
@BindView(R.id.tv_client) @BindView(R.id.tv_client)
TextView tvClient; TextView tvClient;
@BindView(R.id.rl_client) @BindView(R.id.rl_client)
RelativeLayout rlClient; LinearLayout rlClient;
private Map<String, Object> param; private Map<String, Object> param;
private Integer clientId; private Integer clientId;
private QMUIDialog.MenuDialogBuilder typeDialog; private QMUIDialog.MenuDialogBuilder typeDialog;
...@@ -82,7 +87,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity { ...@@ -82,7 +87,7 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 10001 && resultCode == 10001) { if (requestCode == 10002 && resultCode == 10002) {
String clientName = data.getStringExtra("clientName"); String clientName = data.getStringExtra("clientName");
clientId = data.getIntExtra("id", 0); clientId = data.getIntExtra("id", 0);
tvClient.setText(clientName); tvClient.setText(clientName);
...@@ -93,12 +98,10 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity { ...@@ -93,12 +98,10 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
} }
} }
@OnClick({R.id.tv_next, R.id.rl_order, R.id.rl_dep, R.id.rl_client}) @OnClick({R.id.tv_next, R.id.rl_order, R.id.rl_dep, R.id.rl_client})
public void onViewClicked(View view) { public void onViewClicked(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.tv_next: case R.id.tv_next:
if (TextUtils.isEmpty(chooseType)) { if (TextUtils.isEmpty(chooseType)) {
toast("请选择订单类别"); toast("请选择订单类别");
return; return;
...@@ -108,16 +111,12 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity { ...@@ -108,16 +111,12 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
return; return;
} }
if (clientId == null) { if (clientId == null) {
toast("请先选择客户"); toast("请先选择供应商");
return; return;
} }
startActivity(WorkChooseProductActivity.class,
// param.put("process", PermissionType.); "orderType", tvOrder.getText().toString(), "supplier", "选择供应商", "depId", depId + "", "customerId", clientId + "",
// param.put("applyRemark", etRemark.getText().toString()); "customerName", tvClient.getText().toString());
// param.put("applyDept", UserKeeper.getInstance().getUserDepId());
// param.put("orderType", chooseType);
// param.put("applyAmount", etPrice.getText().toString());
startActivity(StoreSaleClientActivity.class);
break; break;
case R.id.rl_order: case R.id.rl_order:
typeDialog.show(); typeDialog.show();
...@@ -126,9 +125,26 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity { ...@@ -126,9 +125,26 @@ public class WorkFinancialReceiveTicketAddActivity extends WorkToolBarActivity {
startActivityForResult(WorkChooseDepActivity.class, 10003); startActivityForResult(WorkChooseDepActivity.class, 10003);
break; break;
case R.id.rl_client: case R.id.rl_client:
startActivityForResult(StoreSaleClientActivity.class, 10001, startActivityForResult(StoreSaleClientActivity.class, 10002,
"code", "SUPPLIER","supplier","选择供应商"); "depId", depId + "", "flag", "1", "code", "SUPPLIER", "supplier", "选择供应商");
break; break;
} }
} }
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckTicketEvent event) {
finish();
}
} }
...@@ -20,6 +20,7 @@ import com.wd.workoffice.bean.event.CheckTicketEvent; ...@@ -20,6 +20,7 @@ import com.wd.workoffice.bean.event.CheckTicketEvent;
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.adapter.WorkFinancialTicketDetailAdapter; import com.wd.workoffice.ui.adapter.WorkFinancialTicketDetailAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
...@@ -91,7 +92,7 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit ...@@ -91,7 +92,7 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
dataAdapter = new WorkFinancialTicketDetailAdapter(R.layout.item_ticket_detail, dataList); dataAdapter = new WorkFinancialTicketDetailAdapter(R.layout.item_ticket_detail, dataList);
dataAdapter.bindToRecyclerView(rvData); dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>(); param = new HashMap<>();
param.put("id", getIntent().getStringExtra("id")); param.put("id", info.getId());
orderType = getIntent().getStringExtra("type"); orderType = getIntent().getStringExtra("type");
} }
...@@ -198,11 +199,11 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit ...@@ -198,11 +199,11 @@ public class WorkFinancialReceiveTicketDetailActivity extends WorkToolBarActivit
param.put("auditRemark", remark); param.put("auditRemark", remark);
Observable<BaseBean> baseBeanObservable; Observable<BaseBean> baseBeanObservable;
if (TextUtils.equals(orderType, "供应订单")) { if (TextUtils.equals(orderType, "供应订单")) {
baseBeanObservable = RtfUtils.getRtf().receiveFoExam(param); baseBeanObservable = RtfUtils.getRtf().receiveFoExam(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, "外采购订单")) { } else if (TextUtils.equals(orderType, "外采购订单")) {
baseBeanObservable = RtfUtils.getRtf().receivePoExam(param); baseBeanObservable = RtfUtils.getRtf().receivePoExam(WorkUtils.convertMapToBody(param));
} else { } else {
baseBeanObservable = RtfUtils.getRtf().receiveFoExam(param); baseBeanObservable = RtfUtils.getRtf().receiveFoExam(WorkUtils.convertMapToBody(param));
} }
baseBeanObservable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { baseBeanObservable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
......
package com.wd.workoffice.ui.activity.bat.work;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.widget.EditText;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.TicketAddBean;
import com.wd.workoffice.bean.event.CheckTicketEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter;
import com.wd.workoffice.util.MathUtils;
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.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 WorkFinancialReceiveTicketSubmitActivity extends WorkToolBarActivity {
@BindView(R.id.tv_bottom)
TextView tvBottom;
@BindView(R.id.tv_desc)
TextView tvDesc;
@BindView(R.id.tv_client)
TextView tvClient;
@BindView(R.id.tv_price)
TextView tvPrice;
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.et_tax)
EditText etTax;
@BindView(R.id.et_remark)
EditText etRemark;
@BindView(R.id.tv_remark_num)
TextView tvRemarkNum;
private List<TicketAddBean.RecordsBean> dataList;
private WorkAddTicketOrderAdapter dataAdapter;
private Map<String, Object> param;
private String orderType;
@Override
protected void initView() {
ButterKnife.bind(this);
tvDesc.setText("所属供应商");
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
tvClient.setText(getIntent().getStringExtra("customerName"));
dataList = JSON.parseArray(getIntent().getStringExtra("info"), TicketAddBean.RecordsBean.class);
dataAdapter = new WorkAddTicketOrderAdapter(R.layout.item_ticket_add_detail, dataList,1);
dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>();
param.put("supplierId", getIntent().getStringExtra("customerId"));
param.put("deptId", getIntent().getStringExtra("depId"));
orderType = getIntent().getStringExtra("orderType");
changeNumAndPrice();
coverProInfo(dataList);
}
@Override
protected void initEvent() {
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) {
tvRemarkNum.setText(s.length() + "/140");
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_open_ticket_submit;
}
/**
* 转换pro,生成上传参数
*
* @param proList
* @return
*/
private void coverProInfo(List<TicketAddBean.RecordsBean> proList) {
List<JSONObject> orderItems = new ArrayList<>();
for (TicketAddBean.RecordsBean recordsBean : proList) {
JSONObject data = new JSONObject();
data.put("productId", recordsBean.getProductId());
data.put("orderId", recordsBean.getOrderId());
data.put("quantity", recordsBean.getCarNum());
data.put("invoiceUnitPrice", recordsBean.getCarPrice());
// data.put("outProductName", recordsBean.getoutpr());
orderItems.add(data);
}
param.put("invoiceApplyItems", orderItems);
}
private void changeNumAndPrice() {
String allPrice = "";
for (TicketAddBean.RecordsBean recordsBean : dataList) {
allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum() + "", recordsBean.getCarPrice(), 2), 2);
}
tvPrice.setText(" ¥ ".concat(allPrice));
}
private void submit() {
param.put("tax", etTax.getText().toString());
param.put("applyRemark", etRemark.getText().toString());
Observable<BaseBean> baseBeanObservable;
if (TextUtils.equals(orderType, "外采购订单")) {
baseBeanObservable = RtfUtils.getRtf().poReceiptApply(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, "销售订单")) {
baseBeanObservable = RtfUtils.getRtf().foReceipApply(WorkUtils.convertMapToBody(param));
} else {
baseBeanObservable = RtfUtils.getRtf().poReceiptApply(WorkUtils.convertMapToBody(param));
}
baseBeanObservable.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 CheckTicketEvent());
finish();
}
});
}
@OnClick(R.id.tv_bottom)
public void onViewClicked() {
if (TextUtils.isEmpty(etTax.getText().toString())) {
toast("请输入税费");
return;
}
submit();
}
}
...@@ -4,17 +4,22 @@ import android.content.DialogInterface; ...@@ -4,17 +4,22 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.CheckTicketEvent;
import com.wd.workoffice.bean.workEnum.OrderType; import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity; import com.wd.workoffice.ui.activity.bat.store.StoreSaleClientActivity;
import com.wd.workoffice.util.DialogUtils; import com.wd.workoffice.util.DialogUtils;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
...@@ -34,15 +39,15 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity { ...@@ -34,15 +39,15 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_order) @BindView(R.id.tv_order)
TextView tvOrder; TextView tvOrder;
@BindView(R.id.rl_order) @BindView(R.id.rl_order)
RelativeLayout rlOrder; LinearLayout rlOrder;
@BindView(R.id.tv_dep) @BindView(R.id.tv_dep)
TextView tvDep; TextView tvDep;
@BindView(R.id.rl_dep) @BindView(R.id.rl_dep)
RelativeLayout rlDep; LinearLayout rlDep;
@BindView(R.id.tv_client) @BindView(R.id.tv_client)
TextView tvClient; TextView tvClient;
@BindView(R.id.rl_client) @BindView(R.id.rl_client)
RelativeLayout rlClient; LinearLayout rlClient;
private Map<String, Object> param; private Map<String, Object> param;
private Integer clientId; private Integer clientId;
private QMUIDialog.MenuDialogBuilder typeDialog; private QMUIDialog.MenuDialogBuilder typeDialog;
...@@ -112,7 +117,9 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity { ...@@ -112,7 +117,9 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
toast("请先选择客户"); toast("请先选择客户");
return; return;
} }
startActivity(WorkChooseProductActivity.class, "orderType", tvOrder.getText().toString(), "depId", "" + "", "customerId", clientId + ""); startActivity(WorkChooseProductActivity.class,
"orderType", tvOrder.getText().toString(), "depId", depId+"", "customerId", clientId + "",
"customerName", tvClient.getText().toString());
break; break;
case R.id.rl_order: case R.id.rl_order:
typeDialog.show(); typeDialog.show();
...@@ -122,8 +129,24 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity { ...@@ -122,8 +129,24 @@ public class WorkFinancialTicketAddActivity extends WorkToolBarActivity {
break; break;
case R.id.rl_client: case R.id.rl_client:
startActivityForResult(StoreSaleClientActivity.class, 10001, startActivityForResult(StoreSaleClientActivity.class, 10001,
"code", "CUSTOMER"); "flag","1","code", "CUSTOMER");
break; break;
} }
} }
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckTicketEvent event) {
finish();
}
} }
...@@ -92,7 +92,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity { ...@@ -92,7 +92,7 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
dataAdapter = new WorkFinancialTicketDetailAdapter(R.layout.item_ticket_detail, dataList); dataAdapter = new WorkFinancialTicketDetailAdapter(R.layout.item_ticket_detail, dataList);
dataAdapter.bindToRecyclerView(rvData); dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>(); param = new HashMap<>();
param.put("id", getIntent().getStringExtra("id")); param.put("id", info.getId());
orderType = getIntent().getStringExtra("type"); orderType = getIntent().getStringExtra("type");
} }
...@@ -199,13 +199,13 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity { ...@@ -199,13 +199,13 @@ public class WorkFinancialTicketDetailActivity extends WorkToolBarActivity {
param.put("auditRemark", remark); param.put("auditRemark", remark);
Observable<BaseBean> baseBeanObservable; Observable<BaseBean> baseBeanObservable;
if (TextUtils.equals(orderType, "销售订单")) { if (TextUtils.equals(orderType, "销售订单")) {
baseBeanObservable = RtfUtils.getRtf().soExam(param); baseBeanObservable = RtfUtils.getRtf().soExam(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, "外采购订单")) { } else if (TextUtils.equals(orderType, "外采购订单")) {
baseBeanObservable = RtfUtils.getRtf().poExam(param); baseBeanObservable = RtfUtils.getRtf().poExam(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, "坩埚订单")) { } else if (TextUtils.equals(orderType, "坩埚订单")) {
baseBeanObservable = RtfUtils.getRtf().coExam(param); baseBeanObservable = RtfUtils.getRtf().coExam(WorkUtils.convertMapToBody(param));
} else { } else {
baseBeanObservable = RtfUtils.getRtf().aoExam(param); baseBeanObservable = RtfUtils.getRtf().aoExam(WorkUtils.convertMapToBody(param));
} }
baseBeanObservable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { baseBeanObservable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
......
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.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProductBean;
import com.wd.workoffice.bean.TicketAddBean;
import com.wd.workoffice.bean.event.CheckTicketEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.WorkAddTicketOrderAdapter;
import com.wd.workoffice.util.MathUtils;
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 WorkFinancialTicketSubmitActivity extends WorkToolBarActivity {
@BindView(R.id.tv_bottom)
TextView tvBottom;
@BindView(R.id.tv_desc)
TextView tvDesc;
@BindView(R.id.tv_client)
TextView tvClient;
@BindView(R.id.tv_price)
TextView tvPrice;
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.et_tax)
EditText etTax;
@BindView(R.id.et_remark)
EditText etRemark;
@BindView(R.id.tv_remark_num)
TextView tvRemarkNum;
private List<TicketAddBean.RecordsBean> dataList;
private WorkAddTicketOrderAdapter dataAdapter;
private Map<String, Object> param;
private String orderType;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
tvClient.setText(getIntent().getStringExtra("customerName"));
dataList = JSON.parseArray(getIntent().getStringExtra("info"), TicketAddBean.RecordsBean.class);
dataAdapter = new WorkAddTicketOrderAdapter(R.layout.item_ticket_add_detail, dataList,1);
dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>();
param.put("customerId", getIntent().getStringExtra("customerId"));
param.put("deptId", getIntent().getStringExtra("depId"));
orderType = getIntent().getStringExtra("orderType");
changeNumAndPrice();
coverProInfo(dataList);
}
@Override
protected void initEvent() {
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) {
tvRemarkNum.setText(s.length() + "/140");
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_open_ticket_submit;
}
/**
* 转换pro,生成上传参数
*
* @param proList
* @return
*/
private void coverProInfo(List<TicketAddBean.RecordsBean> proList) {
List<JSONObject> orderItems = new ArrayList<>();
for (TicketAddBean.RecordsBean recordsBean : proList) {
JSONObject data = new JSONObject();
data.put("productId", recordsBean.getProductId());
data.put("orderId", recordsBean.getOrderId());
data.put("quantity", recordsBean.getCarNum());
data.put("invoiceUnitPrice", recordsBean.getCarPrice());
// data.put("outProductName", recordsBean.getoutpr());
orderItems.add(data);
}
param.put("invoiceApplyItems", orderItems);
}
private void changeNumAndPrice() {
String allPrice = "";
for (TicketAddBean.RecordsBean recordsBean : dataList) {
allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum() + "", recordsBean.getCarPrice(), 2), 2);
}
tvPrice.setText(" ¥ ".concat(allPrice));
}
private void submit() {
param.put("tax", etTax.getText().toString());
param.put("applyRemark", etRemark.getText().toString());
Observable<BaseBean> baseBeanObservable;
if (TextUtils.equals(orderType, "销售订单")) {
baseBeanObservable = RtfUtils.getRtf().soApply(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, "外采购订单")) {
baseBeanObservable = RtfUtils.getRtf().poApply(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, "坩埚订单")) {
baseBeanObservable = RtfUtils.getRtf().coApply(WorkUtils.convertMapToBody(param));
} else {
baseBeanObservable = RtfUtils.getRtf().aoApply(WorkUtils.convertMapToBody(param));
}
baseBeanObservable.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 CheckTicketEvent());
finish();
}
});
}
@OnClick(R.id.tv_bottom)
public void onViewClicked() {
if (TextUtils.isEmpty(etTax.getText().toString())) {
toast("请输入税费");
return;
}
submit();
}
}
...@@ -10,25 +10,36 @@ import com.wd.workoffice.util.MathUtils; ...@@ -10,25 +10,36 @@ import com.wd.workoffice.util.MathUtils;
import java.util.List; import java.util.List;
import androidx.annotation.Nullable;
/** /**
* Created by flexible on 2018/8/13. * Created by flexible on 2018/8/13.
*/ */
public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.RecordsBean, BaseViewHolder> { public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.RecordsBean, BaseViewHolder> {
int type;//0,add 1,submit
public WorkAddTicketOrderAdapter(int layoutResId, List data) { public WorkAddTicketOrderAdapter(int layoutResId, List data) {
super(layoutResId, data); super(layoutResId, data);
} }
public WorkAddTicketOrderAdapter(int layoutResId, @Nullable List<TicketAddBean.RecordsBean> data, int type) {
super(layoutResId, data);
this.type = type;
}
@Override @Override
protected void convert(BaseViewHolder helper, TicketAddBean.RecordsBean item) { protected void convert(BaseViewHolder helper, TicketAddBean.RecordsBean item) {
helper.setText(R.id.tv_name, item.getProductSimpleCode()); helper.setText(R.id.tv_name, item.getProductSimpleCode());
helper.setText(R.id.tv_order, item.getOrderId()); helper.setText(R.id.tv_order, item.getOrderId());
helper.setText(R.id.tv_spec, item.getProductSpec()); helper.setText(R.id.tv_spec, item.getProductSpec());
helper.setText(R.id.tv_unit, item.getProductUnit()); helper.setText(R.id.tv_unit, item.getProductUnit());
helper.setText(R.id.tv_apply_num, item.getProductCount()+""); helper.setText(R.id.tv_apply_num, item.getProductCount() + "");
helper.setText(R.id.tv_price, item.getCarPrice()); helper.setText(R.id.tv_price, item.getCarPrice());
helper.setText(R.id.tv_num, item.getCarNum()+""); helper.setText(R.id.tv_num, item.getCarNum() + "");
if (type == 1) {
helper.setVisible(R.id.iv_cart, false);
}
} }
} }
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_client" android:id="@+id/rv_client"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginTop="4mm"> android:layout_marginTop="4mm">
</androidx.recyclerview.widget.RecyclerView> </androidx.recyclerview.widget.RecyclerView>
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48mm" android:layout_height="48mm"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="#5C768A"
android:gravity="center" android:gravity="center"
android:textColor="@color/white"
android:text="下一步,选择产品来源" android:text="下一步,选择产品来源"
android:background="#5C768A"/> android:textColor="@color/white" />
<LinearLayout <LinearLayout
android:layout_above="@id/tv_next"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@id/tv_next"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <LinearLayout
android:id="@+id/rl_order" android:id="@+id/rl_order"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -52,23 +52,25 @@ ...@@ -52,23 +52,25 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10mm" android:layout_marginLeft="10mm"
android:text="选择订单类别" android:text="选择订单类别"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="center_vertical"> android:layout_weight="1"
android:gravity="center_vertical|right">
<TextView <TextView
android:id="@+id/tv_order" android:id="@+id/tv_order"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="10mm" android:layout_marginRight="10mm"
android:maxLines="1"
android:text="请选择订单类别" android:text="请选择订单类别"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
...@@ -77,9 +79,9 @@ ...@@ -77,9 +79,9 @@
android:background="@mipmap/arrow_right_blue" /> android:background="@mipmap/arrow_right_blue" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </LinearLayout>
<RelativeLayout <LinearLayout
android:id="@+id/rl_dep" android:id="@+id/rl_dep"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -106,34 +108,38 @@ ...@@ -106,34 +108,38 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10mm" android:layout_marginLeft="10mm"
android:text="选择所属部门" android:text="选择所属部门"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_marginLeft="3mm"
android:gravity="center_vertical"> android:layout_weight="1"
android:gravity="center_vertical|right">
<TextView <TextView
android:id="@+id/tv_dep" android:id="@+id/tv_dep"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="10mm" android:ellipsize="end"
android:maxLines="1"
android:text="请选择所属部门" android:text="请选择所属部门"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
android:layout_width="6mm" android:layout_width="6mm"
android:layout_height="10mm" android:layout_height="10mm"
android:layout_marginLeft="10mm"
android:layout_gravity="center_vertical"
android:background="@mipmap/arrow_right_blue" /> android:background="@mipmap/arrow_right_blue" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </LinearLayout>
<RelativeLayout <LinearLayout
android:id="@+id/rl_client" android:id="@+id/rl_client"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -161,31 +167,35 @@ ...@@ -161,31 +167,35 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10mm" android:layout_marginLeft="10mm"
android:text="选择客户" android:text="选择客户"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_marginLeft="3mm"
android:gravity="center_vertical"> android:layout_weight="1"
android:gravity="center_vertical|right">
<TextView <TextView
android:id="@+id/tv_client" android:id="@+id/tv_client"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="10mm" android:ellipsize="end"
android:maxLines="1"
android:text="选择客户" android:text="选择客户"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
android:layout_width="6mm" android:layout_width="6mm"
android:layout_height="10mm" android:layout_height="10mm"
android:layout_marginLeft="10mm"
android:layout_gravity="center_vertical"
android:background="@mipmap/arrow_right_blue" /> android:background="@mipmap/arrow_right_blue" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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">
<TextView
android:id="@+id/tv_bottom"
android:layout_width="match_parent"
android:layout_height="48mm"
android:layout_alignParentBottom="true"
android:background="#5C768A"
android:gravity="center"
android:orientation="horizontal"
android:text="提交申请"
android:textColor="@color/white"
android:textSize="16sp"></TextView>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/tv_bottom">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom"
android:background="@color/white"
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:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所属客户"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_client"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="销售二公司"
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:text="销售二公司"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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" />
<View style="@style/ViewX" />
<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="15sp" />
<EditText
android:id="@+id/et_tax"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:hint="输入税率"
android:inputType="numberDecimal"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</LinearLayout>
<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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3mm"
android:background="@drawable/shape_confirm_order"
android:orientation="vertical">
<EditText
android:id="@+id/et_remark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3mm"
android:background="@null"
android:gravity="top"
android:hint="请输入"
android:minLines="4"
android:padding="5mm"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_remark_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="4mm"
android:text="0/140"
android:textColor="@color/flexible_text_gray" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48mm" android:layout_height="48mm"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="#5C768A"
android:gravity="center" android:gravity="center"
android:textColor="@color/white"
android:text="下一步,选择产品来源" android:text="下一步,选择产品来源"
android:background="#5C768A"/> android:textColor="@color/white" />
<LinearLayout <LinearLayout
android:layout_above="@id/tv_next"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@id/tv_next"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <LinearLayout
android:id="@+id/rl_order" android:id="@+id/rl_order"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -57,18 +57,19 @@ ...@@ -57,18 +57,19 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_weight="1"
android:gravity="center_vertical"> android:gravity="center_vertical|right">
<TextView <TextView
android:id="@+id/tv_order" android:id="@+id/tv_order"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="10mm" android:layout_marginRight="10mm"
android:maxLines="1"
android:text="请选择订单类别" android:text="请选择订单类别"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
...@@ -77,9 +78,9 @@ ...@@ -77,9 +78,9 @@
android:background="@mipmap/arrow_right_blue" /> android:background="@mipmap/arrow_right_blue" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </LinearLayout>
<RelativeLayout <LinearLayout
android:id="@+id/rl_dep" android:id="@+id/rl_dep"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -92,7 +93,6 @@ ...@@ -92,7 +93,6 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center_vertical"> android:gravity="center_vertical">
<View <View
...@@ -111,29 +111,34 @@ ...@@ -111,29 +111,34 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_marginLeft="3mm"
android:gravity="center_vertical"> >
<TextView <TextView
android:id="@+id/tv_dep" android:id="@+id/tv_dep"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="10mm" android:gravity="end"
android:ellipsize="end"
android:singleLine="true"
android:text="请选择所属部门" android:text="请选择所属部门"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
android:layout_width="6mm" android:layout_width="6mm"
android:layout_height="10mm" android:layout_height="10mm"
android:layout_marginLeft="10mm"
android:layout_gravity="center_vertical"
android:background="@mipmap/arrow_right_blue" /> android:background="@mipmap/arrow_right_blue" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </LinearLayout>
<RelativeLayout <LinearLayout
android:id="@+id/rl_client" android:id="@+id/rl_client"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -146,7 +151,6 @@ ...@@ -146,7 +151,6 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:gravity="center_vertical"> android:gravity="center_vertical">
<View <View
...@@ -166,26 +170,29 @@ ...@@ -166,26 +170,29 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_marginLeft="3mm">
android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_client" android:id="@+id/tv_client"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="10mm" android:gravity="right"
android:singleLine="true"
android:text="选择供应商" android:text="选择供应商"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<ImageView <ImageView
android:layout_width="6mm" android:layout_width="6mm"
android:layout_height="10mm" android:layout_height="10mm"
android:layout_marginLeft="10mm"
android:layout_gravity="center_vertical"
android:background="@mipmap/arrow_right_blue" /> android:background="@mipmap/arrow_right_blue" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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">
<TextView
android:id="@+id/tv_bottom"
android:layout_width="match_parent"
android:layout_height="48mm"
android:layout_alignParentBottom="true"
android:background="#5C768A"
android:gravity="center"
android:orientation="horizontal"
android:text="提交申请"
android:textColor="@color/white"
android:textSize="16sp"></TextView>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/tv_bottom">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom"
android:background="@color/white"
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:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所属供应商"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_client"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="销售二公司"
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:text="销售二公司"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</RelativeLayout>
<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" />
<View style="@style/ViewX" />
<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="15sp" />
<EditText
android:id="@+id/et_tax"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:hint="输入税率"
android:inputType="numberDecimal"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
</LinearLayout>
<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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3mm"
android:background="@drawable/shape_confirm_order"
android:orientation="vertical">
<EditText
android:id="@+id/et_remark"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3mm"
android:background="@null"
android:gravity="top"
android:hint="请输入"
android:minLines="4"
android:padding="5mm"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_remark_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="4mm"
android:text="0/140"
android:textColor="@color/flexible_text_gray" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
...@@ -172,6 +172,7 @@ ...@@ -172,6 +172,7 @@
android:textSize="12sp" /> android:textSize="12sp" />
<ImageView <ImageView
android:id="@+id/iv_cart"
android:layout_width="25mm" android:layout_width="25mm"
android:layout_height="25mm" android:layout_height="25mm"
android:layout_gravity="right" android:layout_gravity="right"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论