Selaa lähdekoodia

增加提交功能

songw 6 kuukautta sitten
vanhempi
commit
49a645718f

+ 1 - 1
app/build.gradle

@@ -41,7 +41,7 @@ android {
             if (outputFile != null && outputFile.name.endsWith('.apk')) {
                 if (variant.buildType.name.equals('release')) {
                     def releaseInfo = getVersionName()
-                    fileName = "LG_UAS_PDA_SMART_COM_LGRELEASE_${releaseInfo}.apk"
+                    fileName = "次元MES_${releaseInfo}.apk"
 
                 } else if (variant.buildType.name.equals('debug')) {
                     def debugInfo = getVersionName()

+ 9 - 6
app/src/main/java/com/uas/cy_mes/fragment/IOCOutMakeMaterial.java

@@ -83,17 +83,12 @@ public class IOCOutMakeMaterial extends BaseFragment {
 
     private static String TAG = "IOCOutMakeMaterial";
     private Button mMenuButton;
-    @Bind(R.id.in_out_no)
+
     AutoCompleteTextView inOutNo;
-    @Bind(R.id.clean_iv)
     ImageView cleanIv;
-    @Bind(R.id.wh_code)
     ClearableEditText whCode;
-    @Bind(R.id.submit_btn)
     Button submitBtn;
-    @Bind(R.id.list_in_out)
     ListView listInOut;
-    @Bind(R.id.iocout_material_multiple_tv)
     TextView mMultipleTextView;
 
     private IOCOutMakeMaterialFuzzySearch fuzzySearchData;
@@ -132,6 +127,14 @@ public class IOCOutMakeMaterial extends BaseFragment {
         //弹出软键盘
         mInputMethodManager = (InputMethodManager) root.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
         mInputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
+
+        inOutNo = root.findViewById(R.id.in_out_no);
+        cleanIv = root.findViewById(R.id.clean_iv);
+        whCode = root.findViewById(R.id.wh_code);
+        submitBtn = root.findViewById(R.id.submit_btn);
+        listInOut = root.findViewById(R.id.list_in_out);
+        mMultipleTextView = root.findViewById(R.id.iocout_material_multiple_tv);
+
         inOutNo.requestFocus();
         inOutNo.setThreshold(1);
 

+ 42 - 1
app/src/main/java/com/uas/cy_mes/fragment/NewBePutInStorageOrderDetailFragment.java

@@ -57,6 +57,7 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
     private TextView tv_generate_document_details;
     private TextView tv_hint;
     private TextView tv_qty;
+    private TextView tv_submint;
     private RadioGroup radiogroup1;
     private RadioButton radiobutton0;
     private RadioButton radiobutton1;
@@ -79,6 +80,7 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
         tv_generate_document_details = root.findViewById(R.id.tv_generate_document_details);
         tv_hint = root.findViewById(R.id.tv_hint);
         tv_qty = root.findViewById(R.id.tv_qty);
+        tv_submint = root.findViewById(R.id.tv_submint);
 
         radiogroup1 = root.findViewById(R.id.radiogroup1);
         radiobutton1 = root.findViewById(R.id.radiobutton1);
@@ -147,7 +149,7 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
         tv_productdetails.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                ProductDetailsFragment productDetailsFragment=new ProductDetailsFragment();
+                ProductDetailsFragment productDetailsFragment = new ProductDetailsFragment();
                 Bundle bundle = new Bundle();
                 bundle.putString("pi_inoutno", mPiInoutno);
                 productDetailsFragment.setArguments(bundle);
@@ -162,6 +164,45 @@ public class NewBePutInStorageOrderDetailFragment extends BaseFragment{
                 getDocumentDetails();
             }
         });
+
+        tv_submint.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getSubmint();
+            }
+        });
+    }
+
+    private void getSubmint() {
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_INVENTORY_SUBMIT)
+                .method(Request.Method.POST)
+                .tag(TAG + "getindatalist")
+                .flag(0)
+                //.addParamInt("id",0)
+                .addParam("inoutno",mPiInoutno)
+                .addParam("caller","ProdInOut!Make!In")
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                String result = o.toString();
+                Log.e("result",result);
+                CommonUtil.toastNoRepeat(mActivity, "提交成功");
+//                JSONObject resultObject = JSON.parseObject(result);
+//                String data = FastjsonUtil.getText(resultObject, "data");
+//                //{"success":true,"data":"生成明細成功"}
+//                if (!TextUtils.isEmpty(data)) {
+//                    CommonUtil.toastNoRepeat(mActivity, data);
+//                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
     }
 
     private void getDocumentDetails() {

+ 3 - 0
app/src/main/java/com/uas/cy_mes/global/GloableParams.java

@@ -258,6 +258,7 @@ public class GloableParams {
     public static String ADDRESS_PDAIO_IN_GETWHCODE;
     public static String ADDRESS_OUTMATERIAL_NEWPRODINOUT;
     public static String ADDRESS_DOCUMENT_DETAILS;
+    public static String ADDRESS_INVENTORY_SUBMIT;      //入库详情提交
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -276,6 +277,7 @@ public class GloableParams {
     private static final String ADDRESSTAIL_OUTMATERIAL_GETPDAVERSION = "/api/pda/outMaterial/getPdaVersion.action";
     //生成单据明细
     private static final String ADDRESSTAIL_DOCUMENT_DETAILS = "/api/pda/receiving/GenProdiodetail.action";
+    private static final String ADDRESSTAIL_INVENTORY_SUBMIT = "/scm/reserve/submitProdInOutFinish.action";
 
     /**
      * 条码信息采集
@@ -1139,6 +1141,7 @@ public class GloableParams {
         GloableParams.ADDRESS_PDAIO_IN_GETWHCODE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETWHCODE;
         GloableParams.ADDRESS_OUTMATERIAL_NEWPRODINOUT = uriHead + GloableParams.ADDRESSTAIL_COUNTING_NEWPRODINOUT;
         GloableParams.ADDRESS_DOCUMENT_DETAILS = uriHead + GloableParams.ADDRESSTAIL_DOCUMENT_DETAILS;
+        GloableParams.ADDRESS_INVENTORY_SUBMIT = uriHead + GloableParams.ADDRESSTAIL_INVENTORY_SUBMIT;
 
 
 

+ 9 - 0
app/src/main/java/com/uas/cy_mes/util/HttpParams.java

@@ -80,6 +80,7 @@ public class HttpParams {
         private int flag;
         private Map<String, String> params = new HashMap<>();
         private Map<String, String> headers = new HashMap<>();
+        private Map<String, Integer> paramsInt = new HashMap<>();
         private int method;
         private String tag;
 
@@ -116,6 +117,14 @@ public class HttpParams {
             return this;
         }
 
+        public Builder addParamInt(String key, int value) {
+            if (this.paramsInt == null) {
+                this.paramsInt = new HashMap<>();
+            }
+            this.paramsInt.put(key, value);
+            return this;
+        }
+
         public Builder setHeaders(Map<String, String> headers) {
             if (this.headers == null) {
                 this.headers = new HashMap<>();

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

@@ -48,6 +48,15 @@
             android:padding="5dp"
             android:text="生成单据明细"/>
 
+        <TextView
+            android:layout_marginStart="10dp"
+            android:id="@+id/tv_submint"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:background="@color/gray_light"
+            android:padding="5dp"
+            android:text="提交"/>
+
     </LinearLayout>
 
     <TextView

+ 2 - 2
build.gradle

@@ -55,8 +55,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 34,
-            versionName      : "v2.4.0"
+            versionCode      : 1,
+            versionName      : "v1.0.0"
     ]
 
     depsVersion = [