Commit 13ff529e by Wyh

1、外送自取頁面強制功能 2、報表時間問題 3、檢測版本接口更換、供應鏈代碼

parent 33afd942
...@@ -6,9 +6,7 @@ import android.content.Intent; ...@@ -6,9 +6,7 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.print.PrintManager; import android.print.PrintManager;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
...@@ -33,10 +31,10 @@ import com.gingersoft.coldchain_module.mvp.ui.adapter.MyPrintDocumentAdapter; ...@@ -33,10 +31,10 @@ import com.gingersoft.coldchain_module.mvp.ui.adapter.MyPrintDocumentAdapter;
import com.gingersoft.coldchain_module.mvp.ui.adapter.OrderDetailsBtnAdapter; import com.gingersoft.coldchain_module.mvp.ui.adapter.OrderDetailsBtnAdapter;
import com.gingersoft.coldchain_module.mvp.ui.adapter.OrderDetailsFoodAdapter; import com.gingersoft.coldchain_module.mvp.ui.adapter.OrderDetailsFoodAdapter;
import com.gingersoft.gsa.cloud.app.GsaCloudApplication; import com.gingersoft.gsa.cloud.app.GsaCloudApplication;
import com.gingersoft.gsa.cloud.common.constans.FunctionManagerConstants; import com.gingersoft.gsa.cloud.common.constans.Takeaway;
import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails; import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails;
import com.gingersoft.gsa.cloud.common.function.FunctionManager; import com.gingersoft.gsa.cloud.common.function.FunctionManager;
import com.gingersoft.gsa.cloud.common.ui.utils.BtnBuilder; import com.gingersoft.gsa.cloud.ui.utils.BtnBuilder;
import com.gingersoft.gsa.cloud.common.utils.ClipboardUtils; import com.gingersoft.gsa.cloud.common.utils.ClipboardUtils;
import com.gingersoft.gsa.cloud.common.utils.CollectionUtils; import com.gingersoft.gsa.cloud.common.utils.CollectionUtils;
import com.gingersoft.gsa.cloud.common.utils.MoneyUtil; import com.gingersoft.gsa.cloud.common.utils.MoneyUtil;
...@@ -55,7 +53,6 @@ import com.qmuiteam.qmui.widget.QMUITopBar; ...@@ -55,7 +53,6 @@ import com.qmuiteam.qmui.widget.QMUITopBar;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import butterknife.BindView; import butterknife.BindView;
...@@ -157,7 +154,7 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailsPresenter> im ...@@ -157,7 +154,7 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailsPresenter> im
requestPermissions(null); requestPermissions(null);
mPresenter.findOrderDetails(orderId, isRead); mPresenter.findOrderDetails(orderId, isRead);
// mPresenter.download("https://labels.shipany.io/sbx2/325764d7-b2e2-4d8b-9a68-7f4473719f9c/2020-08-27/20200827171831451_SF5805023992121_144ac51b-5370-46db-9e8d-50904e33b1b7.pdf"); // mPresenter.download("https://labels.shipany.io/sbx2/325764d7-b2e2-4d8b-9a68-7f4473719f9c/2020-08-27/20200827171831451_SF5805023992121_144ac51b-5370-46db-9e8d-50904e33b1b7.pdf");
List<Function> functionByResModule = FunctionManager.getDefault().getFunctionByResModule(GsaCloudApplication.getAppContext(), FunctionManagerConstants.takeaway.class, FunctionManagerConstants.takeaway.orderDetails, "orderDetails/btn"); List<Function> functionByResModule = FunctionManager.getDefault().getFunctionByResModule(GsaCloudApplication.getAppContext(), Takeaway.ORDER_DETAILS_BTN_PERMISSION, Takeaway.TAKEAWAY_ORDER_DETAILS);
btnBuilder = BtnBuilder.getInstance(functionByResModule); btnBuilder = BtnBuilder.getInstance(functionByResModule);
} }
......
...@@ -3,7 +3,7 @@ package com.gingersoft.coldchain_module.mvp.ui.adapter ...@@ -3,7 +3,7 @@ package com.gingersoft.coldchain_module.mvp.ui.adapter
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.coldchain_module.R import com.gingersoft.coldchain_module.R
import com.gingersoft.gsa.cloud.common.ui.utils.BtnBuilder import com.gingersoft.gsa.cloud.ui.utils.BtnBuilder
class OrderDetailsBtnAdapter(list: MutableList<BtnBuilder.BtnBean>) : BaseQuickAdapter<BtnBuilder.BtnBean, BaseViewHolder>(R.layout.item_btn, list) { class OrderDetailsBtnAdapter(list: MutableList<BtnBuilder.BtnBean>) : BaseQuickAdapter<BtnBuilder.BtnBean, BaseViewHolder>(R.layout.item_btn, list) {
......
...@@ -13,14 +13,14 @@ import androidx.recyclerview.widget.GridLayoutManager ...@@ -13,14 +13,14 @@ import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.billy.cc.core.component.CC import com.billy.cc.core.component.CC
import com.gingersoft.gsa.cloud.app.GsaCloudApplication import com.gingersoft.gsa.cloud.app.GsaCloudApplication
import com.gingersoft.gsa.cloud.common.constans.AppConstans import com.gingersoft.gsa.cloud.common.constans.*
import com.gingersoft.gsa.cloud.common.constans.FoodSummaryConstans
import com.gingersoft.gsa.cloud.common.constans.PrintConstans
import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails
import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails.Companion.verifiAmountTip import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails.Companion.verifiAmountTip
import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails.Companion.verificationAmount import com.gingersoft.gsa.cloud.common.core.delivery.OrderDetails.Companion.verificationAmount
import com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager import com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
import com.gingersoft.gsa.cloud.common.core.user.UserContext import com.gingersoft.gsa.cloud.common.core.user.UserContext
import com.gingersoft.gsa.cloud.common.function.XFunctionManager
import com.gingersoft.gsa.cloud.common.function.XFunctionViews
import com.gingersoft.gsa.cloud.common.logan.LoganManager import com.gingersoft.gsa.cloud.common.logan.LoganManager
import com.gingersoft.gsa.cloud.common.service.ICommandService import com.gingersoft.gsa.cloud.common.service.ICommandService
import com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils import com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
...@@ -29,6 +29,7 @@ import com.gingersoft.gsa.cloud.common.utils.other.TextUtil ...@@ -29,6 +29,7 @@ import com.gingersoft.gsa.cloud.common.utils.other.TextUtil
import com.gingersoft.gsa.cloud.common.utils.time.TimeUtils import com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
import com.gingersoft.gsa.cloud.common.utils.toast.ToastUtils import com.gingersoft.gsa.cloud.common.utils.toast.ToastUtils
import com.gingersoft.gsa.cloud.component.ComponentName import com.gingersoft.gsa.cloud.component.ComponentName
import com.gingersoft.gsa.cloud.database.bean.Function
import com.gingersoft.gsa.cloud.order.order.TakeawayOrder import com.gingersoft.gsa.cloud.order.order.TakeawayOrder
import com.gingersoft.gsa.cloud.pay.bean.PayMethod import com.gingersoft.gsa.cloud.pay.bean.PayMethod
import com.gingersoft.gsa.cloud.print.bean.adapter.PrintContentAdapter import com.gingersoft.gsa.cloud.print.bean.adapter.PrintContentAdapter
...@@ -39,7 +40,6 @@ import com.gingersoft.gsa.delivery_pick_mode.data.model.bean.* ...@@ -39,7 +40,6 @@ import com.gingersoft.gsa.delivery_pick_mode.data.model.bean.*
import com.gingersoft.gsa.delivery_pick_mode.ui.adapter.DeliveryAdapter import com.gingersoft.gsa.delivery_pick_mode.ui.adapter.DeliveryAdapter
import com.gingersoft.gsa.delivery_pick_mode.util.OtherOrderUtils import com.gingersoft.gsa.delivery_pick_mode.util.OtherOrderUtils
import com.jess.arms.utils.ArmsUtils import com.jess.arms.utils.ArmsUtils
import kotlinx.android.synthetic.main.activity_other_order.*
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
...@@ -65,8 +65,13 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -65,8 +65,13 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
val Transportation = 1009//修改運輸工具成功 val Transportation = 1009//修改運輸工具成功
val AmountError = 1010//訂單金額有錯 val AmountError = 1010//訂單金額有錯
val ErrorCode = 1011//報錯提示 val ErrorCode = 1011//報錯提示
init {
XFunctionManager.inJect(this, Takeaway::class.java)
}
} }
var mEnforceBtn: List<Function> = java.util.ArrayList(7)
//餐廳id //餐廳id
val restaurantId by lazy { RestaurantInfoManager.newInstance().restaurantId } val restaurantId by lazy { RestaurantInfoManager.newInstance().restaurantId }
...@@ -605,7 +610,6 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() { ...@@ -605,7 +610,6 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
fun closingBill(orderDetails: OrderDetails.DataBean, payMethods: List<PayMethod>, listener: (Int, Boolean) -> Unit) { fun closingBill(orderDetails: OrderDetails.DataBean, payMethods: List<PayMethod>, listener: (Int, Boolean) -> Unit) {
launch({ launch({
val payMultiple = ArrayList<OrderDetails.DataBean.PayMultiple>() val payMultiple = ArrayList<OrderDetails.DataBean.PayMultiple>()
payMethods.forEach { payMethods.forEach {
payMultiple.add(OrderDetails.DataBean.PayMultiple(it.payType.toString(), it.payMoney, it.payName, 0.0)) payMultiple.add(OrderDetails.DataBean.PayMultiple(it.payType.toString(), it.payMoney, it.payName, 0.0))
} }
......
...@@ -24,7 +24,7 @@ import com.billy.cc.core.component.CC ...@@ -24,7 +24,7 @@ import com.billy.cc.core.component.CC
import com.gingersoft.gsa.cloud.common.constans.AppConstans import com.gingersoft.gsa.cloud.common.constans.AppConstans
import com.gingersoft.gsa.cloud.common.constans.ExpandConstant import com.gingersoft.gsa.cloud.common.constans.ExpandConstant
import com.gingersoft.gsa.cloud.common.constans.FoodSummaryConstans.TAKEAWAY_TYPE import com.gingersoft.gsa.cloud.common.constans.FoodSummaryConstans.TAKEAWAY_TYPE
import com.gingersoft.gsa.cloud.common.constans.FunctionManagerConstants import com.gingersoft.gsa.cloud.common.constans.Takeaway
import com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager import com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
import com.gingersoft.gsa.cloud.common.core.restaurant.utils.RestaurantExpandInfoUtils import com.gingersoft.gsa.cloud.common.core.restaurant.utils.RestaurantExpandInfoUtils
import com.gingersoft.gsa.cloud.common.function.FunctionManager import com.gingersoft.gsa.cloud.common.function.FunctionManager
...@@ -92,7 +92,7 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen ...@@ -92,7 +92,7 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
//功能配置 //功能配置
private val functionByResModule by lazy { private val functionByResModule by lazy {
FunctionManager.getDefault().getFunctionByResModule(this, FunctionManagerConstants.takeaway::class.java, FunctionManagerConstants.takeaway.takeawayMain, "btn") FunctionManager.getDefault().getFunctionByResModule(this, Takeaway.TAKEAWAY_MAIN_BTN_PERMISSION, Takeaway.TAKEAWAY_BTN)
} }
//關閉心跳的廣播 //關閉心跳的廣播
...@@ -396,7 +396,7 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen ...@@ -396,7 +396,7 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
val notification: NotificationManagerCompat = NotificationManagerCompat.from(this) val notification: NotificationManagerCompat = NotificationManagerCompat.from(this)
if (!notification.areNotificationsEnabled()) { if (!notification.areNotificationsEnabled()) {
//未開啟通知權限 //未開啟通知權限
AppDialog().showTipDialog(this, "檢測到通知權限未打開,建議打開,否則會影響正常使用!") { _, d -> AppDialog().showTipDialog(this, "檢測到通知權限未打開,建議打開,否則會影響正常使用!") { ->
val intent = Intent() val intent = Intent()
when { when {
SDK_INT >= Build.VERSION_CODES.O -> { SDK_INT >= Build.VERSION_CODES.O -> {
...@@ -451,12 +451,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen ...@@ -451,12 +451,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
if (type == 3 || type == 4 || type == 5 if (type == 3 || type == 4 || type == 5
|| type == 6 || type == 7) { || type == 6 || type == 7) {
//上次是未確認訂單,本次的提示還是未確認訂單,就不刷新本地頁面 //上次是未確認訂單,本次的提示還是未確認訂單,就不刷新本地頁面
if (!(lastMsgType == 5 && type == 5)) { getCurrentPageOrderList()
getCurrentPageOrderList() // 刷新餘額
// 刷新餘額 pageViewModel.getBalance(RestaurantInfoManager.newInstance().brandId)
pageViewModel.getBalance(RestaurantInfoManager.newInstance().brandId)
}
lastMsgType = type
// 選擇了自動接單,有訂單來就接單 // 選擇了自動接單,有訂單來就接單
if (cb_takeaway_auto_receiving_orders.isChecked) { if (cb_takeaway_auto_receiving_orders.isChecked) {
//查詢待確定的訂單id //查詢待確定的訂單id
...@@ -467,6 +464,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen ...@@ -467,6 +464,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
//查詢預約單和即時單數量 //查詢預約單和即時單數量
pageViewModel.getOrderStatistics(fragmentStatus[view_pager.currentItem]) pageViewModel.getOrderStatistics(fragmentStatus[view_pager.currentItem])
} }
} else if(type == 1){
//長連接登陸成功,也刷新一下列表
getCurrentPageOrderList()
} }
} }
}) })
...@@ -545,9 +545,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen ...@@ -545,9 +545,9 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
*/ */
private fun initAppTop() { private fun initAppTop() {
//獲取功能權限 //獲取功能權限
val newOrderFunction = FunctionManager.getFunctionByKey(functionByResModule, FunctionManagerConstants.takeaway.TAKEAWAY_NEW_ORDER) val newOrderFunction = FunctionManager.getFunctionByKey(functionByResModule, Takeaway.TAKEAWAY_NEW_ORDER)
val historyOrderFunction = FunctionManager.getFunctionByKey(functionByResModule, FunctionManagerConstants.takeaway.TAKEAWAY_HISTORY_ORDER) val historyOrderFunction = FunctionManager.getFunctionByKey(functionByResModule, Takeaway.TAKEAWAY_HISTORY_ORDER)
val openCashBoxFunction = FunctionManager.getFunctionByKey(functionByResModule, FunctionManagerConstants.takeaway.TAKEAWAY_OPEN_CASH_BOX) val openCashBoxFunction = FunctionManager.getFunctionByKey(functionByResModule, Takeaway.TAKEAWAY_OPEN_CASH_BOX)
//顯示餐廳名 //顯示餐廳名
qm_other_order_bar.setTitle(RestaurantInfoManager.newInstance().restaurantName) qm_other_order_bar.setTitle(RestaurantInfoManager.newInstance().restaurantName)
qm_other_order_bar.addLeftImageButton(R.drawable.icon_return, R.id.iv_left_back).setOnClickListener { finish() } qm_other_order_bar.addLeftImageButton(R.drawable.icon_return, R.id.iv_left_back).setOnClickListener { finish() }
......
...@@ -6,7 +6,7 @@ import android.widget.ImageView ...@@ -6,7 +6,7 @@ import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.gingersoft.gsa.cloud.common.ui.utils.BtnBuilder import com.gingersoft.gsa.cloud.ui.utils.BtnBuilder
import com.gingersoft.gsa.delivery_pick_mode.R import com.gingersoft.gsa.delivery_pick_mode.R
class OrderBtnAdapter(var list: MutableList<BtnBuilder.BtnBean>) : RecyclerView.Adapter<OrderBtnAdapter.ViewHolder>() { class OrderBtnAdapter(var list: MutableList<BtnBuilder.BtnBean>) : RecyclerView.Adapter<OrderBtnAdapter.ViewHolder>() {
......
...@@ -2,7 +2,7 @@ package com.gingersoft.gsa.delivery_pick_mode.ui.adapter ...@@ -2,7 +2,7 @@ package com.gingersoft.gsa.delivery_pick_mode.ui.adapter
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.ui.utils.BtnBuilder import com.gingersoft.gsa.cloud.ui.utils.BtnBuilder
import com.gingersoft.gsa.delivery_pick_mode.R import com.gingersoft.gsa.delivery_pick_mode.R
class OrderDetailsAdapter(list: MutableList<BtnBuilder.BtnBean>) : BaseQuickAdapter<BtnBuilder.BtnBean, BaseViewHolder>(R.layout.item_btn, list) { class OrderDetailsAdapter(list: MutableList<BtnBuilder.BtnBean>) : BaseQuickAdapter<BtnBuilder.BtnBean, BaseViewHolder>(R.layout.item_btn, list) {
......
...@@ -22,7 +22,7 @@ import retrofit2.http.Query; ...@@ -22,7 +22,7 @@ import retrofit2.http.Query;
public interface MainService { public interface MainService {
@Headers({"Domain-Name: update_version"}) @Headers({"Domain-Name: update_version"})
@GET("system/checkAppVersionGsa" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2) @GET("system/checkAppVersion" + RetrofitUrlManager.IDENTIFICATION_PATH_SIZE + 2)
Observable<CheckVersionRequest> checkAppVersion(@Query("version") String version); Observable<CheckVersionRequest> checkAppVersion(@Query("version") String version);
@FormUrlEncoded @FormUrlEncoded
......
...@@ -162,43 +162,39 @@ public class HomePresenter extends BasePresenter<HomeContract.Model, HomeContrac ...@@ -162,43 +162,39 @@ public class HomePresenter extends BasePresenter<HomeContract.Model, HomeContrac
} }
public void checkAppVersion() { public void checkAppVersion() {
// RequestBody requestBody = new FormBody.Builder() mModel.checkAppVersion(DeviceUtils.getVersionName(mApplication) + "|" + DeviceUtils.getVersionCode(mApplication))
// .add("version", ) .subscribeOn(Schedulers.io())
// .add("type", "2") .subscribeOn(AndroidSchedulers.mainThread())
// .build(); .observeOn(AndroidSchedulers.mainThread())
// mModel.checkAppVersion(DeviceUtils.getVersionName(mApplication) + "|" + DeviceUtils.getVersionCode(mApplication)) .compose(RxLifecycleUtils.bindToLifecycle(mRootView))
// .subscribeOn(Schedulers.io()) .subscribe(new ErrorHandleSubscriber<CheckVersionRequest>(mErrorHandler) {
// .subscribeOn(AndroidSchedulers.mainThread())
// .observeOn(AndroidSchedulers.mainThread()) @Override
// .compose(RxLifecycleUtils.bindToLifecycle(mRootView)) public void onNext(@NonNull CheckVersionRequest info) {
// .subscribe(new ErrorHandleSubscriber<CheckVersionRequest>(mErrorHandler) { if (info != null) {
// /**
// @Override * 操作类型:
// public void onNext(@NonNull CheckVersionRequest info) { * 1、不提示更新
// if (info != null) { * 2、提示更新可选择更新
// /** * 3、强行更新
// * 操作类型: * 4、跳转goole play下载app 没安装goole play就用webview打开goole网页下载
// * 1、不提示更新 * 5、跳转goole play下载app 没安装goole play就用浏览器打开goole网页下载
// * 2、提示更新可选择更新 */
// * 3、强行更新 int operate = info.getOperate();
// * 4、跳转goole play下载app 没安装goole play就用webview打开goole网页下载 if (operate == 2 || operate == 3 || operate == 4 || operate == 5) {
// * 5、跳转goole play下载app 没安装goole play就用浏览器打开goole网页下载 String updatePath = info.getUpdatePath();
// */ if (!TextUtils.isEmpty(updatePath) && !updatePath.equals("null")) {
// int operate = info.getOperate(); updateAPK(operate, updatePath);
// if (operate == 2 || operate == 3 || operate == 4 || operate == 5) { } else {
// String updatePath = info.getUpdatePath(); if (operate == 3) {
// if (!TextUtils.isEmpty(updatePath) && !updatePath.equals("null")) { mAppManager.appExit();
// updateAPK(operate, updatePath); }
// } else { }
// if (operate == 3) { }
// mAppManager.appExit(); } else {
// } }
// } }
// } });
// } else {
// }
// }
// });
} }
public void loginOut() { public void loginOut() {
......
...@@ -97,43 +97,39 @@ public class NewMainPresenter extends BasePresenter<NewMainContract.Model, NewMa ...@@ -97,43 +97,39 @@ public class NewMainPresenter extends BasePresenter<NewMainContract.Model, NewMa
} }
public void checkAppVersion() { public void checkAppVersion() {
// RequestBody requestBody = new FormBody.Builder() mModel.checkAppVersion(DeviceUtils.getVersionName(mApplication) + "|" + DeviceUtils.getVersionCode(mApplication))
// .add("version", ) .subscribeOn(Schedulers.io())
// .add("type", "2") .subscribeOn(AndroidSchedulers.mainThread())
// .build(); .observeOn(AndroidSchedulers.mainThread())
// mModel.checkAppVersion(DeviceUtils.getVersionName(mApplication) + "|" + DeviceUtils.getVersionCode(mApplication)) .compose(RxLifecycleUtils.bindToLifecycle(mRootView))
// .subscribeOn(Schedulers.io()) .subscribe(new ErrorHandleSubscriber<CheckVersionRequest>(mErrorHandler) {
// .subscribeOn(AndroidSchedulers.mainThread())
// .observeOn(AndroidSchedulers.mainThread()) @Override
// .compose(RxLifecycleUtils.bindToLifecycle(mRootView)) public void onNext(@NonNull CheckVersionRequest info) {
// .subscribe(new ErrorHandleSubscriber<CheckVersionRequest>(mErrorHandler) { if (info != null) {
// /**
// @Override * 操作类型:
// public void onNext(@NonNull CheckVersionRequest info) { * 1、不提示更新
// if (info != null) { * 2、提示更新可选择更新
// /** * 3、强行更新
// * 操作类型: * 4、跳转goole play下载app 没安装goole play就用webview打开goole网页下载
// * 1、不提示更新 * 5、跳转goole play下载app 没安装goole play就用浏览器打开goole网页下载
// * 2、提示更新可选择更新 */
// * 3、强行更新 int operate = info.getOperate();
// * 4、跳转goole play下载app 没安装goole play就用webview打开goole网页下载 if (operate == 2 || operate == 3 || operate == 4 || operate == 5) {
// * 5、跳转goole play下载app 没安装goole play就用浏览器打开goole网页下载 String updatePath = info.getUpdatePath();
// */ if (!TextUtils.isEmpty(updatePath) && !updatePath.equals("null")) {
// int operate = info.getOperate(); updateAPK(operate, updatePath);
// if (operate == 2 || operate == 3 || operate == 4 || operate == 5) { } else {
// String updatePath = info.getUpdatePath(); if (operate == 3) {
// if (!TextUtils.isEmpty(updatePath) && !updatePath.equals("null")) { mAppManager.appExit();
// updateAPK(operate, updatePath); }
// } else { }
// if (operate == 3) { }
// mAppManager.appExit(); } else {
// } }
// } }
// } });
// } else {
// }
// }
// });
} }
public void loginOut() { public void loginOut() {
......
...@@ -505,7 +505,7 @@ public class BusinessReportFragment extends BaseFragment<BusinessReportPresenter ...@@ -505,7 +505,7 @@ public class BusinessReportFragment extends BaseFragment<BusinessReportPresenter
private String endTime; private String endTime;
private void getInfo() { private void getInfo() {
startTime = TimeUtils.getDatebyDate(mTvStartTime.getText().toString(), -1); startTime = TimeUtils.getDatebyDate(mTvStartTime.getText().toString(), 0);
endTime = TimeUtils.getDatebyDate(mTvEndTime.getText().toString(), 1); endTime = TimeUtils.getDatebyDate(mTvEndTime.getText().toString(), 1);
mPresenter.getRestaurantAmount(restaurantId, startTime, endTime); mPresenter.getRestaurantAmount(restaurantId, startTime, endTime);
mPresenter.getRestaurantBusinessInfo(restaurantId, startTime, endTime); mPresenter.getRestaurantBusinessInfo(restaurantId, startTime, endTime);
......
...@@ -136,7 +136,7 @@ public class PaymentMethodReportFragment extends BaseFragment<PaymentMethodRepor ...@@ -136,7 +136,7 @@ public class PaymentMethodReportFragment extends BaseFragment<PaymentMethodRepor
} }
private void getPayMenthInfo() { private void getPayMenthInfo() {
String startTime = TimeUtils.getDatebyDate(mTvStartTime.getText().toString(), -1); String startTime = TimeUtils.getDatebyDate(mTvStartTime.getText().toString(), 0);
String endTime = TimeUtils.getDatebyDate(mTvEndTime.getText().toString(), 1); String endTime = TimeUtils.getDatebyDate(mTvEndTime.getText().toString(), 1);
mPresenter.getPaymentInfo(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime); mPresenter.getPaymentInfo(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime);
} }
......
...@@ -527,13 +527,13 @@ public class SalesFragment extends BaseFragment<SalesPresenter> implements Sales ...@@ -527,13 +527,13 @@ public class SalesFragment extends BaseFragment<SalesPresenter> implements Sales
} }
private void getSaleReport() { private void getSaleReport() {
String startTime = TimeUtils.getDatebyDate(mTvStartTime.getText().toString(), -1); String startTime = TimeUtils.getDatebyDate(mTvStartTime.getText().toString(), 0);
String endTime = TimeUtils.getDatebyDate(mTvEndTime.getText().toString(), 1); String endTime = TimeUtils.getDatebyDate(mTvEndTime.getText().toString(), 1);
mPresenter.getSalesReportInfo(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime); mPresenter.getSalesReportInfo(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime);
} }
private void getDeliveryReport(){ private void getDeliveryReport(){
String startTime = TimeUtils.getDatebyDate(startEndTimePickerView.getStartTime(), -1); String startTime = TimeUtils.getDatebyDate(startEndTimePickerView.getStartTime(), 0);
String endTime = TimeUtils.getDatebyDate(startEndTimePickerView.getEndTime(), 1); String endTime = TimeUtils.getDatebyDate(startEndTimePickerView.getEndTime(), 1);
mPresenter.getDeliveryOrderCurveInfo(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime); mPresenter.getDeliveryOrderCurveInfo(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime);
mPresenter.getDeliveryPersonnelReport(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime); mPresenter.getDeliveryPersonnelReport(RestaurantInfoManager.newInstance().getRestaurantId() + "", startTime, endTime);
......
apply from: rootProject.file('cc-settings.gradle') apply from: rootProject.file('cc-settings.gradle')
apply plugin: 'com.jakewharton.butterknife' apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'android-aspectjx' apply plugin: 'android-aspectjx'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android { android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"] compileSdkVersion rootProject.ext.android["compileSdkVersion"]
......
package com.gingersoft.supply_chain.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.supply_chain.di.module.WarehousingOrderListModule;
import com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract;
import com.jess.arms.di.scope.FragmentScope;
import com.gingersoft.supply_chain.mvp.ui.fragment.warehouse.WarehousingOrderListFragment;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 04/28/2021 19:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
@Component(modules = WarehousingOrderListModule.class, dependencies = AppComponent.class)
public interface WarehousingOrderListComponent {
void inject(WarehousingOrderListFragment fragment);
@Component.Builder
interface Builder {
@BindsInstance
WarehousingOrderListComponent.Builder view(WarehousingOrderListContract.View view);
WarehousingOrderListComponent.Builder appComponent(AppComponent appComponent);
WarehousingOrderListComponent build();
}
}
\ No newline at end of file
package com.gingersoft.supply_chain.di.module;
import com.jess.arms.di.scope.FragmentScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract;
import com.gingersoft.supply_chain.mvp.model.WarehousingOrderListModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 04/28/2021 19:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class WarehousingOrderListModule {
@Binds
abstract WarehousingOrderListContract.Model bindWarehousingOrderListModel(WarehousingOrderListModel model);
}
\ No newline at end of file
...@@ -27,4 +27,6 @@ public class ConsumeWareHousingBean { ...@@ -27,4 +27,6 @@ public class ConsumeWareHousingBean {
*/ */
private String purchaseConsumeNoId; private String purchaseConsumeNoId;
private String remarks;
} }
...@@ -193,7 +193,6 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas ...@@ -193,7 +193,6 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas
minimumInventory == that.minimumInventory && minimumInventory == that.minimumInventory &&
shelfLife == that.shelfLife && shelfLife == that.shelfLife &&
warningDays == that.warningDays && warningDays == that.warningDays &&
foodMarkSn == that.foodMarkSn &&
Objects.equals(supplierName, that.supplierName) && Objects.equals(supplierName, that.supplierName) &&
Objects.equals(images, that.images) && Objects.equals(images, that.images) &&
Objects.equals(foodNo, that.foodNo) && Objects.equals(foodNo, that.foodNo) &&
......
package com.gingersoft.supply_chain.mvp.bean; package com.gingersoft.supply_chain.mvp.bean;
import java.io.Serializable;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.Data;
......
...@@ -56,6 +56,8 @@ public class WarehouseDetailsBean implements Serializable { ...@@ -56,6 +56,8 @@ public class WarehouseDetailsBean implements Serializable {
* 消耗狀態,1從未被消耗,2消耗了一部分,3完全消耗 * 消耗狀態,1從未被消耗,2消耗了一部分,3完全消耗
*/ */
private int consumeStatus; private int consumeStatus;
private String remarks;
/** /**
* 入庫詳情ids,逗號分隔 * 入庫詳情ids,逗號分隔
*/ */
...@@ -94,6 +96,7 @@ public class WarehouseDetailsBean implements Serializable { ...@@ -94,6 +96,7 @@ public class WarehouseDetailsBean implements Serializable {
warehousingBean.supplierName = consumeWareHousingBean.getSupplierName(); warehousingBean.supplierName = consumeWareHousingBean.getSupplierName();
warehousingBean.purchaseConsumeNoId = consumeWareHousingBean.getPurchaseConsumeNoId(); warehousingBean.purchaseConsumeNoId = consumeWareHousingBean.getPurchaseConsumeNoId();
warehousingBean.warehousingOrderDetailsIds = consumeWareHousingBean.getWarehousingOrderDetailsIds(); warehousingBean.warehousingOrderDetailsIds = consumeWareHousingBean.getWarehousingOrderDetailsIds();
warehousingBean.remarks = consumeWareHousingBean.getRemarks();
return warehousingBean; return warehousingBean;
} }
......
package com.gingersoft.supply_chain.mvp.bean;
/**
* @author 宇航. 1239658231@qq.com
* User: admin
* Date: 2021/4/28
* Time: 14:36
* Use:
*/
public class WarehouseOrderBean {
public String orderNo;
public String warehousingMember;
public String warehousingTime;
public String warehousingFoodName;
public int warehousingSpecies;
public String warehousingReason;
}
...@@ -12,6 +12,7 @@ import java.util.HashMap; ...@@ -12,6 +12,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @author 宇航. * @author 宇航.
...@@ -21,16 +22,17 @@ import java.util.Map; ...@@ -21,16 +22,17 @@ import java.util.Map;
* Use: 供應鏈購物車,需要緩存用戶選中的食品 * Use: 供應鏈購物車,需要緩存用戶選中的食品
*/ */
public class SupplyShoppingCart { public class SupplyShoppingCart {
/**
* key為食品id
* value為食品信息
*/
private static List<PurchaseFoodBean> cartFoods;
/** /**
* 供應商信息map * 供應商信息map
* 有時候PurchaseFoodBean中的供應商信息不可靠,比如:用戶將食品添加到購物車中,然後又去供應商列表修改供應商信息,這時候需要更新供應商信息 * 有時候PurchaseFoodBean中的供應商信息不可靠,比如:用戶將食品添加到購物車中,然後又去供應商列表修改供應商信息,這時候需要更新供應商信息
*/ */
private static Map<Integer, SupplierInfoBean> supplierInfoBeanMap; private static Map<Integer, SupplierInfoBean> supplierInfoBeanMap;
/**
* key為食品id
* value為食品信息
*/
private static Map<Integer, PurchaseFoodBean> foodBeanMap;
private static SupplyShoppingCart shoppingCart; private static SupplyShoppingCart shoppingCart;
...@@ -42,10 +44,14 @@ public class SupplyShoppingCart { ...@@ -42,10 +44,14 @@ public class SupplyShoppingCart {
} }
public List<PurchaseFoodBean> getCartFoods() { public List<PurchaseFoodBean> getCartFoods() {
if (cartFoods == null) { return new ArrayList<>(getFoodBeanMap().values());
cartFoods = new ArrayList<>(); }
public Map<Integer, PurchaseFoodBean> getFoodBeanMap() {
if (foodBeanMap == null) {
foodBeanMap = new HashMap<>();
} }
return cartFoods; return foodBeanMap;
} }
public Map<Integer, SupplierInfoBean> getSupplierInfoBeanMap() { public Map<Integer, SupplierInfoBean> getSupplierInfoBeanMap() {
...@@ -72,49 +78,48 @@ public class SupplyShoppingCart { ...@@ -72,49 +78,48 @@ public class SupplyShoppingCart {
/** /**
* 添加食品時記錄供應商信息,對供應商進行修改時,需要修改食材的供應商信息 * 添加食品時記錄供應商信息,對供應商進行修改時,需要修改食材的供應商信息
* *
* @param purchaseFoodBean * @param purchaseFoodBean 食品
*/ */
public void addFood(PurchaseFoodBean purchaseFoodBean) { public void addFood(PurchaseFoodBean purchaseFoodBean) {
addFood(getCartFoods().size(), purchaseFoodBean); getFoodBeanMap().put(purchaseFoodBean.getId(), purchaseFoodBean);
}
public void addFood(int index, PurchaseFoodBean purchaseFoodBean) {
getCartFoods().add(index, purchaseFoodBean);
if (getSupplierInfoBeanMap().get(purchaseFoodBean.getSupplierId()) == null) { if (getSupplierInfoBeanMap().get(purchaseFoodBean.getSupplierId()) == null) {
getSupplierInfoBeanMap().put(purchaseFoodBean.getSupplierId(), SupplierInfoBean.generateSupplierByFood(purchaseFoodBean)); getSupplierInfoBeanMap().put(purchaseFoodBean.getSupplierId(), SupplierInfoBean.generateSupplierByFood(purchaseFoodBean));
} }
} }
/**
* 替換食品信息
*
* @param purchaseFoodBean 食品信息
*/
public void replaceFood(PurchaseFoodBean purchaseFoodBean) { public void replaceFood(PurchaseFoodBean purchaseFoodBean) {
RxJavaUtils.doInIOThread(new RxIOTask<Object>(1) { //從食品緩衝中拿到這個食品
@Override PurchaseFoodBean mapFood = getFoodBeanMap().get(purchaseFoodBean.getId());
public Void doInIOThread(Object o) { //食品不為空並且這個食品的供應商還存在
for (int i = 0; i < getCartFoods().size(); i++) { if (mapFood != null && getSupplierInfoBeanMap().get(purchaseFoodBean.getSupplierId()) != null) {
PurchaseFoodBean cartFood = getCartFoods().get(i); //將要替換的食品數量同步為當前緩存中的數量
//找到這個食品 purchaseFoodBean.setFoodQuantity(mapFood.getFoodQuantity());
if (purchaseFoodBean.getId().equals(cartFood.getId())) { //用新的食材數據替換掉舊的,避免有可能修改了其他信息
int foodNum = cartFood.getFoodQuantity(); getFoodBeanMap().put(purchaseFoodBean.getId(), purchaseFoodBean);
purchaseFoodBean.setFoodQuantity(foodNum); }
if (getSupplierInfoBeanMap().get(purchaseFoodBean.getSupplierId()) != null) { }
//可能用戶修改了食品的供應商信息,但是這裡是沒有供應商的詳細,直接移除食品
getCartFoods().add(i, purchaseFoodBean); public void removeFood(PurchaseFoodBean purchaseFoodBean) {
} getFoodBeanMap().remove(purchaseFoodBean.getId());
cartFoods.remove(cartFood);
break;
}
}
return null;
}
});
} }
public void clear() { public void clear() {
if (cartFoods == null) { getFoodBeanMap().clear();
return;
}
cartFoods.clear();
} }
public PurchaseFoodBean getFoodByFoodId(int foodId) {
for (PurchaseFoodBean cartFood : getCartFoods()) {
if (cartFood.getId() == foodId) {
return cartFood;
}
}
return null;
}
public void removeFoodsByFoodId(int foodId) { public void removeFoodsByFoodId(int foodId) {
RxJavaUtils.doInIOThread(new RxIOTask<Object>(0) { RxJavaUtils.doInIOThread(new RxIOTask<Object>(0) {
...@@ -208,9 +213,9 @@ public class SupplyShoppingCart { ...@@ -208,9 +213,9 @@ public class SupplyShoppingCart {
public void removeFoodsByCategoryTress(List<OrderCategoryBean.FoodCategoryTrees> thirdCategory) { public void removeFoodsByCategoryTress(List<OrderCategoryBean.FoodCategoryTrees> thirdCategory) {
if (thirdCategory != null) { if (thirdCategory != null) {
for (OrderCategoryBean.FoodCategoryTrees trees : thirdCategory) { for (OrderCategoryBean.FoodCategoryTrees trees : thirdCategory) {
for (PurchaseFoodBean cartFood : cartFoods) { for (PurchaseFoodBean cartFood : getCartFoods()) {
if (cartFood.getFoodCategoryId() == trees.getId()) { if (cartFood.getFoodCategoryId() == trees.getId()) {
cartFoods.remove(cartFood); getFoodBeanMap().remove(cartFood.getId());
} }
} }
} }
......
package com.gingersoft.supply_chain.mvp.contract;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 04/28/2021 19:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public interface WarehousingOrderListContract {
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface View extends IView {
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface Model extends IModel {
}
}
package com.gingersoft.supply_chain.mvp.model;
import android.app.Application;
import com.google.gson.Gson;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.jess.arms.di.scope.FragmentScope;
import javax.inject.Inject;
import com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 04/28/2021 19:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class WarehousingOrderListModel extends BaseModel implements WarehousingOrderListContract.Model {
@Inject
Gson mGson;
@Inject
Application mApplication;
@Inject
public WarehousingOrderListModel(IRepositoryManager repositoryManager) {
super(repositoryManager);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mGson = null;
this.mApplication = null;
}
}
\ No newline at end of file
...@@ -77,7 +77,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo ...@@ -77,7 +77,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
/** /**
* 所上傳的圖片路徑集合 * 所上傳的圖片路徑集合
*/ */
private List<String> imgs; private List<Object> imgs;
/** /**
* 逗號分隔符 * 逗號分隔符
*/ */
...@@ -340,7 +340,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo ...@@ -340,7 +340,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
OrderWareHouseBean.PurchaseWarehousingOrder purchaseWarehousingOrder = new OrderWareHouseBean.PurchaseWarehousingOrder(); OrderWareHouseBean.PurchaseWarehousingOrder purchaseWarehousingOrder = new OrderWareHouseBean.PurchaseWarehousingOrder();
if (imgs != null) { if (imgs != null) {
StringBuilder files = new StringBuilder(); StringBuilder files = new StringBuilder();
for (String img : imgs) { for (Object img : imgs) {
files.append(img).append(COMMA_SEPARATED); files.append(img).append(COMMA_SEPARATED);
} }
String substring = files.substring(0, files.length()); String substring = files.substring(0, files.length());
...@@ -579,13 +579,17 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo ...@@ -579,13 +579,17 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
}); });
} }
public List<Object> getImgs() {
return imgs;
}
public void deletePic(int position) { public void deletePic(int position) {
if (imgs != null && position < imgs.size()) { if (imgs != null && position < imgs.size()) {
imgs.remove(position); imgs.remove(position);
} }
} }
public String getPic(int position) { public Object getPic(int position) {
if (imgs != null && position < imgs.size()) { if (imgs != null && position < imgs.size()) {
return imgs.get(position); return imgs.get(position);
} }
......
...@@ -129,18 +129,11 @@ public class WareHouseListPresenter extends BasePresenter<WareHouseListContract. ...@@ -129,18 +129,11 @@ public class WareHouseListPresenter extends BasePresenter<WareHouseListContract.
@Override @Override
public void onNext(WareHouseListBean wareHouseListBean) { public void onNext(WareHouseListBean wareHouseListBean) {
if (wareHouseListBean.isSuccess()) { if (wareHouseListBean.isSuccess()) {
// if (data == null || pageIndex == 0) {
// data = new WareHouseListBean.WareHousingDataBean();
// data.setPurchaseWarehousingOrderDetailsVOS(new ArrayList<>());
// data.getPurchaseWarehousingOrderDetailsVOS().add(new PurchaseWarehousingOrderDetailsVO());
// }
// data.setTotal(wareHouseListBean.getData().getTotal());
if (CollectionUtils.isNullOrEmpty(wareHouseListBean.getData().getPurchaseWarehousingOrderDetailsVOS())) { if (CollectionUtils.isNullOrEmpty(wareHouseListBean.getData().getPurchaseWarehousingOrderDetailsVOS())) {
mRootView.finishLoadNoMoreData(); mRootView.finishLoadNoMoreData();
} else { } else {
mRootView.loadWarehousingInfo(wareHouseListBean.getData()); mRootView.loadWarehousingInfo(wareHouseListBean.getData());
} }
// data.getPurchaseWarehousingOrderDetailsVOS().addAll(wareHouseListBean.getData().getPurchaseWarehousingOrderDetailsVOS());
} else if (TextUtil.isNotEmptyOrNullOrUndefined(wareHouseListBean.getErrMsg())) { } else if (TextUtil.isNotEmptyOrNullOrUndefined(wareHouseListBean.getErrMsg())) {
mRootView.showMessage(wareHouseListBean.getErrMsg()); mRootView.showMessage(wareHouseListBean.getErrMsg());
mRootView.loadFail(); mRootView.loadFail();
......
package com.gingersoft.supply_chain.mvp.presenter;
import android.app.Application;
import com.jess.arms.integration.AppManager;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.mvp.BasePresenter;
import com.jess.arms.http.imageloader.ImageLoader;
import me.jessyan.rxerrorhandler.core.RxErrorHandler;
import javax.inject.Inject;
import com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 04/28/2021 19:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@FragmentScope
public class WarehousingOrderListPresenter extends BasePresenter<WarehousingOrderListContract.Model, WarehousingOrderListContract.View> {
@Inject
RxErrorHandler mErrorHandler;
@Inject
Application mApplication;
@Inject
ImageLoader mImageLoader;
@Inject
AppManager mAppManager;
@Inject
public WarehousingOrderListPresenter(WarehousingOrderListContract.Model model, WarehousingOrderListContract.View rootView) {
super(model, rootView);
}
@Override
public void onDestroy() {
super.onDestroy();
this.mErrorHandler = null;
this.mAppManager = null;
this.mImageLoader = null;
this.mApplication = null;
}
}
...@@ -47,7 +47,6 @@ public class SupplyChainMainActivity extends BaseFragmentActivity<SupplyChainMai ...@@ -47,7 +47,6 @@ public class SupplyChainMainActivity extends BaseFragmentActivity<SupplyChainMai
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
SoftHideKeyBoardUtil.assistActivity(this); SoftHideKeyBoardUtil.assistActivity(this);
} }
@Override @Override
......
...@@ -7,6 +7,7 @@ import android.widget.EditText; ...@@ -7,6 +7,7 @@ import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
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.gsa.cloud.common.utils.threadPool.ThreadPoolManager; import com.gingersoft.gsa.cloud.common.utils.threadPool.ThreadPoolManager;
...@@ -100,7 +101,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi ...@@ -100,7 +101,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
itemViewHolder.setText(R.id.tv_food_item_supplier_name, purchaseFoodBean.getSupplierName()); itemViewHolder.setText(R.id.tv_food_item_supplier_name, purchaseFoodBean.getSupplierName());
itemViewHolder.setImageResource(R.id.iv_food_ingredient_img, R.drawable.img_small_default); itemViewHolder.setImageResource(R.id.iv_food_ingredient_img, R.drawable.img_small_default);
if (TextUtil.isNotEmptyOrNullOrUndefined(purchaseFoodBean.getImages())) { if (TextUtil.isNotEmptyOrNullOrUndefined(purchaseFoodBean.getImages())) {
GlideUtils.display(mContext, (ImageView) itemViewHolder.get(R.id.iv_food_ingredient_img), purchaseFoodBean.getImages()); GlideUtils.display(mContext, itemViewHolder.get(R.id.iv_food_ingredient_img), purchaseFoodBean.getImages());
} }
itemViewHolder.setText(R.id.tv_food_item_no, purchaseFoodBean.getFoodNo()); itemViewHolder.setText(R.id.tv_food_item_no, purchaseFoodBean.getFoodNo());
itemViewHolder.setText(R.id.tv_food_item_name, purchaseFoodBean.getName()); itemViewHolder.setText(R.id.tv_food_item_name, purchaseFoodBean.getName());
...@@ -110,7 +111,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi ...@@ -110,7 +111,7 @@ 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), purchaseFoodBean.getUnitPrice())); itemViewHolder.setText(R.id.tv_food_item_price, String.format(mContext.getString(R.string.amount_string_s), MoneyUtil.formatDouble(purchaseFoodBean.getUnitPrice())));
EditText edNumberInput = itemViewHolder.get(R.id.ed_food_ingredient_number); EditText edNumberInput = itemViewHolder.get(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,就不顯示減號和數量
...@@ -148,7 +149,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi ...@@ -148,7 +149,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
setDisplayStateByType(itemViewHolder, true, false, false); setDisplayStateByType(itemViewHolder, true, false, false);
} else if (adapterType == BuyIngredientsFragment.ADD_ORDER) { } else if (adapterType == BuyIngredientsFragment.ADD_ORDER) {
//創建採購單頁面,隱藏編輯和刪除,顯示加減和數量 //創建採購單頁面,隱藏編輯和刪除,顯示加減和數量
setDisplayStateByType(itemViewHolder, false, true, true); setDisplayStateByType(itemViewHolder, false, purchaseFoodBean.getFoodQuantity() > 0, true);
} else if (adapterType == BuyIngredientsFragment.GET_FOOD_BY_SUPPLIER) { } else if (adapterType == BuyIngredientsFragment.GET_FOOD_BY_SUPPLIER) {
//供應商商品列表,編輯和數量都顯示 //供應商商品列表,編輯和數量都顯示
setDisplayStateByType(itemViewHolder, true, purchaseFoodBean.getFoodQuantity() > 0, true); setDisplayStateByType(itemViewHolder, true, purchaseFoodBean.getFoodQuantity() > 0, true);
...@@ -181,7 +182,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi ...@@ -181,7 +182,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
*/ */
private void setSubAndNumShow(BaseViewHolder viewHolder, boolean showOrHide) { private void setSubAndNumShow(BaseViewHolder viewHolder, boolean showOrHide) {
viewHolder.setVisible(R.id.btn_food_operation_sub, !showOrHide); viewHolder.setVisible(R.id.btn_food_operation_sub, !showOrHide);
viewHolder.setInvisible(R.id.ed_food_ingredient_number, showOrHide); viewHolder.setVisible(R.id.ed_food_ingredient_number, !showOrHide);
} }
/** /**
......
...@@ -16,10 +16,12 @@ ...@@ -16,10 +16,12 @@
package com.gingersoft.supply_chain.mvp.ui.adapter; package com.gingersoft.supply_chain.mvp.ui.adapter;
import android.text.Layout;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
......
package com.gingersoft.supply_chain.mvp.ui.adapter; package com.gingersoft.supply_chain.mvp.ui.adapter;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
...@@ -9,7 +7,7 @@ import androidx.core.content.ContextCompat; ...@@ -9,7 +7,7 @@ import androidx.core.content.ContextCompat;
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.other.TextUtil;
import com.gingersoft.supply_chain.R; import com.gingersoft.supply_chain.R;
import com.gingersoft.supply_chain.mvp.bean.WarehouseDetailsBean; import com.gingersoft.supply_chain.mvp.bean.WarehouseDetailsBean;
import com.gingersoft.supply_chain.mvp.ui.fragment.warehouse.WarehouseDetailsFragment; import com.gingersoft.supply_chain.mvp.ui.fragment.warehouse.WarehouseDetailsFragment;
...@@ -44,52 +42,58 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails ...@@ -44,52 +42,58 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
} }
@Override @Override
protected void convert(@NotNull BaseViewHolder viewHolder, WarehouseDetailsBean purchaseWarehousingOrderDetailsContentsBean) { protected void convert(@NotNull BaseViewHolder viewHolder, WarehouseDetailsBean item) {
//食品名 //食品名
viewHolder.setText(R.id.tv_warehouse_details_food_name, purchaseWarehousingOrderDetailsContentsBean.getName()); viewHolder.setText(R.id.tv_warehouse_details_food_name, item.getName());
//入庫單位 //入庫單位
viewHolder.setText(R.id.tv_warehouse_details_food_unit, purchaseWarehousingOrderDetailsContentsBean.getUnitName()); viewHolder.setText(R.id.tv_warehouse_details_food_unit, item.getUnitName());
//入庫食品數量 //入庫食品數量
// if (purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity() > 0) { // if (item.getFoodQuantity() > 0) {
if (type == WarehouseDetailsFragment.WAREHOUSE_TYPE) { if (type == WarehouseDetailsFragment.WAREHOUSE_TYPE) {
// 入庫,顯示+ // 入庫,顯示+
if (purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity() >= 0) { if (item.getFoodQuantity() >= 0) {
//如果大於0,前面顯示+號 //如果大於0,前面顯示+號
viewHolder.setText(R.id.tv_warehouse_details_food_num, String.format(getContext().getString(R.string.str_format_positive_int), purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity())); viewHolder.setText(R.id.tv_warehouse_details_food_num, String.format(getContext().getString(R.string.str_format_positive_int), item.getFoodQuantity()));
} else { } else {
//小於0,直接顯示負數 //小於0,直接顯示負數
viewHolder.setText(R.id.tv_warehouse_details_food_num, String.valueOf(purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity())); viewHolder.setText(R.id.tv_warehouse_details_food_num, String.valueOf(item.getFoodQuantity()));
} }
viewHolder.setGone(R.id.tv_warehouse_time_text, false); viewHolder.setGone(R.id.tv_warehouse_time_text, false);
viewHolder.setText(R.id.tv_warehouse_order_time_text, "下單日期:"); viewHolder.setText(R.id.tv_warehouse_order_time_text, "下單日期:");
//入庫日期 //入庫日期
viewHolder.setText(R.id.tv_warehouse_details_time, purchaseWarehousingOrderDetailsContentsBean.getWarehousingTime()); viewHolder.setText(R.id.tv_warehouse_details_time, item.getWarehousingTime());
viewHolder.setGone(R.id.tv_warehouse_details_time, false); viewHolder.setGone(R.id.tv_warehouse_details_time, false);
viewHolder.setGone(R.id.tv_warehouse_details_remarks, true);
} else { } else {
//出庫,顯示- //出庫,顯示-
if (purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity() >= 0) { if (item.getFoodQuantity() >= 0) {
//如果大於0,前面顯示-號 //如果大於0,前面顯示-號
viewHolder.setText(R.id.tv_warehouse_details_food_num, String.format(getContext().getString(R.string.str_format_less), purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity() + "")); viewHolder.setText(R.id.tv_warehouse_details_food_num, String.format(getContext().getString(R.string.str_format_less), item.getFoodQuantity() + ""));
} else { } else {
//小於0,顯示正數,負負得正 //小於0,顯示正數,負負得正
viewHolder.setText(R.id.tv_warehouse_details_food_num, String.format(getContext().getString(R.string.str_format_positive), Math.abs(purchaseWarehousingOrderDetailsContentsBean.getFoodQuantity()) + "")); viewHolder.setText(R.id.tv_warehouse_details_food_num, String.format(getContext().getString(R.string.str_format_positive), Math.abs(item.getFoodQuantity()) + ""));
} }
// 入庫顯示消耗日期,不顯示入庫日期 // 入庫顯示消耗日期,不顯示入庫日期
viewHolder.setGone(R.id.tv_warehouse_time_text, true); viewHolder.setGone(R.id.tv_warehouse_time_text, true);
viewHolder.setGone(R.id.tv_warehouse_details_time, true);
//消耗日期 //消耗日期
viewHolder.setText(R.id.tv_warehouse_order_time_text, "消耗日期:"); viewHolder.setText(R.id.tv_warehouse_order_time_text, "消耗日期:");
viewHolder.setGone(R.id.tv_warehouse_details_time, true); //顯示備註
viewHolder.setGone(R.id.tv_warehouse_details_remarks, false);
if (TextUtil.isNotEmptyOrNullOrUndefined(item.getRemarks())) {
viewHolder.setText(R.id.tv_warehouse_details_remarks, String.format(getContext().getString(R.string.str_format_remark_colon), item.getRemarks()));
}
} }
//下單時間 //下單時間
viewHolder.setText(R.id.tv_warehouse_details_order_time, purchaseWarehousingOrderDetailsContentsBean.getPurchaseTime()); viewHolder.setText(R.id.tv_warehouse_details_order_time, item.getPurchaseTime());
//供應商 //供應商
viewHolder.setText(R.id.tv_warehouse_details_supplier, purchaseWarehousingOrderDetailsContentsBean.getSupplierName()); viewHolder.setText(R.id.tv_warehouse_details_supplier, item.getSupplierName());
//入庫來源 //入庫來源
viewHolder.setText(R.id.tv_warehouse_details_reason, purchaseWarehousingOrderDetailsContentsBean.getPurchase()); viewHolder.setText(R.id.tv_warehouse_details_reason, item.getPurchase());
//設置狀態 //設置狀態
TextView tvState = viewHolder.getView(R.id.tv_warehouse_state); TextView tvState = viewHolder.getView(R.id.tv_warehouse_state);
TextView tvExpiresTime = viewHolder.getView(R.id.tv_warehouse_expires_time); TextView tvExpiresTime = viewHolder.getView(R.id.tv_warehouse_expires_time);
if (purchaseWarehousingOrderDetailsContentsBean.getConsumeStatus() == WarehouseDetailsBean.WAREHOUSE_STATE_ALL_CONSUMED) { if (item.getConsumeStatus() == WarehouseDetailsBean.WAREHOUSE_STATE_ALL_CONSUMED) {
//全部消耗了 //全部消耗了
tvState.setText("庫存已使用"); tvState.setText("庫存已使用");
tvState.setTextColor(ContextCompat.getColor(getContext(), R.color.required_color)); tvState.setTextColor(ContextCompat.getColor(getContext(), R.color.required_color));
...@@ -98,26 +102,26 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails ...@@ -98,26 +102,26 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
tvExpiresTime.setVisibility(View.GONE); tvExpiresTime.setVisibility(View.GONE);
} else { } else {
//部分消耗 //部分消耗
if (purchaseWarehousingOrderDetailsContentsBean.getConsumeStatus() == WarehouseDetailsBean.WAREHOUSE_STATE_PART_CONSUMED) { if (item.getConsumeStatus() == WarehouseDetailsBean.WAREHOUSE_STATE_PART_CONSUMED) {
tvState.setText("部分使用"); tvState.setText("部分使用");
tvState.setTextColor(ContextCompat.getColor(getContext(), R.color.bright_orange)); tvState.setTextColor(ContextCompat.getColor(getContext(), R.color.bright_orange));
tvState.setVisibility(View.VISIBLE); tvState.setVisibility(View.VISIBLE);
} else { } else {
tvState.setVisibility(View.INVISIBLE); tvState.setVisibility(View.INVISIBLE);
} }
if (purchaseWarehousingOrderDetailsContentsBean.getDistanceExpiresTime() >= 0) { if (item.getDistanceExpiresTime() >= 0) {
//即將過期天數大於等於0 //即將過期天數大於等於0
if (purchaseWarehousingOrderDetailsContentsBean.getWarningDays() > purchaseWarehousingOrderDetailsContentsBean.getDistanceExpiresTime()) { if (item.getWarningDays() > item.getDistanceExpiresTime()) {
//在預警天數內 //在預警天數內
//顯示即將過期 //顯示即將過期
setExpiresTime(tvExpiresTime, R.drawable.shape_oval_bright_orange, "即将過期:", purchaseWarehousingOrderDetailsContentsBean.getDistanceExpiresTime()); setExpiresTime(tvExpiresTime, R.drawable.shape_oval_bright_orange, "即将過期:", item.getDistanceExpiresTime());
} else { } else {
tvExpiresTime.setVisibility(View.GONE); tvExpiresTime.setVisibility(View.GONE);
tvState.setVisibility(View.GONE); tvState.setVisibility(View.GONE);
} }
} else { } else {
//天數為負,則是已過期 //天數為負,則是已過期
setExpiresTime(tvExpiresTime, R.drawable.shape_oval_red_wine, "已過期:", Math.abs(purchaseWarehousingOrderDetailsContentsBean.getDistanceExpiresTime())); setExpiresTime(tvExpiresTime, R.drawable.shape_oval_red_wine, "已過期:", Math.abs(item.getDistanceExpiresTime()));
} }
} }
} }
......
package com.gingersoft.supply_chain.mvp.ui.adapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gingersoft.supply_chain.R
import com.gingersoft.supply_chain.mvp.bean.WarehouseOrderBean
/**
* @author 宇航. 1239658231@qq.com
* User: admin
* Date: 2021/4/28
* Time: 14:19
* Use:
*/
class WarehousingOrderListAdapter(data: MutableList<WarehouseOrderBean>?) : BaseQuickAdapter<WarehouseOrderBean, BaseViewHolder>(R.layout.item_warehousing_order_list, data) {
override fun convert(holder: BaseViewHolder, item: WarehouseOrderBean) {
holder.setText(R.id.tv_warehousing_order_no, item.orderNo)
holder.setText(R.id.tv_warehousing_order_createTime, item.warehousingTime)
holder.setText(R.id.tv_warehousing_order_species, item.warehousingSpecies)
holder.setText(R.id.tv_warehousing_order_createMember, item.warehousingMember)
holder.setText(R.id.tv_warehousing_order_foods, item.warehousingFoodName)
holder.setText(R.id.tv_warehousing_order_createReason, item.warehousingReason)
}
}
\ No newline at end of file
...@@ -142,7 +142,7 @@ public class NewFoodIngredientsFragment extends BaseSupplyChainFragment<NewFoodI ...@@ -142,7 +142,7 @@ public class NewFoodIngredientsFragment extends BaseSupplyChainFragment<NewFoodI
purchaseFoodBean = (PurchaseFoodBean) arguments.getSerializable(FOOD_INFO_KEY); purchaseFoodBean = (PurchaseFoodBean) arguments.getSerializable(FOOD_INFO_KEY);
if (purchaseFoodBean == null) { if (purchaseFoodBean == null) {
isUpdate = false; isUpdate = false;
initTopBar(topbarNewFoodIngredients, "新增食材"); initTopBar(topbarNewFoodIngredients, getString(R.string.str_new_add_ingredients));
purchaseFoodBean = new PurchaseFoodBean(); purchaseFoodBean = new PurchaseFoodBean();
purchaseFoodBean.setFoodMarkSn(-1); purchaseFoodBean.setFoodMarkSn(-1);
//拿到分類集合 //拿到分類集合
...@@ -303,9 +303,7 @@ public class NewFoodIngredientsFragment extends BaseSupplyChainFragment<NewFoodI ...@@ -303,9 +303,7 @@ public class NewFoodIngredientsFragment extends BaseSupplyChainFragment<NewFoodI
public boolean onBackPressedSupport() { public boolean onBackPressedSupport() {
if (mPresenter.isUpdate(infoMultiAdapter.getData()) && !isLeave) { if (mPresenter.isUpdate(infoMultiAdapter.getData()) && !isLeave) {
//用戶修改了數據,提示是否保存 //用戶修改了數據,提示是否保存
AppDialog.getInstance().showTipDialog(requireContext(), getString(R.string.str_about_to_leave), getString(R.string.str_yes), getString(R.string.str_no), (view, dialog) -> { AppDialog.getInstance().showTipDialog(requireContext(), getString(R.string.str_about_to_leave), getString(R.string.str_yes), getString(R.string.str_no), this::saveGoodsInfo, () -> {
saveGoodsInfo();
}, (view, dialog) -> {
isLeave = true; isLeave = true;
killMyself(); killMyself();
}); });
......
...@@ -118,9 +118,7 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres ...@@ -118,9 +118,7 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres
if (viewId == R.id.tv_order_content_complete) { if (viewId == R.id.tv_order_content_complete) {
//完成,篩選出選擇的食品 //完成,篩選出選擇的食品
if (mPresenter.filterData(shoppingCartAdapter.getData())) { if (mPresenter.filterData(shoppingCartAdapter.getData())) {
AppDialog.getInstance().showTipDialog(requireContext(), "確認創建訂單?", (view, dialog) -> { AppDialog.getInstance().showTipDialog(requireContext(), "確認創建訂單?", () -> mPresenter.createOrder(shoppingCartAdapter.getData()));
mPresenter.createOrder(shoppingCartAdapter.getData());
});
} }
} else if (viewId == R.id.btn_order_content_order_template) { } else if (viewId == R.id.btn_order_content_order_template) {
//訂單模板 //訂單模板
...@@ -139,7 +137,7 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres ...@@ -139,7 +137,7 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres
shoppingCartAdapter = new ShoppingCartAdapter(mContext, shoppingCartBeans); shoppingCartAdapter = new ShoppingCartAdapter(mContext, shoppingCartBeans);
shoppingCartAdapter.setOnFoodDeleteListener((supplierIndex, foodListVosBean) -> { shoppingCartAdapter.setOnFoodDeleteListener((supplierIndex, foodListVosBean) -> {
//從購物車元數據移除掉這個食材 //從購物車元數據移除掉這個食材
SupplyShoppingCart.getInstance().getCartFoods().remove(foodListVosBean); SupplyShoppingCart.getInstance().removeFood(foodListVosBean);
List<ShoppingCartBean> shoppingCartAdapterData = shoppingCartAdapter.getData(); List<ShoppingCartBean> shoppingCartAdapterData = shoppingCartAdapter.getData();
//購物車adapter移除這個供應商 //購物車adapter移除這個供應商
if (shoppingCartAdapterData.get(supplierIndex).getFoodList().size() <= 0) { if (shoppingCartAdapterData.get(supplierIndex).getFoodList().size() <= 0) {
...@@ -154,6 +152,9 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres ...@@ -154,6 +152,9 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres
setAllSelect(shoppingCartAdapterData); setAllSelect(shoppingCartAdapterData);
mPresenter.verificationMixAmount(shoppingCartAdapter.getData()); mPresenter.verificationMixAmount(shoppingCartAdapter.getData());
setFragmentResult(RESULT_OK, null); setFragmentResult(RESULT_OK, null);
if (shoppingCartAdapter.getItemCount() <= 0) {
killMyself();
}
}); });
rvOrderContent.setAdapter(shoppingCartAdapter); rvOrderContent.setAdapter(shoppingCartAdapter);
setAllSelect(shoppingCartBeans); setAllSelect(shoppingCartBeans);
...@@ -193,6 +194,8 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres ...@@ -193,6 +194,8 @@ public class ShoppingCatFragment extends BaseSupplyChainFragment<ShoppingCatPres
@Override @Override
public void addOrderSuccess(List<ConfirmOrderBean.PurchaseOrder> purchaseOrders) { public void addOrderSuccess(List<ConfirmOrderBean.PurchaseOrder> purchaseOrders) {
setFragmentResult(RESULT_OK, null);
SupplyShoppingCart.getInstance().clear();
startWithPop(SendMsgFragment.newInstance(purchaseOrders)); startWithPop(SendMsgFragment.newInstance(purchaseOrders));
} }
......
...@@ -65,18 +65,8 @@ public class WareHouseListFragment extends BaseSupplyChainFragment<WareHouseList ...@@ -65,18 +65,8 @@ public class WareHouseListFragment extends BaseSupplyChainFragment<WareHouseList
TextView tvLowInventoryFoodNum; TextView tvLowInventoryFoodNum;
@BindView(R2.id.tv_ingredients_cost_inventory) @BindView(R2.id.tv_ingredients_cost_inventory)
TextView tvIngredientsCostInventory; TextView tvIngredientsCostInventory;
// @BindView(R2.id.rv_warehouse_list)
// RecyclerView rvWarehouseList;
@BindView(R2.id.table_ware_housing_list) @BindView(R2.id.table_ware_housing_list)
TableView mTableView; TableView mTableView;
// @BindView(R2.id.sl_warehousing_list)
// SmartRefreshLayout smartRefreshLayout;
// @BindView(R2.id.tv_warehouse_item_unit_price)
// TextView tvUnitPrice;
// @BindView(R2.id.tv_warehouse_item_inventory_quantity)
// TextView tvWarehousingQuantity;
// @BindView(R2.id.tv_warehouse_item_total_amount)
// TextView tvTotalAmount;
private int SORT_TYPE = 0; private int SORT_TYPE = 0;
/** /**
...@@ -111,7 +101,6 @@ public class WareHouseListFragment extends BaseSupplyChainFragment<WareHouseList ...@@ -111,7 +101,6 @@ public class WareHouseListFragment extends BaseSupplyChainFragment<WareHouseList
@Override @Override
public void initData(@Nullable Bundle savedInstanceState) { public void initData(@Nullable Bundle savedInstanceState) {
// smartRefreshLayout.setPrimaryColorsId(R.color.trans, R.color.black);
initTopBar(supplyTopBar, "庫存查詢"); initTopBar(supplyTopBar, "庫存查詢");
loadService = LoadSir.getDefault().register(mTableView); loadService = LoadSir.getDefault().register(mTableView);
getWarehousing(); getWarehousing();
......
...@@ -546,10 +546,10 @@ public class WarehouseDetailsFragment extends BaseSupplyChainFragment<WarehouseD ...@@ -546,10 +546,10 @@ public class WarehouseDetailsFragment extends BaseSupplyChainFragment<WarehouseD
if (inventoryConsumptionView != null) { if (inventoryConsumptionView != null) {
if (scanSnView != null && scanSnView.getSnSize() > 0) { if (scanSnView != null && scanSnView.getSnSize() > 0) {
//當前顯示著掃SN碼消耗,判斷有沒有SN碼,有的話提示是否保存 //當前顯示著掃SN碼消耗,判斷有沒有SN碼,有的話提示是否保存
AppDialog.getInstance().showTipDialog(requireContext(), getString(R.string.str_info_not_save_about_to_leave), (view, dialog) -> { AppDialog.getInstance().showTipDialog(requireContext(), getString(R.string.str_info_not_save_about_to_leave), () -> {
isLeave = true; isLeave = true;
showList(View.VISIBLE); showList(View.VISIBLE);
}, (view, dialog) -> isLeave = false); }, () -> isLeave = false);
} else { } else {
showList(View.VISIBLE); showList(View.VISIBLE);
} }
......
...@@ -3,7 +3,6 @@ package com.gingersoft.supply_chain.mvp.ui.fragment.warehouse; ...@@ -3,7 +3,6 @@ package com.gingersoft.supply_chain.mvp.ui.fragment.warehouse;
import android.os.Bundle; import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -18,28 +17,21 @@ import androidx.annotation.NonNull; ...@@ -18,28 +17,21 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.billy.cc.core.component.CC;
import com.gingersoft.gsa.cloud.common.loadsir.EmptyCallback; import com.gingersoft.gsa.cloud.common.loadsir.EmptyCallback;
import com.gingersoft.gsa.cloud.common.utils.CollectionUtils; import com.gingersoft.gsa.cloud.common.utils.CollectionUtils;
import com.gingersoft.gsa.cloud.common.utils.XPermissionUtils;
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.gsa.cloud.common.utils.toast.ToastUtils;
import com.gingersoft.gsa.cloud.component.ComponentName;
import com.gingersoft.supply_chain.R; import com.gingersoft.supply_chain.R;
import com.gingersoft.supply_chain.R2; import com.gingersoft.supply_chain.R2;
import com.gingersoft.supply_chain.di.component.DaggerWarehousingInventoryComponent; import com.gingersoft.supply_chain.di.component.DaggerWarehousingInventoryComponent;
import com.gingersoft.supply_chain.mvp.bean.InventoryRecordBean; import com.gingersoft.supply_chain.mvp.bean.InventoryRecordBean;
import com.gingersoft.supply_chain.mvp.bean.PurchaseFoodEncodeSn;
import com.gingersoft.supply_chain.mvp.bean.PurchaseWarehousingOrderDetailsVO; import com.gingersoft.supply_chain.mvp.bean.PurchaseWarehousingOrderDetailsVO;
import com.gingersoft.supply_chain.mvp.contract.WarehousingInventoryContract; import com.gingersoft.supply_chain.mvp.contract.WarehousingInventoryContract;
import com.gingersoft.supply_chain.mvp.presenter.WarehousingInventoryPresenter; import com.gingersoft.supply_chain.mvp.presenter.WarehousingInventoryPresenter;
import com.gingersoft.supply_chain.mvp.ui.adapter.InventoryRecordAdapter; import com.gingersoft.supply_chain.mvp.ui.adapter.InventoryRecordAdapter;
import com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment; import com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment;
import com.gingersoft.supply_chain.mvp.ui.widget.ScanSnPopup;
import com.gingersoft.supply_chain.mvp.ui.widget.ScanSnView; import com.gingersoft.supply_chain.mvp.ui.widget.ScanSnView;
import com.jess.arms.di.component.AppComponent; import com.jess.arms.di.component.AppComponent;
import com.kingja.loadsir.LoadSirUtil;
import com.kingja.loadsir.callback.Callback; import com.kingja.loadsir.callback.Callback;
import com.kingja.loadsir.core.LoadSir; import com.kingja.loadsir.core.LoadSir;
import com.qmuiteam.qmui.util.QMUIDisplayHelper; import com.qmuiteam.qmui.util.QMUIDisplayHelper;
...@@ -49,8 +41,6 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout; ...@@ -49,8 +41,6 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import java.util.List; import java.util.List;
import butterknife.BindView; import butterknife.BindView;
import butterknife.OnClick;
import cn.bingoogolapple.qrcode.core.BarcodeType;
import static com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean.HAS_SN; import static com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean.HAS_SN;
......
package com.gingersoft.supply_chain.mvp.ui.fragment.warehouse;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment;
import com.jess.arms.di.component.AppComponent;
import com.gingersoft.supply_chain.di.component.DaggerWarehousingOrderListComponent;
import com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract;
import com.gingersoft.supply_chain.mvp.presenter.WarehousingOrderListPresenter;
import com.gingersoft.supply_chain.R;
import static com.jess.arms.utils.Preconditions.checkNotNull;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 04/28/2021 19:21
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
public class WarehousingOrderListFragment extends BaseSupplyChainFragment<WarehousingOrderListPresenter> implements WarehousingOrderListContract.View {
public static WarehousingOrderListFragment newInstance() {
WarehousingOrderListFragment fragment = new WarehousingOrderListFragment();
return fragment;
}
@Override
public void setupFragmentComponent(@NonNull AppComponent appComponent) {
DaggerWarehousingOrderListComponent //如找不到该类,请编译一下项目
.builder()
.appComponent(appComponent)
.view(this)
.build()
.inject(this);
}
@Override
public View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_warehousing_list, container, false);
}
@Override
public void initData(@Nullable Bundle savedInstanceState) {
}
}
...@@ -126,10 +126,12 @@ public class InventoryConsumptionView extends FrameLayout { ...@@ -126,10 +126,12 @@ public class InventoryConsumptionView extends FrameLayout {
edInput.setEnabled(enabled); edInput.setEnabled(enabled);
return this; return this;
} }
public InventoryConsumptionView setHint(String hint) { public InventoryConsumptionView setHint(String hint) {
edInput.setHint(hint); edInput.setHint(hint);
return this; return this;
} }
public InventoryConsumptionView setOnConfirmClickListener(OnConfirmClickListener onConfirmClickListener) { public InventoryConsumptionView setOnConfirmClickListener(OnConfirmClickListener onConfirmClickListener) {
this.onConfirmClickListener = onConfirmClickListener; this.onConfirmClickListener = onConfirmClickListener;
return this; return this;
...@@ -178,20 +180,24 @@ public class InventoryConsumptionView extends FrameLayout { ...@@ -178,20 +180,24 @@ public class InventoryConsumptionView extends FrameLayout {
int i = Integer.parseInt(s); int i = Integer.parseInt(s);
if (i > 0) { if (i > 0) {
if (i > maxConsumption) { if (i > maxConsumption) {
edInput.setError("不能超過當前庫存數量:" + maxConsumption); String errMsg = "不能超過當前庫存數量:" + maxConsumption;
edInput.setError(errMsg);
ToastUtils.show(getContext(), errMsg);
return -1; return -1;
} else { } else {
return i; return i;
} }
} else { } else {
ToastUtils.show(getContext(), "請輸入消耗庫存數"); String errMsg = "請輸入消耗庫存數";
edInput.setError("請輸入消耗庫存數"); ToastUtils.show(getContext(), errMsg);
edInput.setError(errMsg);
return -1; return -1;
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
e.printStackTrace(); e.printStackTrace();
ToastUtils.show(getContext(), "請輸入消耗庫存數"); String errMsg = "請輸入消耗庫存數";
edInput.setError("請輸入消耗庫存數"); ToastUtils.show(getContext(), errMsg);
edInput.setError(errMsg);
return -1; return -1;
} }
} }
...@@ -211,6 +217,7 @@ public class InventoryConsumptionView extends FrameLayout { ...@@ -211,6 +217,7 @@ public class InventoryConsumptionView extends FrameLayout {
} }
public void setConsumptionNumber(int consumptionNumber) { public void setConsumptionNumber(int consumptionNumber) {
edInput.setError(null);
edInput.setText(String.valueOf(consumptionNumber)); edInput.setText(String.valueOf(consumptionNumber));
} }
......
...@@ -13,6 +13,7 @@ import com.gingersoft.supply_chain.R2; ...@@ -13,6 +13,7 @@ import com.gingersoft.supply_chain.R2;
import com.gingersoft.supply_chain.mvp.bean.PurchaseFoodEncodeSn; import com.gingersoft.supply_chain.mvp.bean.PurchaseFoodEncodeSn;
import com.jess.arms.utils.DeviceUtils; import com.jess.arms.utils.DeviceUtils;
import com.lxj.xpopup.core.BottomPopupView; import com.lxj.xpopup.core.BottomPopupView;
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -84,12 +85,16 @@ public class ScanSnPopup extends BottomPopupView { ...@@ -84,12 +85,16 @@ public class ScanSnPopup extends BottomPopupView {
rootLayout.addView(new ScanSnView(fragment, snCodes) rootLayout.addView(new ScanSnView(fragment, snCodes)
.setOnScanResultListener((popup, scanResult) -> onScanResultListener.onScanResult(ScanSnPopup.this, scanResult)) .setOnScanResultListener((popup, scanResult) -> onScanResultListener.onScanResult(ScanSnPopup.this, scanResult))
.setOnDeleteSnCodeListener(onDeleteListener) .setOnDeleteSnCodeListener(onDeleteListener)
.setOnCancelListener(this::dismiss)
.setMinCodeSize(minCodeSize) .setMinCodeSize(minCodeSize)
.setMaxCodeSize(maxCodeSize) .setMaxCodeSize(maxCodeSize)
.setOnSingerResultListener((isAdd, snCode, currentSnCodeNumber) -> { .setOnSingerResultListener((isAdd, snCode, currentSnCodeNumber) -> {
//每掃描出一個調用 //每掃描出一個調用
tvFoodInboundQuantity.setText(String.valueOf(currentSnCodeNumber)); tvFoodInboundQuantity.setText(String.valueOf(currentSnCodeNumber));
}).setOnCancelListener(() -> {
dismissOrHideSoftInput();
if (!isDismiss()) {
dismiss();
}
}).init() }).init()
, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)); , new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
} else { } else {
...@@ -108,15 +113,10 @@ public class ScanSnPopup extends BottomPopupView { ...@@ -108,15 +113,10 @@ public class ScanSnPopup extends BottomPopupView {
} }
@Override @Override
protected int getMaxHeight() { protected int getPopupHeight() {
return (int) (DeviceUtils.getScreenHeight(getContext()) / 2); return QMUIDisplayHelper.getScreenHeight(getContext()) / 2;
} }
// @Override
// protected int getPopupHeight() {
// return (int) (DeviceUtils.getScreenHeight(getContext()) / 2);
// }
public interface OnScanResultListener { public interface OnScanResultListener {
/** /**
* 掃完碼確認之後回調 * 掃完碼確認之後回調
......
...@@ -7,6 +7,7 @@ import android.view.View; ...@@ -7,6 +7,7 @@ import android.view.View;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
...@@ -186,8 +187,7 @@ public class ScanSnView extends FrameLayout { ...@@ -186,8 +187,7 @@ public class ScanSnView extends FrameLayout {
btnFoodIngredientsCancel.setOnClickListener(v -> { btnFoodIngredientsCancel.setOnClickListener(v -> {
if (adapter.getData().size() != initCodeSize) { if (adapter.getData().size() != initCodeSize) {
AppDialog.getInstance().showWaringDialog(getContext(), "關閉後不會保存SN碼記錄", (view, dialog) -> { AppDialog.getInstance().showTipDialog(getContext(), "關閉後不會保存SN碼記錄", () -> {
dialog.dismiss();
if (onCancelListener != null) { if (onCancelListener != null) {
onCancelListener.onCancel(); onCancelListener.onCancel();
} }
...@@ -198,15 +198,19 @@ public class ScanSnView extends FrameLayout { ...@@ -198,15 +198,19 @@ public class ScanSnView extends FrameLayout {
}); });
adapter.setOnItemChildClickListener((adapter1, view, position) -> { adapter.setOnItemChildClickListener((adapter1, view, position) -> {
if (view.getId() == R.id.iv_sn_code_delete) { if (view.getId() == R.id.iv_sn_code_delete) {
onSingerResultListener.onScanValue(false, adapter.getItem(position), adapter.getItemCount());
if (onDeleteSnCodeListener != null) {
onDeleteSnCodeListener.onDelete(adapter.getItem(position), position);
}
if (adapter.getItem(position).newAdd) { if (adapter.getItem(position).newAdd) {
newCodeSize--; onSingerResultListener.onScanValue(false, adapter.getItem(position), adapter.getItemCount());
if (onDeleteSnCodeListener != null) {
onDeleteSnCodeListener.onDelete(adapter.getItem(position), position);
}
if (adapter.getItem(position).newAdd) {
newCodeSize--;
}
adapter1.removeAt(position);
setConfirmBtnState();
} else {
ToastUtils.show(getContext(), "已入庫的SN碼不可刪除");
} }
adapter1.removeAt(position);
setConfirmBtnState();
} }
}); });
addView(rootView); addView(rootView);
...@@ -271,7 +275,7 @@ public class ScanSnView extends FrameLayout { ...@@ -271,7 +275,7 @@ public class ScanSnView extends FrameLayout {
private void addSnCode(SnCodeAdapter adapter, String snCode) { private void addSnCode(SnCodeAdapter adapter, String snCode) {
PurchaseFoodEncodeSn purchaseFoodEncodeSn = new PurchaseFoodEncodeSn(snCode); PurchaseFoodEncodeSn purchaseFoodEncodeSn = new PurchaseFoodEncodeSn(snCode);
purchaseFoodEncodeSn.newAdd = true; purchaseFoodEncodeSn.newAdd = true;
adapter.addData(purchaseFoodEncodeSn); adapter.addData(0, purchaseFoodEncodeSn);
newCodeSize++; newCodeSize++;
edInputSn.setText(""); edInputSn.setText("");
setConfirmBtnState(); setConfirmBtnState();
...@@ -362,6 +366,12 @@ public class ScanSnView extends FrameLayout { ...@@ -362,6 +366,12 @@ public class ScanSnView extends FrameLayout {
viewHolder.setTextColor(R.id.tv_sn_code, ContextCompat.getColor(getContext(), R.color.color_3c)); viewHolder.setTextColor(R.id.tv_sn_code, ContextCompat.getColor(getContext(), R.color.color_3c));
viewHolder.setTextColor(R.id.tv_serial_number, ContextCompat.getColor(getContext(), R.color.color_3c)); viewHolder.setTextColor(R.id.tv_serial_number, ContextCompat.getColor(getContext(), R.color.color_3c));
viewHolder.setGone(R.id.iv_sn_code_delete, false); viewHolder.setGone(R.id.iv_sn_code_delete, false);
ImageView ivDelete = viewHolder.getView(R.id.iv_sn_code_delete);
if (s.newAdd) {
ivDelete.clearColorFilter();
} else {
ivDelete.setColorFilter(ContextCompat.getColor(getContext(), R.color.color_ccc));
}
viewHolder.setGone(R.id.it_sn_code_operating, true); viewHolder.setGone(R.id.it_sn_code_operating, true);
viewHolder.setText(R.id.tv_serial_number, String.valueOf(viewHolder.getAdapterPosition() + 1)); viewHolder.setText(R.id.tv_serial_number, String.valueOf(viewHolder.getAdapterPosition() + 1));
if (viewHolder.getAdapterPosition() % 2 == 0) { if (viewHolder.getAdapterPosition() % 2 == 0) {
......
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
android:id="@+id/rv_order_content" android:id="@+id/rv_order_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_5"
android:paddingBottom="@dimen/dp_5"
android:layout_weight="1" android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_6" android:layout_marginTop="@dimen/dp_6"
tools:text="100" /> android:text="@string/str_zero" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_6" android:layout_marginTop="@dimen/dp_6"
tools:text="3" /> android:text="@string/str_zero" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_6" android:layout_marginTop="@dimen/dp_6"
tools:text="7" /> android:text="@string/str_zero" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -148,8 +148,8 @@ ...@@ -148,8 +148,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_6" android:layout_marginTop="@dimen/dp_6"
android:textColor="@color/required_color" android:text="@string/str_zero"
tools:text="¥10000.00" /> android:textColor="@color/required_color" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="@color/supply_chain_bg_color" android:background="@color/supply_chain_bg_color"
android:orientation="vertical"> android:orientation="vertical">
...@@ -163,6 +162,7 @@ ...@@ -163,6 +162,7 @@
android:id="@+id/vp_warehouse_viewpager" android:id="@+id/vp_warehouse_viewpager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipChildren="true"
android:layout_marginTop="@dimen/dp_10" /> android:layout_marginTop="@dimen/dp_10" />
</LinearLayout> </LinearLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout> </com.scwang.smartrefresh.layout.SmartRefreshLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/supply_chain_top_bar" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_second_category"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginBottom="@dimen/head_height" android:layout_marginBottom="@dimen/head_height"
android:drawableTop="@mipmap/loadsir_empty" android:drawableTop="@drawable/ic_not_have_goods"
android:drawablePadding="@dimen/dp_10" android:drawablePadding="@dimen/dp_10"
android:gravity="center" android:gravity="center"
android:text="@string/emptyView_mode_desc_double" android:text="@string/emptyView_mode_desc_double"
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
style="@style/Food_Ingredient_Info_TextStyle" style="@style/Food_Ingredient_Info_TextStyle"
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="0.5"
android:textSize="@dimen/dp_12" android:textSize="@dimen/dp_12"
tools:text="3KG/盒" /> tools:text="3KG/盒" />
...@@ -97,8 +97,18 @@ ...@@ -97,8 +97,18 @@
android:textSize="@dimen/dp_12" android:textSize="@dimen/dp_12"
android:textStyle="bold" android:textStyle="bold"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout>
<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"
android:gravity="end"
android:textColor="@color/required_color"
android:textStyle="bold"
tools:text="$100.00" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -109,16 +119,10 @@ ...@@ -109,16 +119,10 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <View
android:id="@+id/tv_food_item_price"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1" />
android:textColor="@color/required_color"
android:textStyle="bold"
tools:text="$100.00" />
<!-- <LinearLayout--> <!-- <LinearLayout-->
<!-- android:id="@+id/layout_operation_food_num"--> <!-- android:id="@+id/layout_operation_food_num"-->
<!-- android:layout_width="wrap_content"--> <!-- android:layout_width="wrap_content"-->
...@@ -132,8 +136,8 @@ ...@@ -132,8 +136,8 @@
android:layout_height="@dimen/dp_26" android:layout_height="@dimen/dp_26"
android:layout_marginLeft="@dimen/dp_5" android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_5" android:layout_marginRight="@dimen/dp_5"
android:src="@drawable/ic_blue_edit"
android:padding="@dimen/dp_3" android:padding="@dimen/dp_3"
android:src="@drawable/ic_blue_edit"
android:visibility="gone" /> android:visibility="gone" />
<ImageView <ImageView
...@@ -162,7 +166,7 @@ ...@@ -162,7 +166,7 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:gravity="center" android:gravity="center"
android:inputType="number" android:inputType="number"
android:maxLength="5" android:maxLength="4"
android:maxLines="1" android:maxLines="1"
android:paddingLeft="@dimen/dp_4" android:paddingLeft="@dimen/dp_4"
android:paddingRight="@dimen/dp_4" android:paddingRight="@dimen/dp_4"
......
...@@ -112,6 +112,8 @@ ...@@ -112,6 +112,8 @@
android:layout_marginLeft="@dimen/dp_9" android:layout_marginLeft="@dimen/dp_9"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_border_bg_c8" android:background="@drawable/shape_border_bg_c8"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -147,6 +149,8 @@ ...@@ -147,6 +149,8 @@
android:layout_marginLeft="@dimen/dp_9" android:layout_marginLeft="@dimen/dp_9"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/shape_border_bg_c8" android:background="@drawable/shape_border_bg_c8"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -164,10 +168,10 @@ ...@@ -164,10 +168,10 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_5" android:layout_marginLeft="@dimen/dp_5"
android:background="@null" android:background="@null"
android:paddingRight="@dimen/dp_10"
android:gravity="end|center_vertical" android:gravity="end|center_vertical"
android:inputType="numberDecimal" android:inputType="numberDecimal"
android:maxLines="1" android:maxLines="1"
android:paddingRight="@dimen/dp_10"
android:textColor="@color/color_3c" android:textColor="@color/color_3c"
android:textCursorDrawable="@drawable/cursor_theme" android:textCursorDrawable="@drawable/cursor_theme"
android:textSize="@dimen/dp_15" android:textSize="@dimen/dp_15"
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
tools:text="肥牛天地供應商" /> tools:text="肥牛天地供應商" />
</LinearLayout> </LinearLayout>
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_6" android:layout_marginBottom="@dimen/dp_6"
...@@ -99,36 +99,43 @@ ...@@ -99,36 +99,43 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="入庫日期:" android:text="入庫日期:"
android:textColor="@color/color_3c" android:textColor="@color/color_3c"
android:textSize="@dimen/sp_16"/> android:textSize="@dimen/sp_16"
android:visibility="gone" />
<TextView <TextView
android:id="@+id/tv_warehouse_details_time" android:id="@+id/tv_warehouse_details_time"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@id/tv_warehouse_details_reason"
android:layout_toRightOf="@id/tv_warehouse_time_text"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/color_3c" android:textColor="@color/color_3c"
android:textSize="@dimen/sp_16" android:textSize="@dimen/sp_16"
android:visibility="gone"
tools:text="2020-11-20" /> tools:text="2020-11-20" />
<TextView <TextView
android:id="@+id/tv_warehouse_details_remarks" android:id="@+id/tv_warehouse_details_remarks"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/tv_warehouse_details_reason"
android:paddingRight="@dimen/dp_5"
android:textColor="@color/color_3c" android:textColor="@color/color_3c"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:visibility="gone" android:visibility="visible"
tools:text="備註:是打飛機死垃圾分類三代機福利社利社的" /> tools:text="備註:" />
<TextView <TextView
android:id="@+id/tv_warehouse_details_reason" android:id="@+id/tv_warehouse_details_reason"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:gravity="end" android:gravity="end"
android:textColor="@color/color_3c" android:textColor="@color/color_3c"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
tools:text="採購入庫" /> tools:text="採購入庫" />
</LinearLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_10"
android:background="@drawable/shape_white_eight_corners_bg"
android:elevation="@dimen/dp_2"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_8"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_warehousing_order_no"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_17"
tools:text="入庫單號" />
<TextView
android:id="@+id/tv_warehousing_order_createTime"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="right"
android:maxLines="1"
tools:text="2020-11-20 12:00" />
</LinearLayout>
<include layout="@layout/include_horizontal_color_eee_dividing_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_8">
<TextView
android:id="@+id/tv_warehousing_order_species"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="種類:12" />
<TextView
android:id="@+id/tv_warehousing_order_createMember"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:layout_weight="1"
android:gravity="end"
tools:text="入庫人" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/dp_8"
android:paddingRight="@dimen/dp_8"
android:paddingBottom="@dimen/dp_8">
<TextView
android:id="@+id/tv_warehousing_order_foods"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:singleLine="true"
tools:text="巴西肥牛、澳洲牛排" />
<TextView
android:id="@+id/tv_warehousing_order_createReason"
style="@style/Food_Ingredient_Info_TextStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="調撥入庫" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -8,17 +8,17 @@ ...@@ -8,17 +8,17 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/dp_9" android:background="@drawable/shape_white_top_border"
android:paddingBottom="@dimen/dp_6"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:background="@drawable/shape_white_top_border"
android:paddingLeft="@dimen/dp_19" android:paddingLeft="@dimen/dp_19"
android:paddingRight="@dimen/dp_19"> android:paddingTop="@dimen/dp_9"
android:paddingRight="@dimen/dp_19"
android:paddingBottom="@dimen/dp_6">
<TextView <TextView
style="@style/WareHouse_Title_TextStyle"
android:id="@+id/tv_hint_scan_sn" android:id="@+id/tv_hint_scan_sn"
style="@style/WareHouse_Title_TextStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/str_enter_scan_sn" /> android:text="@string/str_enter_scan_sn" />
......
...@@ -56,5 +56,6 @@ ...@@ -56,5 +56,6 @@
<string name="str_choice_category">選擇類別</string> <string name="str_choice_category">選擇類別</string>
<string name="str_select_least_one_product">至少選擇一個商品</string> <string name="str_select_least_one_product">至少選擇一個商品</string>
<string name="str_confirm_receipt">是否確認收貨?</string> <string name="str_confirm_receipt">是否確認收貨?</string>
<string name="str_new_add_ingredients">新增食材</string>
</resources> </resources>
\ No newline at end of file
...@@ -57,10 +57,8 @@ public class SoftHideKeyBoardUtil { ...@@ -57,10 +57,8 @@ public class SoftHideKeyBoardUtil {
if (usableHeightNow != usableHeightPrevious) { if (usableHeightNow != usableHeightPrevious) {
//3、获取Activity中xml中布局在当前界面显示的高度 //3、获取Activity中xml中布局在当前界面显示的高度
int usableHeightSansKeyboard = mChildOfContent.getRootView().getHeight(); int usableHeightSansKeyboard = mChildOfContent.getRootView().getHeight();
Log.e("eee", "顯示高度:" + usableHeightSansKeyboard);
//4、Activity中xml布局的高度-当前可用高度 //4、Activity中xml布局的高度-当前可用高度
int heightDifference = usableHeightSansKeyboard - usableHeightNow; int heightDifference = usableHeightSansKeyboard - usableHeightNow;
Log.e("eee", "鍵盤高度:" + heightDifference);
//5、高度差大于屏幕1/4时,说明键盘弹出 //5、高度差大于屏幕1/4时,说明键盘弹出
if (heightDifference > (usableHeightSansKeyboard / 4)) { if (heightDifference > (usableHeightSansKeyboard / 4)) {
// 6、键盘弹出了,Activity的xml布局高度应当减去键盘高度 // 6、键盘弹出了,Activity的xml布局高度应当减去键盘高度
...@@ -69,7 +67,6 @@ public class SoftHideKeyBoardUtil { ...@@ -69,7 +67,6 @@ public class SoftHideKeyBoardUtil {
} else { } else {
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference; frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
} }
Log.e("eee", "頁面高度:" + frameLayoutParams.height);
} else { } else {
frameLayoutParams.height = contentHeight; frameLayoutParams.height = contentHeight;
} }
......
package com.gingersoft.gsa.cloud.common.constans;
import com.gingersoft.gsa.cloud.common.function.FModule;
public class FunctionManagerConstants {
public static class takeaway{
public static final String CONFIRM_BTN_KEY = "takeaway/orderDetails/btn/confirmOrder";
public static final String PRODUCTION_COMPLETED_BTN_KEY = "takeaway/orderDetails/btn/ProductionCompleted";
public static final String CANCEL_ORDER_BTN_KEY = "takeaway/orderDetails/btn/cancelOrder";
public static final String PRINT_ORDER_BTN_KEY = "takeaway/orderDetails/btn/printOrder";
public static final String LOGISTICS_BTN_KEY = "takeaway/orderDetails/btn/logistics";
public static final String ASSIGNDELIVERY_BTN_KEY = "takeaway/orderDetails/btn/assignDelivery";
public static final String CLOSING_BTN_KEY = "takeaway/orderDetails/btn/closing";
public static final String TRANSPORTATION_BTN_KEY = "takeaway/orderDetails/btn/transportation";
public static final String ADDITIONALSERVICECHARGE_BTN_KEY = "takeaway/orderDetails/btn/additionalServiceCharge";
//新訂單
public static final String TAKEAWAY_NEW_ORDER = "takeaway/btn/newOrder";
//歷史訂單
public static final String TAKEAWAY_HISTORY_ORDER = "takeaway/btn/historyOrder";
//開錢箱
public static final String TAKEAWAY_OPEN_CASH_BOX = "takeaway/btn/openCashBox";
/** 外送/自取- 訂單詳情管理 */
public static final FModule[] orderDetails = {
new FModule(CONFIRM_BTN_KEY, 0, 0),
new FModule(PRODUCTION_COMPLETED_BTN_KEY, 0, 0),
new FModule(CANCEL_ORDER_BTN_KEY, 0, 0),
new FModule(PRINT_ORDER_BTN_KEY, 0, 0),
new FModule(LOGISTICS_BTN_KEY, 0, 0),
new FModule(ASSIGNDELIVERY_BTN_KEY, 0, 0),
new FModule(CLOSING_BTN_KEY, 0, 0),
new FModule(TRANSPORTATION_BTN_KEY, 0, 0),
new FModule(ADDITIONALSERVICECHARGE_BTN_KEY, 0, 0)
};
/** 外送/自取- 首頁按鈕管理 */
public static final FModule[] takeawayMain = {
new FModule(TAKEAWAY_NEW_ORDER, 0, 0)
};
}
}
package com.gingersoft.gsa.cloud.common.constans;
import com.gingersoft.gsa.cloud.common.function.FModule;
import com.gingersoft.gsa.cloud.common.function.XFunctionItems;
/**
* @author admin
* 外送按鈕功能權限
*/
public class Takeaway {
public static final String TAKEAWAY_ORDER_DETAILS = "takeaway/orderDetails/btn/";
public static final String TAKEAWAY_ORDER_DETAILS_ENFORCE = "takeaway/orderDetails/btn/enforce/";
public static final String TAKEAWAY_BTN = "takeaway/btn/";
public static final String CONFIRM_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "confirmOrder";
public static final String PRODUCTION_COMPLETED_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "ProductionCompleted";
public static final String CANCEL_ORDER_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "cancelOrder";
public static final String PRINT_ORDER_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "printOrder";
public static final String LOGISTICS_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "logistics";
public static final String ASSIGN_DELIVERY_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "assignDelivery";
public static final String CLOSING_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "closing";
public static final String TRANSPORTATION_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "transportation";
public static final String ADDITIONAL_SERVICE_CHARGE_BTN_KEY = TAKEAWAY_ORDER_DETAILS + "additionalServiceCharge";
/**
* 新訂單
*/
public static final String TAKEAWAY_NEW_ORDER = TAKEAWAY_BTN + "newOrder";
/**
* 歷史訂單
*/
public static final String TAKEAWAY_HISTORY_ORDER = TAKEAWAY_BTN + "historyOrder";
/**
* 開錢箱
*/
public static final String TAKEAWAY_OPEN_CASH_BOX = TAKEAWAY_BTN + "openCashBox";
/**
* 外送/自取- 訂單詳情管理
*/
@XFunctionItems(TAKEAWAY_ORDER_DETAILS)
public static final FModule[] ORDER_DETAILS_BTN_PERMISSION = {
new FModule(CONFIRM_BTN_KEY, 0, 0),
new FModule(PRODUCTION_COMPLETED_BTN_KEY, 0, 0),
new FModule(CANCEL_ORDER_BTN_KEY, 0, 0),
new FModule(PRINT_ORDER_BTN_KEY, 0, 0),
new FModule(LOGISTICS_BTN_KEY, 0, 0),
new FModule(ASSIGN_DELIVERY_BTN_KEY, 0, 0),
new FModule(CLOSING_BTN_KEY, 0, 0),
new FModule(TRANSPORTATION_BTN_KEY, 0, 0),
new FModule(ADDITIONAL_SERVICE_CHARGE_BTN_KEY, 0, 0)
};
/**
* 外送/自取- 訂單詳情強制按鈕
*/
@XFunctionItems(TAKEAWAY_ORDER_DETAILS_ENFORCE)
public static final FModule[] ORDER_DETAILS_BTN_ENFORCE_PERMISSION = {
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforceConfirmOrder", 0, 0),//強制確認訂單
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforceProductionCompleted", 0, 0),//強制製作完成
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforceCancelOrder", 0, 0),//強制取消訂單
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforcePrintOrder", 0, 0),//強制打印訂單
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforceCancelLogistics", 0, 0),//強制取消物流
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforceAssignDelivery", 0, 0),//強制指派送貨
new FModule(TAKEAWAY_ORDER_DETAILS_ENFORCE + "EnforceClosing", 0, 0)//強制結賬
};
/**
* 外送/自取- 首頁按鈕管理
*/
@XFunctionItems(TAKEAWAY_BTN)
public static final FModule[] TAKEAWAY_MAIN_BTN_PERMISSION = {
new FModule(TAKEAWAY_NEW_ORDER, 0, 0),
new FModule(TAKEAWAY_HISTORY_ORDER, 0, 0),
new FModule(TAKEAWAY_OPEN_CASH_BOX, 0, 0)
};
}
...@@ -31,11 +31,18 @@ public class FunctionManager { ...@@ -31,11 +31,18 @@ public class FunctionManager {
public List<Function> getFunctionByResModule(Context context, Class c, FModule[] fModules, String specific) { public List<Function> getFunctionByResModule(Context context, Class c, FModule[] fModules, String specific) {
String resLoction = c.getSimpleName().toLowerCase() + "/" + specific; String resLocation = c.getSimpleName().toLowerCase() + "/" + specific;
FunctionDaoUtils daoUtils = new FunctionDaoUtils(context); FunctionDaoUtils daoUtils = new FunctionDaoUtils(context);
List<Function> functionList = daoUtils.queryAllFunction(); List<Function> functionList = daoUtils.queryAllFunction();
return filterFunctionByResLoction(functionList, fModules, resLoction); return filterFunctionByResLoction(functionList, fModules, resLocation);
}
public List<Function> getFunctionByResModule(Context context, FModule[] fModules, String specific) {
String resLocation = specific;
FunctionDaoUtils daoUtils = new FunctionDaoUtils(context);
List<Function> functionList = daoUtils.queryAllFunction();
return filterFunctionByResLoction(functionList, fModules, resLocation);
} }
private List<Function> filterFunctionByResLoction(List<Function> functionList, FModule[] fModules, String resLoction) { private List<Function> filterFunctionByResLoction(List<Function> functionList, FModule[] fModules, String resLoction) {
......
...@@ -34,7 +34,6 @@ public class BaseQueicItemClickAspect { ...@@ -34,7 +34,6 @@ public class BaseQueicItemClickAspect {
*/ */
@Around("onItemSingleClickMethod()") @Around("onItemSingleClickMethod()")
public void doItemSingleClickMethod(ProceedingJoinPoint joinPoint) throws Throwable { public void doItemSingleClickMethod(ProceedingJoinPoint joinPoint) throws Throwable {
Log.d("SingleClickAspect", "來了");
View view = null; View view = null;
for (Object arg : joinPoint.getArgs()) { for (Object arg : joinPoint.getArgs()) {
if (arg instanceof View) { if (arg instanceof View) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableTop="@mipmap/loadsir_empty" android:drawableTop="@drawable/ic_not_have_goods"
android:gravity="center" android:gravity="center"
android:drawablePadding="@dimen/dp_10" android:drawablePadding="@dimen/dp_10"
android:textColor="#999999" android:textColor="#999999"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableTop="@mipmap/loadsir_empty" android:drawableTop="@drawable/ic_not_have_goods"
android:gravity="center" android:gravity="center"
android:drawablePadding="@dimen/dp_10" android:drawablePadding="@dimen/dp_10"
android:textColor="#999999" android:textColor="#999999"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableTop="@mipmap/loadsir_empty" android:drawableTop="@drawable/ic_not_have_goods"
android:gravity="center" android:gravity="center"
android:drawablePadding="@dimen/dp_10" android:drawablePadding="@dimen/dp_10"
android:textColor="#999999" android:textColor="#999999"
......
<resources> <resources>
<string name="base_app_name">public-base</string> <string name="base_app_name">public-base</string>
<string name="str_zero">0</string>
<string name="str_one">1</string>
<string name="str_two">2</string>
<string name="str_three">3</string>
<string name="str_four">4</string>
<string name="str_five">5</string>
<string name="str_six">6</string>
<string name="str_seven">7</string>
<string name="str_eight">8</string>
<string name="str_nine">9</string>
<string name="Key_0">0</string> <string name="Key_0">0</string>
<string name="Key_00">00</string> <string name="Key_00">00</string>
...@@ -233,6 +243,8 @@ ...@@ -233,6 +243,8 @@
<string name="str_determine">確定</string> <string name="str_determine">確定</string>
<string name="str_remark">備註</string> <string name="str_remark">備註</string>
<string name="str_remark_colon">備註:</string> <string name="str_remark_colon">備註:</string>
<string name="str_format_remark_colon">備註:%1$s</string>
<string name="str_save">保存</string> <string name="str_save">保存</string>
<string name="str_inventory">盤點</string> <string name="str_inventory">盤點</string>
......
...@@ -16,6 +16,7 @@ import com.jess.arms.utils.ArmsUtils; ...@@ -16,6 +16,7 @@ import com.jess.arms.utils.ArmsUtils;
import com.lxj.xpopup.XPopup; import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.impl.InputConfirmPopupView; import com.lxj.xpopup.impl.InputConfirmPopupView;
import com.lxj.xpopup.interfaces.OnCancelListener; import com.lxj.xpopup.interfaces.OnCancelListener;
import com.lxj.xpopup.interfaces.OnConfirmListener;
import java.util.List; import java.util.List;
...@@ -33,19 +34,19 @@ public class AppDialog { ...@@ -33,19 +34,19 @@ public class AppDialog {
} }
public void showWaringDialog(Context context, String title, DialogOnClickListenter sureOnclickListener) { public void showWaringDialog(Context context, String title, DialogOnClickListener sureOnclickListener) {
showWaringDialog(context, title, null, null, sureOnclickListener, null, true); showWaringDialog(context, title, null, null, sureOnclickListener, null, true);
} }
public void showWaringDialog(Context context, String title, boolean isDismiss, DialogOnClickListenter sureOnclickListener) { public void showWaringDialog(Context context, String title, boolean isDismiss, DialogOnClickListener sureOnclickListener) {
showWaringDialog(context, title, null, null, sureOnclickListener, null, isDismiss); showWaringDialog(context, title, null, null, sureOnclickListener, null, isDismiss);
} }
public void showWaringDialog(Context context, String title, boolean isDismiss, DialogOnClickListenter sureOnclickListener, DialogOnClickListenter cancelOnclickListener) { public void showWaringDialog(Context context, String title, boolean isDismiss, DialogOnClickListener sureOnclickListener, DialogOnClickListener cancelOnclickListener) {
showWaringDialog(context, title, null, null, sureOnclickListener, cancelOnclickListener, isDismiss); showWaringDialog(context, title, null, null, sureOnclickListener, cancelOnclickListener, isDismiss);
} }
private void showWaringDialog(Context context, String title, String confimText, String cancelText, DialogOnClickListenter sureOnclickListener, DialogOnClickListenter cancelOnclickListener, boolean isDismiss) { private void showWaringDialog(Context context, String title, String confimText, String cancelText, DialogOnClickListener sureOnclickListener, DialogOnClickListener cancelOnclickListener, boolean isDismiss) {
//DialogUtils內存洩漏,換Xpopup //DialogUtils內存洩漏,換Xpopup
new DialogUtils(context, R.layout.other_order_pause_orders) { new DialogUtils(context, R.layout.other_order_pause_orders) {
@Override @Override
...@@ -76,7 +77,7 @@ public class AppDialog { ...@@ -76,7 +77,7 @@ public class AppDialog {
}.show(); }.show();
} }
public void showSelectDialog(Context context, String title, int spanCount, RecyclerView.Adapter adapter, DialogOnClickListenter sureOnclickListenter) { public void showSelectDialog(Context context, String title, int spanCount, RecyclerView.Adapter adapter, DialogOnClickListener sureOnclickListenter) {
new DialogUtils(context, R.layout.dialog_select_layout) { new DialogUtils(context, R.layout.dialog_select_layout) {
@Override @Override
public void initLayout(ViewHepler hepler, Dialog dialog) { public void initLayout(ViewHepler hepler, Dialog dialog) {
...@@ -105,41 +106,42 @@ public class AppDialog { ...@@ -105,41 +106,42 @@ public class AppDialog {
/** /**
* 藍色的提示框 * 藍色的提示框
*/ */
public void showTipDialog(Context context, String title, DialogOnClickListenter sureOnclickListenter) { public void showTipDialog(Context context, String title, OnConfirmListener sureOnclickListener) {
showTipDialog(context, title, context.getString(R.string.str_determine), context.getString(R.string.str_cancel), sureOnclickListenter, null); showTipDialog(context, title, context.getString(R.string.str_determine), context.getString(R.string.str_cancel), sureOnclickListener, null);
} }
/** /**
* 藍色的提示框 * 藍色的提示框
*/ */
public void showTipDialog(Context context, String title, DialogOnClickListenter sureOnclickListenter, DialogOnClickListenter onCancelListener) { public void showTipDialog(Context context, String title, OnConfirmListener sureOnclickListener, OnCancelListener onCancelListener) {
showTipDialog(context, title, context.getString(R.string.str_determine), context.getString(R.string.str_cancel), sureOnclickListenter, onCancelListener); showTipDialog(context, title, context.getString(R.string.str_determine), context.getString(R.string.str_cancel), sureOnclickListener, onCancelListener);
} }
public void showTipDialog(Context context, String title, String sureBtnText, String cancelBtnText, DialogOnClickListenter sureOnclickListener, DialogOnClickListenter onCancelListener) { public void showTipDialog(Context context, String title, String sureBtnText, String cancelBtnText, OnConfirmListener sureOnclickListener, OnCancelListener onCancelListener) {
new DialogUtils(context, R.layout.dialog_tip) { new XPopup.Builder(context).asConfirm(title, "", cancelBtnText, sureBtnText, sureOnclickListener, onCancelListener, false, R.layout.dialog_tip).show();
@Override // new DialogUtils(context, R.layout.dialog_tip) {
public void initLayout(ViewHepler hepler, Dialog dialog) { // @Override
if (title != null) { // public void initLayout(ViewHepler hepler, Dialog dialog) {
hepler.setText(R.id.tv_warning_title, title); // if (title != null) {
} // hepler.setText(R.id.tv_warning_title, title);
hepler.getView(R.id.tv_dialog_cancel).setOnClickListener(v -> dialog.dismiss()); // }
((TextView) hepler.getView(R.id.tv_dialog_confirm)).setText(sureBtnText); // hepler.getView(R.id.tv_dialog_cancel).setOnClickListener(v -> dialog.dismiss());
((TextView) hepler.getView(R.id.tv_dialog_cancel)).setText(cancelBtnText); // ((TextView) hepler.getView(R.id.tv_dialog_confirm)).setText(sureBtnText);
hepler.getView(R.id.tv_dialog_confirm).setOnClickListener(v -> { // ((TextView) hepler.getView(R.id.tv_dialog_cancel)).setText(cancelBtnText);
if (sureOnclickListener != null) { // hepler.getView(R.id.tv_dialog_confirm).setOnClickListener(v -> {
sureOnclickListener.onclick(v, dialog); // if (sureOnclickListener != null) {
} // sureOnclickListener.onclick(v, dialog);
dialog.dismiss(); // }
}); // dialog.dismiss();
hepler.getView(R.id.tv_dialog_cancel).setOnClickListener(v -> { // });
dismiss(); // hepler.getView(R.id.tv_dialog_cancel).setOnClickListener(v -> {
if (onCancelListener != null) { // dismiss();
onCancelListener.onclick(v, dialog); // if (onCancelListener != null) {
} // onCancelListener.onclick(v, dialog);
}); // }
} // });
}.show(); // }
// }.show();
} }
public void showListDialog(Context context, String[] data, onDialogSelectListener onSelectListener) { public void showListDialog(Context context, String[] data, onDialogSelectListener onSelectListener) {
...@@ -168,7 +170,7 @@ public class AppDialog { ...@@ -168,7 +170,7 @@ public class AppDialog {
} }
public interface DialogOnClickListenter { public interface DialogOnClickListener {
void onclick(View view, Dialog dialog); void onclick(View view, Dialog dialog);
} }
......
package com.gingersoft.gsa.cloud.common.ui.utils package com.gingersoft.gsa.cloud.ui.utils
import com.gingersoft.gsa.cloud.common.constans.FunctionManagerConstants import com.gingersoft.gsa.cloud.common.constans.Takeaway
import com.gingersoft.gsa.cloud.database.bean.Function import com.gingersoft.gsa.cloud.database.bean.Function
import com.gingersoft.gsa.cloud.ui.R import com.gingersoft.gsa.cloud.ui.R
/**
* 凍鏈外送都需要用到
*/
class BtnBuilder { class BtnBuilder {
lateinit var functions: List<Function> lateinit var functions: List<Function>
...@@ -17,6 +20,14 @@ class BtnBuilder { ...@@ -17,6 +20,14 @@ class BtnBuilder {
const val ProductionCompletedBtn = 6 const val ProductionCompletedBtn = 6
const val TransportationBtn = 7//選擇運輸工具 const val TransportationBtn = 7//選擇運輸工具
const val AdditionalServiceChargeBtn = 8//追加服務費 const val AdditionalServiceChargeBtn = 8//追加服務費
//強制
const val EnforceSureBtn = 9
const val EnforceCancelBtn = 10
const val EnforcePrintBtn = 11
const val EnforceLogisticsBtn = 12
const val EnforceAssignDeliveryBtn = 13
const val EnforceClosingBtn = 14
const val EnforceProductionCompletedBtn = 15
@Volatile @Volatile
private var instance: BtnBuilder? = null private var instance: BtnBuilder? = null
...@@ -37,54 +48,80 @@ class BtnBuilder { ...@@ -37,54 +48,80 @@ class BtnBuilder {
class BtnBean(val type: Int, var btnContent: String, val btnColor: Int, val btnImg: Int) class BtnBean(val type: Int, var btnContent: String, val btnColor: Int, val btnImg: Int)
fun getSureBtn(): BtnBean? { fun getSureBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.CONFIRM_BTN_KEY, SureBtn, "確認訂單", R.color.other_order_details_sure_btn_color, R.drawable.ic_sure) return getBtn(Takeaway.CONFIRM_BTN_KEY, SureBtn, "確認訂單", R.color.other_order_details_sure_btn_color, R.drawable.ic_sure)
} }
fun getProductionCompletedBtn(): BtnBean? { fun getProductionCompletedBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.PRODUCTION_COMPLETED_BTN_KEY, ProductionCompletedBtn, "製作完成", R.color.other_order_details_sure_btn_color, R.drawable.ic_sure) return getBtn(Takeaway.PRODUCTION_COMPLETED_BTN_KEY, ProductionCompletedBtn, "製作完成", R.color.other_order_details_sure_btn_color, R.drawable.ic_sure)
} }
fun getCancelBtn(): BtnBean? { fun getCancelBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.CANCEL_ORDER_BTN_KEY, CancelBtn, "取消訂單", R.color.other_order_details_cancel_btn_color, R.drawable.ic_cancel) return getBtn(Takeaway.CANCEL_ORDER_BTN_KEY, CancelBtn, "取消訂單", R.color.other_order_details_cancel_btn_color, R.drawable.ic_cancel)
} }
fun getPrintBtn(): BtnBean? { fun getPrintBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.PRINT_ORDER_BTN_KEY, PrintBtn, "打印訂單", R.color.other_order_details_print_btn_color, R.drawable.ic_print) return getBtn(Takeaway.PRINT_ORDER_BTN_KEY, PrintBtn, "打印訂單", R.color.other_order_details_print_btn_color, R.drawable.ic_print)
} }
fun getLogisticsBtn(): BtnBean? { fun getLogisticsBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.LOGISTICS_BTN_KEY, LogisticsBtn, "取消物流", R.color.other_order_details_cancel_logistics_btn_color, R.drawable.ic_logistics) return getBtn(Takeaway.LOGISTICS_BTN_KEY, LogisticsBtn, "取消物流", R.color.other_order_details_cancel_logistics_btn_color, R.drawable.ic_logistics)
} }
fun getAssignDeliveryBtn(): BtnBean? { fun getAssignDeliveryBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.ASSIGNDELIVERY_BTN_KEY, AssignDeliveryBtn, "指派送貨", R.color.other_order_details_sure_btn_color, R.drawable.ic_deliveryman) return getBtn(Takeaway.ASSIGN_DELIVERY_BTN_KEY, AssignDeliveryBtn, "指派送貨", R.color.other_order_details_sure_btn_color, R.drawable.ic_deliveryman)
} }
fun getClosingBtn(): BtnBean? { fun getClosingBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.CLOSING_BTN_KEY, ClosingBtn, "結賬", R.color.other_order_details_cancel_btn_color, R.drawable.ic_closing) return getBtn(Takeaway.CLOSING_BTN_KEY, ClosingBtn, "結賬", R.color.other_order_details_cancel_btn_color, R.drawable.ic_closing)
} }
fun getTransportationBtn(): BtnBean? { fun getTransportationBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.TRANSPORTATION_BTN_KEY, TransportationBtn, "運輸工具", R.color.other_order_details_cancel_logistics_btn_color, R.drawable.ic_logistics) return getBtn(Takeaway.TRANSPORTATION_BTN_KEY, TransportationBtn, "運輸工具", R.color.other_order_details_cancel_logistics_btn_color, R.drawable.ic_logistics)
} }
fun getAdditionalServiceChargeBtn(): BtnBean? { fun getAdditionalServiceChargeBtn(): BtnBean? {
return getBtn(FunctionManagerConstants.takeaway.ADDITIONALSERVICECHARGE_BTN_KEY, AdditionalServiceChargeBtn, "追加貼士", R.color.additional_service_charge_btn_color, R.drawable.ic_additional_service_charge) return getBtn(Takeaway.ADDITIONAL_SERVICE_CHARGE_BTN_KEY, AdditionalServiceChargeBtn, "追加貼士", R.color.additional_service_charge_btn_color, R.drawable.ic_additional_service_charge)
} }
fun getEnforceSureBtn(): BtnBean? {
return getBtn(Takeaway.CONFIRM_BTN_KEY, SureBtn, "確認訂單", R.color.other_order_details_sure_btn_color, R.drawable.ic_sure)
}
fun getEnforceProductionCompletedBtn(): BtnBean? {
return getBtn(Takeaway.PRODUCTION_COMPLETED_BTN_KEY, ProductionCompletedBtn, "製作完成", R.color.other_order_details_sure_btn_color, R.drawable.ic_sure)
}
fun getEnforceCancelBtn(): BtnBean? {
return getBtn(Takeaway.CANCEL_ORDER_BTN_KEY, CancelBtn, "取消訂單", R.color.other_order_details_cancel_btn_color, R.drawable.ic_cancel)
}
fun getEnforcePrintBtn(): BtnBean? {
return getBtn(Takeaway.PRINT_ORDER_BTN_KEY, PrintBtn, "打印訂單", R.color.other_order_details_print_btn_color, R.drawable.ic_print)
}
fun getEnforceLogisticsBtn(): BtnBean? {
return getBtn(Takeaway.LOGISTICS_BTN_KEY, LogisticsBtn, "取消物流", R.color.other_order_details_cancel_logistics_btn_color, R.drawable.ic_logistics)
}
fun getEnforceAssignDeliveryBtn(): BtnBean? {
return getBtn(Takeaway.ASSIGN_DELIVERY_BTN_KEY, AssignDeliveryBtn, "指派送貨", R.color.other_order_details_sure_btn_color, R.drawable.ic_deliveryman)
}
fun getEnforceClosingBtn(): BtnBean? {
return getBtn(Takeaway.CLOSING_BTN_KEY, ClosingBtn, "結賬", R.color.other_order_details_cancel_btn_color, R.drawable.ic_closing)
}
private fun getBtn(key: String, btnCode: Int, btnContent: String, btnColor: Int, btnImg: Int): BtnBean? { private fun getBtn(key: String, btnCode: Int, btnContent: String, btnColor: Int, btnImg: Int): BtnBean? {
for (value in functions) { for (value in functions) {
if (value.resUrl == key) { if (value.resUrl == key) {
return when { return when (value.status) {
value.status == 3 -> BtnBean(btnCode, btnContent, R.color.color_ccc, btnImg) 3 -> BtnBean(btnCode, btnContent, R.color.color_ccc, btnImg)
// value.status == 1 -> BtnBean(btnCode, btnContent, btnColor, btnImg)
else -> BtnBean(btnCode, btnContent, btnColor, btnImg) else -> BtnBean(btnCode, btnContent, btnColor, btnImg)
} }
} }
} }
return null return null
// return BtnBean(btnCode, btnContent, btnColor, btnImg)
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/shape_white_eight_corners_bg" android:background="@drawable/shape_white_eight_corners_bg"
...@@ -16,13 +17,21 @@ ...@@ -16,13 +17,21 @@
android:src="@drawable/ic_question_prompt" /> android:src="@drawable/ic_question_prompt" />
<TextView <TextView
android:id="@+id/tv_warning_title" android:id="@+id/tv_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_22" android:layout_marginTop="@dimen/dp_22"
android:text="是否暫停接單?"
android:textColor="@color/color_3c" android:textColor="@color/color_3c"
android:textSize="@dimen/dp_20" /> android:textSize="@dimen/dp_20"
tools:text="是否暫停接單?" />
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_3c"
android:textSize="@dimen/dp_20"
android:visibility="gone" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -31,7 +40,7 @@ ...@@ -31,7 +40,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/tv_dialog_confirm" android:id="@+id/tv_confirm"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shape_theme_eight_corners_bg" android:background="@drawable/shape_theme_eight_corners_bg"
...@@ -44,7 +53,7 @@ ...@@ -44,7 +53,7 @@
android:textSize="@dimen/dp_15" /> android:textSize="@dimen/dp_15" />
<TextView <TextView
android:id="@+id/tv_dialog_cancel" android:id="@+id/tv_cancel"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_28" android:layout_marginLeft="@dimen/dp_28"
......
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