提交 370129f9 authored 作者: lgd's avatar lgd

1.添加订单参数

2.//todo  回款管理的客户接口
上级 be75d275
......@@ -959,6 +959,14 @@
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.store.ChooseStockActivity"
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.order.UseApplyActivity"
android:configChanges="keyboardHidden|orientation"
......
......@@ -2,6 +2,7 @@ package com.wd.workoffice.ui.activity.bat.store;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Menu;
......@@ -79,6 +80,18 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
TextView tvClient;
@BindView(R.id.tv_supplier)
TextView tvSupplier;
@BindView(R.id.tv_in_stock)
TextView tvInStock;
@BindView(R.id.tv_in_stock_content)
TextView tvInStockContent;
@BindView(R.id.ll_in_stock)
LinearLayout llInStock;
@BindView(R.id.tv_send_stock)
TextView tvSendStock;
@BindView(R.id.tv_send_stock_content)
TextView tvSendStockContent;
@BindView(R.id.ll_send_stock)
LinearLayout llSendStock;
private Map<String, Object> param;
private List<ProductBean.RecordsBean> proList;
private StoreProductAdapter proAdapter;
......@@ -102,6 +115,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
private List<TradingBean.RecordsBean> tradingProductList;
private TradingProductAdapter tradingProductAdapter;
private Map<String, Object> tradeParam;
private StockBean chooseSendStock;
@Override
protected void initView() {
......@@ -125,6 +139,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
case "3":
permissionCode = PermissionType.PROCESS_SUPPLY.getCode();
llClient.setVisibility(View.GONE);
llSendStock.setVisibility(View.GONE);
tvCommonDesc.setText("入库仓库");
tvCommonContent.setHint("请选择入库仓库");
break;
......@@ -134,6 +149,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
permissionCode = PermissionType.PROCESS_CRUCIBLE.getCode();
llClient.setVisibility(View.GONE);
llSupplier.setVisibility(View.GONE);
llSendStock.setVisibility(View.GONE);
tvCommonDesc.setText("入库仓库");
tvCommonContent.setHint("请选择入库仓库");
break;
......@@ -141,6 +157,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
permissionCode = PermissionType.PROCESS_INSIDE.getCode();
llClient.setVisibility(View.GONE);
llSupplier.setVisibility(View.GONE);
llSendStock.setVisibility(View.GONE);
tvCommonDesc.setText("入库仓库");
tvCommonContent.setHint("请选择入库仓库");
break;
......@@ -248,8 +265,12 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
toast("请选择客户");
return super.onOptionsItemSelected(item);
}
if (chooseProcess == null) {
toast("请选择关联仓库");
if (chooseStock == null) {
toast("请选择入库仓库");
return super.onOptionsItemSelected(item);
}
if (chooseSendStock == null) {
toast("请选择出库仓库");
return super.onOptionsItemSelected(item);
}
break;
......@@ -262,8 +283,12 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
toast("请选择供应商");
return super.onOptionsItemSelected(item);
}
if (chooseProcess == null) {
toast("请选择关联仓库");
if (chooseStock == null) {
toast("请选择入库仓库");
return super.onOptionsItemSelected(item);
}
if (chooseSendStock == null) {
toast("请选择出库仓库");
return super.onOptionsItemSelected(item);
}
break;
......@@ -298,6 +323,8 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
"subProcess", chooseProcess == null ? "" : chooseProcess.getName(),
"subProcessId", chooseProcess == null ? "" : chooseProcess.getId() + "",
"inStockId", chooseStock == null ? "" : chooseStock.getId() + "",
"intoStore", chooseStock == null ? "" : chooseStock.getId() + "",
"outerStore", chooseSendStock == null ? "" : chooseSendStock.getId() + "",
"customerId", clientId == null ? "" : clientId.toString(),
"receiveDeptId", getIntent().getStringExtra("deptId"),
"code", permissionCode);
......@@ -313,9 +340,15 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
}
@OnClick({R.id.ll_client, R.id.ll_supplier, R.id.btn_search, R.id.ll_common})
@OnClick({R.id.ll_send_stock,R.id.ll_in_stock,R.id.ll_client, R.id.ll_supplier, R.id.btn_search, R.id.ll_common})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.ll_send_stock:
startActivityForResult(ChooseStockActivity.class, 10005);
break;
case R.id.ll_in_stock:
startActivityForResult(ChooseStockActivity.class, 10004);
break;
case R.id.ll_client:
switch (type) {
case "1":
......@@ -401,7 +434,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
// }
// processDialog.show();
startActivityForResult(ChooseProcessActivity.class, 10003,
"processCode",permissionCode,"transitPartId",clientId.toString());
"processCode", permissionCode, "transitPartId", clientId.toString());
break;
case "2":
if (!WorkUtils.hasPermission(PagePermissionType.SUB_PROCESS.getPermission())) {
......@@ -418,7 +451,7 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
// }
// processDialog.show();
startActivityForResult(ChooseProcessActivity.class, 10003,
"processCode",permissionCode,"transitPartId",clientId.toString());
"processCode", permissionCode, "transitPartId", clientId.toString());
break;
case "3":
if (supplyId == null) {
......@@ -517,10 +550,22 @@ public class ChooseInfoActivity extends WorkToolBarActivity implements BatChoose
break;
case 10003:
if (resultCode == 10003) {
chooseProcess = JSON.parseObject(data.getStringExtra("process"),ProcessBean.class);
chooseProcess = JSON.parseObject(data.getStringExtra("process"), ProcessBean.class);
tvCommonContent.setText(chooseProcess.getName());
}
break;
case 10004://入库
if (resultCode == 10005) {
chooseStock = JSON.parseObject(data.getStringExtra("stock"), StockBean.class);
tvInStockContent.setText(chooseStock.getName());
}
break;
case 10005://出库
if (resultCode == 10005) {
chooseSendStock = JSON.parseObject(data.getStringExtra("stock"), StockBean.class);
tvSendStockContent.setText(chooseSendStock.getName());
}
break;
}
}
......
package com.wd.workoffice.ui.activity.bat.store;
import android.content.Intent;
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.ProcessBean;
import com.wd.workoffice.bean.StockBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.ProcessAdapter;
import com.wd.workoffice.ui.adapter.StockAdapter;
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 ChooseStockActivity extends WorkToolBarActivity {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private List<StockBean> dataList;
private StockAdapter dataAdapter;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
dataList = new ArrayList<>();
dataAdapter = new StockAdapter(R.layout.item_store_client, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
getData();
}
private void getData() {
Map<String, Object> param = WorkUtils.simpleParam();
param.put("deptId", UserKeeper.getInstance().getUserDepId());
RtfUtils.getRtf().getStock(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<StockBean> getList = JSON.parseArray(data.getData().toString(), StockBean.class);
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
}
});
}
@Override
protected void initEvent() {
srlRefresh.setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
getData();
}
});
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("stock", JSON.toJSONString(dataList.get(position)));
setResult(10005, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_pro_price;
}
}
......@@ -118,6 +118,8 @@ public class StoreSaleCarActivity extends WorkToolBarActivity {
"supplierId", getIntent().getStringExtra("supplierId"),
"subProcessId", getIntent().getStringExtra("subProcessId"),
"inStockId", getIntent().getStringExtra("inStockId"),
"intoStore", getIntent().getStringExtra("intoStore"),
"outerStore",getIntent().getStringExtra("outerStore"),
"customerId", getIntent().getStringExtra("customerId"),
"receiveDeptId", getIntent().getStringExtra("receiveDeptId"),
"code", getIntent().getStringExtra("code"),
......
......@@ -321,6 +321,12 @@ public class StoreSaleConfirmActivity extends WorkToolBarActivity {
expandInfo.put("demond4", etAddress.getText().toString());
expandInfo.put("demond5", etInput1.getText().toString());
expandInfo.put("comments", etInput5.getText().toString());
if (!TextUtils.isEmpty(getIntent().getStringExtra("intoStore"))) {
expandInfo.put("intoStore", getIntent().getStringExtra("intoStore"));
}
if (!TextUtils.isEmpty(getIntent().getStringExtra("outerStore"))) {
expandInfo.put("outerStore", getIntent().getStringExtra("outerStore"));
}
orderItems = coverProInfo(proList);
String stringByNow = TimeUtils.getFitTimeSpanByNow(tvTime.getText().toString(), new SimpleDateFormat("yyyy-MM-dd"), 1);
if (stringByNow.endsWith("天")) {
......
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.ProcessBean;
import com.wd.workoffice.bean.StockBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class StockAdapter extends BaseQuickAdapter<StockBean, BaseViewHolder> {
public StockAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, StockBean item) {
helper.setText(R.id.tv_name, item.getName());
}
}
......@@ -8,6 +8,7 @@
android:id="@+id/ll_client"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="12mm">
......@@ -30,6 +31,7 @@
android:id="@+id/ll_supplier"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="12mm">
......@@ -49,55 +51,72 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_in_stock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
android:paddingVertical="12mm">
<TextView
android:id="@+id/tv_in_stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库仓库"
android:textColor="#ff3f617f"
android:textSize="16sp" />
<LinearLayout
<TextView
android:id="@+id/tv_in_stock_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/shape_client_search"
android:gravity="center_vertical"
android:paddingHorizontal="10mm">
android:gravity="right"
android:text="请选择入库仓库"
android:textColor="#FF5E6D82"
android:textSize="16sp" />
<ImageView
android:layout_width="22mm"
android:layout_height="22mm"
android:src="@mipmap/add_data_search" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_blue" />
</LinearLayout>
<EditText
android:id="@+id/et_key"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2mm"
android:background="@null"
android:hint="搜索图号/品号/规格/品名"
android:maxLines="1"
<LinearLayout
android:id="@+id/ll_send_stock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="20mm"
android:paddingVertical="12mm">
android:textColor="#91ABBA"
android:textColorHint="#91ABBA"
android:textSize="11sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_send_stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发货仓库"
android:textColor="#ff3f617f"
android:textSize="16sp" />
<Button
android:id="@+id/btn_search"
android:layout_width="60mm"
<TextView
android:id="@+id/tv_send_stock_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:background="@color/mainTextColor"
android:text="搜索"
android:textColor="@color/white"
android:layout_weight="1"
android:gravity="right"
android:text="请选择发货仓库"
android:textColor="#FF5E6D82"
android:textSize="16sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:src="@mipmap/arrow_right_blue" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_common"
android:layout_marginTop="10mm"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
......@@ -127,9 +146,56 @@
android:src="@mipmap/arrow_right_blue" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/shape_client_search"
android:gravity="center_vertical"
android:paddingHorizontal="10mm">
<ImageView
android:layout_width="22mm"
android:layout_height="22mm"
android:src="@mipmap/add_data_search" />
<EditText
android:id="@+id/et_key"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2mm"
android:background="@null"
android:hint="搜索图号/品号/规格/品名"
android:maxLines="1"
android:textColor="#91ABBA"
android:textColorHint="#91ABBA"
android:textSize="11sp" />
</LinearLayout>
<Button
android:id="@+id/btn_search"
android:layout_width="60mm"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:background="@color/mainTextColor"
android:text="搜索"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_marginTop="10mm"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:layout_marginTop="10mm" />
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论