Commit 1e28402f by Wyh

1、prj打印不顯示問題

2、prj沒有食品時不需要打印
parent d1f85c82
...@@ -76,7 +76,6 @@ android { ...@@ -76,7 +76,6 @@ android {
} }
} }
} }
//dokit 扩展 //dokit 扩展
dokitExt { dokitExt {
//通用设置 //通用设置
...@@ -125,8 +124,8 @@ dependencies { ...@@ -125,8 +124,8 @@ dependencies {
addComponent 'component-coldchain' addComponent 'component-coldchain'
// addComponent 'component-supply-chain' // addComponent 'component-supply-chain'
addComponent 'component-webview' addComponent 'component-webview'
addComponent 'component-scan' // addComponent 'component-scan'
addComponent 'component-pay' // addComponent 'component-pay'
implementation 'androidx.viewpager2:viewpager2:1.0.0-alpha03' implementation 'androidx.viewpager2:viewpager2:1.0.0-alpha03'
annotationProcessor rootProject.ext.dependencies["dagger2-compiler"] annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
......
...@@ -108,7 +108,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -108,7 +108,7 @@ public class PrjService extends Service implements ReceiveListener {
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
mContext = this; mContext = this;
ThreadPoolManager.getInstence().putExecutableTasks(() -> { ThreadPoolManager.getInstence().putExecutableTasks(() -> {
LoganManager.w_printer(TAG,"開始請求 PRJ 數據"); LoganManager.w_printer(TAG, "開始請求 PRJ 數據");
getPrintList(); getPrintList();
//開始請求 //開始請求
startGetPrjInfo(); startGetPrjInfo();
...@@ -170,23 +170,23 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -170,23 +170,23 @@ public class PrjService extends Service implements ReceiveListener {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(Disposable d) {
disposable = d; disposable = d;
LoganManager.w_printer(TAG,"startGetPrjInfo onSubscribe"); LoganManager.w_printer(TAG, "startGetPrjInfo onSubscribe");
} }
@Override @Override
public void onNext(Long aLong) { public void onNext(Long aLong) {
LoganManager.w_printer(TAG,"startGetPrjInfo onNext"); LoganManager.w_printer(TAG, "startGetPrjInfo onNext");
getPrjInfo(); getPrjInfo();
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
LoganManager.w_printer(TAG,"startGetPrjInfo onError:" + e.getMessage()); LoganManager.w_printer(TAG, "startGetPrjInfo onError:" + e.getMessage());
} }
@Override @Override
public void onComplete() { public void onComplete() {
LoganManager.w_printer(TAG,"startGetPrjInfo onComplete"); LoganManager.w_printer(TAG, "startGetPrjInfo onComplete");
} }
}); });
} }
...@@ -202,12 +202,12 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -202,12 +202,12 @@ public class PrjService extends Service implements ReceiveListener {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(Disposable d) {
LoganManager.w_printer(TAG,"getPrjInfo onSubscribe"); LoganManager.w_printer(TAG, "getPrjInfo onSubscribe");
} }
@Override @Override
public void onNext(String s) { public void onNext(String s) {
LoganManager.w_printer(TAG,"getPrjInfo onNext: " + s); LoganManager.w_printer(TAG, "getPrjInfo onNext: " + s);
//請求到數據,停止輪詢,開始打印,在打印完之後再重新開始輪詢 //請求到數據,停止輪詢,開始打印,在打印完之後再重新開始輪詢
// startPrint(s); // startPrint(s);
newPrint(s); newPrint(s);
...@@ -218,35 +218,35 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -218,35 +218,35 @@ public class PrjService extends Service implements ReceiveListener {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(Disposable d) {
wakeDisposable = d; wakeDisposable = d;
LoganManager.w_printer(TAG,"getPrjInfo timer onSubscribe"); LoganManager.w_printer(TAG, "getPrjInfo timer onSubscribe");
} }
@Override @Override
public void onNext(Long aLong) { public void onNext(Long aLong) {
LoganManager.w_printer(TAG,"getPrjInfo timer onNext"); LoganManager.w_printer(TAG, "getPrjInfo timer onNext");
startGetPrjInfo(); startGetPrjInfo();
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
LoganManager.w_printer(TAG,"getPrjInfo timer onError: " + e.getMessage()); LoganManager.w_printer(TAG, "getPrjInfo timer onError: " + e.getMessage());
} }
@Override @Override
public void onComplete() { public void onComplete() {
LoganManager.w_printer(TAG,"getPrjInfo timer onComplete"); LoganManager.w_printer(TAG, "getPrjInfo timer onComplete");
} }
}); });
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
LoganManager.w_printer(TAG,"getPrjInfo onError:" + e.getMessage()); LoganManager.w_printer(TAG, "getPrjInfo onError:" + e.getMessage());
} }
@Override @Override
public void onComplete() { public void onComplete() {
LoganManager.w_printer(TAG,"getPrjInfo onComplete"); LoganManager.w_printer(TAG, "getPrjInfo onComplete");
} }
}); });
} }
...@@ -351,7 +351,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -351,7 +351,7 @@ public class PrjService extends Service implements ReceiveListener {
totalPrj = 0; totalPrj = 0;
PrjBean prjBean = JsonUtils.parseObject(json, PrjBean.class); PrjBean prjBean = JsonUtils.parseObject(json, PrjBean.class);
if (prjBean == null || prjBean.getData() == null) { if (prjBean == null || prjBean.getData() == null) {
LoganManager.w_printer(TAG,"newPrint prjBean == null || prjBean.getData() == null "); LoganManager.w_printer(TAG, "newPrint prjBean == null || prjBean.getData() == null ");
return; return;
} }
//有數據,取消輪詢,等待打印結束。 //有數據,取消輪詢,等待打印結束。
...@@ -388,7 +388,11 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -388,7 +388,11 @@ public class PrjService extends Service implements ReceiveListener {
} }
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
LoganManager.w_printer(TAG,"newPrint JSONException: " + e.getMessage()); LoganManager.w_printer(TAG, "newPrint JSONException: " + e.getMessage());
}
if (listMap.size() <= 0) {
LoganManager.w_printer(TAG, "newPrint listMap.size()<=0");
return;
} }
setPrjIndex(listMap, totalPrj); setPrjIndex(listMap, totalPrj);
initPrinterDevices(); initPrinterDevices();
...@@ -396,7 +400,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -396,7 +400,7 @@ public class PrjService extends Service implements ReceiveListener {
} }
private Map<String, List<PrjBean.DataBean.Bean>> setPrjIndex(Map<String, List<PrjBean.DataBean.Bean>> listMap, int totalPrj) { private Map<String, List<PrjBean.DataBean.Bean>> setPrjIndex(Map<String, List<PrjBean.DataBean.Bean>> listMap, int totalPrj) {
LoganManager.w_printer(TAG,"setPrjIndex totalPrj: "+totalPrj); LoganManager.w_printer(TAG, "setPrjIndex totalPrj: " + totalPrj);
for (Map.Entry<String, List<PrjBean.DataBean.Bean>> prjMap : listMap.entrySet()) { for (Map.Entry<String, List<PrjBean.DataBean.Bean>> prjMap : listMap.entrySet()) {
//上一個對象是否切紙 //上一個對象是否切紙
boolean lastIsCute = false; boolean lastIsCute = false;
...@@ -460,7 +464,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -460,7 +464,7 @@ public class PrjService extends Service implements ReceiveListener {
} }
private void foreachPrint(Map<String, List<PrjBean.DataBean.Bean>> listMap) { private void foreachPrint(Map<String, List<PrjBean.DataBean.Bean>> listMap) {
LoganManager.w_printer(TAG,"foreachPrint"); LoganManager.w_printer(TAG, "foreachPrint");
//雙重遍歷可以以後優化 //雙重遍歷可以以後優化
//第二步:遍歷 Map<廚房位置,需要打印的數據>,通過廚房位置找到對應的打印機,並且通過數據拿到對應的通用配置 //第二步:遍歷 Map<廚房位置,需要打印的數據>,通過廚房位置找到對應的打印機,並且通過數據拿到對應的通用配置
for (Map.Entry<String, List<PrjBean.DataBean.Bean>> prjMap : listMap.entrySet()) { for (Map.Entry<String, List<PrjBean.DataBean.Bean>> prjMap : listMap.entrySet()) {
...@@ -482,7 +486,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -482,7 +486,7 @@ public class PrjService extends Service implements ReceiveListener {
} }
private void initPrinterDevices() { private void initPrinterDevices() {
LoganManager.w_printer(TAG,"initPrinterDevices"); LoganManager.w_printer(TAG, "initPrinterDevices");
//讀取打印機和通用配置,可以優化 //讀取打印機和通用配置,可以優化
//獲取所有打印機 //獲取所有打印機
PrinterDeviceDaoUtils printerDeviceDaoUtils = new PrinterDeviceDaoUtils(this); PrinterDeviceDaoUtils printerDeviceDaoUtils = new PrinterDeviceDaoUtils(this);
...@@ -513,7 +517,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -513,7 +517,7 @@ public class PrjService extends Service implements ReceiveListener {
*/ */
private void generatePrintData(String key, List<PrjBean.DataBean.Bean> beans, PrinterDeviceBean printerDeviceBean) { private void generatePrintData(String key, List<PrjBean.DataBean.Bean> beans, PrinterDeviceBean printerDeviceBean) {
LoganManager.w_printer(TAG,"generatePrintData PrinterDeviceBean deviceType: " + printerDeviceBean.getPrinterDeviceType() LoganManager.w_printer(TAG, "generatePrintData PrinterDeviceBean deviceType: " + printerDeviceBean.getPrinterDeviceType()
+ " ip: " + printerDeviceBean.getIp()); + " ip: " + printerDeviceBean.getIp());
if (isPinPrinter(printerDeviceBean) && printerDeviceBean.getPrinterDeviceType() == PRINT_IP) { if (isPinPrinter(printerDeviceBean) && printerDeviceBean.getPrinterDeviceType() == PRINT_IP) {
...@@ -704,7 +708,7 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -704,7 +708,7 @@ public class PrjService extends Service implements ReceiveListener {
* ip設備打印 * ip設備打印
*/ */
public void ipPrint(PrinterDeviceBean printerDeviceBean, List<Map<String, Bitmap>> bitmapMaps) { public void ipPrint(PrinterDeviceBean printerDeviceBean, List<Map<String, Bitmap>> bitmapMaps) {
LoganManager.w_printer(TAG,"ipPrint: " + printerDeviceBean.getPrinterDeviceType() LoganManager.w_printer(TAG, "ipPrint: " + printerDeviceBean.getPrinterDeviceType()
+ " ip: " + printerDeviceBean.getIp()); + " ip: " + printerDeviceBean.getIp());
for (int i = 0; i < bitmapMaps.size(); i++) { for (int i = 0; i < bitmapMaps.size(); i++) {
PrintExecutor executor = new PrintExecutor(printerDeviceBean); PrintExecutor executor = new PrintExecutor(printerDeviceBean);
...@@ -713,18 +717,18 @@ public class PrjService extends Service implements ReceiveListener { ...@@ -713,18 +717,18 @@ public class PrjService extends Service implements ReceiveListener {
switch (errorCode) { switch (errorCode) {
case PrintSocketHolder.ERROR_0: case PrintSocketHolder.ERROR_0:
//更新狀態 //更新狀態
LoganManager.w_printer(TAG,"ipPrint errorCode ERROR_0 i: " + finalI); LoganManager.w_printer(TAG, "ipPrint errorCode ERROR_0 i: " + finalI);
updatePrjSuccess(ids); updatePrjSuccess(ids);
Log.e(TAG, "打印成功"); Log.e(TAG, "打印成功");
break; break;
case PrintSocketHolder.ERROR_2: case PrintSocketHolder.ERROR_2:
LoganManager.w_printer(TAG,"ipPrint errorCode ERROR_2 i: " + finalI); LoganManager.w_printer(TAG, "ipPrint errorCode ERROR_2 i: " + finalI);
Log.e(TAG, "创建Socket失败"); Log.e(TAG, "创建Socket失败");
updatePrjFailure(ids); updatePrjFailure(ids);
break; break;
} }
}); });
LoganManager.w_printer(TAG,"ipPrint for doPrinterRequestAsync i:" + i); LoganManager.w_printer(TAG, "ipPrint for doPrinterRequestAsync i:" + i);
PrjPrintMaker maker = new PrjPrintMaker(bitmapMaps.get(i)); PrjPrintMaker maker = new PrjPrintMaker(bitmapMaps.get(i));
executor.doPrinterRequestAsync(maker); executor.doPrinterRequestAsync(maker);
} }
......
...@@ -55,6 +55,7 @@ public class KitChenPrjFoodView extends LinearLayout { ...@@ -55,6 +55,7 @@ public class KitChenPrjFoodView extends LinearLayout {
} }
private void init() { private void init() {
setOrientation(LinearLayout.VERTICAL);
for (PrjBean.DataBean.Bean item : data) { for (PrjBean.DataBean.Bean item : data) {
View view = View.inflate(getContext(), R.layout.print_kitchen_item_parent, null); View view = View.inflate(getContext(), R.layout.print_kitchen_item_parent, null);
LinearLayout layout = view.findViewById(R.id.layout_print_kitchen_parent); LinearLayout layout = view.findViewById(R.id.layout_print_kitchen_parent);
...@@ -80,6 +81,7 @@ public class KitChenPrjFoodView extends LinearLayout { ...@@ -80,6 +81,7 @@ public class KitChenPrjFoodView extends LinearLayout {
} }
} }
} }
addView(view);
} }
} }
......
...@@ -3,13 +3,14 @@ package com.gingersoft.supply_chain.mvp.ui.adapter; ...@@ -3,13 +3,14 @@ package com.gingersoft.supply_chain.mvp.ui.adapter;
import android.content.Context; import android.content.Context;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.View;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder; import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gingersoft.gsa.cloud.common.utils.MoneyUtil;
import com.gingersoft.gsa.cloud.common.utils.glide.GlideUtils; import com.gingersoft.gsa.cloud.common.utils.glide.GlideUtils;
import com.gingersoft.gsa.cloud.common.utils.other.TextUtil; import com.gingersoft.gsa.cloud.common.utils.other.TextUtil;
import com.gingersoft.supply_chain.R; import com.gingersoft.supply_chain.R;
...@@ -53,12 +54,15 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -53,12 +54,15 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
*/ */
private Map<Integer, PurchaseFoodBean> integerMap; private Map<Integer, PurchaseFoodBean> integerMap;
private String moneyString;
public FoodListAdapter(Context context, @Nullable List<PurchaseFoodBean> data, int adapterType) { public FoodListAdapter(Context context, @Nullable List<PurchaseFoodBean> data, int adapterType) {
super(R.layout.item_food_ingredient, data); super(R.layout.item_food_ingredient, data);
addChildClickViewIds(R.id.iv_supplier_edit, R.id.iv_supplier_delete); addChildClickViewIds(R.id.iv_supplier_edit, R.id.iv_supplier_delete);
this.context = context; this.context = context;
this.adapterType = adapterType; this.adapterType = adapterType;
integerMap = new HashMap<>(8); integerMap = new HashMap<>(8);
moneyString = context.getString(R.string.amount_string_s);
} }
public FoodListAdapter(int layoutId, Context context, @Nullable List<PurchaseFoodBean> data, int adapterType) { public FoodListAdapter(int layoutId, Context context, @Nullable List<PurchaseFoodBean> data, int adapterType) {
...@@ -67,6 +71,7 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -67,6 +71,7 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
this.context = context; this.context = context;
this.adapterType = adapterType; this.adapterType = adapterType;
integerMap = new HashMap<>(8); integerMap = new HashMap<>(8);
moneyString = context.getString(R.string.amount_string_s);
} }
@Override @Override
...@@ -98,7 +103,7 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -98,7 +103,7 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
viewHolder.setGone(R.id.iv_supplier_delete, false); viewHolder.setGone(R.id.iv_supplier_delete, false);
viewHolder.setGone(R.id.layout_operation_food_num, false); viewHolder.setGone(R.id.layout_operation_food_num, false);
viewHolder.setGone(R.id.cb_order_item_all_select, false); viewHolder.setGone(R.id.cb_order_item_all_select, false);
viewHolder.setGone(R.id.line_supplier_info, true); // viewHolder.setGone(R.id.line_supplier_info, true);
setEdit(viewHolder, foodInfoBean); setEdit(viewHolder, foodInfoBean);
CheckBox checkBox = viewHolder.getView(R.id.cb_order_item_all_select); CheckBox checkBox = viewHolder.getView(R.id.cb_order_item_all_select);
checkBox.setChecked(foodInfoBean.isChecked()); checkBox.setChecked(foodInfoBean.isChecked());
...@@ -152,7 +157,10 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -152,7 +157,10 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
* @param foodInfoBean * @param foodInfoBean
*/ */
private void setEdit(@NotNull BaseViewHolder viewHolder, PurchaseFoodBean foodInfoBean) { private void setEdit(@NotNull BaseViewHolder viewHolder, PurchaseFoodBean foodInfoBean) {
//食品數量
EditText editText = viewHolder.getView(R.id.ed_food_ingredient_number); EditText editText = viewHolder.getView(R.id.ed_food_ingredient_number);
//當前食品總價
TextView mTvTotalAmount = viewHolder.getViewOrNull(R.id.tv_food_item_total_amount);
//從緩存中取出這個食品信息,如果沒有對應的食品信息,說明沒操作過這個食品 //從緩存中取出這個食品信息,如果沒有對應的食品信息,說明沒操作過這個食品
//這裡是採購頁面和購物車頁面共用 //這裡是採購頁面和購物車頁面共用
PurchaseFoodBean food = integerMap.get(foodInfoBean.getId()); PurchaseFoodBean food = integerMap.get(foodInfoBean.getId());
...@@ -162,6 +170,9 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -162,6 +170,9 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
integerMap.put(foodInfoBean.getId(), foodInfoBean); integerMap.put(foodInfoBean.getId(), foodInfoBean);
} }
} }
if (mTvTotalAmount != null) {
mTvTotalAmount.setText(String.format(moneyString, MoneyUtil.formatDouble(MoneyUtil.priceCalculation(food.getUnitPrice(), food.getFoodQuantity()))));
}
editText.setText(String.valueOf(food.getFoodQuantity())); editText.setText(String.valueOf(food.getFoodQuantity()));
//食材減少按鈕監聽 //食材減少按鈕監聽
viewHolder.getView(R.id.btn_food_operation_sub).setOnClickListener(v -> { viewHolder.getView(R.id.btn_food_operation_sub).setOnClickListener(v -> {
...@@ -169,6 +180,9 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -169,6 +180,9 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
onNumberChangeListener.onChanged(foodInfoBean.getFoodQuantity(), foodInfoBean.getFoodQuantity() - 1, viewHolder.getAdapterPosition()); onNumberChangeListener.onChanged(foodInfoBean.getFoodQuantity(), foodInfoBean.getFoodQuantity() - 1, viewHolder.getAdapterPosition());
} }
subNumber(editText, foodInfoBean); subNumber(editText, foodInfoBean);
if (mTvTotalAmount != null) {
mTvTotalAmount.setText(String.format(moneyString, MoneyUtil.formatDouble(MoneyUtil.priceCalculation(foodInfoBean.getUnitPrice(), foodInfoBean.getFoodQuantity()))));
}
}); });
//食材增加按鈕監聽 //食材增加按鈕監聽
viewHolder.getView(R.id.btn_food_operation_add).setOnClickListener(v -> { viewHolder.getView(R.id.btn_food_operation_add).setOnClickListener(v -> {
...@@ -176,8 +190,10 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -176,8 +190,10 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
onNumberChangeListener.onChanged(foodInfoBean.getFoodQuantity(), foodInfoBean.getFoodQuantity() + 1, viewHolder.getAdapterPosition()); onNumberChangeListener.onChanged(foodInfoBean.getFoodQuantity(), foodInfoBean.getFoodQuantity() + 1, viewHolder.getAdapterPosition());
} }
addNumber(editText, foodInfoBean); addNumber(editText, foodInfoBean);
if (mTvTotalAmount != null) {
mTvTotalAmount.setText(String.format(moneyString, MoneyUtil.formatDouble(MoneyUtil.priceCalculation(foodInfoBean.getUnitPrice(), foodInfoBean.getFoodQuantity()))));
}
}); });
//手動輸入食材數量變化監聽 //手動輸入食材數量變化監聽
TextWatcher foodNumTextWatcher = new TextWatcher() { TextWatcher foodNumTextWatcher = new TextWatcher() {
@Override @Override
...@@ -205,6 +221,10 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView ...@@ -205,6 +221,10 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
if (purchaseFoodBean.getFoodQuantity() > 0) { if (purchaseFoodBean.getFoodQuantity() > 0) {
integerMap.put(purchaseFoodBean.getId(), purchaseFoodBean); integerMap.put(purchaseFoodBean.getId(), purchaseFoodBean);
} }
//當前食品總價修改
if (mTvTotalAmount != null) {
mTvTotalAmount.setText(String.format(moneyString, MoneyUtil.formatDouble(MoneyUtil.priceCalculation(purchaseFoodBean.getUnitPrice(), purchaseFoodBean.getFoodQuantity()))));
}
} }
} }
}; };
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
...@@ -15,10 +14,10 @@ ...@@ -15,10 +14,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_40" android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_8" android:layout_marginLeft="@dimen/dp_8"
android:visibility="gone"
android:layout_marginRight="@dimen/dp_8" android:layout_marginRight="@dimen/dp_8"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal"
android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -54,14 +53,14 @@ ...@@ -54,14 +53,14 @@
</LinearLayout> </LinearLayout>
<include <!-- <include-->
android:id="@+id/line_supplier_info" <!-- android:id="@+id/line_supplier_info"-->
layout="@layout/include_horizontal_color_eee_dividing_line" /> <!-- layout="@layout/include_horizontal_color_eee_dividing_line" />-->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_8" android:layout_margin="@dimen/dp_5"
android:orientation="horizontal"> android:orientation="horizontal">
<CheckBox <CheckBox
...@@ -107,12 +106,6 @@ ...@@ -107,12 +106,6 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="編號:" />
<TextView
android:id="@+id/tv_food_item_no" android:id="@+id/tv_food_item_no"
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -127,25 +120,13 @@ ...@@ -127,25 +120,13 @@
android:src="@drawable/ic_red_delete" /> android:src="@drawable/ic_red_delete" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:orientation="horizontal">
<TextView
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="品名:" />
<TextView <TextView
android:id="@+id/tv_food_item_name" android:id="@+id/tv_food_item_name"
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
tools:text="巴西肥牛" /> tools:text="巴西肥牛" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -157,13 +138,23 @@ ...@@ -157,13 +138,23 @@
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="單位:" /> android:text="單價:" />
<TextView
android:id="@+id/tv_food_item_price"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tools:text="$100.00" />
<TextView <TextView
android:id="@+id/tv_food_item_unit" android:id="@+id/tv_food_item_unit"
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
tools:text="3KG/盒" /> tools:text="3KG/盒" />
</LinearLayout> </LinearLayout>
...@@ -177,21 +168,20 @@ ...@@ -177,21 +168,20 @@
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="價格:" /> android:text="總價:" />
<TextView <TextView
android:id="@+id/tv_food_item_price" android:id="@+id/tv_food_item_total_amount"
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="$100.00" /> android:layout_weight="1"
</LinearLayout> tools:text="$100.000" />
<LinearLayout <LinearLayout
android:id="@+id/layout_operation_food_num" android:id="@+id/layout_operation_food_num"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -212,7 +202,7 @@ ...@@ -212,7 +202,7 @@
android:maxLength="4" android:maxLength="4"
android:paddingLeft="@dimen/dp_4" android:paddingLeft="@dimen/dp_4"
android:paddingRight="@dimen/dp_4" android:paddingRight="@dimen/dp_4"
android:text="0" android:text="10"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="@dimen/dp_22" /> android:textSize="@dimen/dp_22" />
...@@ -223,6 +213,9 @@ ...@@ -223,6 +213,9 @@
android:background="@drawable/ic_circle_theme_add" /> android:background="@drawable/ic_circle_theme_add" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
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