提交 5067d6e2 authored 作者: lgd's avatar lgd

1.坩埚下单

上级 47177290
...@@ -2311,7 +2311,22 @@ ...@@ -2311,7 +2311,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.order.AddStockCrucibleChooseActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="选择来源仓库"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.bat.order.AddStockApplyCrucibleAddActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
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;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class AddStockChooseBean {
/**
* records : [{"createdBy":null,"createdByName":null,"createdTime":null,"updatedBy":null,"updatedByName":null,"updatedTime":null,"id":1,"stockId":15,"crucibleId":"COGT10019","productId":9,"quantity":0.36,"finishQuantity":null,"version":null,"lockQuantity":null,"productName":"棕刚玉30#","productSoleCode":"10101030001","productSimpleCode":"棕刚玉","productUnit":"吨","stockName":"销售二公司坩埚内库1","deptId":null,"actionQuantity":0.36}]
* total : 1
* size : 10
* current : 1
* orders : []
* searchCount : true
* pages : 1
*/
private int total;
private int size;
private int current;
private boolean searchCount;
private int pages;
private List<RecordsBean> records;
private List<?> orders;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public int getCurrent() {
return current;
}
public void setCurrent(int current) {
this.current = current;
}
public boolean isSearchCount() {
return searchCount;
}
public void setSearchCount(boolean searchCount) {
this.searchCount = searchCount;
}
public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;
}
public List<RecordsBean> getRecords() {
return records;
}
public void setRecords(List<RecordsBean> records) {
this.records = records;
}
public List<?> getOrders() {
return orders;
}
public void setOrders(List<?> orders) {
this.orders = orders;
}
public static class RecordsBean {
/**
* createdBy : null
* createdByName : null
* createdTime : null
* updatedBy : null
* updatedByName : null
* updatedTime : null
* id : 1
* stockId : 15
* crucibleId : COGT10019
* productId : 9
* quantity : 0.36
* finishQuantity : null
* version : null
* lockQuantity : null
* productName : 棕刚玉30#
* productSoleCode : 10101030001
* productSimpleCode : 棕刚玉
* productUnit : 吨
* stockName : 销售二公司坩埚内库1
* deptId : null
* actionQuantity : 0.36
*/
private Object createdBy;
private Object createdByName;
private Object createdTime;
private Object updatedBy;
private Object updatedByName;
private Object updatedTime;
private int id;
private int stockId;
private String crucibleId;
private int productId;
private double quantity;
private Object finishQuantity;
private Object version;
private Object lockQuantity;
private String productName;
private String productSoleCode;
private String productSimpleCode;
private String productUnit;
private String stockName;
private Object deptId;
private double actionQuantity;
private String chooseNum;
public String getChooseNum() {
return chooseNum;
}
public void setChooseNum(String chooseNum) {
this.chooseNum = chooseNum;
}
public Object getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Object createdBy) {
this.createdBy = createdBy;
}
public Object getCreatedByName() {
return createdByName;
}
public void setCreatedByName(Object createdByName) {
this.createdByName = createdByName;
}
public Object getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Object createdTime) {
this.createdTime = createdTime;
}
public Object getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Object updatedBy) {
this.updatedBy = updatedBy;
}
public Object getUpdatedByName() {
return updatedByName;
}
public void setUpdatedByName(Object updatedByName) {
this.updatedByName = updatedByName;
}
public Object getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Object updatedTime) {
this.updatedTime = updatedTime;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getStockId() {
return stockId;
}
public void setStockId(int stockId) {
this.stockId = stockId;
}
public String getCrucibleId() {
return crucibleId;
}
public void setCrucibleId(String crucibleId) {
this.crucibleId = crucibleId;
}
public int getProductId() {
return productId;
}
public void setProductId(int productId) {
this.productId = productId;
}
public double getQuantity() {
return quantity;
}
public void setQuantity(double quantity) {
this.quantity = quantity;
}
public Object getFinishQuantity() {
return finishQuantity;
}
public void setFinishQuantity(Object finishQuantity) {
this.finishQuantity = finishQuantity;
}
public Object getVersion() {
return version;
}
public void setVersion(Object version) {
this.version = version;
}
public Object getLockQuantity() {
return lockQuantity;
}
public void setLockQuantity(Object lockQuantity) {
this.lockQuantity = lockQuantity;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductSoleCode() {
return productSoleCode;
}
public void setProductSoleCode(String productSoleCode) {
this.productSoleCode = productSoleCode;
}
public String getProductSimpleCode() {
return productSimpleCode;
}
public void setProductSimpleCode(String productSimpleCode) {
this.productSimpleCode = productSimpleCode;
}
public String getProductUnit() {
return productUnit;
}
public void setProductUnit(String productUnit) {
this.productUnit = productUnit;
}
public String getStockName() {
return stockName;
}
public void setStockName(String stockName) {
this.stockName = stockName;
}
public Object getDeptId() {
return deptId;
}
public void setDeptId(Object deptId) {
this.deptId = deptId;
}
public double getActionQuantity() {
return actionQuantity;
}
public void setActionQuantity(double actionQuantity) {
this.actionQuantity = actionQuantity;
}
}
}
...@@ -93,6 +93,15 @@ public class OrderDetail { ...@@ -93,6 +93,15 @@ public class OrderDetail {
private String inStockName; private String inStockName;
private String usedStore; private String usedStore;
private String usedStoreName; private String usedStoreName;
private String isCrucible;
public String getIsCrucible() {
return isCrucible;
}
public void setIsCrucible(String isCrucible) {
this.isCrucible = isCrucible;
}
public String getUsedStoreName() { public String getUsedStoreName() {
return usedStoreName; return usedStoreName;
...@@ -925,7 +934,7 @@ public class OrderDetail { ...@@ -925,7 +934,7 @@ public class OrderDetail {
private double canUseProductSum; private double canUseProductSum;
private Object canPackageSum; private Object canPackageSum;
private Object launchDeptName; private Object launchDeptName;
private Object launchDeptId; private String launchDeptId;
private Object receiveDeptName; private Object receiveDeptName;
private Object customerId; private Object customerId;
private Object customerName; private Object customerName;
...@@ -1278,11 +1287,11 @@ public class OrderDetail { ...@@ -1278,11 +1287,11 @@ public class OrderDetail {
this.launchDeptName = launchDeptName; this.launchDeptName = launchDeptName;
} }
public Object getLaunchDeptId() { public String getLaunchDeptId() {
return launchDeptId; return launchDeptId;
} }
public void setLaunchDeptId(Object launchDeptId) { public void setLaunchDeptId(String launchDeptId) {
this.launchDeptId = launchDeptId; this.launchDeptId = launchDeptId;
} }
......
...@@ -1482,6 +1482,31 @@ public interface ApiService { ...@@ -1482,6 +1482,31 @@ public interface ApiService {
@POST("/procedureStart/so/applyStock/{orderItemId}") @POST("/procedureStart/so/applyStock/{orderItemId}")
Observable<BaseBean> addStockApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody); Observable<BaseBean> addStockApplyAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* step4_1-发起入库申请
*
* @return
*/
@POST("procedureStart/so/applyStock/forward/{orderItemId}")
Observable<BaseBean> addStockApplyForwardAdd(@Path("orderItemId") String orderItemId, @Body RequestBody requestBody);
/**
* 入库来源
*
* @return
*/
@GET("/production-plan-quantity/page/list")
Observable<BaseBean> productionPlan(@QueryMap Map<String, Object> param);
/**
* 入库坩埚详情
*
* @return
*/
@GET("/enter-store-crucible/detail/page/list")
Observable<BaseBean> enterCrucibleDetail(@QueryMap Map<String, Object> param);
/** /**
* step4_1-发起入库申请 * step4_1-发起入库申请
* *
......
...@@ -59,6 +59,7 @@ public class AddStockApplyActivity extends WorkToolBarActivity { ...@@ -59,6 +59,7 @@ public class AddStockApplyActivity extends WorkToolBarActivity {
bundle.putString("orderType", getIntent().getStringExtra("orderType")); bundle.putString("orderType", getIntent().getStringExtra("orderType"));
bundle.putString("productId", getIntent().getStringExtra("productId")); bundle.putString("productId", getIntent().getStringExtra("productId"));
bundle.putString("num", getIntent().getStringExtra("num")); bundle.putString("num", getIntent().getStringExtra("num"));
bundle.putString("isCrucible", getIntent().getStringExtra("isCrucible"));
saleFragment.setArguments(bundle); saleFragment.setArguments(bundle);
data.add(saleFragment); data.add(saleFragment);
...@@ -113,6 +114,17 @@ public class AddStockApplyActivity extends WorkToolBarActivity { ...@@ -113,6 +114,17 @@ public class AddStockApplyActivity extends WorkToolBarActivity {
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case R.id.add: case R.id.add:
if (TextUtils.equals("1", getIntent().getStringExtra("isCrucible"))) {
startActivity(AddStockApplyCrucibleAddActivity.class,
"num", getIntent().getStringExtra("num"),
"orderType", getIntent().getStringExtra("orderType"),
"productId", getIntent().getStringExtra("productId"),
"orderItemId", getIntent().getStringExtra("orderItemId"),
"simpleCode", getIntent().getStringExtra("simpleCode"),
"depId", getIntent().getStringExtra("depId"),
"id", getIntent().getStringExtra("orderId"));
return super.onOptionsItemSelected(item);
}
startActivity(AddStockApplyAddActivity.class, startActivity(AddStockApplyAddActivity.class,
"num", getIntent().getStringExtra("num"), "num", getIntent().getStringExtra("num"),
"orderType", getIntent().getStringExtra("orderType"), "orderType", getIntent().getStringExtra("orderType"),
......
...@@ -143,7 +143,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity { ...@@ -143,7 +143,7 @@ public class AddStockApplyAddActivity extends WorkToolBarActivity {
String remark = etRemark.getText().toString(); String remark = etRemark.getText().toString();
String boxCode = etBoxNum.getText().toString(); String boxCode = etBoxNum.getText().toString();
if (TextUtils.isEmpty(num)) { if (TextUtils.isEmpty(num)) {
toast("请输入库数量"); toast("请输入库数量");
return; return;
} }
if (dataBean!=null) { if (dataBean!=null) {
......
package com.wd.workoffice.ui.activity.bat.order;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonObject;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AddStockChooseBean;
import com.wd.workoffice.bean.OrderDetail;
import com.wd.workoffice.bean.event.CheckAddStockEvent;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.AddStockCrucibleChooseAdapter;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import androidx.annotation.Nullable;
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 AddStockApplyCrucibleAddActivity extends WorkToolBarActivity {
@BindView(R.id.tv_max_num)
TextView tvMaxNum;
@BindView(R.id.tv_num)
TextView tvNum;
@BindView(R.id.et_box_num)
EditText etBoxNum;
@BindView(R.id.et_remark)
EditText etRemark;
@BindView(R.id.tv_remark_num)
TextView tvRemarkNum;
@BindView(R.id.tv_bottom)
TextView tvBottom;
@BindView(R.id.ll_choose_from)
LinearLayout llChooseFrom;
@BindView(R.id.rv_data)
RecyclerView rvData;
private Map<String, Object> param;
private String orderType;
private OrderDetail dataBean;
private List<AddStockChooseBean.RecordsBean> productList;
private AddStockCrucibleChooseAdapter productAdapter;
@Override
protected void initView() {
ButterKnife.bind(this);
WorkUtils.addNumListener(etRemark, tvRemarkNum);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
orderType = getIntent().getStringExtra("orderType");
productList = new ArrayList<>();
productAdapter = new AddStockCrucibleChooseAdapter(R.layout.item_add_stock_choose, productList, 1);
productAdapter.bindToRecyclerView(rvData);
productAdapter.notifyDataSetChanged();
param = new HashMap<>();
param.put("productId", getIntent().getStringExtra("productId"));
param.put("simpleCode", getIntent().getStringExtra("simpleCode"));
getNum();
}
/**
* 获取数量
*/
private void getNum() {
Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().saleOrderDetail(getIntent().getStringExtra("id"), "1");
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().purchaseOrderDetail(getIntent().getStringExtra("id"), "1");
} else if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
observable = RtfUtils.getRtf().supplierOrderDetail(getIntent().getStringExtra("id"), "1");
} else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
observable = RtfUtils.getRtf().crucibleOrderDetail(getIntent().getStringExtra("id"), "1");
} else if (TextUtils.equals(orderType, OrderType.IN.getCode())) {
observable = RtfUtils.getRtf().insideOrderDetail(getIntent().getStringExtra("id"), "1");
} else {
observable = RtfUtils.getRtf().insideOrderDetail(getIntent().getStringExtra("id"), "1");
}
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
dataBean = JSON.parseObject(data.getData().toString(), OrderDetail.class);
List<OrderDetail.OrderItemsBean> orderItems = dataBean.getOrderItems();
for (OrderDetail.OrderItemsBean orderItem : orderItems) {
if (TextUtils.equals(orderItem.getId(), getIntent().getStringExtra("orderItemId"))) {
tvMaxNum.setText(MathUtils.converData(orderItem.getCanInStoreProductSum(), 3));
}
}
}
});
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_add_stock_apply_crucible_add;
}
private void submit() {
String num = tvNum.getText().toString();
String remark = etRemark.getText().toString();
String boxCode = etBoxNum.getText().toString();
if (TextUtils.isEmpty(num)) {
toast("请输入入库数量");
return;
}
if (dataBean != null) {
List<OrderDetail.OrderItemsBean> orderItems = dataBean.getOrderItems();
for (OrderDetail.OrderItemsBean orderItem : orderItems) {
if (TextUtils.equals(orderItem.getId(), getIntent().getStringExtra("orderItemId"))) {
if (new BigDecimal(Double.valueOf(num)).compareTo(new BigDecimal(orderItem.getCanInStoreProductSum())) == 1) {
toast(String.format("可申请入库数量最大为%s", MathUtils.converData(orderItem.getCanInStoreProductSum(), 3)));
return;
}
}
}
}
param.put("productAmount", num);
param.put("boxCode", boxCode);
param.put("orderItemId", getIntent().getStringExtra("orderItemId"));
param.put("applyRemark", remark);
coverPro();
RtfUtils.getRtf().addStockApplyForwardAdd(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(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;
}
toast("提交申请成功");
EventBus.getDefault().post(new CheckAddStockEvent());
finish();
}
});
}
private void coverPro() {
List<JSONObject> backList = new ArrayList<>();
for (AddStockChooseBean.RecordsBean data : productList) {
JSONObject jsonData = new JSONObject();
jsonData.put("crucibleId",data.getCrucibleId());
jsonData.put("fromStockId",data.getStockId());
jsonData.put("productId",data.getProductId());
jsonData.put("actionQuantity",data.getChooseNum());
backList.add(jsonData);
}
param.put("stockFromDetails", backList);
}
@OnClick({R.id.tv_bottom, R.id.ll_choose_from})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_bottom:
submit();
break;
case R.id.ll_choose_from:
startActivityForResult(AddStockCrucibleChooseActivity.class, 10001,
"depId", getIntent().getStringExtra("depId")
, "productId", getIntent().getStringExtra("productId")
, "pro", JSON.toJSONString(productList));
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 10001 && resultCode == 10001) {
List<AddStockChooseBean.RecordsBean> backList = JSON.parseArray(data.getStringExtra("stock")
, AddStockChooseBean.RecordsBean.class);
productList.clear();
productList.addAll(backList);
productAdapter.notifyDataSetChanged();
tvNum.setText(data.getStringExtra("count"));
}
}
}
package com.wd.workoffice.ui.activity.bat.order; package com.wd.workoffice.ui.activity.bat.order;
import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
...@@ -12,17 +13,24 @@ import com.wd.workoffice.R; ...@@ -12,17 +13,24 @@ import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean; import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AddStockBean; import com.wd.workoffice.bean.AddStockBean;
import com.wd.workoffice.bean.AddStockChooseBean;
import com.wd.workoffice.bean.event.CheckAddStockEvent; import com.wd.workoffice.bean.event.CheckAddStockEvent;
import com.wd.workoffice.bean.workEnum.OrderType; import com.wd.workoffice.bean.workEnum.OrderType;
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.AddStockCrucibleChooseAdapter;
import com.wd.workoffice.ui.adapter.AddStockSendApplyAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
...@@ -63,16 +71,27 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -63,16 +71,27 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
LinearLayout llCheck; LinearLayout llCheck;
@BindView(R.id.tv_box_num) @BindView(R.id.tv_box_num)
TextView tvBoxNum; TextView tvBoxNum;
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.ll_stock)
LinearLayout llStock;
private AddStockBean.RecordsBean info; private AddStockBean.RecordsBean info;
private String orderType; private String orderType;
private List<AddStockChooseBean.RecordsBean> productList;
private AddStockCrucibleChooseAdapter productAdapter;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this,RecyclerView.VERTICAL,false));
} }
@Override @Override
protected void initData() { protected void initData() {
productList = new ArrayList<>();
productAdapter = new AddStockCrucibleChooseAdapter(R.layout.item_add_stock_choose, productList, 2);
productAdapter.bindToRecyclerView(rvData);
productAdapter.notifyDataSetChanged();
info = JSON.parseObject(getIntent().getStringExtra("info"), AddStockBean.RecordsBean.class); info = JSON.parseObject(getIntent().getStringExtra("info"), AddStockBean.RecordsBean.class);
orderType = getIntent().getStringExtra("orderType"); orderType = getIntent().getStringExtra("orderType");
tvNum.setText(String.valueOf(info.getProductAmount())); tvNum.setText(String.valueOf(info.getProductAmount()));
...@@ -81,9 +100,9 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -81,9 +100,9 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
tvTime.setText(info.getCreatedTime()); tvTime.setText(info.getCreatedTime());
tvRemark.setText(String.valueOf(info.getApplyRemark())); tvRemark.setText(String.valueOf(info.getApplyRemark()));
if (TextUtils.equals(info.getStatus(), "0")) { if (TextUtils.equals(info.getStatus(), "0")) {
if (TextUtils.equals(getIntent().getStringExtra("hasPermission"),"1")) { if (TextUtils.equals(getIntent().getStringExtra("hasPermission"), "1")) {
llBottom.setVisibility(View.VISIBLE); llBottom.setVisibility(View.VISIBLE);
}else { } else {
llBottom.setVisibility(View.GONE); llBottom.setVisibility(View.GONE);
} }
llCheck.setVisibility(View.GONE); llCheck.setVisibility(View.GONE);
...@@ -95,6 +114,41 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity { ...@@ -95,6 +114,41 @@ public class AddStockApplyDetailActivity extends WorkToolBarActivity {
tvCheckRemark.setText(info.getAuditRemark()); tvCheckRemark.setText(info.getAuditRemark());
tvCheckStatus.setText(WorkUtils.getFinancialStatus(Integer.valueOf(info.getStatus()))); tvCheckStatus.setText(WorkUtils.getFinancialStatus(Integer.valueOf(info.getStatus())));
} }
String isCrucible = getIntent().getStringExtra("isCrucible");
if (TextUtils.equals("1", isCrucible)) {
llStock.setVisibility(View.VISIBLE);
getStockData();
}
}
private void getStockData() {
Map<String, Object> param = WorkUtils.simpleParam();
param.put("enterApplyId", info.getId());
RtfUtils.getRtf().enterCrucibleDetail(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<AddStockChooseBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), AddStockChooseBean.class).getRecords();
productList.clear();
productList.addAll(getList);
productAdapter.notifyDataSetChanged();
}
});
} }
......
package com.wd.workoffice.ui.activity.bat.order;
import android.content.Intent;
import android.text.TextUtils;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.AddStockChooseBean;
import com.wd.workoffice.bean.ProductBean;
import com.wd.workoffice.bean.event.ModifyCarEvent;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.AddStockCrucibleChooseAdapter;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.Collections;
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.disposables.Disposable;
/**
* 选择来源仓库
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class AddStockCrucibleChooseActivity extends WorkToolBarActivity {
@BindView(R.id.tv_price)
TextView tvPrice;
@BindView(R.id.tv_ok)
TextView tvOk;
@BindView(R.id.ll_bottom)
RelativeLayout llBottom;
@BindView(R.id.rv_product)
RecyclerView rvProduct;
private List<AddStockChooseBean.RecordsBean> productList;
private AddStockCrucibleChooseAdapter productAdapter;
private int page = 1;
private Map<String, Object> param;
@Override
protected void initView() {
ButterKnife.bind(this);
rvProduct.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
productList = new ArrayList<>();
productAdapter = new AddStockCrucibleChooseAdapter(R.layout.item_add_stock_choose, productList);
productAdapter.bindToRecyclerView(rvProduct);
productAdapter.notifyDataSetChanged();
param = WorkUtils.pageKey();
param.put("current", page);
param.put("deptId", getIntent().getStringExtra("depId"));
param.put("productId", getIntent().getStringExtra("productId"));
getData();
changeNumAndPrice();
}
private void changeChooseStatue() {
String pro = getIntent().getStringExtra("pro");
if (!TextUtils.isEmpty(pro)) {
Map<Integer, Boolean> isChoose = productAdapter.getIsChoose();
List<AddStockChooseBean.RecordsBean> chooseList = JSON.parseArray(pro, AddStockChooseBean.RecordsBean.class);
for (AddStockChooseBean.RecordsBean chooseStock : chooseList) {
for (int i = 0; i < productList.size(); i++) {
if (productList.get(i).getId() == chooseStock.getId()) {
isChoose.put(i, true);
productList.get(i).setChooseNum(chooseStock.getChooseNum());
}
}
}
productAdapter.notifyDataSetChanged();
}
}
@Override
protected void initEvent() {
// productAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
// @Override
// public void onLoadMoreRequested() {
// param.put("current", page);
// getData();
// }
// }, rvProduct);
}
@Override
protected int layoutId() {
return R.layout.activity_add_stcok_choose;
}
@OnClick(R.id.tv_ok)
public void onViewClicked() {
Map<Integer, Boolean> isChoose = productAdapter.getIsChoose();
boolean isHas = false;
List<AddStockChooseBean.RecordsBean> backList = new ArrayList<>();
for (Map.Entry<Integer, Boolean> entry : isChoose.entrySet()) {
if (entry.getValue()) {
isHas = true;
backList.add(productList.get(entry.getKey()));
if (TextUtils.isEmpty(productList.get(entry.getKey()).getChooseNum())||
TextUtils.equals(productList.get(entry.getKey()).getChooseNum(), "0")) {
toast("请输入数量");
return;
}
}
}
if (isHas) {
Intent intent = new Intent();
intent.putExtra("stock", JSON.toJSONString(backList));
intent.putExtra("count", tvPrice.getText().toString().split(": ")[1]);
setResult(10001, intent);
finish();
} else {
toast("请选择来源仓库");
}
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(ModifyCarEvent event) {
changeNumAndPrice();
}
private void changeNumAndPrice() {
String allPrice = "";
Map<Integer, Boolean> isChoose = productAdapter.getIsChoose();
for (Map.Entry<Integer, Boolean> entry : isChoose.entrySet()) {
if (entry.getValue()) {
allPrice = MathUtils.add(allPrice, productList.get(entry.getKey()).getChooseNum(), 3);
}
}
tvPrice.setText("小计: ".concat(allPrice));
}
private void getData() {
RtfUtils.getRtf().productionPlan(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<AddStockChooseBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), AddStockChooseBean.class).getRecords();
productList.clear();
productList.addAll(getList);
productAdapter.notifyDataSetChanged();
changeChooseStatue();
// if (page == 1) {
// productList.clear();
// productList.addAll(getList);
// productAdapter.notifyDataSetChanged();
// productAdapter.loadMoreComplete();
// } else {
// productAdapter.loadMoreComplete();
// productList.addAll(getList);
// productAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// productAdapter.loadMoreEnd();
// } else {
// page++;
// }
}
});
}
}
...@@ -333,6 +333,8 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity { ...@@ -333,6 +333,8 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
"simpleCode", proList.get(position).getProductSimpleCode(), "simpleCode", proList.get(position).getProductSimpleCode(),
"orderId", getIntent().getStringExtra("id"), "orderId", getIntent().getStringExtra("id"),
"orderItemId", proList.get(position).getId(), "orderItemId", proList.get(position).getId(),
"depId", dataBean.getLaunchDeptId() + "",
"isCrucible", dataBean.getIsCrucible(),
"productId", proList.get(position).getProductId() + ""); "productId", proList.get(position).getProductId() + "");
break; break;
case R.id.tv_return: case R.id.tv_return:
......
...@@ -8,6 +8,7 @@ import com.google.android.material.tabs.TabLayout; ...@@ -8,6 +8,7 @@ import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseFg; import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.workEnum.OrderDeptPermission;
import com.wd.workoffice.bean.workEnum.PagePermissionType; import com.wd.workoffice.bean.workEnum.PagePermissionType;
import com.wd.workoffice.bean.workEnum.PermissionType; import com.wd.workoffice.bean.workEnum.PermissionType;
import com.wd.workoffice.ui.activity.bat.order.CrucibleOrderSearchActivity; import com.wd.workoffice.ui.activity.bat.order.CrucibleOrderSearchActivity;
...@@ -82,7 +83,8 @@ public class WorkPlanActivity extends WorkToolBarActivity { ...@@ -82,7 +83,8 @@ public class WorkPlanActivity extends WorkToolBarActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
if (WorkUtils.hasPermission(PagePermissionType.CO_CRUCIBLE_START.getPermission())) { if (WorkUtils.hasOrderDeptPermission(OrderDeptPermission.CRUCIBLE.getCode())
&&WorkUtils.hasPermission(PagePermissionType.CO_CRUCIBLE_START.getPermission())) {
getMenuInflater().inflate(R.menu.menu_add_and_search, menu); getMenuInflater().inflate(R.menu.menu_add_and_search, menu);
}else { }else {
getMenuInflater().inflate(R.menu.menu_search, menu); getMenuInflater().inflate(R.menu.menu_search, menu);
......
package com.wd.workoffice.ui.adapter;
import android.text.TextUtils;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.AddStockChooseBean;
import com.wd.workoffice.bean.ProductBean;
import com.wd.workoffice.bean.event.ModifyCarEvent;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.widget.AddAndReduceView;
import com.zhihu.matisse.internal.ui.widget.CheckView;
import org.greenrobot.eventbus.EventBus;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* Created by flexible on 2018/8/13.
*/
public class AddStockCrucibleChooseAdapter extends BaseQuickAdapter<AddStockChooseBean.RecordsBean, BaseViewHolder> {
int type;// 0 新增选择 1 新增展示 2 详情
Map<Integer, Boolean> isChoose = new LinkedHashMap<>();
public AddStockCrucibleChooseAdapter(int layoutResId, List data) {
super(layoutResId, data);
for (int i = 0; i < getData().size(); i++) {
isChoose.put(i, false);
}
}
public AddStockCrucibleChooseAdapter(int layoutResId, List data, int type) {
super(layoutResId, data);
this.type = type;
for (int i = 0; i < getData().size(); i++) {
isChoose.put(i, false);
}
}
@Override
protected void convert(BaseViewHolder helper, AddStockChooseBean.RecordsBean item) {
if (type == 1) {
helper.setGone(R.id.ll_bottom, false);
helper.setGone(R.id.cb_check, false);
helper.setText(R.id.tv_stock_num_desc, "申请入库数量");
helper.setText(R.id.tv_stock_num, MathUtils.converData(item.getChooseNum(), 3));
} else if (type == 2) {
helper.setGone(R.id.ll_bottom, false);
helper.setGone(R.id.cb_check, false);
helper.setText(R.id.tv_stock_num_desc, "申请入库数量");
helper.setText(R.id.tv_stock_num, MathUtils.converData(item.getQuantity(), 3));
} else {
helper.setText(R.id.tv_stock_num, MathUtils.converData(item.getQuantity(), 3));
}
helper.setText(R.id.tv_name, item.getCrucibleId());
helper.setText(R.id.tv_stock, item.getStockName());
CheckBox cbChoose = helper.getView(R.id.cb_check);
cbChoose.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
isChoose.put(helper.getAdapterPosition(), cbChoose.isChecked());
EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData())));
}
});
cbChoose.setChecked(isChoose.get(helper.getAdapterPosition()) == null ? false : isChoose.get(helper.getAdapterPosition()));
AddAndReduceView num = helper.getView(R.id.ar_num);
num.setMaxNum(item.getQuantity());
if (!TextUtils.isEmpty(item.getChooseNum()))
num.setNumber(item.getChooseNum());
num.setOnNumberChangedListener(new AddAndReduceView.OnNumberChangedListener() {
@Override
public void OnNumberChanged(String vs) {
item.setChooseNum(vs);
EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData())));
}
});
}
public Map<Integer, Boolean> getIsChoose() {
return isChoose;
}
public void setIsChoose(Map<Integer, Boolean> isChoose) {
this.isChoose = isChoose;
}
}
...@@ -54,6 +54,8 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B ...@@ -54,6 +54,8 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
if (type == 1) { if (type == 1) {
helper.addOnClickListener(R.id.rl_choose_dep); helper.addOnClickListener(R.id.rl_choose_dep);
helper.addOnClickListener(R.id.rl_upload); helper.addOnClickListener(R.id.rl_upload);
helper.setText(R.id.tv_sale_price, item.getCarPrice());
helper.setText(R.id.tv_buy_count, item.getCarNum());
if (!TextUtils.isEmpty(item.getFactoryName())) { if (!TextUtils.isEmpty(item.getFactoryName())) {
helper.setText(R.id.tv_choose_dep, item.getFactoryName()); helper.setText(R.id.tv_choose_dep, item.getFactoryName());
} }
...@@ -65,6 +67,11 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B ...@@ -65,6 +67,11 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
helper.setGone(R.id.rl_pro_from, false); helper.setGone(R.id.rl_pro_from, false);
helper.setGone(R.id.rl_choose_dep, false); helper.setGone(R.id.rl_choose_dep, false);
} }
if (TextUtils.equals(orderType,
PermissionType.PROCESS_SUPPLY.getCode())) {
helper.setGone(R.id.rl_sale_price, false);
}
} else if (type == 2) { } else if (type == 2) {
helper.setGone(R.id.tv_desc, item.getFlag() == 1); helper.setGone(R.id.tv_desc, item.getFlag() == 1);
helper.addOnClickListener(R.id.tv_delete); helper.addOnClickListener(R.id.tv_delete);
......
...@@ -63,6 +63,7 @@ public class AddStockApplyFragment extends WorkBaseFg { ...@@ -63,6 +63,7 @@ public class AddStockApplyFragment extends WorkBaseFg {
private String orderId; private String orderId;
private String productId; private String productId;
private String orderType; private String orderType;
private String isCrucible;
@Override @Override
protected void initView() { protected void initView() {
...@@ -96,9 +97,9 @@ public class AddStockApplyFragment extends WorkBaseFg { ...@@ -96,9 +97,9 @@ public class AddStockApplyFragment extends WorkBaseFg {
orderId = arguments.getString("orderId"); orderId = arguments.getString("orderId");
productId = arguments.getString("productId"); productId = arguments.getString("productId");
orderType = arguments.getString("orderType"); orderType = arguments.getString("orderType");
isCrucible = arguments.getString("isCrucible");
} }
} }
private void getData() { private void getData() {
Observable<BaseBean> observable; Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) { if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
...@@ -168,7 +169,7 @@ public class AddStockApplyFragment extends WorkBaseFg { ...@@ -168,7 +169,7 @@ public class AddStockApplyFragment extends WorkBaseFg {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(AddStockApplyDetailActivity.class, startActivity(AddStockApplyDetailActivity.class,
"orderType", orderType,"hasPermission",dataAdapter.isHasPermission()?"1":"0", "orderType", orderType,"isCrucible", isCrucible,"hasPermission",dataAdapter.isHasPermission()?"1":"0",
"info", JSON.toJSONString(dataList.get(position))); "info", JSON.toJSONString(dataList.get(position)));
} }
}); });
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="60mm"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="15mm"
android:text="总计: ¥ "
android:textSize="16sp" />
<TextView
android:id="@+id/tv_ok"
android:layout_width="80mm"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:background="@color/red_btn_bg"
android:gravity="center"
android:text="确定"
android:textColor="@color/white" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
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" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/tv_bottom"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:id="@+id/rv_data"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/ll_choose_from"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingVertical="4mm">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/add_stock_modify" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="选择入库来源"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="最大入库数量"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_max_num"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:inputType="numberDecimal"
android:padding="3mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="入库数量小计"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_num"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:inputType="numberDecimal"
android:padding="3mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="箱号"
android:textSize="14sp" />
<EditText
android:id="@+id/et_box_num"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:background="@null"
android:gravity="right"
android:hint="输入箱号"
android:padding="3mm"
android:textColor="@color/flexible_text_gray"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm"
android:text="申请备注:"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
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>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -49,6 +49,59 @@ ...@@ -49,6 +49,59 @@
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="20mm"> android:paddingBottom="20mm">
<LinearLayout
android:id="@+id/ll_stock"
android:layout_width="match_parent"
android:orientation="vertical"
android:visibility="gone"
android:layout_height="wrap_content">
<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>
<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 <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -61,7 +114,7 @@ ...@@ -61,7 +114,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="入库数量" android:text="入库数量小计"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
...@@ -74,6 +127,7 @@ ...@@ -74,6 +127,7 @@
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -99,6 +153,7 @@ ...@@ -99,6 +153,7 @@
</RelativeLayout> </RelativeLayout>
<View style="@style/dividerX" /> <View style="@style/dividerX" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:id="@+id/cb_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="图号TH82739857"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15mm"
android:background="#FCFCFD"
android:orientation="vertical"
android:paddingVertical="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_stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="品号"
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:id="@+id/tv_stock_num_desc"
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_stock_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="品号"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
style="@style/dividerX"
android:layout_marginVertical="5mm" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="申请入库数量"
android:textColor="@color/flexible_text_gray"
android:textSize="15sp" />
<com.wd.workoffice.widget.AddAndReduceView
android:id="@+id/ar_num"
android:layout_width="150mm"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -135,6 +135,52 @@ ...@@ -135,6 +135,52 @@
android:textSize="12sp" /> android:textSize="12sp" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/rl_sale_price"
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_sale_price"
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:id="@+id/rl_buy_count"
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_buy_count"
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>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论