提交 7bcd78af authored 作者: lgd's avatar lgd

1.订单追踪

2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级 9bc90d09
package com.wd.workoffice.bean.mesBean;
import com.wd.workoffice.app.BaseMesPageBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesOrderBean extends BaseMesPageBean {
/**
* pageNum : 1
* pageSize : 10
* size : 3
* startRow : 1
* endRow : 3
* total : 3
* pages : 1
* list : [{"id":"22222","createDateTime":1586941483000,"updateDateTime":1586941483000,"manufactureOrderNumber":"ZLD0001","siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"GK10","siteName":"铝碳厂","productId":"7101010688L","productName":"塞棒(高碱)加套B354-2","productCode":"7101010688L","specification":"1560","drawingNumber":"xxxxx","planCount":20,"deliveryDate":1574870400000,"scheduleStatus":"0","auditStatus":"1","index":0,"type":"0","seriesName":"1.6米以下免车塞棒(勿删)","materialName":"塞棒(高碱)加套B354-2","materialCode":"7101010688L","specifications":"1560","planQuantity":20,"unit":"个","batchNo":"ZLD0001","seriesId":"7a671920a0b811ea8334fa163e1166bd","delete":false},{"id":"5ac6962d9ed911e8b81100163e049447","createDateTime":1586941483000,"updateDateTime":1586941483000,"manufactureOrderNumber":"ZLD0001","siteId":"GK10","siteCode":"GK10","siteName":"生产部(GK)","productId":"7101010377D","productName":"塞棒B421","productCode":"7101010377D","specification":null,"drawingNumber":"xxxxx","planCount":50,"deliveryDate":1590595200000,"scheduleStatus":"0","auditStatus":"0","index":1,"type":"0","seriesName":"4545","materialName":"塞棒B421","materialCode":"7101010377D","specifications":null,"planQuantity":50,"unit":"1","batchNo":"ZLD0001","seriesId":"1","delete":false},{"id":"cf185b11382311ea8334fa163e1166bd","createDateTime":1586941483000,"updateDateTime":1586941483000,"manufactureOrderNumber":"LSL1111","siteId":"GK10","siteCode":"GK10","siteName":"生产部(GK)","productId":"7101010688L","productName":"塞棒(高碱)加套B354-2","productCode":"7101010688L","specification":null,"drawingNumber":"xxxxx","planCount":20,"deliveryDate":1574870400000,"scheduleStatus":"0","auditStatus":"0","index":0,"type":"0","seriesName":"1.6米以下免车塞棒(勿删)","materialName":"塞棒(高碱)加套B354-2","materialCode":"7101010688L","specifications":null,"planQuantity":20,"unit":null,"batchNo":"LSL1111","seriesId":"7a671920a0b811ea8334fa163e1166bd","delete":false}]
* prePage : 0
* nextPage : 0
* isFirstPage : true
* isLastPage : true
* hasPreviousPage : false
* hasNextPage : false
* navigatePages : 8
* navigatepageNums : [1]
* navigateFirstPage : 1
* navigateLastPage : 1
* firstPage : 1
* lastPage : 1
*/
private List<ListBean> list;
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* id : 22222
* createDateTime : 1586941483000
* updateDateTime : 1586941483000
* manufactureOrderNumber : ZLD0001
* siteId : 1c37c889ffa211e98334fa163e1166bd
* siteCode : GK10
* siteName : 铝碳厂
* productId : 7101010688L
* productName : 塞棒(高碱)加套B354-2
* productCode : 7101010688L
* specification : 1560
* drawingNumber : xxxxx
* planCount : 20
* deliveryDate : 1574870400000
* scheduleStatus : 0
* auditStatus : 1
* index : 0
* type : 0
* seriesName : 1.6米以下免车塞棒(勿删)
* materialName : 塞棒(高碱)加套B354-2
* materialCode : 7101010688L
* specifications : 1560
* planQuantity : 20
* unit : 个
* batchNo : ZLD0001
* seriesId : 7a671920a0b811ea8334fa163e1166bd
* delete : false
*/
private String id;
private long createDateTime;
private long updateDateTime;
private String manufactureOrderNumber;
private String siteId;
private String siteCode;
private String siteName;
private String productId;
private String productName;
private String productCode;
private String specification;
private String drawingNumber;
private int planCount;
private long deliveryDate;
private String scheduleStatus;
private String auditStatus;
private int index;
private String type;
private String seriesName;
private String materialName;
private String materialCode;
private String specifications;
private int planQuantity;
private String unit;
private String batchNo;
private String seriesId;
private boolean delete;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public long getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(long createDateTime) {
this.createDateTime = createDateTime;
}
public long getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(long updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getManufactureOrderNumber() {
return manufactureOrderNumber;
}
public void setManufactureOrderNumber(String manufactureOrderNumber) {
this.manufactureOrderNumber = manufactureOrderNumber;
}
public String getSiteId() {
return siteId;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public String getSiteCode() {
return siteCode;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;
}
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName;
}
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getSpecification() {
return specification;
}
public void setSpecification(String specification) {
this.specification = specification;
}
public String getDrawingNumber() {
return drawingNumber;
}
public void setDrawingNumber(String drawingNumber) {
this.drawingNumber = drawingNumber;
}
public int getPlanCount() {
return planCount;
}
public void setPlanCount(int planCount) {
this.planCount = planCount;
}
public long getDeliveryDate() {
return deliveryDate;
}
public void setDeliveryDate(long deliveryDate) {
this.deliveryDate = deliveryDate;
}
public String getScheduleStatus() {
return scheduleStatus;
}
public void setScheduleStatus(String scheduleStatus) {
this.scheduleStatus = scheduleStatus;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getSeriesName() {
return seriesName;
}
public void setSeriesName(String seriesName) {
this.seriesName = seriesName;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getSpecifications() {
return specifications;
}
public void setSpecifications(String specifications) {
this.specifications = specifications;
}
public int getPlanQuantity() {
return planQuantity;
}
public void setPlanQuantity(int planQuantity) {
this.planQuantity = planQuantity;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getSeriesId() {
return seriesId;
}
public void setSeriesId(String seriesId) {
this.seriesId = seriesId;
}
public boolean isDelete() {
return delete;
}
public void setDelete(boolean delete) {
this.delete = delete;
}
}
}
...@@ -480,4 +480,11 @@ public interface MesApiService { ...@@ -480,4 +480,11 @@ public interface MesApiService {
*/ */
@POST("/himes/api/customer/show/page.json") @POST("/himes/api/customer/show/page.json")
Observable<BaseMesBean> clientPhoneList(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> clientPhoneList(@Query("functionId") String functionId, @Body RequestBody requestBody);
/**
* @return
*/
@POST("/himes/api/order/show/list.json")
Observable<BaseMesBean> orderList(@Query("functionId") String functionId, @Body RequestBody requestBody);
} }
...@@ -40,7 +40,7 @@ public class MesOrderActivity extends WorkToolBarActivity { ...@@ -40,7 +40,7 @@ public class MesOrderActivity extends WorkToolBarActivity {
private String tab[] = { private String tab[] = {
"全部", "已排程", "未排程"}; "全部", "已排程", "未排程"};
private String order[] = { private String order[] = {
"0", "1", "2"}; "", "1", "0"};
@Override @Override
protected void initView() { protected void initView() {
...@@ -57,8 +57,6 @@ public class MesOrderActivity extends WorkToolBarActivity { ...@@ -57,8 +57,6 @@ public class MesOrderActivity extends WorkToolBarActivity {
MesOrderFragment saleFragment = new MesOrderFragment(); MesOrderFragment saleFragment = new MesOrderFragment();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("state", order[i]); bundle.putString("state", order[i]);
bundle.putString("orderId", getIntent().getStringExtra("orderId"));
bundle.putString("orderType", getIntent().getStringExtra("orderType"));
saleFragment.setArguments(bundle); saleFragment.setArguments(bundle);
data.add(saleFragment); data.add(saleFragment);
......
package com.wd.workoffice.ui.activity.mes.order; package com.wd.workoffice.ui.activity.mes.order;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.MesOrderBean;
import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import flexible.xd.android_base.utils.TimeUtils;
/** /**
* 订单追踪 详情 * 订单追踪 详情
...@@ -14,9 +23,48 @@ import butterknife.ButterKnife; ...@@ -14,9 +23,48 @@ import butterknife.ButterKnife;
public class MesOrderDetailActivity extends WorkToolBarActivity { public class MesOrderDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_top_no)
TextView tvTopNo;
@BindView(R.id.tv_status)
TextView tvStatus;
@BindView(R.id.tv_no)
TextView tvNo;
@BindView(R.id.tv_pro_name)
TextView tvProName;
@BindView(R.id.tv_pro_code)
TextView tvProCode;
@BindView(R.id.tv_factory_name)
TextView tvFactoryName;
@BindView(R.id.tv_factory_code)
TextView tvFactoryCode;
@BindView(R.id.tv_order_time)
TextView tvOrderTime;
@BindView(R.id.tv_num)
TextView tvNum;
@BindView(R.id.tv_weight)
TextView tvWeight;
@BindView(R.id.tv_time)
TextView tvTime;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
MesOrderBean.ListBean info = JSON.parseObject(getIntent().getStringExtra("info"), MesOrderBean.ListBean.class);
if (TextUtils.equals(info.getScheduleStatus(), "") || TextUtils.equals(info.getScheduleStatus(), "0")) {
tvStatus.setText("未排程");
} else {
tvStatus.setText("已排程");
}
tvTopNo.setText(String.format("制造令单号:%s", info.getManufactureOrderNumber()));
tvNo.setText(info.getManufactureOrderNumber());
tvFactoryName.setText(info.getSiteName());
tvFactoryCode.setText(info.getSiteCode());
tvNum.setText(info.getPlanCount() + "");
tvProCode.setText(info.getProductCode());
tvProName.setText(info.getProductName());
tvWeight.setText(info.getUnit());
tvTime.setText(TimeUtils.millis2String(info.getDeliveryDate()));
tvOrderTime.setText(TimeUtils.millis2String(info.getCreateDateTime()));
} }
@Override @Override
......
...@@ -2,44 +2,43 @@ package com.wd.workoffice.ui.adapter; ...@@ -2,44 +2,43 @@ package com.wd.workoffice.ui.adapter;
import android.graphics.Color; import android.graphics.Color;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder; import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.bean.SendApplyBean; import com.wd.workoffice.bean.SendApplyBean;
import com.wd.workoffice.bean.mesBean.MesOrderBean;
import java.util.List; import java.util.List;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import flexible.xd.android_base.utils.TimeUtils;
/** /**
* Created by flexible on 2018/8/13. * Created by flexible on 2018/8/13.
*/ */
public class MesOrderAdapter extends BaseQuickAdapter<Object, BaseViewHolder> { public class MesOrderAdapter extends BaseQuickAdapter<MesOrderBean.ListBean, BaseViewHolder> {
public MesOrderAdapter(int layoutResId, List data) { public MesOrderAdapter(int layoutResId, List data) {
super(layoutResId, data); super(layoutResId, data);
} }
@Override @Override
protected void convert(BaseViewHolder helper, Object item) { protected void convert(BaseViewHolder helper, MesOrderBean.ListBean item) {
if (helper.getAdapterPosition() % 2 == 0) { if (TextUtils.equals(item.getScheduleStatus(),"")||TextUtils.equals(item.getScheduleStatus(),"0") ) {
helper.setTextColor(R.id.tv_status, Color.parseColor("#FF34AA68"));
helper.setText(R.id.tv_status,"已排程");
} else {
helper.setTextColor(R.id.tv_status, Color.parseColor("#FFD16A6A")); helper.setTextColor(R.id.tv_status, Color.parseColor("#FFD16A6A"));
helper.setText(R.id.tv_status,"未排程"); helper.setText(R.id.tv_status,"未排程");
} else {
helper.setTextColor(R.id.tv_status, Color.parseColor("#FF34AA68"));
helper.setText(R.id.tv_status,"已排程");
} }
// helper.setText(R.id.tv_name, item.getSerialNumber()); helper.setText(R.id.tv_no,String.format("指令单号:%s", item.getManufactureOrderNumber()));
// helper.setText(R.id.tv_reason, item.getApplyRemark()); helper.setText(R.id.tv_name, item.getProductName());
// helper.setText(R.id.tv_time, item.getCreatedTime()); helper.setText(R.id.tv_factory_name, item.getSiteName());
// if (status == 0) { helper.setText(R.id.tv_num, item.getPlanCount()+"");
// helper.setVisible(R.id.ll_btn, true); helper.setText(R.id.tv_time, TimeUtils.millis2String(item.getDeliveryDate()));
// helper.addOnClickListener(R.id.tv_agree);
// helper.addOnClickListener(R.id.tv_refuse);
// }
// }
} }
} }
......
...@@ -14,9 +14,12 @@ import com.chad.library.adapter.base.BaseQuickAdapter; ...@@ -14,9 +14,12 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean; import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkBaseFg; import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.SendApplyBean; import com.wd.workoffice.bean.SendApplyBean;
import com.wd.workoffice.bean.event.CheckSendEvent; import com.wd.workoffice.bean.event.CheckSendEvent;
import com.wd.workoffice.bean.mesBean.MesOrderBean;
import com.wd.workoffice.bean.mesBean.TakeOnBean;
import com.wd.workoffice.bean.workEnum.OrderType; 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;
...@@ -31,6 +34,7 @@ import org.greenrobot.eventbus.EventBus; ...@@ -31,6 +34,7 @@ import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -60,9 +64,7 @@ public class MesOrderFragment extends WorkBaseFg { ...@@ -60,9 +64,7 @@ public class MesOrderFragment extends WorkBaseFg {
private int page = 1; private int page = 1;
private Map<String, Object> param; private Map<String, Object> param;
private MesOrderAdapter dataAdapter; private MesOrderAdapter dataAdapter;
private List<Object> dataList; private List<MesOrderBean.ListBean> dataList;
private String orderId;
private String orderType;
@Override @Override
protected void initView() { protected void initView() {
...@@ -73,20 +75,18 @@ public class MesOrderFragment extends WorkBaseFg { ...@@ -73,20 +75,18 @@ public class MesOrderFragment extends WorkBaseFg {
@Override @Override
protected void initData() { protected void initData() {
param = WorkUtils.pageKey(); param = WorkUtils.pageMesKey();
param.put("status", state);
param.put("orderId", orderId);
page = 1; page = 1;
param.put("current", page); param.put("pageNum", page);
Map<String ,Object> paramMap =new HashMap<>();
param.put("paramMap", paramMap);
paramMap.put("scheduleStatus",state);
dataList = new ArrayList<>(); dataList = new ArrayList<>();
dataAdapter = new MesOrderAdapter(R.layout.item_mes_order, dataList); dataAdapter = new MesOrderAdapter(R.layout.item_mes_order, dataList);
dataAdapter.bindToRecyclerView(rvData); dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData); dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
dataList.add(null);
dataList.add(null);
dataList.add(null);
dataAdapter.notifyDataSetChanged(); dataAdapter.notifyDataSetChanged();
// getData(); getData();
} }
...@@ -96,23 +96,11 @@ public class MesOrderFragment extends WorkBaseFg { ...@@ -96,23 +96,11 @@ public class MesOrderFragment extends WorkBaseFg {
Bundle arguments = getArguments(); Bundle arguments = getArguments();
if (arguments != null) { if (arguments != null) {
state = arguments.getString("state"); state = arguments.getString("state");
orderId = arguments.getString("orderId");
orderType = arguments.getString("orderType");
} }
} }
private void getData() { private void getData() {
Observable<BaseBean> observable; RtfUtils.getMesRtf().orderList("1",WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
observable = RtfUtils.getRtf().sendApplyList(param);
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
observable = RtfUtils.getRtf().sendPoApplyList(param);
} else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
observable = RtfUtils.getRtf().sendCoApplyList(param);
} else {
observable = RtfUtils.getRtf().sendApplyList(param);
}
observable.compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
public void doOnSubscribe(Disposable d) { public void doOnSubscribe(Disposable d) {
} }
...@@ -124,15 +112,14 @@ public class MesOrderFragment extends WorkBaseFg { ...@@ -124,15 +112,14 @@ public class MesOrderFragment extends WorkBaseFg {
} }
@Override @Override
public void onSuccess(BaseBean data) { public void onSuccess(BaseMesBean data) {
hideLoading(); hideLoading();
if (data.getCode() != 0) { if (!data.isSuccess()) {
toast(data.getMessage()); toast(data.getMessage());
return; return;
} }
List<SendApplyBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), SendApplyBean.class).getRecords(); List<MesOrderBean.ListBean> getList = JSON.parseObject(data.getData().toString(), MesOrderBean.class).getList();
if (page == 1) { if (page == 1) {
srlRefresh.finishRefresh();
dataList.clear(); dataList.clear();
dataList.addAll(getList); dataList.addAll(getList);
dataAdapter.notifyDataSetChanged(); dataAdapter.notifyDataSetChanged();
...@@ -155,115 +142,28 @@ public class MesOrderFragment extends WorkBaseFg { ...@@ -155,115 +142,28 @@ public class MesOrderFragment extends WorkBaseFg {
protected void initEvent() { protected void initEvent() {
srlRefresh.setOnRefreshListener(refreshLayout -> { srlRefresh.setOnRefreshListener(refreshLayout -> {
page = 1; page = 1;
param.put("current", page); param.put("pageNum", page);
getData(); getData();
}); });
dataAdapter.setOnLoadMoreListener(() -> { dataAdapter.setOnLoadMoreListener(() -> {
param.put("current", page); param.put("pageNum", page);
getData(); getData();
}, rvData); }, rvData);
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) {
startActivity(MesOrderDetailActivity.class); startActivity(MesOrderDetailActivity.class,"info",JSON.toJSONString(dataList.get(position)));
} }
}); });
} }
private void checkDialog(int status, int id) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View view = LayoutInflater.from(getActivity()).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(), id);
addCartDialog.dismiss();
}
});
tvCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
addCartDialog.dismiss();
}
});
addCartDialog.show();
}
private void check(int status, String remark, int id) {
Map<String, Object> param = WorkUtils.simpleParam();
param.put("status", status);
param.put("auditRemark", remark);
param.put("id", id);
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());
}
});
}
@Override @Override
protected int layoutId() { protected int layoutId() {
return R.layout.fg_work_contacts; return R.layout.fg_work_contacts;
} }
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckSendEvent event) {
page = 1;
param.put("current", page);
getData();
}
} }
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
android:paddingVertical="14mm"> android:paddingVertical="14mm">
<TextView <TextView
android:id="@+id/tv_name" android:id="@+id/tv_top_no"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="订单编号:DD10001" android:text="指令单号:"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
...@@ -61,14 +61,16 @@ ...@@ -61,14 +61,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_reason" android:id="@+id/tv_no"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -81,13 +83,16 @@ ...@@ -81,13 +83,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_pro_name"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -100,13 +105,16 @@ ...@@ -100,13 +105,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_pro_code"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -125,7 +133,10 @@ ...@@ -125,7 +133,10 @@
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_factory_name"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -138,13 +149,16 @@ ...@@ -138,13 +149,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_factory_code"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -157,13 +171,16 @@ ...@@ -157,13 +171,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_order_time"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -176,13 +193,16 @@ ...@@ -176,13 +193,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_num"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -195,13 +215,16 @@ ...@@ -195,13 +215,16 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_weight"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -214,16 +237,20 @@ ...@@ -214,16 +237,20 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/tv_name" android:id="@+id/tv_no"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="订单编号:DD10001" android:text="制造令单号:"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
android:layout_marginTop="12mm" android:layout_marginTop="12mm"
android:maxLines="1" android:maxLines="1"
android:text="--------------------------------------------------------------------------------------------------------------------------------" /> android:text="--------------------------------------------------------------------------------------------------------------------------------" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -53,18 +52,19 @@ ...@@ -53,18 +52,19 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tv_reason" android:id="@+id/tv_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -73,17 +73,21 @@ ...@@ -73,17 +73,21 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_factory_name"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="right"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -92,17 +96,21 @@ ...@@ -92,17 +96,21 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_num"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -111,15 +119,19 @@ ...@@ -111,15 +119,19 @@
<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:textColor="@color/flexible_text_gray" android:textColor="@color/flexible_text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="right"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论