|
|
|
@ -7,7 +7,9 @@ import android.media.Ringtone;
|
|
|
|
import android.media.RingtoneManager;
|
|
|
|
import android.media.RingtoneManager;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.net.Uri;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
|
|
|
|
|
|
|
import androidx.appcompat.app.AlertDialog;
|
|
|
|
import androidx.appcompat.app.AlertDialog;
|
|
|
|
|
|
|
|
|
|
|
|
import android.text.TextUtils;
|
|
|
|
import android.text.TextUtils;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
@ -18,10 +20,13 @@ import android.widget.LinearLayout;
|
|
|
|
import android.widget.ListView;
|
|
|
|
import android.widget.ListView;
|
|
|
|
import android.widget.Spinner;
|
|
|
|
import android.widget.Spinner;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.Contans;
|
|
|
|
import com.rehome.zhdcoa.Contans;
|
|
|
|
import com.rehome.zhdcoa.R;
|
|
|
|
import com.rehome.zhdcoa.R;
|
|
|
|
import com.rehome.zhdcoa.adapter.KcpdAdapter;
|
|
|
|
import com.rehome.zhdcoa.adapter.KcpdAdapter;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.base.BaseActivity;
|
|
|
|
import com.rehome.zhdcoa.base.BaseActivity2;
|
|
|
|
import com.rehome.zhdcoa.base.BaseActivity2;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.bean.OneLevelShelvesBean;
|
|
|
|
import com.rehome.zhdcoa.entity.KcpdInfo;
|
|
|
|
import com.rehome.zhdcoa.entity.KcpdInfo;
|
|
|
|
import com.rehome.zhdcoa.entity.StatusInfo;
|
|
|
|
import com.rehome.zhdcoa.entity.StatusInfo;
|
|
|
|
import com.rehome.zhdcoa.utils.GsonUtils;
|
|
|
|
import com.rehome.zhdcoa.utils.GsonUtils;
|
|
|
|
@ -34,10 +39,13 @@ import com.yolanda.nohttp.NoHttp;
|
|
|
|
import com.yolanda.nohttp.RequestMethod;
|
|
|
|
import com.yolanda.nohttp.RequestMethod;
|
|
|
|
import com.yolanda.nohttp.rest.Request;
|
|
|
|
import com.yolanda.nohttp.rest.Request;
|
|
|
|
import com.yolanda.nohttp.rest.Response;
|
|
|
|
import com.yolanda.nohttp.rest.Response;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.App;
|
|
|
|
import com.rehome.zhdcoa.App;
|
|
|
|
public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback {
|
|
|
|
|
|
|
|
|
|
|
|
public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
|
|
|
|
|
|
|
|
|
|
|
|
EditText et_hgtm;
|
|
|
|
EditText et_hgtm;
|
|
|
|
TextView tv_sys;
|
|
|
|
TextView tv_sys;
|
|
|
|
@ -49,7 +57,6 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
EditText et_sjsl;
|
|
|
|
EditText et_sjsl;
|
|
|
|
Button btn_save;
|
|
|
|
Button btn_save;
|
|
|
|
Button btn_cancel;
|
|
|
|
Button btn_cancel;
|
|
|
|
Button btn_itqz;
|
|
|
|
|
|
|
|
LinearLayout ll;
|
|
|
|
LinearLayout ll;
|
|
|
|
EditText etXmh;
|
|
|
|
EditText etXmh;
|
|
|
|
TextView tvSyswz;
|
|
|
|
TextView tvSyswz;
|
|
|
|
@ -70,7 +77,6 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
etXmh = findViewById(R.id.et_xmh);
|
|
|
|
etXmh = findViewById(R.id.et_xmh);
|
|
|
|
tvSyswz = findViewById(R.id.tv_syswz);
|
|
|
|
tvSyswz = findViewById(R.id.tv_syswz);
|
|
|
|
spBz = findViewById(R.id.sp_bz);
|
|
|
|
spBz = findViewById(R.id.sp_bz);
|
|
|
|
btn_itqz = findViewById(R.id.btn_itqz);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
btn_cancel.setOnClickListener(new View.OnClickListener() {
|
|
|
|
btn_cancel.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@ -85,7 +91,7 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
requestData("加载中...");
|
|
|
|
requestData("加载中...");
|
|
|
|
UiUtlis.hideInput(et_hgtm, context);
|
|
|
|
UiUtlis.hideInput(et_hgtm, context);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
showToast("请输入货架号或物资号");
|
|
|
|
showToast("请扫码母货架号和填写物资編码");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -169,13 +175,6 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
startActivityForResult(intent1, 2);
|
|
|
|
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 KcpdAdapter adapter;
|
|
|
|
@ -187,18 +186,28 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int getContentViewID() {
|
|
|
|
public int getLayoutId() {
|
|
|
|
return R.layout.activity_hjpd;
|
|
|
|
return R.layout.activity_hjpd;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void initView() {
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void initView() {
|
|
|
|
findView();
|
|
|
|
findView();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void initData() {
|
|
|
|
public void initData() {
|
|
|
|
pdid = (String) getIntent().getExtras().get(Contans.KEY_PDID);
|
|
|
|
pdid = (String) getIntent().getExtras().get(Contans.KEY_PDID);
|
|
|
|
setTitle("库存盘点");
|
|
|
|
|
|
|
|
setBack();
|
|
|
|
initToolbar("实时库存盘点", "盘点记录", new View.OnClickListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
// Intent intent = new Intent(context, ApplyLeaveDetailActivity.class);
|
|
|
|
|
|
|
|
// intent.putExtra(Contans.KEY.ISEDIT, false);
|
|
|
|
|
|
|
|
// startActivityForResult(intent, REQUEST_CODE_ADD);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// et_sjsl.setEnabled(false);
|
|
|
|
// et_sjsl.setEnabled(false);
|
|
|
|
// et_hgtm.setText("IT");
|
|
|
|
// et_hgtm.setText("IT");
|
|
|
|
@ -217,6 +226,9 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
Bundle bundle = data.getExtras();
|
|
|
|
Bundle bundle = data.getExtras();
|
|
|
|
String resultText = bundle.getString("result");
|
|
|
|
String resultText = bundle.getString("result");
|
|
|
|
et_hgtm.setText(resultText);
|
|
|
|
et_hgtm.setText(resultText);
|
|
|
|
|
|
|
|
if (!TextUtils.isEmpty(resultText)) {
|
|
|
|
|
|
|
|
getSpinnerParentData(resultText);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
@ -486,4 +498,66 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
|
|
|
|
// player.setVolume(1.0f, 1.0f);
|
|
|
|
// player.setVolume(1.0f, 1.0f);
|
|
|
|
// player.start();
|
|
|
|
// player.start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onPointerCaptureChanged(boolean hasCapture) {
|
|
|
|
|
|
|
|
super.onPointerCaptureChanged(hasCapture);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取母货架
|
|
|
|
|
|
|
|
private void getSpinnerParentData(String qccode) {
|
|
|
|
|
|
|
|
String url = Contans.IP + Contans.GET_SPINNER_PARENT_UDBIN_URL;
|
|
|
|
|
|
|
|
Request<String> request = NoHttp.createStringRequest(url, RequestMethod.GET);
|
|
|
|
|
|
|
|
request.add("QCCODE", qccode);
|
|
|
|
|
|
|
|
NohttpUtils.getInstance().add(HjpdActivity.this, 2, request, new HttpListener<String>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSucceed(int what, Response<String> response) {
|
|
|
|
|
|
|
|
if (what == 2) {
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
getSpinnerSonData(BINNUM);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onFailed(int what, Response<String> response) {
|
|
|
|
|
|
|
|
System.out.println("错误" + what + "==" + response.get());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, true, true, UiUtlis.getString(context, R.string.loading));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取子货架
|
|
|
|
|
|
|
|
private void getSpinnerSonData(String binnum) {
|
|
|
|
|
|
|
|
String url = Contans.IP + Contans.GET_SPINNER_PARENT_UDBIN_URL;
|
|
|
|
|
|
|
|
Request<String> request = NoHttp.createStringRequest(url, RequestMethod.GET);
|
|
|
|
|
|
|
|
request.add("BINNUM", binnum);
|
|
|
|
|
|
|
|
NohttpUtils.getInstance().add(HjpdActivity.this, 2, request, new HttpListener<String>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSucceed(int what, Response<String> response) {
|
|
|
|
|
|
|
|
if (what == 2) {
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onFailed(int what, Response<String> response) {
|
|
|
|
|
|
|
|
System.out.println("错误" + what + "==" + response.get());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, true, true, UiUtlis.getString(context, R.string.loading));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|