Browse Source

修改buglist

调味吧台
liup 5 months ago
parent
commit
e0522f06a8
30 changed files with 212 additions and 43 deletions
  1. +23
    -2
      app/src/main/java/com/bonait/bnframework/HBL/Thread/ThreadManager.java
  2. +2
    -0
      app/src/main/java/com/bonait/bnframework/MainApplication.java
  3. +2
    -2
      app/src/main/java/com/bonait/bnframework/common/linktab/good/GoodLeftAdapter.java
  4. +12
    -0
      app/src/main/java/com/bonait/bnframework/common/utils/AlertDialogUtils.java
  5. +25
    -0
      app/src/main/java/com/bonait/bnframework/common/utils/KeyboardUtil.java
  6. +2
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/sx_adapter.java
  7. +5
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/zsx_adapter.java
  8. +2
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java
  9. +17
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/JcsjglActivity.java
  10. +6
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/LogActivity.java
  11. +3
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/OrderListActivity.java
  12. +6
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SalesStatisticsActivity.java
  13. +17
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_sxgl_fragment.java
  14. +7
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_wl_fragment.java
  15. +5
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java
  16. +20
    -9
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_pf_home_control.java
  17. +9
    -9
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/silos_jiaoyan.java
  18. +6
    -1
      app/src/main/res/layout/activity_log.xml
  19. +5
    -1
      app/src/main/res/layout/activity_orderlist.xml
  20. +6
    -1
      app/src/main/res/layout/activity_salesstatistics.xml
  21. +1
    -2
      app/src/main/res/layout/datatab/layout/pfsx_item.xml
  22. +1
    -1
      app/src/main/res/layout/datatab/layout/sx_item.xml
  23. +1
    -0
      app/src/main/res/layout/fragment_jcsjgl_sxgl.xml
  24. +1
    -0
      app/src/main/res/layout/fragment_jcsjgl_wl.xml
  25. +2
    -0
      app/src/main/res/layout/item/layout/dialog_add_good.xml
  26. +1
    -0
      app/src/main/res/layout/item/layout/dialog_add_pf.xml
  27. +6
    -1
      app/src/main/res/layout/item/layout/dialog_add_pf_home.xml
  28. +1
    -0
      app/src/main/res/layout/item/layout/item_zsx.xml
  29. +9
    -4
      app/src/main/res/layout/item/layout/newgood_bj.xml
  30. +9
    -4
      app/src/main/res/layout/item/layout/newmakegood.xml

+ 23
- 2
app/src/main/java/com/bonait/bnframework/HBL/Thread/ThreadManager.java View File

@@ -3,13 +3,21 @@ package com.bonait.bnframework.HBL.Thread;
import com.bonait.bnframework.HBL.Logs.MessageLog;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadManager {
private static volatile ThreadManager _Instance;
private ExecutorService executorService;

public static ThreadManager get() {
if (_Instance == null)
_Instance = new ThreadManager();
if (_Instance == null){
synchronized (ThreadManager.class){
if (_Instance == null){
_Instance = new ThreadManager();
}
}
}
return _Instance;
}

@@ -17,6 +25,19 @@ public class ThreadManager {

}

public void inti(){
// int processors = Runtime.getRuntime().availableProcessors();
executorService = Executors.newCachedThreadPool();
}

public void execute(Runnable runnable){
try{
executorService.execute(runnable);
}catch (Exception e){
e.printStackTrace();
}
}

public long RestartInterval = 3000;
ConcurrentHashMap<String, ThreadModel> tm = new ConcurrentHashMap<>();



+ 2
- 0
app/src/main/java/com/bonait/bnframework/MainApplication.java View File

@@ -13,6 +13,7 @@ import android.util.Log;
import androidx.core.content.ContextCompat;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.HBL.Thread.ThreadManager;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
@@ -92,6 +93,7 @@ public class MainApplication extends Application {
if(ConfigName.TEST){
initBugly();
}
ThreadManager.get().inti();
}

@Override


+ 2
- 2
app/src/main/java/com/bonait/bnframework/common/linktab/good/GoodLeftAdapter.java View File

@@ -120,7 +120,7 @@ public class GoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder>
Detele(index_d);
dialog.dismiss();
if(callBack!=null){
callBack.delete();
callBack.delete(index_d);
}
}
});
@@ -153,6 +153,6 @@ public class GoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder>
}

public interface CallBack{
void delete();
void delete(int index);
}
}

+ 12
- 0
app/src/main/java/com/bonait/bnframework/common/utils/AlertDialogUtils.java View File

@@ -30,6 +30,18 @@ public class AlertDialogUtils {
.create(mCurrentDialogStyle).show();
}

/**
* 对话框,只有取消按钮
* */
public static void showCancelDialog(Context context,String title,String message,QMUIDialogAction.ActionListener onClickListener) {
new QMUIDialog.MessageDialogBuilder(context)
.setCancelable(false)
.setTitle(title)
.setMessage(message)
.addAction("停止", onClickListener)
.create(mCurrentDialogStyle).show();
}

/**
* 对话框,只有确定按钮,自定义确定按钮文本
* */


+ 25
- 0
app/src/main/java/com/bonait/bnframework/common/utils/KeyboardUtil.java View File

@@ -0,0 +1,25 @@
package com.bonait.bnframework.common.utils;

import static androidx.core.content.ContextCompat.getSystemService;

import android.app.Activity;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

import com.bonait.bnframework.MainApplication;

/**
* @author: liup
* @description:
* @date: 2024/5/21 10:12.
*/
public class KeyboardUtil {

// 隐藏键盘的方法
public static void hideKeyboard(View view) {
InputMethodManager inputMethodManager = (InputMethodManager) MainApplication.getContext().getSystemService(Activity.INPUT_METHOD_SERVICE);
if (inputMethodManager != null) {
inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}
}

+ 2
- 1
app/src/main/java/com/bonait/bnframework/modules/home/adapter/sx_adapter.java View File

@@ -19,6 +19,7 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.view.MyLayoutManager;

import java.util.ArrayList;
@@ -49,6 +50,7 @@ public class sx_adapter extends ArrayAdapter<BPA_GOODPROPERTY> {
BPA_GOODPROPERTY bpa_goodproperty = (BPA_GOODPROPERTY) getItem(position);//得到当前项选中item实例
//为每一个子项加载设定的布局
View view = LayoutInflater.from(getContext()).inflate(resource1, parent, false);
view.setOnClickListener(KeyboardUtil::hideKeyboard);
//分别获取 image view 和 textview 的实例
TextView name = view.findViewById(R.id.name);//属性名称
TextView sort = view.findViewById(R.id.sort);//排序
@@ -58,7 +60,6 @@ public class sx_adapter extends ArrayAdapter<BPA_GOODPROPERTY> {
ImageView button_add = view.findViewById(R.id.button_add);//增加 子属性

RecyclerView recyclerView=view.findViewById(R.id.recycler_view);

ArrayList<BPA_GOODPROPERTY> zsx= QueryDB.GetGoodsPropertyALL(bpa_goodproperty.id);
MyLayoutManager layout = new MyLayoutManager();
layout.setAutoMeasureEnabled(true);


+ 5
- 0
app/src/main/java/com/bonait/bnframework/modules/home/adapter/zsx_adapter.java View File

@@ -8,6 +8,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.NonNull;
@@ -19,6 +20,7 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.image.MyBitmapUtils;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.fragment.mode.image_sp;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
@@ -62,6 +64,7 @@ public class zsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

BPA_GOODPROPERTY goodproperty= goodproperties.get(position);
MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder;
myViewHolder.root.setOnClickListener(KeyboardUtil::hideKeyboard);
myViewHolder.edittext.setText(goodproperty.name+"");
myViewHolder.edittext_wj.setText(goodproperty.foreignKeyRe+"");
myViewHolder.edittext_px.setText(goodproperty.sort+"");
@@ -138,6 +141,7 @@ public class zsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
EditText edittext_px;//排序
TextView save_text;
TextView delete_text;
RelativeLayout root;
public MyLCViewHolder1(View view) {
super(view);
edittext=view.findViewById(R.id.edittext);
@@ -145,6 +149,7 @@ public class zsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
save_text=view.findViewById(R.id.save_text);
delete_text=view.findViewById(R.id.delete_text);
edittext_px=view.findViewById(R.id.edittext_px);
root=view.findViewById(R.id.root);
}
}
}

+ 2
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java View File

@@ -342,10 +342,8 @@ public class GoodPeiFangActivity extends BaseActivity {
LinearLayoutManager manager = (LinearLayoutManager) rv_right.getLayoutManager();
leftAdapter = new GoodLeftAdapter(R.layout.item_left_good, Fdata, getResources(), manager, new GoodLeftAdapter.CallBack() {
@Override
public void delete() {
if(rightAdapter!=null){
rightAdapter.notifyDataSetChanged();
}
public void delete(int index) {
Initdata();
}
});
rightAdapter = new GoodRightAdapter(R.layout.item_right_lc, Fdata, getResources());


+ 17
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/JcsjglActivity.java View File

@@ -26,6 +26,7 @@ import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.tabbar.MainNavigateTabBar;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.modules.home.fragment.GongnengFragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_wl_fragment;
@@ -102,6 +103,22 @@ public class JcsjglActivity extends BaseActivity {
}
};
viewpager_wl.setAdapter(adapter);
viewpager_wl.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int i, float v, int i1) {
KeyboardUtil.hideKeyboard(viewpager_wl);
}

@Override
public void onPageSelected(int i) {
KeyboardUtil.hideKeyboard(viewpager_wl);
}

@Override
public void onPageScrollStateChanged(int i) {

}
});
tabs.setupWithViewPager(viewpager_wl,true);
}
//-------------------------配置viewPager与fragment关联----------------------------//


+ 6
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/LogActivity.java View File

@@ -28,6 +28,7 @@ import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.res.ResAlertLog;
import com.bonait.bnframework.common.db.res.ResLog;
import com.bonait.bnframework.common.helper.DateUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.yjrz_adapter;
import com.bonait.bnframework.modules.home.fragment.GuanLifragment;
@@ -37,6 +38,7 @@ import com.qmuiteam.qmui.arch.QMUIFragment;
import com.qmuiteam.qmui.arch.QMUIFragmentPagerAdapter;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;
import com.qmuiteam.qmui.widget.QMUIViewPager;
import com.qmuiteam.qmui.widget.QMUIWindowInsetLayout;
import com.qmuiteam.qmui.widget.tab.QMUITabSegment;

import java.text.SimpleDateFormat;
@@ -90,6 +92,8 @@ public class LogActivity extends BaseActivity {
EditText starttime;
@BindView(R.id.stoptime)
EditText stoptime;
@BindView(R.id.root)
QMUIWindowInsetLayout root;
/**
* 日志类型
*/
@@ -112,6 +116,8 @@ public class LogActivity extends BaseActivity {
}

private void initTopBar() {
button.requestFocus();
KeyboardUtil.hideKeyboard(button);
mTopBar.setTitle("日志管理");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override


+ 3
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/OrderListActivity.java View File

@@ -27,6 +27,7 @@ import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.res.ResSubOrder;
import com.bonait.bnframework.common.helper.DateUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.ddgl_adapter;
import com.bonait.bnframework.modules.home.fragment.DingDanfragment;
@@ -112,6 +113,8 @@ public class OrderListActivity extends BaseActivity {
}

private void initTopBar() {
button.requestFocus();
KeyboardUtil.hideKeyboard(button);
mTopBar.setTitle("订单列表");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override


+ 6
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SalesStatisticsActivity.java View File

@@ -28,12 +28,14 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.res.ResSubOrder;
import com.bonait.bnframework.common.db.res.SuOrderTJ;
import com.bonait.bnframework.common.helper.DateUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.ddgl_adapter;
import com.bonait.bnframework.modules.home.adapter.ddtj_adapter;
import com.bonait.bnframework.modules.home.fragment.DingDanfragment;
import com.bonait.bnframework.modules.home.fragment.GuanLifragment;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;
import com.qmuiteam.qmui.widget.QMUIWindowInsetLayout;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -81,6 +83,8 @@ public class SalesStatisticsActivity extends BaseActivity {
EditText starttime;
@BindView(R.id.stoptime)
EditText stoptime;
@BindView(R.id.root)
QMUIWindowInsetLayout root;

private Context context;
private ViewGroup view;
@@ -99,6 +103,8 @@ public class SalesStatisticsActivity extends BaseActivity {
}

private void initTopBar() {
button.requestFocus();
KeyboardUtil.hideKeyboard(button);
mTopBar.setTitle("销售统计");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override


+ 17
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_sxgl_fragment.java View File

@@ -22,9 +22,11 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.sx_adapter;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.QMUIWindowInsetLayout;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

@@ -40,6 +42,8 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis

@BindView(R.id.datatab_sx)
ListView datatab_sx;
@BindView(R.id.root)
QMUIWindowInsetLayout root;
/**
* 属性数据
*/
@@ -68,6 +72,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
* 初始化界面
*/
public void InitView() {
root.setOnClickListener(KeyboardUtil::hideKeyboard);
bpa_goodstypes= QueryDB.GetGoodsTypeALL();
itemstypes.clear();
for (BPA_GOODSTYPE item:bpa_goodstypes)
@@ -92,6 +97,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
KeyboardUtil.hideKeyboard(builder_add.getEditText());
dialog.dismiss();
}
})
@@ -114,6 +120,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
QueryDB.AddGoodsProperty(bpa_goodproperty);
ToastUtils.info("新增成功");
Initdata_sx();
KeyboardUtil.hideKeyboard(builder_add.getEditText());
dialog.dismiss();
} else {
//请填入昵称
@@ -139,6 +146,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
KeyboardUtil.hideKeyboard(builder.getEditText());
dialog.dismiss();
}
})
@@ -153,6 +161,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
}
QueryDB.UpdateGoodsPropertyName(((BPA_GOODPROPERTY) data).id, text.toString());
Initdata_sx();
KeyboardUtil.hideKeyboard(builder.getEditText());
dialog.dismiss();
} else {
//请填入昵称
@@ -171,6 +180,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
})
@@ -181,6 +191,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
if (text != null && text.length() > 0) {
QueryDB.UpdateGoodsPropertySort(((BPA_GOODPROPERTY) data).id, Integer.parseInt(text.toString()));
Initdata_sx();
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
} else {
//请填入昵称
@@ -222,6 +233,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
builder3.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});
@@ -245,7 +257,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
}
QueryDB.UpdateGoodsPropertyType(((BPA_GOODPROPERTY) data).id, result);
Initdata_sx();
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});
@@ -265,6 +277,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
Initdata_sx();
ToastUtils.info("删除成功");
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});
@@ -282,12 +295,14 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
QueryDB.AddGoodsProperty(bpa_goodproperty);
ToastUtils.info("新增成功");
Initdata_sx();
KeyboardUtil.hideKeyboard(v);
break;

case R.id.save_text://保存属性
QueryDB.UpdateGoodsProperty((BPA_GOODPROPERTY) data);
ToastUtils.info("保存成功");
Initdata_sx();
KeyboardUtil.hideKeyboard(v);
break;
case R.id.delete_text://删除
String title1 = "温馨提示!";
@@ -298,6 +313,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
Initdata_sx();
ToastUtils.info("删除成功");
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});


+ 7
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_wl_fragment.java View File

@@ -32,10 +32,12 @@ import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.MY;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.NetworkUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.wl_adapter;
import com.orhanobut.logger.Logger;
import com.qmuiteam.qmui.widget.QMUIWindowInsetLayout;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

@@ -53,6 +55,8 @@ public class Jcsjgl_wl_fragment extends BaseFragment {// implements MyClickListe
Button add_wl;
@BindView(R.id.datatab_wl)
ListView datatab_wl;
@BindView(R.id.root)
QMUIWindowInsetLayout root;
/**
* 物料数据
*/
@@ -77,6 +81,7 @@ public class Jcsjgl_wl_fragment extends BaseFragment {// implements MyClickListe
* 初始化界面
*/
public void InitView() {
root.setOnClickListener(KeyboardUtil::hideKeyboard);
Initdata_wl();
}

@@ -101,6 +106,7 @@ public class Jcsjgl_wl_fragment extends BaseFragment {// implements MyClickListe
.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
KeyboardUtil.hideKeyboard(builder_add.getEditText());
dialog.dismiss();
}
})
@@ -122,6 +128,7 @@ public class Jcsjgl_wl_fragment extends BaseFragment {// implements MyClickListe
QueryDB.AddMaterial(bpa_material);
ToastUtils.info("新增成功");
Initdata_wl();
KeyboardUtil.hideKeyboard(builder_add.getEditText());
dialog.dismiss();
} else {
//请填入昵称


+ 5
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java View File

@@ -11,6 +11,7 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Spinner;

import androidx.annotation.Nullable;
@@ -28,6 +29,7 @@ import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.image.MyBitmapUtils;
import com.bonait.bnframework.common.message.MessageLooper;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.newmeatrilselect_adapter;
@@ -296,6 +298,7 @@ public class add_good_control extends LinearLayout {
Activity activity_ma;
public String url="";
Map<String,String> map_fl = new LinkedHashMap<>();
RelativeLayout rlRoot;
/**
* 初始化界面控件
*/
@@ -310,6 +313,8 @@ public class add_good_control extends LinearLayout {
editsp_fl = findViewById(R.id.editsp_fl);

recycler_view_wl = findViewById(R.id.recycler_view_wl);
rlRoot = findViewById(R.id.root);
rlRoot.setOnClickListener(KeyboardUtil::hideKeyboard);
}

/**


+ 20
- 9
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_pf_home_control.java View File

@@ -15,12 +15,15 @@ import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME;
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.res.ResGoodsRecipe;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.KeyboardUtil;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.goodpf_apapter;
import com.bonait.bnframework.modules.home.adapter.wl_adapter;
@@ -136,15 +139,23 @@ public class add_pf_home_control extends LinearLayout {//implements MyClickLis
}
break;
case R.id.button_item://删除按钮

ArrayList<ResGoodsRecipe> re= QueryDB.GetGoodsSreciperecipeList(((BPA_GOODSRECIPENAME) data).id);
for(ResGoodsRecipe item:re)
{
QueryDB.DeleteGoodsSrecipe(item);
}
QueryDB.DeleteGoodsRecipeName((BPA_GOODSRECIPENAME) data);
Initdata_pf();
ToastUtils.info("删除成功");
String title = "温馨提示!";
String message = "客官确定要删除配方【"+((BPA_GOODSRECIPENAME) data).name+"】吗?";
AlertDialogUtils.showDialog(getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
ArrayList<ResGoodsRecipe> re= QueryDB.GetGoodsSreciperecipeList(((BPA_GOODSRECIPENAME) data).id);
for(ResGoodsRecipe item:re)
{
QueryDB.DeleteGoodsSrecipe(item);
}
QueryDB.DeleteGoodsRecipeName((BPA_GOODSRECIPENAME) data);
Initdata_pf();
ToastUtils.info("删除成功");
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});
break;
}
}


+ 9
- 9
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/silos_jiaoyan.java View File

@@ -32,7 +32,10 @@ import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.IRun;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;

import java.util.Timer;
import java.util.TimerTask;
@@ -335,18 +338,15 @@ public class silos_jiaoyan extends LinearLayout {
MessageLog.ShowInfo("下发参数,开始校准 当前时间:"+startTime +" 出料时间"+((int) time)*100);
ExecuteTheRecipe.Write(lcMode.name+lcMode.num+"启停控制",true,null);//下发启动信号


WaitDialog.getInstance().AddText("等待校准完成");
String name = lcMode.name+lcMode.num+"启停控制";
//等待出料完成
Unity.Wait(()->{return TTrig.get(name).Start(ExecuteTheRecipe.ReadBool(name));},(int)(time*1000+2000)).OnSource(()->{
Unity.Wait(()->{return false;},(int)(time*1000+2000)).OnSource(()->{
MessageLog.ShowInfo("下发参数,结束校准 结束时间:"+(System.currentTimeMillis()-startTime) +" stop");
WaitDialog.getInstance().Dismiss();
}).OnFailed(msg->{
//获取电子秤重量,并填充到对应位置
try {
Thread.sleep(500);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
MessageLog.ShowInfo("下发参数,结束校准 结束时间:"+(System.currentTimeMillis()-startTime) +" 读取启停控制 false");
MessageLog.ShowInfo("下发参数,结束校准 结束时间:"+(System.currentTimeMillis()-startTime) +" true");

activity.runOnUiThread(()->{
float weight = (float) (ExecuteTheRecipe.ReadShort(PLCName.称当前重量)/10.0);
@@ -356,7 +356,7 @@ public class silos_jiaoyan extends LinearLayout {
});
WaitDialog.getInstance().Dismiss();
DialogManager.showInfo(activity,"校准完成",AlertDialogButton.OK,null);
}).OnFailed(msg->{WaitDialog.getInstance().TimeOut("等待校准完成超时,请退出后重试!");});
});
TTrig.Remove(name);
}).OnFailed((msg)->{WaitDialog.getInstance().TimeOut("等待清零超时,请退出后重试!");});
});


+ 6
- 1
app/src/main/res/layout/activity_log.xml View File

@@ -6,6 +6,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white"
android:id="@+id/root"
android:fitsSystemWindows="true">

<RelativeLayout
@@ -97,7 +98,11 @@
android:layout_width="120dp"
android:layout_height="26dp"
android:textColor="@color/white"
/>
android:focusableInTouchMode="true"
android:focusable="true"
>
<requestFocus/>
</Button>
</LinearLayout>

</RelativeLayout>


+ 5
- 1
app/src/main/res/layout/activity_orderlist.xml View File

@@ -99,7 +99,11 @@
android:background="@drawable/bg_btn_login_selected"
android:text="查询"
android:textColor="@color/white"
android:textSize="@dimen/textSize" />
android:focusableInTouchMode="true"
android:focusable="true"
android:textSize="@dimen/textSize" >
<requestFocus/>
</Button>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"


+ 6
- 1
app/src/main/res/layout/activity_salesstatistics.xml View File

@@ -6,6 +6,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white"
android:id="@+id/root"
android:fitsSystemWindows="true">

<RelativeLayout
@@ -74,7 +75,11 @@
android:background="@drawable/bg_btn_login_selected"
android:text="查询"
android:textColor="@color/white"
android:textSize="@dimen/textSize" />
android:focusable="true"
android:focusableInTouchMode="true"
android:textSize="@dimen/textSize" >
<requestFocus/>
</Button>
</LinearLayout>
</RelativeLayout>



+ 1
- 2
app/src/main/res/layout/datatab/layout/pfsx_item.xml View File

@@ -18,10 +18,9 @@
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/dp_10"
android:text="回锅"
android:text="回锅11111111111111111111111111"
android:gravity="center"
android:textSize="18sp" />
</RelativeLayout>


+ 1
- 1
app/src/main/res/layout/datatab/layout/sx_item.xml View File

@@ -113,7 +113,7 @@
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
</LinearLayout>


+ 1
- 0
app/src/main/res/layout/fragment_jcsjgl_sxgl.xml View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/root"
tools:context=".modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment">
<LinearLayout
android:layout_width="match_parent"


+ 1
- 0
app/src/main/res/layout/fragment_jcsjgl_wl.xml View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/root"
tools:context=".modules.home.fragment.from.fragment.Jcsjgl_wl_fragment">
<LinearLayout
android:layout_width="match_parent"


+ 2
- 0
app/src/main/res/layout/item/layout/dialog_add_good.xml View File

@@ -5,6 +5,7 @@
android:layout_height="match_parent"
android:background="@color/dialogbj"
android:focusable="true"
android:id="@+id/root"
android:clickable="true">

<RelativeLayout
@@ -98,6 +99,7 @@
android:hint="请输入"
android:inputType="text"
android:maxLines="1"
android:maxLength="30"
android:padding="3dp"
android:textSize="18dp" />
</LinearLayout>


+ 1
- 0
app/src/main/res/layout/item/layout/dialog_add_pf.xml View File

@@ -99,6 +99,7 @@
android:background="@drawable/input_bj"
android:hint="请输入"
android:inputType="text"
android:maxLength="30"
android:maxLines="1"
android:padding="3dp"
android:textSize="18dp" />


+ 6
- 1
app/src/main/res/layout/item/layout/dialog_add_pf_home.xml View File

@@ -32,6 +32,11 @@
android:layout_height="wrap_content"
android:text="星星知多少奶茶"
android:textSize="20dp"
android:maxLines="2"
android:singleLine="true"
android:ellipsize="middle"
android:paddingRight="43dp"
android:paddingLeft="43dp"
android:layout_marginTop="@dimen/dp_10"
android:layout_centerHorizontal="true">
</TextView>
@@ -138,7 +143,7 @@
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="match_parent"
android:textAlignment="center"
android:maxLength="25"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"


+ 1
- 0
app/src/main/res/layout/item/layout/item_zsx.xml View File

@@ -2,6 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="200dp"
android:id="@+id/root"
android:layout_height="150dp">

<LinearLayout


+ 9
- 4
app/src/main/res/layout/item/layout/newgood_bj.xml View File

@@ -5,7 +5,7 @@
android:layout_height="180dp"
>

<LinearLayout
<RelativeLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
@@ -26,15 +26,20 @@
android:id="@+id/Tag_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="清炒三月瓜"
android:textAlignment="center"
android:textColor="@color/gray_deep"
tools:ignore="MissingConstraints"
android:layout_above="@id/rl_btn"
android:maxLines="2"
android:textSize="20dp"/>
<RelativeLayout
android:id="@+id/rl_btn"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="5dp">
<TextView
android:id="@+id/Sc_text"
@@ -55,5 +60,5 @@
android:text="删除"/>

</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

+ 9
- 4
app/src/main/res/layout/item/layout/newmakegood.xml View File

@@ -5,7 +5,7 @@
android:layout_height="180dp">


<LinearLayout
<RelativeLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="5dp"
android:layout_marginRight="10dp"
@@ -24,19 +24,24 @@
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
>

<TextView
android:id="@+id/Tag_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
tools:text="清炒三月瓜"
android:maxLength="2"
android:ellipsize="end"
android:textColor="@color/black"
android:textSize="20sp"
tools:ignore="MissingConstraints" />
</RelativeLayout>

</LinearLayout>
</RelativeLayout>
</RelativeLayout>

Loading…
Cancel
Save