Browse Source

修改UI细节需求;属性分类提出来

调味吧台
liup 7 months ago
parent
commit
c7bdfdf502
38 changed files with 414 additions and 480 deletions
  1. +3
    -0
      app/build.gradle
  2. +11
    -14
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  3. +8
    -7
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  4. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  5. +17
    -0
      app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
  6. +0
    -2
      app/src/main/java/com/bonait/bnframework/common/linktab/RightAdapter.java
  7. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/linktab/TopItemDecoration.java
  8. +17
    -5
      app/src/main/java/com/bonait/bnframework/common/linktab/makegood/MakeGoodLeftAdapter.java
  9. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/utils/DisplayManager.java
  10. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/utils/ToastUtils.java
  11. +2
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java
  12. +0
    -10
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/AttributeSetAdapter.java
  13. +0
    -136
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/sx_adapter.java
  14. +3
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/DingDanfragment.java
  15. +20
    -20
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/GongnengFragment.java
  16. +4
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/MakeGoodFragment.java
  17. +3
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/SheZhifragment.java
  18. +56
    -118
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_sxgl_fragment.java
  19. +2
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_makegood_control.java
  20. +0
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_pf_control.java
  21. +14
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/silos_jiaoyan.java
  22. +0
    -1
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java
  23. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java
  24. +24
    -20
      app/src/main/res/layout/activity_jcsjgl.xml
  25. +8
    -4
      app/src/main/res/layout/datatab/layout/pfsx_item.xml
  26. +6
    -25
      app/src/main/res/layout/datatab/layout/sx_item.xml
  27. +6
    -6
      app/src/main/res/layout/fragment_dingdan.xml
  28. +27
    -26
      app/src/main/res/layout/fragment_gongneng.xml
  29. +34
    -22
      app/src/main/res/layout/fragment_jcsjgl_sxgl.xml
  30. +6
    -7
      app/src/main/res/layout/fragment_make_good.xml
  31. +6
    -6
      app/src/main/res/layout/fragment_she_zhi.xml
  32. +26
    -21
      app/src/main/res/layout/item/layout/dialog_add_makegood.xml
  33. +7
    -0
      app/src/main/res/layout/item/layout/item_right_lc.xml
  34. +6
    -4
      app/src/main/res/layout/item/layout/new_propety_click.xml
  35. +13
    -2
      app/src/main/res/layout/item/layout/silos_jiaoyan_item_edit.xml
  36. +2
    -2
      app/src/main/res/layout/item/layout/toast_layout.xml
  37. +1
    -0
      app/src/main/res/values/colors.xml
  38. +77
    -2
      app/src/main/res/values/styles.xml

+ 3
- 0
app/build.gradle View File

@@ -66,6 +66,9 @@ android {
outputFileName = "boluo-peiliaobatai-v${defaultConfig.versionCode}-${releaseTime()}"+"-unsigned-${variant.name}.apk"
}
}
buildFeatures {
viewBinding = true
}
}

dependencies {


+ 11
- 14
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -397,7 +397,6 @@ public class ExecuteTheRecipe {
ArrayList<ResGoodsRecipe> recipes= GoodMake.recipes;

//region 根据物料配方排序Sort步骤分组
MainInit.initToastString();
LinkedHashMap<Integer, List<ResGoodsRecipe>> rgrs = new LinkedHashMap<>();
for (int i = 0; i < recipes.size(); i++) {
if (!rgrs.containsKey(recipes.get(i).sort))
@@ -409,7 +408,6 @@ public class ExecuteTheRecipe {
int count = 0;
boolean isError = false;

MainInit.initToastString();
for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) {
WritePLC("配料完成", false,null);

@@ -452,22 +450,23 @@ public class ExecuteTheRecipe {
if(res!=null){
String name = silos.name+silos.num+"出料时间";
outValue = Unity.Scale(_val,res.inputWightMax,res.inputWightMin,res.outputTimeMax,res.outputTimeMin);
MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "写入地址:"+name+"地址值:"+outValue*100);
// MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "写入地址:"+name+"地址值:"+outValue*100);
LogUtils.d("商品制作线程 name="+name+"; outValue="+outValue);
WritePLC(name, (short) (outValue*100), null);
//減去料仓数量
int otherG=silos.silosmargin-(int)(_val);
QueryDB.UpdateYL(silos.id,otherG>=0?otherG:0);
LogUtils.d("商品制作线程 _val="+_val+" ;otherG = "+otherG+";silos.silosmargin="+silos.silosmargin);
}else{
MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, message + "下发失败!物料没有对应的校准值!");
Thread.sleep(2000);
IsComplete[0] = true;
isError = true;
}
//減去料仓数量
int otherG=silos.silosmargin-(int)(_val);
QueryDB.UpdateYL(silos.id,otherG>=0?otherG:0);
LogUtils.d("商品制作线程 _val="+_val+" ;otherG = "+otherG+";silos.silosmargin="+silos.silosmargin);
}
}
MessageLog.ShowInfo(RecipesNames + "下发成功!");
// MessageLog.ShowInfo(RecipesNames + "下发成功!");
//endregion


OnChargeMixtureCompleteNotify = new IRun() {
@Override
public void Run() {
@@ -482,7 +481,7 @@ public class ExecuteTheRecipe {
WritePLC("配料启动",true,new IWriteCallBack() {
@Override
public void onSuccess() {
MessageLog.ShowInfo("[" + GoodMake.good.name + "]步骤【" + key + "】启动配料成功!");
// MessageLog.ShowInfo("[" + GoodMake.good.name + "]步骤【" + key + "】启动配料成功!");
}

@Override
@@ -503,7 +502,7 @@ public class ExecuteTheRecipe {
//更新缓存商品制作列表状态
count += goodsRecipes.size();
DataBus.getInstance().UpdateGoodsMake(GoodMake.subOrder.id, "步骤【" + key + "】:" + RecipesNames + "-配料完成!", count, key, true);
MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "[" + GoodMake.good.name + "]步骤【" + key + "】下发" + RecipesNames + "执行完成!");
// MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "[" + GoodMake.good.name + "]步骤【" + key + "】下发" + RecipesNames + "执行完成!");
}

DataBus.getInstance().DeleteGoodsMake(GoodMake.subOrder.id,isError);
@@ -516,7 +515,6 @@ public class ExecuteTheRecipe {

GoodMake=null;
IsMakeGood=false;
MainInit.initToastString();
OnChargeMixtureCompleteNotify = null;
}

@@ -524,7 +522,6 @@ public class ExecuteTheRecipe {
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
IsMakeGood=false;
MainInit.initToastString();
}
Thread.sleep(500);
}


+ 8
- 7
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -201,17 +201,17 @@ public class MainInit {
// DBHelper.getInstance(this).DeleteCreateTables(BPA_PLCADDRESS.class,null);
}

public static StringBuffer toastString = new StringBuffer();
// public static StringBuffer toastString = new StringBuffer();

public static void initToastString(){
toastString.setLength(0);
}
// public static void initToastString(){
// toastString.setLength(0);
// }

/**
* 初始化消息日志接收打印
*/
public static void InitMsgLog(){
initToastString();
// initToastString();
MessageLog.MsgNotify = new IMessageLogNotify() {
@Override
public void ErrorMsg(String msg) {
@@ -243,8 +243,9 @@ public class MainInit {
if(msg.contains("登录")){
ToastUtils.info(msg, Toast.LENGTH_SHORT);
}else {
toastString.append(msg).append("|");
ToastUtils.info(toastString.subSequence(0,toastString.length()-1).toString(), Toast.LENGTH_LONG);
// toastString.append(msg).append("|");
// ToastUtils.info(toastString.subSequence(0,toastString.length()-1).toString(), Toast.LENGTH_LONG);
ToastUtils.info(msg, Toast.LENGTH_SHORT);
}
switch (type.toString())
{


+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java View File

@@ -46,7 +46,7 @@ import java.util.concurrent.ConcurrentHashMap;
* 配置文件
*/
public class ConfigName {
public static final boolean TEST = false;
public static final boolean TEST = true;
public static final boolean TEST2 = false;
//region 单例模式
private static ConfigName mInstance; //实例变量设置私有,防止直接通过类名访问


+ 17
- 0
app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java View File

@@ -1187,6 +1187,23 @@ public class QueryDB {
return data;
}

/**
* 获取分类下的父属性
*
* @return
*/
public static ArrayList<BPA_GOODPROPERTY> GetGoodsPropertyByTypeId(String GoodsTypeId) {
String orderby = Desc_Sort_Up + ',' +Desc_Time_Up;//先按排序 创建时间倒序
String where = "isDelete=? and GoodsTypeId=?";
String[] args = new String[]{"0", GoodsTypeId};
ArrayList<BPA_GOODPROPERTY> data = new ArrayList<>();
ArrayList<Object> obj = Get(BPA_GOODPROPERTY.class, where, args, orderby);
for (Object k : obj) {
data.add((BPA_GOODPROPERTY) k);
}
return data;
}

/**
* 判断是否存在
*


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

@@ -10,8 +10,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.liaochang_adapter;
import com.bonait.bnframework.modules.home.adapter.sx_adapter;
import com.bonait.bnframework.modules.home.adapter.zsx_adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;



+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/linktab/TopItemDecoration.java View File

@@ -35,7 +35,7 @@ public class TopItemDecoration extends RecyclerView.ItemDecoration{
{
mContext=_context;
mPaint.setColor(ContextCompat.getColor(mContext, R.color.main_background));
textPaint.setColor(ContextCompat.getColor(mContext, R.color.black));
textPaint.setColor(ContextCompat.getColor(mContext, R.color.app_color_blue));
textPaint.setTextSize(25f);
typeListener=type;
}


+ 17
- 5
app/src/main/java/com/bonait/bnframework/common/linktab/makegood/MakeGoodLeftAdapter.java View File

@@ -40,11 +40,9 @@ public class MakeGoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHold
holder.setText(R.id.tv_type, type.name);
int index_d = Fdata.indexOf(item);
if (item.isChoose) {
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.main_background));
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.app_color_blue));
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.app_color_blue7f));
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.white));
holder.setVisible(R.id.tv_image, true);


} else {
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.white));
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.tab_text_normal));
@@ -56,7 +54,12 @@ public class MakeGoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHold
@Override
public void onClick(View view) {
setChoose(index_d);
Manager.scrollToPositionWithOffset(index_d, 0);
if(callBack!=null){
callBack.onClickItem(view,type);
}
if(Manager!=null){
Manager.scrollToPositionWithOffset(index_d, 0);
}
}
});
}
@@ -84,5 +87,14 @@ public class MakeGoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHold
Fdata.get(position).isChoose = true;
notifyDataSetChanged();
}
private ClickCallBack callBack;

public void setCallBack(ClickCallBack callBack) {
this.callBack = callBack;
}

public interface ClickCallBack{
void onClickItem(View v,BPA_GOODSTYPE type);
}
}


+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/utils/DisplayManager.java View File

@@ -330,7 +330,7 @@ public class DisplayManager
if (null != view)
{
// scaleView(view, mfDeviceScaleRate);
scaleView(view, (float) mfWidthScaleRate);
scaleView(view, (float) mfHeightScaleRate);
}
else
{


+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/utils/ToastUtils.java View File

@@ -278,7 +278,7 @@ public class ToastUtils {

currentToast.setView(toastLayout);
currentToast.setDuration(duration);
currentToast.setGravity(Gravity.TOP,0,100);
currentToast.setGravity(Gravity.BOTTOM|Gravity.END,0,60);
// currentToast.setGravity(Gravity.LEFT | Gravity.TOP, 0, 0);//左上角
// currentToast.setGravity(Gravity.RIGHT | Gravity.TOP, 0, 0);//右上角
// currentToast.setGravity(Gravity.LEFT | Gravity.BOTTOM, 0, 0);//左下角


+ 2
- 0
app/src/main/java/com/bonait/bnframework/modules/home/activity/BottomNavigationMainActivity.java View File

@@ -18,6 +18,7 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.RelativeLayout;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.ExecuteTheRecipe;
@@ -199,6 +200,7 @@ public class BottomNavigationMainActivity extends BaseActivity{
ThreadManager.Get().StartLong("PLC断线重连线程", true, new IThread() {
@Override
public void Run() throws InterruptedException {
LogUtils.d("ReconnectModbus PLC断线重连线程");
try {
if (ConfigName.getInstance().PlcIsConnect) {
//ping 不通


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

@@ -75,7 +75,6 @@ public class AttributeSetAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
myLCViewHolder1.name.setText(bpa_goodproperty.name);
myLCViewHolder1.sort.setText(bpa_goodproperty.sort+"");

myLCViewHolder1.typeS.setText(GetName(bpa_goodproperty.GoodsTypeId));
myLCViewHolder1.name.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -90,13 +89,6 @@ public class AttributeSetAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
}
});

myLCViewHolder1.typeS.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mListener!=null) mListener.clickListenerNew(view,position,bpa_goodproperty);
}
});

myLCViewHolder1.button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -144,7 +136,6 @@ public class AttributeSetAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
LinearLayout root ;
TextView name ;//属性名称
TextView sort ;//排序
TextView typeS ;//排序

ImageView button ;//删除
ImageView button_add ;//增加 子属性
@@ -155,7 +146,6 @@ public class AttributeSetAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
root = view.findViewById(R.id.root);
name = view.findViewById(R.id.name);//属性名称
sort = view.findViewById(R.id.sort);//排序
typeS = view.findViewById(R.id.typeS);//排序

button = view.findViewById(R.id.button_item);//删除
button_add = view.findViewById(R.id.button_add);//增加 子属性


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

@@ -1,136 +0,0 @@
package com.bonait.bnframework.modules.home.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

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_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;
import java.util.List;

public class sx_adapter extends ArrayAdapter<BPA_GOODPROPERTY> {
/**
* 内部点击事件
*/
private MyClickListener mListener;
private List<BPA_GOODPROPERTY> datas;

private ArrayList<BPA_GOODSTYPE> goodstypes;
int resource1;
public Context contextA;
public sx_adapter(@NonNull Context context, int resource, @NonNull List<BPA_GOODPROPERTY> objects, ArrayList<BPA_GOODSTYPE> bpa_goodstypes, MyClickListener listener) {
super(context, resource, objects);
mListener = listener;
contextA=context;
datas=objects;
goodstypes=bpa_goodstypes;
this.resource1=resource;
}
//每个子项被滚动到屏幕内的时候会被调用
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
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);//排序
TextView typeS = view.findViewById(R.id.typeS);//排序

ImageView button = view.findViewById(R.id.button_item);//删除
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);
recyclerView.setLayoutManager(layout);
zsx_adapter zsxadapter = new zsx_adapter(position,contextA,zsx,mListener);
recyclerView.setAdapter(zsxadapter);



// 设置要显示的图片和文字
name.setText(bpa_goodproperty.name);
sort.setText(bpa_goodproperty.sort+"");

typeS.setText(GetName(bpa_goodproperty.GoodsTypeId));
name.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mListener!=null) mListener.clickListenerNew(view,position,bpa_goodproperty);
}
});

sort.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mListener!=null) mListener.clickListenerNew(view,position,bpa_goodproperty);
}
});

typeS.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mListener!=null) mListener.clickListenerNew(view,position,bpa_goodproperty);
}
});

button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mListener!=null) mListener.clickListenerNew(view,position,bpa_goodproperty);
}
});

button_add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mListener!=null) mListener.clickListenerNew(view,position,bpa_goodproperty);
}
});
return view;
}

public String GetName(String ids)
{
String name="";
if(ids==null || ids.isEmpty())
{
return "";
}
for (BPA_GOODSTYPE item:goodstypes)
{
if(ids.contains(item.id))
{
name+=item.name+",";
}
}

if(!name.isEmpty())
{
name=name.substring(0, name.length() - 1);
}

return name;
}
}

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

@@ -28,8 +28,8 @@ import butterknife.OnClick;
public class DingDanfragment extends BaseFragment {


@BindView(R.id.topbar)
QMUITopBarLayout mTopBar;//顶部标题
// @BindView(R.id.topbar)
// QMUITopBarLayout mTopBar;//顶部标题
private Context context;

public DingDanfragment() {
@@ -54,7 +54,7 @@ public class DingDanfragment extends BaseFragment {
*/
private void initTopBar() {
// mTopBar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.app_color_theme_4));
mTopBar.setTitle("订单管理");
// mTopBar.setTitle("订单管理");
}

@OnClick({R.id.ddgl,R.id.xltj})


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

@@ -44,11 +44,11 @@ import butterknife.OnClick;

public class GongnengFragment extends BaseFragment {

@BindView(R.id.topbar)
QMUITopBarLayout mTopBar;//顶部标题
@BindView(R.id.btn_sync)
Button btn_Sync;
// @BindView(R.id.topbar)
// QMUITopBarLayout mTopBar;//顶部标题
//
// @BindView(R.id.btn_sync)
// Button btn_Sync;

private Context context;

@@ -73,21 +73,21 @@ public class GongnengFragment extends BaseFragment {
* 初始化TopBar
*/
private void initTopBar() {
mTopBar.setTitle("功能菜单");
btn_Sync.setOnClickListener(v->{
DialogManager.showWarn(context,"同步云端商品会参数本地所有配方数据,\r\n请问是否继续?", AlertDialogButton.YesNo,(s)->{
if(s){
WaitDialog.getInstance().Show("同步数据","请耐心等待,不要关闭应用",getContext(),getActivity());
ThreadManager.get().execute(new Runnable() {
@Override
public void run() {
APIService.MainInit();
EventBus.getDefault().post(new SynchronousCloudDataEvent());
}
});
}
});
});
// mTopBar.setTitle("功能菜单");
// btn_Sync.setOnClickListener(v->{
// DialogManager.showWarn(context,"同步云端商品会参数本地所有配方数据,\r\n请问是否继续?", AlertDialogButton.YesNo,(s)->{
// if(s){
// WaitDialog.getInstance().Show("同步数据","请耐心等待,不要关闭应用",getContext(),getActivity());
// ThreadManager.get().execute(new Runnable() {
// @Override
// public void run() {
// APIService.MainInit();
// EventBus.getDefault().post(new SynchronousCloudDataEvent());
// }
// });
// }
// });
// });
}
@OnClick({R.id.jcsjgl,R.id.lcgl,R.id.yfpf,R.id.log,R.id.ssjk})
public void onViewClicked(View view) {


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

@@ -119,8 +119,8 @@ public class MakeGoodFragment extends BaseFragment {


private QMUIViewPager viewPager;
@BindView(R.id.topbar)
QMUITopBarLayout mTopBar;//顶部标题
// @BindView(R.id.topbar)
// QMUITopBarLayout mTopBar;//顶部标题

/**
* 左边分类
@@ -475,7 +475,7 @@ public class MakeGoodFragment extends BaseFragment {
*/
private void initTopBar() {

mTopBar.setTitle("智慧菠萝点餐系统" + ConfigName.getInstance().Version);
// mTopBar.setTitle("智慧菠萝点餐系统" + ConfigName.getInstance().Version);

// mTopBar.addLeftImageButton(R.mipmap.silos1, 1).setOnClickListener(new View.OnClickListener() {
// @Override
@@ -720,7 +720,7 @@ public class MakeGoodFragment extends BaseFragment {
if(mHandler!=null){
try {
mHandler.sendEmptyMessage(0);
if(time>=60) //12秒执行一次
if(time>=60) //60秒执行一次
{
ArrayList<lcMode> lcModes = DataBus.getInstance().ResGetLc();
String title="";


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

@@ -26,8 +26,8 @@ import butterknife.OnClick;
public class SheZhifragment extends BaseFragment {


@BindView(R.id.topbar)
QMUITopBarLayout mTopBar;//顶部标题
// @BindView(R.id.topbar)
// QMUITopBarLayout mTopBar;//顶部标题
private Context context;

public SheZhifragment() {
@@ -51,7 +51,7 @@ public class SheZhifragment extends BaseFragment {
* 初始化TopBar
*/
private void initTopBar() {
mTopBar.setTitle("订单管理");
// mTopBar.setTitle("订单管理");
}

@OnClick({R.id.xtcs,R.id.imagegl,R.id.shebeixinxi


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

@@ -2,6 +2,7 @@ package com.bonait.bnframework.modules.home.fragment.from.fragment;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.content.Context;
@@ -11,7 +12,9 @@ import android.text.InputType;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment;
@@ -19,21 +22,24 @@ import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
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.helper.I.MyClickListener;
import com.bonait.bnframework.common.linktab.LinkMode;
import com.bonait.bnframework.common.linktab.makegood.MakeGoodLeftAdapter;
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.AttributeSetAdapter;
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;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

@@ -46,7 +52,14 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
@BindView(R.id.datatab_sx)
RecyclerView datatab_sx;
@BindView(R.id.root)
QMUIWindowInsetLayout root;
LinearLayout root;
@BindView(R.id.recyclerView)
RecyclerView recyclerView;
@BindView(R.id.ll_content)
LinearLayout llContent;
@BindView(R.id.tip)
TextView textTip;

/**
* 属性数据
*/
@@ -54,6 +67,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis

ArrayList<BPA_GOODSTYPE> bpa_goodstypes=new ArrayList<>();
ConcurrentHashMap<String,String> itemstypes=new ConcurrentHashMap<>();
private String goodsTypeId = "";

private Context context;
@Override
@@ -85,8 +99,46 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
itemstypes.put(item.name,item.id);
}
}
initLeftView();
}

private List<LinkMode> leftData = new ArrayList<>();
private void initLeftView(){
leftData.clear();
int i = 0;
for (BPA_GOODSTYPE item : QueryDB.GetGoodsTypeALL()) {
ArrayList<BPA_GOODS> goodsm = QueryDB.GetGoodsTypeId(item.id);
leftData.add(new LinkMode(item, Arrays.asList(goodsm.toArray()), i == 0 ? true : false));
i++;
}
MakeGoodLeftAdapter leftAdapter = new MakeGoodLeftAdapter(R.layout.item_left_makegood, leftData, getResources(), null);
leftAdapter.setCallBack(new MakeGoodLeftAdapter.ClickCallBack() {
@Override
public void onClickItem(View v, BPA_GOODSTYPE type) {
goodsTypeId = type.id;
Initdata_sx();
}
});
recyclerView.setAdapter(leftAdapter);
if(leftData.isEmpty()){
llContent.setVisibility(View.GONE);
textTip.setVisibility(View.VISIBLE);
}else {
llContent.setVisibility(View.VISIBLE);
textTip.setVisibility(View.GONE);
goodsTypeId = ((BPA_GOODSTYPE) leftData.get(0).type).id;
Initdata_sx();
}
}

Initdata_sx(0);
/**
* 初始化数据加载
*/
public void Initdata_sx() {
bpa_goodproperties = QueryDB.GetGoodsPropertyByTypeId(goodsTypeId);
AttributeSetAdapter adapter = new AttributeSetAdapter(context, bpa_goodproperties, bpa_goodstypes,listener);
datatab_sx.setAdapter(adapter);
adapter.notifyDataSetChanged();
}

@OnClick({R.id.add_sx})
@@ -118,6 +170,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
bpa_goodproperty.foreignKeyRe = "";
bpa_goodproperty.parentid = "0";
bpa_goodproperty.sort=0;
bpa_goodproperty.GoodsTypeId=goodsTypeId;
bpa_goodproperty.deviceID = ConfigName.getInstance().DeviceId;
bpa_goodproperty.userID = ConfigName.getInstance().user.userID;
QueryDB.AddGoodsProperty(bpa_goodproperty);
@@ -225,72 +278,6 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
})
.show();
break;
case R.id.typeS:
ArrayList<Integer> keys=new ArrayList<Integer>();
String[] items = itemstypes.keySet().toArray(new String[itemstypes.keySet().size()]);



if(((BPA_GOODPROPERTY) data).GoodsTypeId!=null && !((BPA_GOODPROPERTY) data).GoodsTypeId.isEmpty())
{
for (int i=0;i<items.length;i++)
{
if(((BPA_GOODPROPERTY) data).GoodsTypeId.contains(itemstypes.get(items[i])))
{
keys.add(i);
}
}
}
int []intarrs=new int[keys.size()];
for(int i=0;i<intarrs.length;i++){
intarrs[i]=keys.get(i);
}

final QMUIDialog.MultiCheckableDialogBuilder builder3 = new QMUIDialog.MultiCheckableDialogBuilder(context)
.addItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

}
})
.setCheckedItems(intarrs);
builder3.addAction("取消", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});
builder3.addAction("确定", new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
String result="";
for(int i=0;i<builder3.getCheckedItemIndexes().length;i++){
result+=""+itemstypes.get(items[builder3.getCheckedItemIndexes()[i]])+",";
}

if(result.isEmpty())
{
ToastUtils.info("必须选择一个类型!");
return;
}

if(!result.isEmpty())
{
result=result.substring(0, result.length() - 1);
}
QueryDB.UpdateGoodsPropertyType(((BPA_GOODPROPERTY) data).id, result);
BPA_GOODPROPERTY bean = (BPA_GOODPROPERTY) data;
bean.GoodsTypeId = result;
bpa_goodproperties.set(k,bean);
datatab_sx.getAdapter().notifyItemChanged(k);
// Initdata_sx(k);
KeyboardUtil.hideKeyboard(v);
dialog.dismiss();
}
});
builder3.show();
break;
case R.id.button_item://删除按钮
String title = "温馨提示!";
String message = "客官确定要删除属性【"+((BPA_GOODPROPERTY) data).name+"】吗?";
@@ -331,8 +318,6 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
bpa_goodproperty.userID = ConfigName.getInstance().user.userID;
QueryDB.AddGoodsProperty(bpa_goodproperty);
ToastUtils.info("新增成功");
// Initdata_sx(k);

datatab_sx.getAdapter().notifyItemChanged(k);
KeyboardUtil.hideKeyboard(v);
break;
@@ -340,7 +325,6 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
case R.id.save_text://保存属性
QueryDB.UpdateGoodsProperty((BPA_GOODPROPERTY) data);
ToastUtils.info("保存成功");
// Initdata_sx(k);
datatab_sx.getAdapter().notifyItemChanged(k);
KeyboardUtil.hideKeyboard(v);
break;
@@ -357,7 +341,6 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
}
}
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
// Initdata_sx(k);
datatab_sx.getAdapter().notifyItemChanged(k);
ToastUtils.info("删除成功");
KeyboardUtil.hideKeyboard(v);
@@ -369,51 +352,6 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis
}
};

// /**
// * 点击事件
// *
// * @param v
// * @param data
// */
// @Override
// public void clickListener(View v, Object data) {
//
// }
//
// @Override
// public void clickListenerNew(View v, int k, Object data) {
//
// }
//region 数据加载
/**
* 初始化数据加载
*/
public void Initdata_sx(int position) {
try {

bpa_goodproperties = QueryDB.GetGoodsPropertyALL("0");
AttributeSetAdapter adapter = new AttributeSetAdapter(context, bpa_goodproperties, bpa_goodstypes,listener);
datatab_sx.setAdapter(adapter);
adapter.notifyDataSetChanged();
// datatab_sx.postDelayed(new Runnable() {
// @Override
// public void run() {
// if(position>0){
// if(position>=bpa_goodproperties.size()-1){
// datatab_sx.smoothScrollToPosition(bpa_goodproperties.size()-1);
// }else {
// datatab_sx.smoothScrollToPosition(position);
// }
// }
// }
// },500);

} catch (Exception e) {

}
}
//endregion

@Override
public void onDestroy() {
super.onDestroy();


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

@@ -30,6 +30,7 @@ import com.bonait.bnframework.common.db.res.ResGoodProperty;
import com.bonait.bnframework.common.db.res.ResGoodsRecipe;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.WrapContentLinearLayoutManager;
import com.bonait.bnframework.common.utils.DisplayManager;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.newneatril_adapter;
@@ -74,6 +75,7 @@ public class add_makegood_control extends LinearLayout{
contextMian=context;
root = LayoutInflater.from(context).inflate(R.layout.dialog_add_makegood, this);
ButterKnife.bind(this, root);
DisplayManager.scaleViewGroup(root.findViewById(R.id.root));
Init();
}



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

@@ -34,12 +34,8 @@ import com.bonait.bnframework.common.message.MessageLooper;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter;
import com.bonait.bnframework.modules.home.adapter.newmeatrilselect_adapter;
import com.bonait.bnframework.modules.home.adapter.newneatril_adapter;
import com.bonait.bnframework.modules.home.adapter.pfsx_adapter;
import com.bonait.bnframework.modules.home.adapter.sx_adapter;
import com.bonait.bnframework.modules.home.adapter.wl_adapter;
import com.bonait.bnframework.modules.home.adapter.xxpf_adapter;

import java.util.ArrayList;


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

@@ -30,6 +30,7 @@ import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_SILOS_CALIBRATE;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.IRun;
import com.bonait.bnframework.common.helper.I.IWriteCallBack;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
@@ -304,9 +305,21 @@ public class silos_jiaoyan extends LinearLayout {
* 按钮单击事件
* @param view
*/
@OnClick({R.id.btn_min_standard, R.id.btn_max_standard,R.id.btn_sim_discharge,R.id.btn_save})
@OnClick({R.id.btn_min_standard, R.id.btn_max_standard,R.id.btn_sim_discharge,R.id.btn_save,R.id.btn_clear})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.btn_clear:
ExecuteTheRecipe.WritePLC("重量清零", true, new IWriteCallBack() {
@Override
public void onSuccess() {
ToastUtils.info("清零成功!");
}
@Override
public void onFailure(String ErrorMsg) {
ToastUtils.error("清零失败!");
}
});
break;
case R.id.btn_max_standard:
case R.id.btn_min_standard:
float time = EditTextValidate(view.getId()==R.id.btn_min_standard? min_time:max_time,"请输入正确的时间");


+ 0
- 1
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java View File

@@ -214,7 +214,6 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL
BPA_USER user= QueryDB.UserLogin(userAccount,password);
if(user!=null)
{
MainInit.initToastString();
MessageLog.ShowUserMessage(UserLogEnum.登录日志,user.name+"-登录成功");
ConfigName.getInstance().user=user;
ConfigData.getInstance().SavePZ();


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java View File

@@ -41,7 +41,7 @@ public class WelcomeActivity extends BaseActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
initWelcome();
DisplayManager.setReferenceMaxWidthHeight(800, 1208);
DisplayManager.setReferenceMaxWidthHeight(1208, 800);
DisplayManager.updateDisplayInfo(this);
}



+ 24
- 20
app/src/main/res/layout/activity_jcsjgl.xml View File

@@ -8,29 +8,33 @@
android:background="@color/white"
android:fitsSystemWindows="true">

<com.qmuiteam.qmui.widget.tab.QMUITabSegment
android:id="@+id/tabs"
android:layout_marginTop="54dp"
android:layout_width="match_parent"
android:layout_height="43dp"
android:background="@drawable/qmui_list_item_bg_with_border_bottom"
android:textSize="14sp"
app:qmui_tab_selected_text_size="16sp"
app:qmui_tab_normal_text_size="14sp"
app:qmui_tab_indicator_height="2dp"
app:qmui_tab_indicator_top="false"
app:qmui_tab_has_indicator="true"
/>
<com.qmuiteam.qmui.widget.QMUIViewPager
android:id="@+id/viewpager_wl"
android:layout_marginTop="100dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_content_bg_color" />

<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color_blue"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="54dp"
android:orientation="vertical"
android:layout_height="match_parent">
<com.qmuiteam.qmui.widget.tab.QMUITabSegment
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="43dp"
android:background="@drawable/qmui_list_item_bg_with_border_bottom"
android:textSize="14sp"
app:qmui_tab_selected_text_size="16sp"
app:qmui_tab_normal_text_size="14sp"
app:qmui_tab_indicator_height="2dp"
app:qmui_tab_indicator_top="false"
app:qmui_tab_has_indicator="true"
/>
<com.qmuiteam.qmui.widget.QMUIViewPager
android:id="@+id/viewpager_wl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_content_bg_color" />
</LinearLayout>

</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 8
- 4
app/src/main/res/layout/datatab/layout/pfsx_item.xml View File

@@ -4,6 +4,9 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
android:paddingTop="15dp"
android:paddingBottom="5dp"
android:background="@drawable/input_bj"
xsi:schemaLocation="http://schemas.android.com/apk/res/android ">

<LinearLayout
@@ -18,11 +21,12 @@
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/dp_10"
android:text="回锅11111111111111111111111111"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/dp_10"
android:text="回锅"
android:paddingTop="12dp"
android:gravity="center"
android:textSize="18sp" />
android:textSize="24sp" />
</RelativeLayout>




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

@@ -18,23 +18,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">

<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">

<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="回锅肉"
android:textAlignment="center"
android:textSize="13dp"/>
</RelativeLayout>
<RelativeLayout
android:background="@drawable/border"
android:layout_width="0dp"
@@ -42,34 +25,32 @@
android:layout_weight="1">

<TextView
android:id="@+id/typeS"
android:id="@+id/sort"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:text="小类"
android:text="排序"
android:textAlignment="center"
android:textSize="13dp" />
</RelativeLayout>
<RelativeLayout
android:background="@drawable/border"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">

<TextView
android:id="@+id/sort"
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:text="排序"
android:layout_alignParentLeft="true"
android:text="回锅肉"
android:textAlignment="center"
android:textSize="13dp" />
android:textSize="13dp"/>
</RelativeLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"


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

@@ -5,10 +5,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/app_color_blue">
<!--android:layout_marginTop="?attr/qmui_topbar_height" -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/main_background">
<RelativeLayout
android:layout_width="match_parent"
@@ -93,9 +93,9 @@
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color_blue"/>
<!-- <com.qmuiteam.qmui.widget.QMUITopBarLayout-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@color/app_color_blue"/>-->
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 27
- 26
app/src/main/res/layout/fragment_gongneng.xml View File

@@ -6,10 +6,10 @@
android:layout_height="match_parent"
android:background="@color/app_color_blue">

<!--android:layout_marginTop="?attr/qmui_topbar_height" -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/main_background">

<LinearLayout
@@ -141,7 +141,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/log"
android:layout_marginLeft="5dp"
android:layout_marginLeft="10dp"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@@ -172,6 +172,7 @@
</RelativeLayout>

<RelativeLayout
android:visibility="gone"
android:id="@+id/ssjk"
android:layout_width="match_parent"
android:layout_height="0dp"
@@ -238,29 +239,29 @@
</LinearLayout>
</RelativeLayout>

<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color_blue" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="?attr/qmui_topbar_height">
<Button
android:id="@+id/btn_sync"
android:layout_width="100dp"
android:layout_height="?attr/qmui_topbar_height"
android:background="#00000000"
android:textSize="16sp"
android:layout_centerHorizontal="true"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="?attr/qmui_topbar_height"
android:src="@mipmap/yxz"
android:layout_gravity="center"
android:scaleType="fitCenter"
/>
</FrameLayout>
<!-- <com.qmuiteam.qmui.widget.QMUITopBarLayout-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@color/app_color_blue" >-->
<!-- <FrameLayout-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="?attr/qmui_topbar_height">-->
<!-- <Button-->
<!-- android:id="@+id/btn_sync"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="?attr/qmui_topbar_height"-->
<!-- android:background="#00000000"-->
<!-- android:textSize="16sp"-->
<!-- android:layout_centerHorizontal="true"/>-->
<!-- <ImageView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="?attr/qmui_topbar_height"-->
<!-- android:src="@mipmap/yxz"-->
<!-- android:layout_gravity="center"-->
<!-- android:scaleType="fitCenter"-->
<!-- />-->
<!-- </FrameLayout>-->

</com.qmuiteam.qmui.widget.QMUITopBarLayout>
<!-- </com.qmuiteam.qmui.widget.QMUITopBarLayout>-->
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 34
- 22
app/src/main/res/layout/fragment_jcsjgl_sxgl.xml View File

@@ -1,14 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/root"
android:orientation="horizontal"
tools:context=".modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="90dp"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/>

<TextView
android:layout_width="3dp"
android:layout_height="match_parent"
android:background="@color/app_color_blue7f"/>
<TextView
android:id="@+id/tip"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="36sp"
android:visibility="gone"
android:textColor="@color/color3"
android:layout_gravity="center"
android:gravity="center"
android:text="没有分类数据,请先创建分类"
/>

<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="5dp"
android:background="@color/main_background"
android:orientation="vertical">

@@ -18,7 +45,7 @@
android:layout_height="wrap_content"
android:background="@color/qmui_config_color_white"
android:orientation="vertical"
android:paddingLeft="@dimen/dp_10"
android:paddingLeft="5dp"
android:paddingTop="@dimen/dp_10"
android:paddingRight="@dimen/dp_10">

@@ -27,7 +54,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp">


@@ -43,7 +69,7 @@
<Button
android:id="@+id/add_sx"
android:layout_width="100dp"
android:layout_height="26dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginLeft="@dimen/dp_10"
@@ -80,7 +106,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -91,26 +116,12 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="属性名称"
android:text="排序"
android:textAlignment="center"
android:textStyle="bold"
android:textColor="@color/white"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">

<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="商品小类"
android:textAlignment="center"
android:textStyle="bold"
android:textColor="@color/white"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -121,11 +132,12 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="排序"
android:text="属性名称"
android:textAlignment="center"
android:textStyle="bold"
android:textColor="@color/white"/>
</RelativeLayout>

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -158,4 +170,4 @@
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>
</LinearLayout>

+ 6
- 7
app/src/main/res/layout/fragment_make_good.xml View File

@@ -6,11 +6,10 @@
android:layout_height="match_parent"
android:background="@color/app_color_blue">

<!--android:layout_marginTop="?attr/qmui_topbar_height" -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/main_background">
<LinearLayout
android:layout_width="match_parent"
@@ -182,11 +181,11 @@

</LinearLayout>
</RelativeLayout>
<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color_blue" />
<!-- <com.qmuiteam.qmui.widget.QMUITopBarLayout-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@color/app_color_blue" />-->


</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

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

@@ -5,10 +5,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/app_color_blue">
<!--android:layout_marginTop="?attr/qmui_topbar_height" -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/qmui_topbar_height"
android:background="@color/main_background">
<RelativeLayout
android:layout_width="match_parent"
@@ -311,9 +311,9 @@
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color_blue" />
<!-- <com.qmuiteam.qmui.widget.QMUITopBarLayout-->
<!-- android:id="@+id/topbar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="@color/app_color_blue" />-->
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 26
- 21
app/src/main/res/layout/item/layout/dialog_add_makegood.xml View File

@@ -3,22 +3,23 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/root"
android:background="@color/dialogbj">

<RelativeLayout
android:layout_centerInParent="true"
android:layout_margin="50dp"
android:layout_width="500dp"
android:layout_width="900dp"
android:layout_height="700dp"
android:background="@drawable/common_bg_with_radius_and_border">

<Button
android:id="@+id/close_from_good"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:background="@mipmap/close_image"
android:textSize="14dp"
@@ -29,25 +30,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="星星知多少奶茶"
android:textSize="20dp"
android:paddingLeft="43dp"
android:textSize="32sp"
android:paddingLeft="70dp"
android:gravity="center"
android:layout_centerHorizontal="true"
android:maxLines="2"
android:paddingRight="43dp"
android:layout_marginLeft="30dp"
android:paddingRight="70dp"
android:layout_marginTop="@dimen/dp_10">
</TextView>

<RelativeLayout
android:layout_marginTop="46dp"
android:layout_marginTop="50dp"
android:layout_marginBottom="50dp"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -65,6 +65,8 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"
android:background="@color/color3" />

<LinearLayout
@@ -86,9 +88,11 @@
</LinearLayout>

<LinearLayout
android:layout_marginBottom="40dp"
android:layout_marginBottom="50dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="end"
android:orientation="horizontal">
<TextView
android:layout_marginLeft="20dp"
@@ -99,24 +103,25 @@

<TextView
android:id="@+id/chubeiliang"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_10"
android:paddingEnd="@dimen/dp_10"
android:fontFamily="cursive"
android:text="21"
android:textAlignment="center"
android:textColor="@color/app_color_blue"
android:textSize="50dp"
android:textSize="28sp"
android:textStyle="bold" />

<TextView
android:layout_width="100dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="cursive"
android:text="单"
android:textAlignment="viewStart"
android:textColor="@color/app_color_blue"
android:textSize="30dp"
android:textSize="28sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
@@ -125,15 +130,15 @@
<Button
android:layout_alignParentBottom="true"
android:id="@+id/quzhizuo"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginStart="100dp"
android:layout_marginEnd="100dp"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/bg_btn_login_selected"
android:text="去制作"
android:textColor="@color/white"
android:textSize="18sp"/>
android:textSize="32sp"/>
</RelativeLayout>
</RelativeLayout>

+ 7
- 0
app/src/main/res/layout/item/layout/item_right_lc.xml View File

@@ -13,4 +13,11 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

<TextView
android:layout_marginTop="7dp"
android:layout_width="match_parent"
android:layout_height="3dp"
android:background="@color/app_color_blue7f"
/>
</LinearLayout>

+ 6
- 4
app/src/main/res/layout/item/layout/new_propety_click.xml View File

@@ -3,15 +3,17 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:layout_marginLeft="5dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginBottom="10dp"
android:id="@+id/button_select"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_height="60dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="糖水"
android:background="@drawable/button2"
android:textColor="@color/white"
android:textSize="19dp">
android:textSize="24dp">
</Button>

</RelativeLayout>

+ 13
- 2
app/src/main/res/layout/item/layout/silos_jiaoyan_item_edit.xml View File

@@ -17,7 +17,7 @@

<LinearLayout
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

@@ -39,10 +39,21 @@
android:id="@+id/current_weight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="实际出料重量:"
tools:text="100g"
android:textSize="20sp"/>

<Button
android:id="@+id/btn_clear"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn_login_selected"
android:text="清零"
android:layout_marginLeft="20dp"
android:textColor="@color/white"
android:textSize="20sp"/>
</LinearLayout>


<Button
android:id="@+id/close_from"
android:layout_width="32dp"


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

@@ -15,8 +15,8 @@

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toast_text"
android:textSize="32sp"
tools:text="1信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n信息信息信息信息信息信息信息信息\n5信息信息信息信息信息信息信息信息\n"
android:textSize="24sp"
tools:text="1信息信息信息信息信息信息信息信息息信息信息息信息信息\n5信息信息信息信息信息信息信"
android:ellipsize="start"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />


+ 1
- 0
app/src/main/res/values/colors.xml View File

@@ -33,6 +33,7 @@
<!-- <color name="app_color_blue">#fcc702</color>-->
<color name="blue_primary_dark">#00A8E1</color>
<color name="app_color_blue">#0088FF</color>
<color name="app_color_blue7f">#7f0088FF</color>
<!-- <color name="app_color_blue">#00A8E1</color>-->

<!-- <color name="blue_primary_dark">#0f70f1</color>-->


+ 77
- 2
app/src/main/res/values/styles.xml View File

@@ -35,8 +35,83 @@
<item name="app_content_bg_color">@color/qmui_config_color_white</item>


<item name="qmui_dialog_inset_hor">64dp</item>
<item name="qmui_dialog_title_style">@style/DialogTheme2TitleStyle</item>
<item name="qmui_dialog_action_container_style">@style/DialogTheme2ActionContainerStyle
</item>
<item name="qmui_dialog_action_style">@style/DialogTheme2ActionStyle</item>
<item name="qmui_dialog_message_content_style">@style/DialogTheme2MessageContentStyle</item>
<item name="qmui_dialog_menu_container_style">@style/DialogTheme2MenuContainerStyle</item>
<item name="qmui_dialog_menu_item_style">@style/DialogTheme2MenuItemStyle</item>
<item name="qmui_dialog_max_width">700dp</item>
<item name="qmui_dialog_min_width">550dp</item>
<item name="qmui_dialog_edit_content_style">@style/DialogTheme2ContentStyle</item>
<!-- <item name="android:windowAnimationStyle">@style/activityanim</item>-->

</style>
<!-- <style name="activityanim" parent="@android:style/Animation">-->
<!-- <item name="android:activityOpenEnterAnimation">@anim/slide_right_in</item>-->
<!-- <item name="android:activityOpenExitAnimation">@anim/slide_left_out</item>-->
<!-- <item name="android:activityCloseEnterAnimation">@anim/slide_left_in</item>-->
<!-- <item name="android:activityCloseExitAnimation">@anim/slide_right_out</item>-->
<!-- </style>-->

<style name="DialogTheme2TitleStyle" parent="QMUI.Dialog.Title">
<item name="android:textColor">?attr/qmui_config_color_gray_1</item>
<item name="android:textSize">26sp</item>
<item name="android:gravity">center</item>
<item name="android:paddingTop">26dp</item>
<item name="android:singleLine">false</item>
<item name="android:lineSpacingExtra">3dp</item>
</style>
<style name="DialogTheme2ActionContainerStyle">
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:paddingTop">0dp</item>
<item name="android:paddingBottom">0dp</item>
<item name="qmui_dialog_action_container_justify_content">stretch</item>
<item name="qmui_dialog_action_height">56dp</item>
<item name="qmui_dialog_action_space">8dp</item>
<item name="qmui_topDividerColor">?attr/qmui_skin_support_color_separator</item>
<item name="qmui_topDividerHeight">1px</item>
</style>
<style name="DialogTheme2ActionStyle">
<item name="android:textColor">?attr/qmui_config_color_blue</item>
<item name="android:textSize">26sp</item>
<item name="android:gravity">center</item>
<item name="android:minWidth">64dp</item>
<item name="android:background">@null</item>
<item name="qmui_dialog_action_button_padding_horizontal">12dp</item>
<item name="qmui_dialog_action_icon_space">6dp</item>
<item name="qmui_dialog_positive_action_text_color">?attr/qmui_config_color_blue</item>
<item name="qmui_dialog_negative_action_text_color">?attr/qmui_config_color_red</item>
</style>
<style name="DialogTheme2MenuItemStyle" parent="@style/QMUI.Dialog.MenuItem">
<item name="android:textSize">26sp</item>
<item name="android:textColor">?attr/qmui_config_color_gray_1</item>
<item name="android:paddingLeft">30dp</item>
<item name="android:paddingRight">30dp</item>
</style>

<style name="DialogTheme2MenuContainerStyle" parent="@style/QMUI.Dialog.MenuContainer">
<item name="qmui_dialog_menu_item_height">60dp</item>
<item name="qmui_dialog_menu_container_padding_top_when_title_exist">23dp</item>
<item name="qmui_dialog_menu_container_padding_bottom_when_action_exist">24dp</item>
</style>

<style name="DialogTheme2ContentStyle" parent="@style/QMUI.Dialog.EditContent">
<item name="android:textSize">26sp</item>
<item name="android:textColor">@color/black</item>
</style>

<style name="DialogTheme2MessageContentStyle" parent="QMUI.Dialog.MessageContent">
<item name="android:textColor">?attr/qmui_config_color_gray_4</item>
<item name="android:textSize">26sp</item>
<item name="android:gravity">center</item>
<item name="android:paddingTop">13dp</item>
<item name="android:paddingBottom">27dp</item>
<item name="android:lineSpacingExtra">5dp</item>
<item name="qmui_paddingTopWhenNotTitle">24dp</item>
</style>

<style name="ProgressBar" parent="@android:style/Widget.ProgressBar.Horizontal">
@@ -64,13 +139,13 @@

<style name="QDtextAppearanceListItem">
<item name="android:textColor">?attr/qmui_config_color_black</item>
<item name="android:textSize">18sp</item>
<item name="android:textSize">24sp</item>

</style>

<style name="QDTextAppearanceListItemSmall">
<item name="android:textColor">?attr/qmui_config_color_gray_4</item>
<item name="android:textSize">16sp</item>
<item name="android:textSize">24sp</item>

</style>



Loading…
Cancel
Save