李士越 1 год назад
Родитель
Сommit
a0fe1e1038

+ 5 - 19
res/layout/activity_delivery_note_inquiry.xml

@@ -133,7 +133,7 @@
                 android:layout_width="80dp"
                 android:layout_height="wrap_content"
                 android:layout_marginLeft="10dp"
-                android:text="车牌号:"
+                android:text="车    号:"
                 android:textColor="@color/white"
                 android:textSize="@dimen/textsize_16" />
 
@@ -165,17 +165,11 @@
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_vertical"
                 android:layout_marginLeft="10dp"
-                android:text="记账日期"
+                android:text="记账日期"
                 android:textColor="@color/white"
                 android:textSize="@dimen/textsize_16" />
 
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:text=":"
-                android:textColor="@color/white"
-                android:textSize="@dimen/textsize_16" />
+            
 
             <LinearLayout
                 android:layout_width="fill_parent"
@@ -226,17 +220,9 @@
                 android:layout_height="wrap_content"
                 android:layout_gravity="center_vertical"
                 android:layout_marginLeft="10dp"
-                android:text="送货日期"
-                android:textColor="@color/white"
-                android:textSize="@dimen/textsize_16" />
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:text=":"
+                android:text="送货日期:"
                 android:textColor="@color/white"
-                android:textSize="@dimen/textsize_16" />
+                android:textSize="@dimen/textsize_16" /> 
 
             <LinearLayout
                 android:layout_width="fill_parent"

+ 1 - 0
res/layout/activity_delivery_note_inquiry_item.xml

@@ -9,6 +9,7 @@
         android:layout_height="fill_parent"
         android:orientation="vertical" >
     <LinearLayout
+        android:id="@+id/backgroundcolor"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal" > 

+ 31 - 1
src/com/jiaju/activity/DeliveryNoteInquiryActivity.java

@@ -32,7 +32,11 @@ import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.Spinner;
 import android.widget.TextView;
-
+/**
+ *  发货单一览
+ * 2024-11-15
+ *  李士越
+ * */
 public class DeliveryNoteInquiryActivity extends Activity {
 	/**返回*/
 	private ImageButton backbtn;
@@ -509,8 +513,11 @@ public class DeliveryNoteInquiryActivity extends Activity {
 				Boolean lock = true;
 				// 过滤出多选选中数据
 				List<DeliveryNoteInquiryItemModel> Wherelist = steamfilter();
+				// 总单id数据集合
+				List<String> ementy = new ArrayList<>();
 				// 遍历数据
 				for (DeliveryNoteInquiryItemModel item : Wherelist) {
+					ementy.add(item.getSenddoutgoodsLogID());
 					// 当同步状态为1时
 					if (item.getSyncstatusState().equals("1")) {
 						lock = false;
@@ -527,6 +534,29 @@ public class DeliveryNoteInquiryActivity extends Activity {
 					exceptionHandler.sendMessage(m);
 					return;
 				}
+				try {
+					JSONObject js = new JSONObject();
+					js.put("accountCode", accountCode);
+					js.put("userCode", barcode_print_userCode);
+					js.put("userPassword", password);
+					js.put("sessionKey", sessionkey);
+					js.put("ementy", ementy.toString());
+					String API = "http://" + ServerAddress_ip + ":" + ServerAddress_Port + Constants.serverAction
+							+ "/SupplementaryPush";
+					thread = new HandlerThread("barcodeThread", 5);
+					thread.start();
+					mHandler = new Handler(thread.getLooper());
+					ButtonAPIRunnable Data = new ButtonAPIRunnable(js, API, 4);
+					mHandler.post(Data);
+				} catch (Exception e) {
+					Message m = new Message();
+					m.what = 0;
+					Bundle b = new Bundle();
+					b.putString("message", "网络连接异常");
+					m.setData(b);
+					exceptionHandler.sendMessage(m);
+					e.printStackTrace();
+				}
 			}
 		});
 

+ 41 - 19
src/com/jiaju/adapter/DeliveryNoteInquiryItemAdapter.java

@@ -2,12 +2,14 @@ package com.jiaju.adapter;
 
 import java.util.List;
 
-import com.jiaju.activity.R; 
+import com.jiaju.activity.R;
+import com.jiaju.activity.SendOutGoods;
 import com.jiaju.model.DefectDataDetailModel;
 import com.jiaju.model.DeliveryNoteInquiryItemModel;
-
+import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Context;
+import android.content.Intent;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -43,6 +45,7 @@ public class DeliveryNoteInquiryItemAdapter extends BaseAdapter{
 
 	}
 
+	@SuppressLint("ResourceAsColor")
 	@Override
 	public View getView(final int position, View convertView, ViewGroup parent) {
 		DeliveryNoteInquiryItemModel deliverynoteInquiryitemModel = null;
@@ -65,6 +68,7 @@ public class DeliveryNoteInquiryItemAdapter extends BaseAdapter{
 			viewHolder.RevokeTv = (TextView) convertView.findViewById(R.id.revoke); 
 			viewHolder.linQINQI = (LinearLayout) convertView.findViewById(R.id.lin_jump);
 			viewHolder.CheckBoxDetail = (CheckBox) convertView.findViewById(R.id.checkBox_detail);
+			viewHolder.backgroundcolor= (LinearLayout) convertView.findViewById(R.id.backgroundcolor);
 			convertView.setTag(viewHolder); 
 		} else {
 			viewHolder = (ViewHolder) convertView.getTag();
@@ -77,23 +81,40 @@ public class DeliveryNoteInquiryItemAdapter extends BaseAdapter{
 		viewHolder.PostingDateTv.setText(deliverynoteInquiryitemModel.getPostingDate());
 		viewHolder.DeliveryDateTv.setText(deliverynoteInquiryitemModel.getDeliveryDate());
 		viewHolder.SynchronizationStatusTv.setText(deliverynoteInquiryitemModel.getSynchronizationStatus());
-		viewHolder.RevokeTv.setText(deliverynoteInquiryitemModel.getRevoke());
+		viewHolder.RevokeTv.setText(deliverynoteInquiryitemModel.getRevoke()); 
+		viewHolder.backgroundcolor.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) { 
+            	//椤甸潰璺宠浆
+//            	Toast.makeText(mContext, "杩欐槸涓€鏉�oast鎻愮ず淇℃伅"+ list.get(position).getSendoutCode(), Toast.LENGTH_SHORT).show();   
+                Intent intent = new Intent();
+                intent.setClass(mContext, SendOutGoods.class);
+                intent.putExtra("sendoutCode", list.get(position).getSendoutCode());
+                mContext.startActivity(intent); 
+            }
+        });
+		   //鍚屾�鐘舵€佷负澶辫触
+        if (deliverynoteInquiryitemModel.getAmendsState()=="2") {
+        	//璁剧疆鑳屾櫙棰滆壊涓洪粍鑹�
+        	convertView.setBackgroundColor(mContext.getResources().getColor(R.color.yellow));
+        }
+		
 		viewHolder.CheckBoxDetail.setOnClickListener(new View.OnClickListener() {
 	            @Override
 	            public void onClick(View v) {
 	                 ViewHolder holder = (ViewHolder) ((View) v.getParent()).getTag();
 	            	   
-	                // 获取数据集合
+	                // 鑾峰彇鏁版嵁闆嗗悎
 	                List<DeliveryNoteInquiryItemModel> dataList = list ; 
-	                // 修改对应位置的数据的CheckBoxFlag属性值
+	                // 淇�敼瀵瑰簲浣嶇疆鐨勬暟鎹�殑CheckBoxFlag灞炴€у€�
 	                dataList.get(position).setCheckBoxFlag(((CheckBox) v).isChecked());
-	                // 通知ListView数据已更改,以便更新界面显示 
+	                // 閫氱煡ListView鏁版嵁宸叉洿鏀癸紝浠ヤ究鏇存柊鐣岄潰鏄剧ず 
 	                  notifyDataSetChanged(); 
 //	                if (((CheckBox) v).isChecked()) {
-//	                    Toast.makeText(mContext, "复选框已选中", Toast.LENGTH_SHORT).show();
+//	                    Toast.makeText(mContext, "澶嶉€夋�宸查€変腑", Toast.LENGTH_SHORT).show();
 //	                    
 //	                } else {
-//	                    Toast.makeText(mContext, "复选框已取消选中", Toast.LENGTH_SHORT).show();
+//	                    Toast.makeText(mContext, "澶嶉€夋�宸插彇娑堥€変腑", Toast.LENGTH_SHORT).show();
 //	                }
 	            }
 	        });
@@ -102,27 +123,28 @@ public class DeliveryNoteInquiryItemAdapter extends BaseAdapter{
 	} 
 	
 	private class ViewHolder {
-		/**发货单号*/
+		/**鍙戣揣鍗曞彿*/
 		TextView SendoutCodeTv;
-		/**发出仓库*/
+		/**鍙戝嚭浠撳簱*/
 		TextView SendOutWarehouseTv;
-		/**接收仓库*/
+		/**鎺ユ敹浠撳簱*/
 		TextView ReceivingWarehouseTv;
-		/**车牌号*/
+		/**杞︾墝鍙�*/
 		TextView LicensePlateNumberTv;
-		/**记账日期*/
+		/**璁拌处鏃ユ湡*/
 		TextView PostingDateTv;
-		/**送货日期*/
+		/**閫佽揣鏃ユ湡*/
 		TextView DeliveryDateTv;
-		/**同步状态*/
+		/**鍚屾�鐘舵€�*/
 		TextView SynchronizationStatusTv;
-		/**撤销状态*/
+		/**鎾ら攢鐘舵€�*/
 		TextView RevokeTv; 
-		/**多选按钮*/
+		/**澶氶€夋寜閽�*/
 		CheckBox CheckBoxDetail; 
-		/**点击布局*/
+		/**鐐瑰嚮甯冨眬*/
 		LinearLayout linQINQI;
-		 
+		/**鑳屾櫙棰滆壊*/
+		LinearLayout backgroundcolor;
 	}
 	 
 }