实时盘点查列表

master
hwf453 2 years ago
parent 8eea91da85
commit 54a73f9a95

@ -289,6 +289,10 @@ public class Contans {
*
*/
public static String PDJHSC = "WLJS/KCPD/SetData.aspx";
/**
*
*/
public static String REAL_TIME_PD = "WLJS/KCSSPD/GetListData.ashx";
/**
*
@ -556,6 +560,8 @@ public class Contans {
public static String YDCK_WZ_UPLOAD_VIDEO_URL="WLJS/WLUP/SetFilesNew.aspx";
//扫码获取母货架编号
public static String GET_SPINNER_PARENT_UDBIN_URL="WLJS/KCSSPD/GetUDBIN.ashx";
//用母货架编号查询获取子货架编号
public static String GET_SPINNER_SON_UDBIN_URL="WLJS/KCSSPD/GetUDBINNUM.ashx";
}

@ -0,0 +1,144 @@
package com.rehome.zhdcoa.adapter;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.TextView;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.bean.RealTimeKcpdInfo;
import com.rehome.zhdcoa.entity.KcpdInfo;
import com.zhy.autolayout.utils.AutoUtils;
import java.util.List;
public class RealTimeKcpdAdapter extends BaseAdapter implements View.OnClickListener{
private final List<RealTimeKcpdInfo.RowsBean> infos;
private final Context context;
private final RealTimeKcpdAdapter.Callback mCallback;
public interface Callback {
void cbClick(View view);
}
public RealTimeKcpdAdapter(List<RealTimeKcpdInfo.RowsBean> infos, Context context, RealTimeKcpdAdapter.Callback mCallback) {
this.infos = infos;
this.context = context;
this.mCallback = mCallback;
}
@Override
public int getCount() {
return infos.size();
}
@Override
public Object getItem(int i) {
return infos.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(final int i, View view, ViewGroup viewGroup) {
final RealTimeKcpdAdapter.ViewHolder holder;
if (view == null) {
holder = new RealTimeKcpdAdapter.ViewHolder();
view = LayoutInflater.from(context).inflate(R.layout.adapter_real_time_kcpd, viewGroup, false);
holder.tv_ms = view.findViewById(R.id.tv_ms);
holder.tv_sl = view.findViewById(R.id.tv_sl);
holder.tv_wl = view.findViewById(R.id.tv_wl);
holder.tv_hg = view.findViewById(R.id.tv_hg);
holder.cb = view.findViewById(R.id.cb_isprint);
holder.tv_pdsl = view.findViewById(R.id.tv_pdsl);
holder.tv_pdzt = view.findViewById(R.id.tv_pdzt);
holder.tv_hjzy = view.findViewById(R.id.tv_hjzy);
holder.tv_wzbm = view.findViewById(R.id.tv_wzbm);
view.setTag(holder);
AutoUtils.autoSize(view);
} else {
holder = (RealTimeKcpdAdapter.ViewHolder) view.getTag();
}
holder.tv_ms.setText(infos.get(i).getDESCRIPTION());
holder.tv_wl.setText(infos.get(i).getBINNUM());
holder.tv_sl.setText(infos.get(i).getCURBAL() + "");
holder.tv_hg.setText(infos.get(i).getITEMNUM());
holder.cb.setChecked(infos.get(i).isFlag());
holder.tv_pdsl.setText(infos.get(i).getPDSL());
holder.tv_hjzy.setText(infos.get(i).getSTOCKTYPE());
holder.tv_wzbm.setText(infos.get(i).getITEMNUM());
// if (infos.get(i).getIspd().equals("1")) {
// holder.tv_pdzt.setText("已盘点");
// int color = context.getResources().getColor(R.color.red);
// holder.tv_pdzt.setTextColor(color);
// holder.tv_ms.setTextColor(color);
// holder.tv_wl.setTextColor(color);
// holder.tv_sl.setTextColor(color);
// holder.tv_hg.setTextColor(color);
// holder.tv_pdsl.setTextColor(color);
// holder.tv_hjzy.setTextColor(color);
// holder.tv_wzbm.setTextColor(color);
//
// if (infos.get(i).getCurbal().equals(infos.get(i).getPdsl())){
// int color1 = context.getResources().getColor(R.color.red);
// holder.tv_sl.setTextColor(color1);
// holder.tv_pdsl.setTextColor(color1);
// }else {
// int color2 = context.getResources().getColor(R.color.green);
// holder.tv_pdsl.setTextColor(color2);
// holder.tv_wzbm.setTextColor(color2);
// holder.tv_sl.setTextColor(color2);
// holder.tv_pdzt.setTextColor(color2);
// holder.tv_hjzy.setTextColor(color2);
// }
//
//
//
// } else {
// holder.tv_pdzt.setText("未盘点");
// holder.tv_pdzt.setTextColor(Color.GRAY);
// holder.tv_ms.setTextColor(Color.GRAY);
// holder.tv_wl.setTextColor(Color.GRAY);
// holder.tv_sl.setTextColor(Color.GRAY);
// holder.tv_hg.setTextColor(Color.GRAY);
// holder.tv_pdsl.setTextColor(Color.GRAY);
// holder.tv_hjzy.setTextColor(Color.GRAY);
// holder.tv_wzbm.setTextColor(Color.GRAY);
// }
holder.cb.setOnClickListener(this);
holder.cb.setTag(i);
return view;
}
@Override
public void onClick(View view) {
mCallback.cbClick(view);
}
static class ViewHolder {
TextView tv_sl;
TextView tv_ms;
TextView tv_wl;
TextView tv_hg;
CheckBox cb;
TextView tv_pdsl;
TextView tv_pdzt;
TextView tv_hjzy;
TextView tv_wzbm;
}
}

@ -0,0 +1,171 @@
package com.rehome.zhdcoa.bean;
import java.util.List;
/**
*
*/
public class RealTimeKcpdInfo extends DagerEnterApplyBaseBean{
private List<RowsBean> Datas;
public List<RowsBean> getDatas() {
return Datas;
}
public void setDatas(List<RowsBean> datas) {
Datas = datas;
}
public static class RowsBean {
//序号
private String SORTSXH;
//物资编码
private String ITEMNUM;
//货架号
private String BINNUM;
//批次号
private String LOTNUM;
//账面数量
private String CURBAL;
//盘点数量
private String PDSL;
//盘点状态0未盘点1已盘点
private String ISPD;
//物资描述
private String DESCRIPTION;
//相关专业
private String IN6;
//单价
private String LASTCOST;
//单位
private String ORDERUNIT;
//货架专业属性
private String STOCKTYPE;
//总价
private String ZJ;
//备注
private String BZ;
private boolean isFlag;
public String getSORTSXH() {
return SORTSXH;
}
public void setSORTSXH(String SORTSXH) {
this.SORTSXH = SORTSXH;
}
public String getITEMNUM() {
return ITEMNUM;
}
public void setITEMNUM(String ITEMNUM) {
this.ITEMNUM = ITEMNUM;
}
public String getBINNUM() {
return BINNUM;
}
public void setBINNUM(String BINNUM) {
this.BINNUM = BINNUM;
}
public String getLOTNUM() {
return LOTNUM;
}
public void setLOTNUM(String LOTNUM) {
this.LOTNUM = LOTNUM;
}
public String getCURBAL() {
return CURBAL;
}
public void setCURBAL(String CURBAL) {
this.CURBAL = CURBAL;
}
public String getPDSL() {
return PDSL;
}
public void setPDSL(String PDSL) {
this.PDSL = PDSL;
}
public String getISPD() {
return ISPD;
}
public void setISPD(String ISPD) {
this.ISPD = ISPD;
}
public String getDESCRIPTION() {
return DESCRIPTION;
}
public void setDESCRIPTION(String DESCRIPTION) {
this.DESCRIPTION = DESCRIPTION;
}
public String getIN6() {
return IN6;
}
public void setIN6(String IN6) {
this.IN6 = IN6;
}
public String getLASTCOST() {
return LASTCOST;
}
public void setLASTCOST(String LASTCOST) {
this.LASTCOST = LASTCOST;
}
public String getORDERUNIT() {
return ORDERUNIT;
}
public void setORDERUNIT(String ORDERUNIT) {
this.ORDERUNIT = ORDERUNIT;
}
public String getSTOCKTYPE() {
return STOCKTYPE;
}
public void setSTOCKTYPE(String STOCKTYPE) {
this.STOCKTYPE = STOCKTYPE;
}
public String getZJ() {
return ZJ;
}
public void setZJ(String ZJ) {
this.ZJ = ZJ;
}
public String getBZ() {
return BZ;
}
public void setBZ(String BZ) {
this.BZ = BZ;
}
public boolean isFlag() {
return isFlag;
}
public void setFlag(boolean flag) {
isFlag = flag;
}
}
}

@ -0,0 +1,64 @@
package com.rehome.zhdcoa.bean;
public class SaveRealTimeKcpdInfo {
//物资编码
private String ITEMNUM;
//货架号
private String BINNUM;
//批次号
private String LOTNUM;
//盘点数量
private String PDSL;
//备注
private String BZ;
//盘点人工号(当前登录人)
private String PDR;
public String getITEMNUM() {
return ITEMNUM;
}
public void setITEMNUM(String ITEMNUM) {
this.ITEMNUM = ITEMNUM;
}
public String getBINNUM() {
return BINNUM;
}
public void setBINNUM(String BINNUM) {
this.BINNUM = BINNUM;
}
public String getLOTNUM() {
return LOTNUM;
}
public void setLOTNUM(String LOTNUM) {
this.LOTNUM = LOTNUM;
}
public String getPDSL() {
return PDSL;
}
public void setPDSL(String PDSL) {
this.PDSL = PDSL;
}
public String getBZ() {
return BZ;
}
public void setBZ(String BZ) {
this.BZ = BZ;
}
public String getPDR() {
return PDR;
}
public void setPDR(String PDR) {
this.PDR = PDR;
}
}

@ -0,0 +1,43 @@
package com.rehome.zhdcoa.bean;
import java.util.List;
/**
*
*/
public class TwoLevelShelvesBean extends DagerEnterApplyBaseBean{
private List<RowsBean> Datas;
public List<RowsBean> getDatas() {
return Datas;
}
public void setDatas(List<RowsBean> datas) {
Datas = datas;
}
public static class RowsBean {
//货架号
private String VALUE;
//货架号
private String TEXT;
public String getVALUE() {
return VALUE;
}
public void setVALUE(String VALUE) {
this.VALUE = VALUE;
}
public String getTEXT() {
return TEXT;
}
public void setTEXT(String TEXT) {
this.TEXT = TEXT;
}
}
}

@ -13,6 +13,7 @@ import androidx.appcompat.app.AlertDialog;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
@ -24,9 +25,13 @@ import android.widget.TextView;
import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.adapter.KcpdAdapter;
import com.rehome.zhdcoa.adapter.RealTimeKcpdAdapter;
import com.rehome.zhdcoa.base.BaseActivity;
import com.rehome.zhdcoa.base.BaseActivity2;
import com.rehome.zhdcoa.bean.OneLevelShelvesBean;
import com.rehome.zhdcoa.bean.RealTimeKcpdInfo;
import com.rehome.zhdcoa.bean.SaveRealTimeKcpdInfo;
import com.rehome.zhdcoa.bean.TwoLevelShelvesBean;
import com.rehome.zhdcoa.entity.KcpdInfo;
import com.rehome.zhdcoa.entity.StatusInfo;
import com.rehome.zhdcoa.utils.GsonUtils;
@ -45,7 +50,7 @@ import java.util.List;
import com.rehome.zhdcoa.App;
public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
public class HjpdActivity extends BaseActivity implements RealTimeKcpdAdapter.Callback {
EditText et_hgtm;
TextView tv_sys;
@ -57,11 +62,16 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
EditText et_sjsl;
Button btn_save;
Button btn_cancel;
Button btn_itqz;
LinearLayout ll;
EditText etXmh;
TextView tvSyswz;
Spinner spBz;
Spinner spinnerSon;
List<TwoLevelShelvesBean.RowsBean> spinnerSonList = new ArrayList();
private void findView() {
et_hgtm = findViewById(R.id.et_hgtm);
tv_sys = findViewById(R.id.tv_sys);
@ -73,10 +83,12 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
et_sjsl = findViewById(R.id.et_sjsl);
btn_save = findViewById(R.id.btn_save);
btn_cancel = findViewById(R.id.btn_cancel);
btn_itqz = findViewById(R.id.btn_itqz);
ll = findViewById(R.id.ll);
etXmh = findViewById(R.id.et_xmh);
tvSyswz = findViewById(R.id.tv_syswz);
spBz = findViewById(R.id.sp_bz);
spinnerSon = findViewById(R.id.spinnerSon);
btn_cancel.setOnClickListener(new View.OnClickListener() {
@Override
@ -87,10 +99,12 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
btn_query.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!TextUtils.isEmpty(UiUtlis.getText(etXmh)) || !TextUtils.isEmpty(UiUtlis.getText(et_hgtm))) {
String spinnerSonSelectItemStr = spinnerSon.getSelectedItem().toString();
if (!TextUtils.isEmpty(UiUtlis.getText(et_hgtm)) || !TextUtils.isEmpty(spinnerSonSelectItemStr) || !TextUtils.isEmpty(UiUtlis.getText(etXmh)))
{
requestData("加载中...");
UiUtlis.hideInput(et_hgtm, context);
} else {
} else{
showToast("请扫码母货架号和填写物资編码");
}
}
@ -103,7 +117,7 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
for (int i = 0; i < infos.size(); i++) {
if (infos.get(i).isFlag()) {
//判断是否已经盘点
if (infos.get(i).getIspd().equals("1")) {
if (infos.get(i).getISPD().equals("1")) {
showPdDialog(false);
} else {
//如果没有盘点,就盘点
@ -114,14 +128,20 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
} else {
showToast("你还没有输入盘点数量");
}
} else //如果没有选中,点击保存。
{
} else {
//如果没有选中,点击保存。
// String spinnerSonSelectItemStr = spinnerSon.getSelectedItem().toString();
// Request<String> request = NoHttp.createStringRequest(Contans.IP + Contans.REAL_TIME_PD);
// request.add("UDBINNUM", spinnerSonSelectItemStr);
// request.add("ITEMNUM", UiUtlis.getText(etXmh));
// request.add("BINNUM", UiUtlis.getText(et_hgtm));
if (!UiUtlis.getText(et_sjsl).isEmpty() && !UiUtlis.getText(et_hgtm).isEmpty() && !UiUtlis.getText(etXmh).isEmpty()) {
boolean ispd = false;
if (infos.size() != 0) {
for (KcpdInfo.kcpd kcpd : infos) {
for (RealTimeKcpdInfo.RowsBean kcpd : infos) {
if (kcpd.getIspd().equals("1") && kcpd.getBinnum().equals(UiUtlis.getText(et_hgtm))) {
if (kcpd.getISPD().equals("1") && kcpd.getBINNUM().equals(UiUtlis.getText(et_hgtm))) {
ispd = true;
break;
}
@ -175,10 +195,17 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
startActivityForResult(intent1, 2);
}
});
btn_itqz.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
etXmh.setText("IT");
//etXmh.setSelection(2);
}
});
}
private KcpdAdapter adapter;
private List<KcpdInfo.kcpd> infos;
private RealTimeKcpdAdapter adapter;
private List<RealTimeKcpdInfo.RowsBean> infos;
private View headView;
private String pdid;
@ -227,7 +254,10 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
String resultText = bundle.getString("result");
et_hgtm.setText(resultText);
if (!TextUtils.isEmpty(resultText)) {
//1K101
//1k102
getSpinnerParentData(resultText);
//getSpinnerParentData("1K101");
}
}
break;
@ -298,10 +328,11 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
}
private void requestData(String msg) {
Request<String> request = NoHttp.createStringRequest(Contans.IP + Contans.PDJH);
request.add("pdid", pdid);
request.add("itemnum", UiUtlis.getText(etXmh));
request.add("binnum", UiUtlis.getText(et_hgtm));
String spinnerSonSelectItemStr = spinnerSon.getSelectedItem().toString();
Request<String> request = NoHttp.createStringRequest(Contans.IP + Contans.REAL_TIME_PD);
request.add("UDBINNUM", spinnerSonSelectItemStr);
request.add("ITEMNUM", UiUtlis.getText(etXmh));
request.add("BINNUM", UiUtlis.getText(et_hgtm));
NohttpUtils.getInstance().add(HjpdActivity.this, 0, request, callback, true, true, msg);
}
@ -315,28 +346,29 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
private final HttpListener<String> callback = new HttpListener<String>() {
@Override
public void onSucceed(int what, Response<String> response) {
String result = response.get();
showLog(result);
switch (what) {
case 0:
KcpdInfo kcpdInfo = GsonUtils.GsonToBean(response.get(), KcpdInfo.class);
if (kcpdInfo != null) {
if (kcpdInfo.getTotal() != 0) {
if (TextUtils.isEmpty(UiUtlis.getText(et_hgtm))) {
playSound();
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setCancelable(false);
builder.setTitle("提示");
builder.setMessage("该货柜下无此物资");
builder.setPositiveButton("返回", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
builder.create().show();
}
RealTimeKcpdInfo realTimeKcpdInfo = GsonUtils.GsonToBean(result, RealTimeKcpdInfo.class);
if (realTimeKcpdInfo != null) {
if (realTimeKcpdInfo.isFlag()) {
// if (TextUtils.isEmpty(UiUtlis.getText(et_hgtm))) {
// playSound();
// AlertDialog.Builder builder = new AlertDialog.Builder(context);
// builder.setCancelable(false);
// builder.setTitle("提示");
// builder.setMessage("该货柜下无此物资");
// builder.setPositiveButton("返回", new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// dialog.dismiss();
// }
// });
// builder.create().show();
// }
infos.clear();
infos.addAll(kcpdInfo.getRows());
infos.addAll(realTimeKcpdInfo.getDatas());
setListData();
} else {
infos.clear();
@ -389,7 +421,7 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
lv.addHeaderView(headView, null, false);
}
if (adapter == null) {
adapter = new KcpdAdapter(infos, context, HjpdActivity.this);
adapter = new RealTimeKcpdAdapter(infos, context, this);
lv.setAdapter(adapter);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
@ -419,12 +451,12 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
private void updateView(int index) {
selectItem = index;
et_xm.setText(infos.get(index).getItemnum());
et_ms.setText(infos.get(index).getDescription());
et_sl.setText(infos.get(index).getCurbal() + "");
et_sjsl.setText(infos.get(index).getCurbal() + "");
et_xm.setText(infos.get(index).getITEMNUM());
et_ms.setText(infos.get(index).getDESCRIPTION());
et_sl.setText(infos.get(index).getCURBAL() + "");
et_sjsl.setText(infos.get(index).getCURBAL() + "");
et_sjsl.setEnabled(true);
et_hgtm.setText(infos.get(index).getBinnum());
et_hgtm.setText(infos.get(index).getBINNUM());
}
private void clearView() {
@ -455,36 +487,32 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
private String toJson(String sjpdzt) {
String json = "";
if (selectItem != -1) {
KcpdInfo info = new KcpdInfo();
List<KcpdInfo.kcpd> list = new ArrayList<>();
KcpdInfo.kcpd kcpd = infos.get(selectItem);
kcpd.setPdsl(et_sjsl.getText().toString());
kcpd.setPdr(App.getInstance().getUserInfo().getManid());
kcpd.setSjpdzt(sjpdzt);
kcpd.setBz((String) spBz.getSelectedItem());
kcpd.setUname(App.getInstance().getUserInfo().getManid());
list.add(kcpd);
info.setRows(list);
info.setTotal(1);
json = GsonUtils.GsonString(info);
}
// if (selectItem != -1) {
// KcpdInfo info = new KcpdInfo();
// List<KcpdInfo.kcpd> list = new ArrayList<>();
// KcpdInfo.kcpd kcpd = infos.get(selectItem);
// kcpd.setPdsl(et_sjsl.getText().toString());
// kcpd.setPdr(App.getInstance().getUserInfo().getManid());
// kcpd.setSjpdzt(sjpdzt);
// kcpd.setBz((String) spBz.getSelectedItem());
// kcpd.setUname(App.getInstance().getUserInfo().getManid());
// list.add(kcpd);
// info.setRows(list);
// info.setTotal(1);
// json = GsonUtils.GsonString(info);
// }
return json;
}
private String addJson(String sjpdzt, KcpdInfo.kcpd kcpd) {
private String addJson(String sjpdzt, RealTimeKcpdInfo.RowsBean kcpd) {
String json = "";
KcpdInfo info = new KcpdInfo();
List<KcpdInfo.kcpd> list = new ArrayList<>();
kcpd.setPdsl(et_sjsl.getText().toString());
kcpd.setPdr(App.getInstance().getUserInfo().getManid());
kcpd.setSjpdzt(sjpdzt);
kcpd.setBz((String) spBz.getSelectedItem());
kcpd.setUname(App.getInstance().getUserInfo().getManid());
kcpd.setBinnum(UiUtlis.getText(et_hgtm));
list.add(kcpd);
info.setRows(list);
info.setTotal(1);
SaveRealTimeKcpdInfo info = new SaveRealTimeKcpdInfo();
info.setPDSL(et_sjsl.getText().toString());
info.setPDR(App.getInstance().getUserInfo().getManid());
info.setITEMNUM(kcpd.getITEMNUM());
info.setBZ((String) spBz.getSelectedItem());
info.setLOTNUM(kcpd.getLOTNUM());
info.setBINNUM(kcpd.getBINNUM());
json = GsonUtils.GsonString(info);
return json;
}
@ -535,19 +563,36 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
//获取子货架
private void getSpinnerSonData(String binnum) {
String url = Contans.IP + Contans.GET_SPINNER_PARENT_UDBIN_URL;
String url = Contans.IP + Contans.GET_SPINNER_SON_UDBIN_URL;
Request<String> request = NoHttp.createStringRequest(url, RequestMethod.GET);
request.add("BINNUM", binnum);
NohttpUtils.getInstance().add(HjpdActivity.this, 2, request, new HttpListener<String>() {
NohttpUtils.getInstance().add(HjpdActivity.this, 3, request, new HttpListener<String>() {
@Override
public void onSucceed(int what, Response<String> response) {
if (what == 2) {
if (what == 3) {
String result = response.get();
showLog(result);
OneLevelShelvesBean oneLevelShelvesBean = GsonUtils.GsonToBean(result, OneLevelShelvesBean.class);
if (oneLevelShelvesBean != null) {
if (oneLevelShelvesBean.isFlag() && oneLevelShelvesBean.getDatas() != null && oneLevelShelvesBean.getDatas().size() > 0) {
String BINNUM = oneLevelShelvesBean.getDatas().get(0).getBINNUM();
TwoLevelShelvesBean twoLevelShelvesBean = GsonUtils.GsonToBean(result, TwoLevelShelvesBean.class);
if (twoLevelShelvesBean != null) {
if (twoLevelShelvesBean.isFlag() && twoLevelShelvesBean.getDatas() != null && twoLevelShelvesBean.getDatas().size() > 0) {
spinnerSonList.clear();
spinnerSonList.addAll(twoLevelShelvesBean.getDatas());
// 在我们的这个位置的话创建我们的数组
String[] arrayModel = new String[spinnerSonList.size()];
ArrayList<String> listText = new ArrayList<String>();
spinnerSonList.forEach(item -> {
listText.add(item.getTEXT());
});
listText.toArray(arrayModel);
// 然后的话创建一个我们的一个数组适配器并且的话这个数组适配器使我们的字符串类型的
ArrayAdapter<String> adapter = new ArrayAdapter<String>(HjpdActivity.this, android.R.layout.simple_spinner_item, arrayModel);
// 设置我们的数组下拉时的选项的样式
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinnerSon.setAdapter(adapter);
}
}
}
@ -561,3 +606,62 @@ public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
}, true, true, UiUtlis.getString(context, R.string.loading));
}
}
/**
* 1K101
* 1K101-013
* IT63966
* <p>
* 1K101
* 1K101-043
* IT63867
* <p>
* 1K102
* 1K101-013
* IT62209
* IT62210
* IT62211
* IT60669
* <p>
* 1K103
* 1K101-034
* IT16159
* <p>
* 1K101
* 1K101-043
* IT63867
* <p>
* 1K102
* 1K101-013
* IT62209
* IT62210
* IT62211
* IT60669
* <p>
* 1K103
* 1K101-034
* IT16159
*/
/**
* 1K101
* 1K101-043
* IT63867
*/
/**
* 1K102
* 1K101-013
* IT62209
* IT62210
* IT62211
* IT60669
*/
/**
* 1K103
* 1K101-034
* IT16159
*/

@ -4,7 +4,6 @@ import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.widget.ListView;
import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.adapter.CommonAdapter;
@ -14,13 +13,11 @@ import com.rehome.zhdcoa.entity.PdjhInfo;
import com.rehome.zhdcoa.utils.GsonUtils;
import com.rehome.zhdcoa.utils.HttpListener;
import com.rehome.zhdcoa.utils.NohttpUtils;
import com.rehome.zhdcoa.utils.SPUtils;
import com.rehome.zhdcoa.utils.UiUtlis;
import com.yolanda.nohttp.NoHttp;
import com.yolanda.nohttp.RequestMethod;
import com.yolanda.nohttp.rest.Request;
import com.yolanda.nohttp.rest.Response;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@ -37,7 +34,6 @@ public class Kcpd2Activity extends BaseActivity2 {
ListView lv_pdjh;
private PdjhInfo pdjhInfo;
private List<PdjhInfo.Pdjh> list = new ArrayList<>();
;
private CommonAdapter<PdjhInfo.Pdjh> cAdapter;
@Override

@ -33,7 +33,6 @@
<EditText
android:id="@+id/et_hgtm"
style="@style/editTextThemePanDian"
android:layout_centerVertical="true"
android:enabled="false"
android:hint="母货架号" />
@ -118,6 +117,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/btn_itqz"
style="@style/button"
android:layout_marginLeft="20px"
android:layout_weight="1"
android:text="IT前缀" />
<Button
android:id="@+id/btn_query"

@ -0,0 +1,165 @@
<?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:minHeight="100px"
android:orientation="vertical">
<View
android:id="@+id/head"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#524658"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="96px">
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<LinearLayout
android:layout_width="80px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5px">
<CheckBox
android:id="@+id/cb_isprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:focusable="false" />
</LinearLayout>
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658"
android:visibility="gone" />
<TextView
android:id="@+id/tv_hg"
android:layout_width="100px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="项目"
android:visibility="gone" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<TextView
android:gravity="center"
android:id="@+id/tv_wl"
android:layout_width="150px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="货柜" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658"
android:visibility="gone" />
<TextView
android:id="@+id/tv_ms"
android:layout_width="300px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="描述"
android:visibility="gone" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<TextView
android:gravity="center"
android:id="@+id/tv_wzbm"
android:layout_width="130px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="项目" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<TextView
android:gravity="center"
android:id="@+id/tv_sl"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="账面\n数量" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<TextView
android:gravity="center"
android:id="@+id/tv_pdsl"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="盘点\n数量" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<TextView
android:gravity="center"
android:id="@+id/tv_pdzt"
android:layout_width="120px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="盘点\n状态" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
<TextView
android:gravity="center"
android:id="@+id/tv_hjzy"
android:layout_width="150px"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5px"
android:text="货架\n专业" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="#524658" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#524658" />
</LinearLayout>
Loading…
Cancel
Save