实时盘点查列表
parent
8eea91da85
commit
54a73f9a95
@ -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,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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…
Reference in New Issue