Browse Source

入库详情采集增加条件,自动登录

ChengJH 2 years ago
parent
commit
30e64f1ed4

+ 19 - 0
app/src/main/java/com/uas/uas_mes_ztrh/fragment/NewBePutInStorageOrderDetailFragment.java

@@ -10,6 +10,8 @@ import android.view.View;
 import android.view.WindowManager;
 import android.view.inputmethod.EditorInfo;
 import android.widget.CheckBox;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -53,6 +55,9 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
     private TextView tv_productdetails;
     private TextView tv_hint;
     private TextView tv_qty;
+    private RadioGroup radiogroup1;
+    private RadioButton radiobutton1;
+    private RadioButton radiobutton2;
 
     @Override
     protected int getLayout() {
@@ -70,6 +75,11 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
         tv_hint = root.findViewById(R.id.tv_hint);
         tv_qty = root.findViewById(R.id.tv_qty);
 
+        radiogroup1 = root.findViewById(R.id.radiogroup1);
+        radiobutton1 = root.findViewById(R.id.radiobutton1);
+        radiobutton2 = root.findViewById(R.id.radiobutton2);
+        radiobutton1.setChecked(true);
+
         mTypeColumn = new Column<String>("类型", "PIM_TYPE");
         mcontentColumn = new Column<String>("内容", "CONTENT");
         mCnColumn = new Column<String>("数量", "CN");
@@ -205,6 +215,14 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
 
 
     public void getmakeInWarhouse(String input){
+        String text_radiobutton = null;
+        if (radiobutton1.isChecked()==true){
+            text_radiobutton="BOX";
+        }else if (radiobutton2.isChecked()==true){
+            text_radiobutton="SN";
+        }else {
+            text_radiobutton="";
+        }
         progressDialog.show();
         VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
                 .url(GloableParams.ADDRESS_DOCUMENTLIBRARY_MAKEINWARHOUSE)
@@ -214,6 +232,7 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
                 .addParam("inoutno",mPiInoutno)
                 .addParam("cancel",ck_cancel.isChecked()+"")
                 .addParam("code",input)
+                .addParam("type",text_radiobutton)
                 .build(), new HttpCallback() {
             @Override
             public void onSuccess(int flag, Object o) throws Exception {

+ 1 - 1
app/src/main/java/com/uas/uas_mes_ztrh/util/VolleyRequest.java

@@ -129,7 +129,7 @@ public class VolleyRequest {
                             LogUtil.e("responErr", errorToast);
                             if (errorToast.length() >= 500) {
                                 Log.e("重新登录1","重新登录");
-                                //Volley请求服务器重新登录
+                                //Volley请求服务器重新登录userNames
                                 Activity activity=new Activity();
                                 String maName = SharedPreUtil.getString(activity, Constants.FLAG.ACCOUNT_NAME_CACHE, null);
                                 String userName = SharedPreUtil.getString(activity, "userNames", null);

+ 25 - 0
app/src/main/res/layout/newbeputinstorageorderdetail_fragment.xml

@@ -61,6 +61,31 @@
         android:padding="5dp"
         android:text="">
     </TextView>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <RadioGroup
+            android:id="@+id/radiogroup1"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="horizontal">
+
+            <RadioButton
+                android:id="@+id/radiobutton1"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="箱号" />
+
+            <RadioButton
+                android:id="@+id/radiobutton2"
+                android:layout_marginLeft="@dimen/textsize_20"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="单台序列号" />
+
+        </RadioGroup>
+
+    </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 14,
-            versionName      : "v1.4"
+            versionCode      : 10,
+            versionName      : "v1.0"
     ]
 
     depsVersion = [