master
hwf453 2 years ago
parent 4ef56e0023
commit 8eea91da85

@ -554,6 +554,8 @@ public class Contans {
public static String GET_WZ_SEARCH_DATA_URL="WLJS/WLUP/GetDataNew.aspx";
//上传视频
public static String YDCK_WZ_UPLOAD_VIDEO_URL="WLJS/WLUP/SetFilesNew.aspx";
//扫码获取母货架编号
public static String GET_SPINNER_PARENT_UDBIN_URL="WLJS/KCSSPD/GetUDBIN.ashx";
}

@ -1,2 +1,30 @@
package com.rehome.zhdcoa.bean;public class OneLevelShelvesBean {
package com.rehome.zhdcoa.bean;
import java.util.List;
public class OneLevelShelvesBean 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 BINNUM;
public String getBINNUM() {
return BINNUM;
}
public void setBINNUM(String BINNUM) {
this.BINNUM = BINNUM;
}
}
}

@ -7,7 +7,9 @@ import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
@ -18,10 +20,13 @@ import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.adapter.KcpdAdapter;
import com.rehome.zhdcoa.base.BaseActivity;
import com.rehome.zhdcoa.base.BaseActivity2;
import com.rehome.zhdcoa.bean.OneLevelShelvesBean;
import com.rehome.zhdcoa.entity.KcpdInfo;
import com.rehome.zhdcoa.entity.StatusInfo;
import com.rehome.zhdcoa.utils.GsonUtils;
@ -34,10 +39,13 @@ import com.yolanda.nohttp.NoHttp;
import com.yolanda.nohttp.RequestMethod;
import com.yolanda.nohttp.rest.Request;
import com.yolanda.nohttp.rest.Response;
import java.util.ArrayList;
import java.util.List;
import com.rehome.zhdcoa.App;
public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback {
public class HjpdActivity extends BaseActivity implements KcpdAdapter.Callback {
EditText et_hgtm;
TextView tv_sys;
@ -49,7 +57,6 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
EditText et_sjsl;
Button btn_save;
Button btn_cancel;
Button btn_itqz;
LinearLayout ll;
EditText etXmh;
TextView tvSyswz;
@ -70,7 +77,6 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
etXmh = findViewById(R.id.et_xmh);
tvSyswz = findViewById(R.id.tv_syswz);
spBz = findViewById(R.id.sp_bz);
btn_itqz = findViewById(R.id.btn_itqz);
btn_cancel.setOnClickListener(new View.OnClickListener() {
@Override
@ -85,7 +91,7 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
requestData("加载中...");
UiUtlis.hideInput(et_hgtm, context);
} else {
showToast("请输入货架号或物资号");
showToast("请扫码母货架号和填写物资編码");
}
}
});
@ -169,13 +175,6 @@ public class HjpdActivity extends BaseActivity2 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;
@ -187,18 +186,28 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
@Override
public int getContentViewID() {
public int getLayoutId() {
return R.layout.activity_hjpd;
}
protected void initView() {
@Override
public void initView() {
findView();
}
public void initData() {
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_hgtm.setText("IT");
@ -217,6 +226,9 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
Bundle bundle = data.getExtras();
String resultText = bundle.getString("result");
et_hgtm.setText(resultText);
if (!TextUtils.isEmpty(resultText)) {
getSpinnerParentData(resultText);
}
}
break;
case 2:
@ -486,4 +498,66 @@ public class HjpdActivity extends BaseActivity2 implements KcpdAdapter.Callback
// player.setVolume(1.0f, 1.0f);
// 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));
}
}

@ -20,7 +20,7 @@ public class KcpdTypeActivity extends BaseViewBindingActivity<ActivityKcpdTypeBi
private GridViewKcpdTypeAdapter adapter;
private final String[] str = {"按计划盘点", "按货架盘点"};
private final String[] str = {"按计划盘点", "实时盘点"};
private final int[] imageId = {R.mipmap.dingqi, R.mipmap.huojia01};
private int[] colors = {R.drawable.radius_a1, R.drawable.radius_a2};

@ -7,7 +7,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar_yx"></include>
<include layout="@layout/layout_base" />
<ScrollView
android:layout_width="match_parent"
@ -34,7 +34,8 @@
android:id="@+id/et_hgtm"
style="@style/editTextThemePanDian"
android:layout_centerVertical="true"
android:hint="货架号" />
android:enabled="false"
android:hint="母货架号" />
<TextView
android:id="@+id/tv_sys"
@ -48,6 +49,43 @@
android:text="扫一扫" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="70px"
android:background="@drawable/bg_edittext"
android:gravity="center_vertical"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:text="子货架号:"
android:textStyle="bold"
android:textColor="#aaaaaa"
android:textSize="13sp"/>
<Spinner
android:id="@+id/spinnerSon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:spinnerMode="dropdown">
</Spinner>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_10"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
@ -59,7 +97,7 @@
android:id="@+id/et_xmh"
style="@style/editTextThemePanDian"
android:layout_centerVertical="true"
android:hint="物资" />
android:hint="物资编码" />
<TextView
android:id="@+id/tv_syswz"
@ -81,13 +119,6 @@
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"
style="@style/button"

@ -3,32 +3,3 @@ plugins {
id 'com.android.application' version '8.1.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
//buildscript {
// repositories {
// google()
// jcenter()
// //
// mavenCentral()
//
// }
// dependencies {
// classpath 'com.android.tools.build:gradle:8.1.0'
// classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20'
// }
//}
//
//allprojects {
// repositories {
// google()
// jcenter()
// maven {url "https://jitpack.io"}
// maven {url 'https://maven.google.com'}
// }
//}
//
//task clean(type: Delete) {
// delete rootProject.buildDir
//}

Loading…
Cancel
Save