Browse Source

增加出库单物料变更-物料编号搜索

ChengJH 2 years ago
parent
commit
15611fe08c

+ 23 - 0
app/src/main/java/com/uas/uas_mes_zb_p/fragment/TakeApartThePalletFragment.java

@@ -78,6 +78,7 @@ public class TakeApartThePalletFragment extends BaseFragment{
     private ClearableEditText edit_mj;
     private String pr_spec;
     private String pr_detail;
+    private ClearableEditText pr_code_et;
 
     @Override
     protected int getLayout() {
@@ -427,6 +428,9 @@ public class TakeApartThePalletFragment extends BaseFragment{
      */
     private void initRecyclePopupWindow() {
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_recycleview_pup, null);
+
+        pr_code_et = (ClearableEditText) contView.findViewById(R.id.pr_code_et);
+        ImageView pr_code_im = contView.findViewById(R.id.pr_code_im);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
         rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
         sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
@@ -520,6 +524,24 @@ public class TakeApartThePalletFragment extends BaseFragment{
 
 
 
+        pr_code_et.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    getCheck_pd_prodcode();
+                    return true;
+                }
+                return false;
+            }
+        });
+        pr_code_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getCheck_pd_prodcode();
+            }
+        });
         edit_et.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -622,6 +644,7 @@ public class TakeApartThePalletFragment extends BaseFragment{
                 .addParam("pr_spec1", edit_et.getText().toString().trim())
                 .addParam("pr_spec2", edit_gg.getText().toString().trim())
                 .addParam("pr_spec3", edit_mj.getText().toString().trim())
+                .addParam("pr_code", pr_code_et.getText().toString().trim())
                 .build(), new HttpCallback() {
             @Override
             public void onSuccess(int flag, Object o) throws Exception {

+ 38 - 0
app/src/main/res/layout/index_recycleview_pup.xml

@@ -12,8 +12,46 @@
         android:gravity="center"
         android:padding="14dp"
         android:text="请采集岗位资源" />
+    <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:id="@+id/line_top1"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+        <TextView
+            android:text="编号"
+            android:gravity="center"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+        </TextView>
+
+        <com.uas.uas_mes_zb_p.view.ClearableEditText
+            android:id="@+id/pr_code_et"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_marginRight="16dp"
+            android:layout_weight="1"
+            android:background="@drawable/bg_line_edittext"
+            android:gravity="center_vertical"
+            android:hint="请输入要搜索的物料编号"
+            android:padding="5dp"
+            android:textSize="14sp"/>
+
+        <ImageView
+            android:id="@+id/pr_code_im"
+            android:layout_width="46dp"
+            android:layout_height="match_parent"
+            android:layout_marginRight="10dp"
+            android:background="@drawable/bg_button"
+            android:src="@drawable/search_48" />
+    </LinearLayout>
 
     <LinearLayout
+        android:layout_below="@+id/line_top1"
         android:layout_marginTop="@dimen/dp_10"
         android:id="@+id/line_top"
         android:layout_width="match_parent"

+ 1 - 1
build.gradle

@@ -51,7 +51,7 @@ ext {
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
             versionCode      : 11,
-            versionName      : "v1.1"
+            versionName      : "v1.2"
     ]
 
     depsVersion = [