提交 356f0bb3 authored 作者: lgd's avatar lgd

1.坩埚销售发货,详情跳转页面

2.TODO 供应订单三个功能测试,坩埚销售页面查接口/数量对应字段
上级 dd77865f
...@@ -2408,6 +2408,22 @@ ...@@ -2408,6 +2408,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.SendApplyCrucibleDetailFromActivity"
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.SendApplyDetailCrucibleActivity"
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"
......
...@@ -1319,6 +1319,15 @@ public interface ApiService { ...@@ -1319,6 +1319,15 @@ public interface ApiService {
*/ */
@GET("/send-out-store-apply/item/list") @GET("/send-out-store-apply/item/list")
Observable<BaseBean> sendApplyDetail(@Query("applyId") String applyId); Observable<BaseBean> sendApplyDetail(@Query("applyId") String applyId);
/**
* _3获取发货申请详细信息列表
*
* @return
*/
@GET("/send-out-store-crucible/detail/page/list")
Observable<BaseBean> sendApplyCrucibleDetail(@QueryMap Map<String, Object> param);
/** /**
* _获取领料申请详细信息列表 * _获取领料申请详细信息列表
...@@ -1336,6 +1345,15 @@ public interface ApiService { ...@@ -1336,6 +1345,15 @@ public interface ApiService {
@POST("/procedureStart/so/applyOutStock/{orderId}") @POST("/procedureStart/so/applyOutStock/{orderId}")
Observable<BaseBean> sendApply(@Path("orderId") String orderId, @Body RequestBody requestBody); Observable<BaseBean> sendApply(@Path("orderId") String orderId, @Body RequestBody requestBody);
/**
* _坩埚销售发货
*
* @return
*/
@POST("/procedureStart/so/applyOutStock/forward/{orderId}")
Observable<BaseBean> sendForwardApply(@Path("orderId") String orderId, @Body RequestBody requestBody);
/** /**
* 领料 * 领料
* *
......
...@@ -57,6 +57,7 @@ public class SendApplyActivity extends WorkToolBarActivity { ...@@ -57,6 +57,7 @@ public class SendApplyActivity extends WorkToolBarActivity {
bundle.putString("state", order[i]); bundle.putString("state", order[i]);
bundle.putString("orderId", getIntent().getStringExtra("orderId")); bundle.putString("orderId", getIntent().getStringExtra("orderId"));
bundle.putString("orderType", getIntent().getStringExtra("orderType")); bundle.putString("orderType", getIntent().getStringExtra("orderType"));
bundle.putString("isCrucible", getIntent().getStringExtra("isCrucible"));
saleFragment.setArguments(bundle); saleFragment.setArguments(bundle);
data.add(saleFragment); data.add(saleFragment);
......
...@@ -182,14 +182,22 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity { ...@@ -182,14 +182,22 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
if (entry.getValue()) { if (entry.getValue()) {
OrderDetail.OrderItemsBean recordsBean = dataList.get(entry.getKey()); OrderDetail.OrderItemsBean recordsBean = dataList.get(entry.getKey());
JSONObject returnData = new JSONObject(); JSONObject returnData = new JSONObject();
if (TextUtils.isEmpty(recordsBean.getChooseNum()) || Double.valueOf(recordsBean.getChooseNum()) == 0d) { if (null==recordsBean.getBackList()) {
toast("请选择来源");
return false;
}
if (TextUtils.isEmpty(recordsBean.getCount()) || Double.valueOf(recordsBean.getCount()) == 0d) {
toast("请选择发货数量"); toast("请选择发货数量");
return false; return false;
} }
totalWeight = MathUtils.add(totalWeight, MathUtils.multiply(recordsBean.getChooseNum(), totalWeight = MathUtils.add(totalWeight, MathUtils.multiply(recordsBean.getCount(),
String.valueOf(recordsBean.getProductWeight()), 3), 3); String.valueOf(recordsBean.getProductWeight()), 3), 3);
returnData.put("productId", recordsBean.getProductId()); returnData.put("productId", recordsBean.getProductId());
returnData.put("productAmount", recordsBean.getChooseNum()); returnData.put("productAmount", recordsBean.getCount());
for (AddStockChooseBean.RecordsBean bean : recordsBean.getBackList()) {
bean.setActionQuantity(Double.valueOf(bean.getChooseNum()));
}
returnData.put("stockFromDetails", recordsBean.getBackList());
info.add(returnData); info.add(returnData);
} }
} }
...@@ -207,11 +215,11 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity { ...@@ -207,11 +215,11 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
String price = etLogisticsPrice.getText().toString(); String price = etLogisticsPrice.getText().toString();
String code = etLogisticsCode.getText().toString(); String code = etLogisticsCode.getText().toString();
String remark = etRemark.getText().toString(); String remark = etRemark.getText().toString();
String time = tvTime.getText().toString(); // String time = tvTime.getText().toString();
if (TextUtils.isEmpty(time)) { // if (TextUtils.isEmpty(time)) {
toast("请选择发货时间"); // toast("请选择发货时间");
return; // return;
} // }
if (TextUtils.isEmpty(price)) { if (TextUtils.isEmpty(price)) {
toast("请输入运费"); toast("请输入运费");
return; return;
...@@ -230,13 +238,9 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity { ...@@ -230,13 +238,9 @@ public class SendApplyAddCrucibleActivity extends WorkToolBarActivity {
param.put("logisticsId", clientId); param.put("logisticsId", clientId);
Observable<BaseBean> observable; Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) { if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().sendApply(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param)); observable = RtfUtils.getRtf().sendForwardApply(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().sendPoApply(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
observable = RtfUtils.getRtf().sendCoApply(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
} else { } else {
observable = RtfUtils.getRtf().sendApply(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param)); observable = RtfUtils.getRtf().sendForwardApply(getIntent().getStringExtra("id"), WorkUtils.convertMapToBody(param));
} }
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
......
package com.wd.workoffice.ui.activity.bat.order;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
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.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.SendApplyCrucibleChooseAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
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 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 SendApplyCrucibleDetailFromActivity 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;
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.ll_search)
LinearLayout llSearch;
@BindView(R.id.tv_count_desc)
TextView tvCountDesc;
@BindView(R.id.ll_title)
LinearLayout llTitle;
private List<AddStockChooseBean.RecordsBean> productList;
private SendApplyCrucibleChooseAdapter productAdapter;
private int page = 1;
private Map<String, Object> param;
@Override
protected void initView() {
ButterKnife.bind(this);
llSearch.setVisibility(View.GONE);
llTitle.setVisibility(View.GONE);
rvProduct.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
productList = new ArrayList<>();
productAdapter = new SendApplyCrucibleChooseAdapter(R.layout.item_add_stock_choose, productList, 2);
productAdapter.bindToRecyclerView(rvProduct);
productAdapter.notifyDataSetChanged();
param = WorkUtils.pageKey();
param.put("current", page);
param.put("sendOutApplyItemId", getIntent().getStringExtra("sendOutApplyItemId"));
getData();
}
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_send_apply_choose;
}
private void getData() {
RtfUtils.getRtf().sendApplyCrucibleDetail(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++;
// }
}
});
}
}
package com.wd.workoffice.ui.activity.bat.order;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
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.SendApplyBean;
import com.wd.workoffice.bean.SendApplyDetailBean;
import com.wd.workoffice.bean.event.CheckSendEvent;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.bean.workEnum.PagePermissionType;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.SendApplyDetailAdapter;
import com.wd.workoffice.ui.adapter.SendApplyDetailCrucibleAdapter;
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 SendApplyDetailCrucibleActivity extends WorkToolBarActivity {
@BindView(R.id.tv_refuse)
TextView tvRefuse;
@BindView(R.id.tv_agree)
TextView tvAgree;
@BindView(R.id.ll_bottom)
LinearLayout llBottom;
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.tv_time)
TextView tvTime;
@BindView(R.id.tv_weight)
TextView tvWeight;
@BindView(R.id.tv_logistics_price)
TextView tvLogisticsPrice;
@BindView(R.id.tv_logistics_code)
TextView tvLogisticsCode;
@BindView(R.id.tv_logistics_company)
TextView tvLogisticsCompany;
@BindView(R.id.tv_remark)
TextView tvRemark;
@BindView(R.id.tv_check_person)
TextView tvCheckPerson;
@BindView(R.id.tv_check_time)
TextView tvCheckTime;
@BindView(R.id.tv_check_remark)
TextView tvCheckRemark;
@BindView(R.id.ll_check)
LinearLayout llCheck;
private List<SendApplyDetailBean> dataList;
private SendApplyDetailCrucibleAdapter dataAdapter;
private Map<String, Object> param;
private SendApplyBean.RecordsBean info;
private String orderType;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
private void changePermission() {
boolean hasPermission = true;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
hasPermission = WorkUtils.hasPermission(PagePermissionType.SO_OUT_AUDIT.getPermission());
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
hasPermission = WorkUtils.hasPermission(PagePermissionType.PO_OUT_AUDIT.getPermission());
} else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
hasPermission = WorkUtils.hasPermission(PagePermissionType.CO_OUT_AUDIT.getPermission());
}
if (!hasPermission) {
llBottom.setVisibility(View.GONE);
}
}
@Override
protected void initData() {
orderType = getIntent().getStringExtra("orderType");
info = JSON.parseObject(getIntent().getStringExtra("info"), SendApplyBean.RecordsBean.class);
getData(info.getId() + "");
tvTime.setText(info.getCreatedTime());
tvWeight.setText(MathUtils.converData(info.getTotalWeight(), 3));
tvLogisticsPrice.setText(MathUtils.converData(info.getFareMoney(), 3));
tvLogisticsCode.setText(info.getTrackingNumber());
tvLogisticsCompany.setText(info.getTransitPartName());
tvRemark.setText(info.getApplyRemark());
if (TextUtils.equals(info.getStatus(), "0")) {
llBottom.setVisibility(View.VISIBLE);
llCheck.setVisibility(View.GONE);
changePermission();
} else {
llBottom.setVisibility(View.GONE);
llCheck.setVisibility(View.VISIBLE);
tvCheckPerson.setText(info.getUpdatedUser());
tvCheckTime.setText(info.getUpdatedTime());
tvCheckRemark.setText(info.getAuditRemark());
}
dataList = new ArrayList<>();
dataAdapter = new SendApplyDetailCrucibleAdapter(R.layout.item_send_apply_detail_crucible, dataList);
dataAdapter.bindToRecyclerView(rvData);
param = new HashMap<>();
param.put("id", info.getId());
}
private void getData(String id) {
RtfUtils.getRtf().sendApplyDetail(id).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<SendApplyDetailBean> dataBean = JSON.parseArray(data.getData().toString(), SendApplyDetailBean.class);
dataList.addAll(dataBean);
dataAdapter.notifyDataSetChanged();
}
});
}
@Override
protected void initEvent() {
dataAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
startActivity(SendApplyCrucibleDetailFromActivity.class, "sendOutApplyItemId", dataList.get(i).getId() + "");
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_send_apply_detail;
}
@OnClick({R.id.tv_refuse, R.id.tv_agree})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_refuse:
checkDialog(2);
break;
case R.id.tv_agree:
checkDialog(1);
break;
}
}
private void checkDialog(int status) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
View view = LayoutInflater.from(this).inflate(R.layout.view_check, null);
TextView tvOk = view.findViewById(R.id.tv_ok);
TextView tvDesc = view.findViewById(R.id.tv_desc);
tvDesc.setText(status == 1 ? "通过" : "拒绝");
TextView tvNum = view.findViewById(R.id.tv_num);
TextView tvCancel = view.findViewById(R.id.tv_cancel);
EditText etRemark = view.findViewById(R.id.et_content);
WorkUtils.addNumListener(etRemark, tvNum);
builder.setView(view);
AlertDialog addCartDialog = builder.create();
tvOk.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (status != 1 && TextUtils.isEmpty(etRemark.getText().toString())) {
toast("请填写备注");
return;
}
check(status, etRemark.getText().toString());
addCartDialog.dismiss();
}
});
tvCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
addCartDialog.dismiss();
}
});
addCartDialog.show();
}
private void check(int status, String remark) {
param.put("status", status);
param.put("auditRemark", remark);
param.put("id", info.getId());
Observable<BaseBean> observable;
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().sendApplyCheck(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().sendPoApplyCheck(WorkUtils.convertMapToBody(param));
} else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
observable = RtfUtils.getRtf().sendCoApplyCheck(WorkUtils.convertMapToBody(param));
} else {
observable = RtfUtils.getRtf().sendApplyCheck(WorkUtils.convertMapToBody(param));
}
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;
}
toast("操作成功");
EventBus.getDefault().post(new CheckSendEvent());
finish();
}
});
}
}
...@@ -55,12 +55,12 @@ public class SendApplyCrucibleChooseAdapter extends BaseQuickAdapter<AddStockCho ...@@ -55,12 +55,12 @@ public class SendApplyCrucibleChooseAdapter extends BaseQuickAdapter<AddStockCho
} else if (type == 2) { } else if (type == 2) {
helper.setGone(R.id.ll_bottom, false); helper.setGone(R.id.ll_bottom, false);
helper.setGone(R.id.cb_check, false); helper.setGone(R.id.cb_check, false);
helper.setText(R.id.tv_stock_num_desc, "发货数量"); helper.setText(R.id.tv_stock_num_desc, "申请发货数量");
helper.setText(R.id.tv_stock_num, MathUtils.converData(item.getQuantity(), 3)); helper.setText(R.id.tv_stock_num, MathUtils.converData(item.getQuantity(), 3));
} else { } else {
helper.setText(R.id.tv_stock_num_desc, "可发货数量"); helper.setText(R.id.tv_stock_num_desc, "可发货数量");
helper.setText(R.id.tv_add_desc, "申请发货数量"); helper.setText(R.id.tv_add_desc, "申请发货数量");
helper.setText(R.id.tv_stock_num, MathUtils.converData(item.getActionQuantity(), 3)); 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_name, item.getCrucibleId());
helper.setText(R.id.tv_stock, item.getStockName()); helper.setText(R.id.tv_stock, item.getStockName());
......
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.SendApplyDetailBean;
import com.wd.workoffice.util.MathUtils;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class SendApplyDetailCrucibleAdapter extends BaseQuickAdapter<SendApplyDetailBean, BaseViewHolder> {
public SendApplyDetailCrucibleAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, SendApplyDetailBean item) {
helper.setText(R.id.tv_name, item.getSimpleCode());
helper.setText(R.id.tv_card, item.getSoleCode());
helper.setText(R.id.tv_card_name, item.getProductName());
helper.setText(R.id.tv_all_num, MathUtils.converData(item.getProductAmount(),3));
helper.addOnClickListener(R.id.tv_from);
}
}
...@@ -21,7 +21,9 @@ import com.wd.workoffice.bean.workEnum.OrderType; ...@@ -21,7 +21,9 @@ import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.bean.workEnum.PagePermissionType; import com.wd.workoffice.bean.workEnum.PagePermissionType;
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.order.SendApplyAddCrucibleActivity;
import com.wd.workoffice.ui.activity.bat.order.SendApplyDetailActivity; import com.wd.workoffice.ui.activity.bat.order.SendApplyDetailActivity;
import com.wd.workoffice.ui.activity.bat.order.SendApplyDetailCrucibleActivity;
import com.wd.workoffice.ui.adapter.SendApplyAdapter; import com.wd.workoffice.ui.adapter.SendApplyAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
...@@ -62,6 +64,7 @@ public class SendApplyFragment extends WorkBaseFg { ...@@ -62,6 +64,7 @@ public class SendApplyFragment extends WorkBaseFg {
private List<SendApplyBean.RecordsBean> dataList; private List<SendApplyBean.RecordsBean> dataList;
private String orderId; private String orderId;
private String orderType; private String orderType;
private String isCrucible;
@Override @Override
protected void initView() { protected void initView() {
...@@ -106,6 +109,7 @@ public class SendApplyFragment extends WorkBaseFg { ...@@ -106,6 +109,7 @@ public class SendApplyFragment extends WorkBaseFg {
state = arguments.getString("state"); state = arguments.getString("state");
orderId = arguments.getString("orderId"); orderId = arguments.getString("orderId");
orderType = arguments.getString("orderType"); orderType = arguments.getString("orderType");
isCrucible = arguments.getString("isCrucible");
} }
} }
...@@ -173,6 +177,12 @@ public class SendApplyFragment extends WorkBaseFg { ...@@ -173,6 +177,12 @@ public class SendApplyFragment extends WorkBaseFg {
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
if (TextUtils.equals("1", isCrucible)) {
startActivity(SendApplyDetailCrucibleActivity.class,
"orderType", orderType,
"info", JSON.toJSONString(dataList.get(position)));
return;
}
startActivity(SendApplyDetailActivity.class, startActivity(SendApplyDetailActivity.class,
"orderType", orderType, "orderType", orderType,
"info", JSON.toJSONString(dataList.get(position))); "info", JSON.toJSONString(dataList.get(position)));
......
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingVertical="10mm"> android:paddingVertical="10mm">
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="图号TH82739857"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15mm"
android:background="#FCFCFD"
android:orientation="vertical"
android:padding="10mm">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="品号"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="品名"
android:textColor="@color/flexible_text_gray"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_card_name"
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>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30mm">
<LinearLayout
android:layout_width="wrap_content"
android:layout_centerVertical="true"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发货数量: "
android:textSize="12sp" />
<TextView
android:id="@+id/tv_all_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tv_from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/shape_blue_btn"
android:paddingHorizontal="5mm"
android:paddingVertical="5mm"
android:text="发货来源"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论