Commit 1335ed97 by 张建升

1盘点 bug 修复 2食材样式优化 3采购单页面 单双列切换

parent 4565d018
...@@ -78,7 +78,7 @@ public class WarehousingInventoryPresenter extends BasePresenter<WarehousingInve ...@@ -78,7 +78,7 @@ public class WarehousingInventoryPresenter extends BasePresenter<WarehousingInve
consumeWareHousing(getPurchaseConsumeSnBean(foodNo, consumeQuantity, purchaseFoodId,null)); consumeWareHousing(getPurchaseConsumeSnBean(foodNo, consumeQuantity, purchaseFoodId,null));
} }
public void consumeWareHousing(String foodNo, int consumeQuantity,int purchaseFoodId, List<PurchaseFoodEncodeSn> snCodes) { public void consumeWareHousing(String foodNo,int purchaseFoodId, int consumeQuantity, List<PurchaseFoodEncodeSn> snCodes) {
consumeWareHousing(getPurchaseConsumeSnBean(foodNo, consumeQuantity,purchaseFoodId, snCodes)); consumeWareHousing(getPurchaseConsumeSnBean(foodNo, consumeQuantity,purchaseFoodId, snCodes));
} }
......
package com.gingersoft.supply_chain.mvp.ui.adapter; package com.gingersoft.supply_chain.mvp.ui.adapter;
import android.content.Context; import android.content.Context;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
...@@ -49,6 +52,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi ...@@ -49,6 +52,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
private OnFoodNumberChangeListener onFoodNumberChangeListener; private OnFoodNumberChangeListener onFoodNumberChangeListener;
private boolean longClick = false; private boolean longClick = false;
private int delayTime = 500; private int delayTime = 500;
private RelativeSizeSpan relativeSizeSpan= new RelativeSizeSpan(0.6f);
public BuyIngredientsAdapter(Context context, List<BuyIngredientsBean> buyIngredientsBeans) { public BuyIngredientsAdapter(Context context, List<BuyIngredientsBean> buyIngredientsBeans) {
super(context, buyIngredientsBeans); super(context, buyIngredientsBeans);
...@@ -131,7 +135,11 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi ...@@ -131,7 +135,11 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
} else { } else {
itemViewHolder.setText(R.id.tv_food_item_unit, purchaseFoodBean.getBasicUnitName()); itemViewHolder.setText(R.id.tv_food_item_unit, purchaseFoodBean.getBasicUnitName());
} }
itemViewHolder.setText(R.id.tv_food_item_price, String.format(mContext.getString(R.string.amount_string_s), MoneyUtil.formatDouble(purchaseFoodBean.getUnitPrice())));
String str=String.format(mContext.getString(R.string.amount_string_s), MoneyUtil.formatDouble(purchaseFoodBean.getUnitPrice()));
SpannableString sPrice= new SpannableString(str);
sPrice.setSpan(relativeSizeSpan, 0,1, 0);
itemViewHolder.setText(R.id.tv_food_item_price, sPrice);
EditText edNumberInput = itemViewHolder.getView(R.id.ed_food_ingredient_number); EditText edNumberInput = itemViewHolder.getView(R.id.ed_food_ingredient_number);
edNumberInput.setText(String.valueOf(purchaseFoodBean.getFoodQuantity()), TextView.BufferType.EDITABLE); edNumberInput.setText(String.valueOf(purchaseFoodBean.getFoodQuantity()), TextView.BufferType.EDITABLE);
//如果數量小於等於0,就不顯示減號和數量 //如果數量小於等於0,就不顯示減號和數量
......
...@@ -33,23 +33,18 @@ ...@@ -33,23 +33,18 @@
android:layout_marginRight="@dimen/dp_10" android:layout_marginRight="@dimen/dp_10"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone"> android:visibility="visible">
<LinearLayout <LinearLayout
android:id="@+id/layout_food_ingredients_search" android:id="@+id/layout_food_ingredients_search"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/dp_40" android:layout_height="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_4"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_white_eight_corners_bg" android:background="@drawable/shape_white_eight_corners_bg"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_10"
android:src="@drawable/ic_search" />
<EditText <EditText
android:id="@+id/ed_food_ingredients_search" android:id="@+id/ed_food_ingredients_search"
style="@style/supplier_search_style" style="@style/supplier_search_style"
...@@ -61,13 +56,27 @@ ...@@ -61,13 +56,27 @@
android:background="@null" android:background="@null"
android:hint="搜索食材名稱" /> android:hint="搜索食材名稱" />
<ImageView
android:paddingLeft="@dimen/dp_12"
android:paddingRight="@dimen/dp_10"
android:paddingTop="@dimen/dp_6"
android:paddingBottom="@dimen/dp_6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_10"
android:src="@drawable/ic_search" />
</LinearLayout> </LinearLayout>
<com.qmuiteam.qmui.alpha.QMUIAlphaImageButton <com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
android:id="@+id/btn_switch_row" android:id="@+id/btn_switch_row"
android:layout_width="@dimen/dp_26" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/dp_6"
android:layout_marginLeft="@dimen/dp_10" android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:src="@drawable/ic_single_row" /> android:src="@drawable/ic_single_row" />
</LinearLayout> </LinearLayout>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:layout_height="@dimen/dp_48" android:layout_height="@dimen/dp_48"
android:layout_margin="@dimen/dp_10" android:layout_margin="@dimen/dp_10"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="visible"> android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/required_color" android:textColor="#f00"
android:textStyle="bold" android:textStyle="bold"
tools:text="$100.00" /> tools:text="$100.00" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment