Sfoglia il codice sorgente

移动单据过账功能到其它页面

songw 2 mesi fa
parent
commit
4248be8d72

+ 39 - 0
app/src/main/java/com/uas/jc_wms/fragment/WorkOrderCollectFragment.java

@@ -1,10 +1,12 @@
 package com.uas.jc_wms.fragment;
 
 import android.app.Activity;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
+import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
@@ -242,11 +244,48 @@ public class WorkOrderCollectFragment extends BaseFragment implements View.OnCli
         View view = View.inflate(getActivity(), R.layout.pop_inventory_collect_menu, null);
         Button detailBtn = (Button) view.findViewById(R.id.pop_inventory_collect_menu_1);
         Button summaryBtn = (Button) view.findViewById(R.id.pop_inventory_collect_menu_2);
+        Button passBillBtn = (Button) view.findViewById(R.id.pop_material_out_menu_6);
         summaryBtn.setText("汇总明细");
         detailBtn.setOnClickListener(this);
         summaryBtn.setOnClickListener(this);
         detailBtn.setVisibility(View.GONE);
 
+        passBillBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                closeMenuPopupWindow();
+                new AlertDialog.Builder(mActivity)
+                        .setMessage("确认将单据过账?")
+                        .setNegativeButton(R.string.cancel, null)
+                        .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialogInterface, int i) {
+                                dialogInterface.dismiss();
+                                progressDialog.show();
+                                VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                                        .url(GloableParams.ADDRESS_INMATERIAL_CONFIRMPOST)
+                                        .method(Request.Method.POST)
+                                        .tag(TAG + "ADDRESS_INMATERIAL_CONFIRMPOST")
+                                        .flag(0)
+                                        .addParam("piid", pi_id)
+                                        .build(), new HttpCallback() {
+                                    @Override
+                                    public void onSuccess(int flag, Object o) throws Exception {
+                                        progressDialog.dismiss();
+                                        CommonUtil.toastNoRepeat(mActivity, "过账成功");
+                                    }
+
+                                    @Override
+                                    public void onFail(int flag, String failStr) throws Exception {
+                                        progressDialog.dismiss();
+                                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                                    }
+                                });
+                            }
+                        }).create().show();
+            }
+        });
+
         mMenuPopupWindow = new PopupWindow(view, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());
         mMenuPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {

+ 33 - 8
app/src/main/res/layout/item_list_storage_recharge.xml

@@ -15,7 +15,7 @@
         <TextView
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
+            android:layout_marginStart="8dp"
             android:layout_weight="1"
             android:text="PO号:"
             android:textSize="14sp" />
@@ -24,24 +24,26 @@
             android:id="@+id/list_storage_recharge_ordercode_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
             android:layout_weight="3"
             android:textSize="14sp"
             tools:text="MP32009240" />
 
         <TextView
+            android:visibility="invisible"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
+            android:layout_marginStart="8dp"
             android:layout_weight="1"
             android:text="序号:"
             android:textSize="14sp" />
 
         <TextView
+            android:visibility="invisible"
             android:id="@+id/list_storage_recharge_orderno_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
             android:layout_weight="1"
             android:textSize="14sp"
             tools:text="1" />
@@ -53,21 +55,36 @@
         android:orientation="horizontal"
         android:padding="4dp">
 
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/bar_prodcode"
+            android:layout_marginStart="8dp"
+            android:textSize="14sp"
+            />
+
         <TextView
             android:id="@+id/list_storage_recharge_prodcode_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
-            android:layout_weight="2"
+            android:layout_marginStart="8dp"
+            android:layout_weight="1.3"
             android:textSize="14sp"
             tools:text="ZWLDK23723447479" />
 
         <LinearLayout
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
             android:layout_weight="1">
 
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/bar_remain"
+                android:textSize="14sp"
+                />
+
             <TextView
                 android:id="@+id/list_storage_recharge_quantity_tv"
                 android:layout_width="0dp"
@@ -93,11 +110,19 @@
         android:orientation="horizontal"
         android:padding="4dp">
 
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/pr_spec"
+            android:layout_marginStart="8dp"
+            android:textSize="14sp"
+            />
+
         <TextView
             android:id="@+id/list_storage_recharge_spec_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
+            android:layout_marginStart="8dp"
             android:layout_weight="1"
             android:textSize="14sp"
             tools:text="名称+规格" />

+ 10 - 0
app/src/main/res/layout/pop_inventory_collect_menu.xml

@@ -17,4 +17,14 @@
         android:text="盘点汇总"
         android:visibility="visible" />
 
+    <Button
+        android:id="@+id/pop_material_out_menu_6"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="单据过账"
+        android:textSize="@dimen/app_text_size_body_2" />
+
 </LinearLayout>

+ 1 - 0
app/src/main/res/layout/pop_material_out_menu.xml

@@ -73,6 +73,7 @@
         android:layout_marginLeft="10dp"
         android:layout_marginRight="10dp"
         android:background="@color/transparent"
+        android:visibility="gone"
         android:text="单据过账"
         android:textSize="@dimen/app_text_size_body_2" />
 

+ 2 - 2
build.gradle

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