Parcourir la source

gengx

味魔方Android
fyf il y a 1 an
Parent
révision
f2a76d74e2
27 fichiers modifiés avec 671 ajouts et 122 suppressions
  1. +0
    -12
      app/src/main/java/com/bonait/bnframework/business/address/PlcAddress.java
  2. +2
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java
  3. +29
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/liaochang_adapter.java
  4. +3
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/sx_adapter.java
  5. +3
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/wl_adapter.java
  6. +41
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SilosActivity.java
  7. +29
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_sxgl_fragment.java
  8. +12
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_wl_fragment.java
  9. +168
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_ck.java
  10. +13
    -0
      app/src/main/res/drawable/border.xml
  11. +1
    -1
      app/src/main/res/layout/activity_goodpeifang.xml
  12. +31
    -8
      app/src/main/res/layout/activity_silos.xml
  13. +26
    -5
      app/src/main/res/layout/datatab/layout/liaochang_item.xml
  14. +27
    -26
      app/src/main/res/layout/datatab/layout/sx_item.xml
  15. +28
    -23
      app/src/main/res/layout/datatab/layout/wl_item.xml
  16. +17
    -12
      app/src/main/res/layout/fragment_jcsjgl_sxgl.xml
  17. +15
    -8
      app/src/main/res/layout/fragment_jcsjgl_wl.xml
  18. +203
    -0
      app/src/main/res/layout/item/layout/dialog_add_silos_ck.xml
  19. +21
    -13
      app/src/main/res/layout/item/layout/item_left_lc.xml
  20. +1
    -1
      app/src/main/res/layout/item/layout/item_zsx.xml
  21. BIN
     
  22. BIN
     
  23. BIN
     
  24. BIN
     
  25. BIN
     
  26. BIN
     
  27. +1
    -0
      app/src/main/res/values/colors.xml

+ 0
- 12
app/src/main/java/com/bonait/bnframework/business/address/PlcAddress.java Voir le fichier

@@ -1,12 +0,0 @@
package com.bonait.bnframework.business.address;

/**
* PLC地址管理
*/
public interface PlcAddress {

//region 火力电机
String HuoLi="M30.0";

//endregion
}

+ 2
- 0
app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java Voir le fichier

@@ -30,4 +30,6 @@ public interface MessageName {

String ClickProperty="ClickProperty";//点击属性

String ClickSilos="ClickSilos";//点击料仓

}

+ 29
- 2
app/src/main/java/com/bonait/bnframework/modules/home/adapter/liaochang_adapter.java Voir le fichier

@@ -18,16 +18,20 @@ import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

@@ -63,17 +67,29 @@ public class liaochang_adapter extends RecyclerView.Adapter<RecyclerView.ViewHol

myViewHolder.xuhao.setText(lcMode.num+"");
myViewHolder.name.setText(lcMode.materialName.isEmpty()?"未设置":(lcMode.materialName+""));

if(lcMode.materialName.isEmpty() || lcMode.materialName.equals("未设置"))
{
myViewHolder.wuliaoimage.setImageResource(R.mipmap.liaochang);
myViewHolder.wuliaoimage.setImageResource(R.mipmap.liaochang_by);
myViewHolder.baifenbi.setText("");
}else
{
myViewHolder.wuliaoimage.setImageResource(R.mipmap.liaochang_select);
if(lcMode.siloszl<=lcMode.silosmargin || lcMode.siloszl==0)
{
myViewHolder.wuliaoimage.setImageResource(R.mipmap.liaochang_yc);
}else
{
myViewHolder.wuliaoimage.setImageResource(R.mipmap.liaochang_zc);
}
myViewHolder.baifenbi.setText(get(lcMode.silosmargin,lcMode.siloszl));
}

myViewHolder.wuliaoimage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//MessageManager.getInstance().sendMessage(MessageName.ClickSilos,lcMode);


List<String> names = new ArrayList<>();
int index = 0;
int count = 0;
@@ -123,6 +139,14 @@ public class liaochang_adapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
}

public static String get(int up, int down) {
if (down == 0) {
return "0%";
}
double value = new BigDecimal((float) up / down).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
return new DecimalFormat("#%").format(value);
}

private Activity findActivity(@NonNull Context context) {
if (context instanceof Activity) {
return (Activity) context;
@@ -163,11 +187,14 @@ public class liaochang_adapter extends RecyclerView.Adapter<RecyclerView.ViewHol
TextView xuhao;
TextView name;
ImageView wuliaoimage;

TextView baifenbi;
public MyLCViewHolder1(View view) {
super(view);
xuhao = view.findViewById(R.id.xuhao);//序号
name = view.findViewById(R.id.wuliaoname);
wuliaoimage=view.findViewById(R.id.wuliaoimage);
baifenbi= view.findViewById(R.id.baifenbi);//序号
}
}
}


+ 3
- 2
app/src/main/java/com/bonait/bnframework/modules/home/adapter/sx_adapter.java Voir le fichier

@@ -6,6 +6,7 @@ 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;
@@ -46,8 +47,8 @@ public class sx_adapter extends ArrayAdapter<BPA_GOODPROPERTY> {
View view = LayoutInflater.from(getContext()).inflate(resource1, parent, false);
//分别获取 image view 和 textview 的实例
TextView name = view.findViewById(R.id.name);//属性名称
Button button = view.findViewById(R.id.button_item);//删除
Button button_add = view.findViewById(R.id.button_add);//增加 子属性
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);


+ 3
- 2
app/src/main/java/com/bonait/bnframework/modules/home/adapter/wl_adapter.java Voir le fichier

@@ -6,6 +6,7 @@ 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;
@@ -42,8 +43,8 @@ public class wl_adapter extends ArrayAdapter<BPA_MATERIAL> {
View view = LayoutInflater.from(getContext()).inflate(resource1, parent, false);
//分别获取 image view 和 textview 的实例
TextView name = view.findViewById(R.id.name);
Button button = view.findViewById(R.id.button_item);
Button button_update = view.findViewById(R.id.button_update);
ImageView button = view.findViewById(R.id.button_item);
ImageView button_update = view.findViewById(R.id.button_update);

// 设置要显示的图片和文字
name.setText(bpa_material.name);


+ 41
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/SilosActivity.java Voir le fichier

@@ -22,15 +22,22 @@ 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.constant.DataBus;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.linktab.LeftAdapter;
import com.bonait.bnframework.common.linktab.LinkMode;
import com.bonait.bnframework.common.linktab.RightAdapter;
import com.bonait.bnframework.common.linktab.TopItemDecoration;
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.modules.home.adapter.lcsz_adapter;
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;
import com.bonait.bnframework.modules.home.fragment.mode.add_pf_control;
import com.bonait.bnframework.modules.home.fragment.mode.add_silos_ck;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemChildClickListener;
import com.google.android.material.bottomnavigation.BottomNavigationView;
@@ -56,6 +63,9 @@ public class SilosActivity extends BaseActivity {
RecyclerView rv_left;
@BindView(R.id.rv_right)
RecyclerView rv_right;

@BindView(R.id.add_silos)
add_silos_ck add_silos;
private Context context;
ArrayList<lcMode> lcModes = new ArrayList<>();
@Override
@@ -80,6 +90,37 @@ public class SilosActivity extends BaseActivity {
finish();
}
});


MessageManager.getInstance().registerMessageReceiver(this, MessageName.ClickSilos, new MessageLooper.OnMessageListener() {
@Override
public void onMessage(Object msg) {
if (msg != null) {
add_silos.SetData((lcMode) msg);
add_silos.setVisibility(View.VISIBLE);
}
}
});

add_silos.mListener = new MyClickListener() {
@Override
public void clickListener(View v, Object data) {
}

@Override
public void clickListenerNew(View v, int k, Object data) {
if (k == 0) {
add_silos.setVisibility(View.GONE);
} else if (k==1){
InitData();
ToastUtils.info("补充原料成功!!!");
}else if (k==2){
ToastUtils.info("满管成功!!!");
}else if (k==3){
//设置
}
}
};
}

public List<LinkMode> Fdata = new ArrayList<>();


+ 29
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_sxgl_fragment.java Voir le fichier

@@ -20,6 +20,7 @@ import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY;
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.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.sx_adapter;
import com.orhanobut.logger.Logger;
@@ -149,8 +150,23 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment implements MyClickListene
.show();
break;
case R.id.button_item://删除按钮
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
Initdata_sx();
String title = "温馨提示!";
String message = "客官确定要删除属性【"+((BPA_GOODPROPERTY) data).name+"】吗?";
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
ArrayList<BPA_GOODPROPERTY> ddd=QueryDB.GetGoodsPropertyALL(((BPA_GOODPROPERTY) data).id);
for (BPA_GOODPROPERTY item:ddd)
{
QueryDB.DeleteGoodsProperty(item);
}
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
Initdata_sx();
ToastUtils.info("删除成功");
dialog.dismiss();
}
});

break;
case R.id.button_add://增加子属性
BPA_GOODPROPERTY sx=(BPA_GOODPROPERTY) data;
@@ -171,8 +187,17 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment implements MyClickListene
Initdata_sx();
break;
case R.id.delete_text://删除
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
Initdata_sx();
String title1 = "温馨提示!";
String message1 = "客官确定要删除属性【"+((BPA_GOODPROPERTY) data).name+"】吗?";
AlertDialogUtils.showDialog(context, title1, message1, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data);
Initdata_sx();
ToastUtils.info("删除成功");
dialog.dismiss();
}
});
break;
}
}


+ 12
- 3
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/Jcsjgl_wl_fragment.java Voir le fichier

@@ -21,6 +21,7 @@ import android.widget.Spinner;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ConfigData;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
@@ -251,9 +252,17 @@ public class Jcsjgl_wl_fragment extends BaseFragment implements MyClickListener
.show();
break;
case R.id.button_item://删除按钮
QueryDB.DeleteMaterial((BPA_MATERIAL) data);
Initdata_wl();
ToastUtils.info("删除成功");
String title = "温馨提示!";
String message = "客官确定要删除物料【"+((BPA_MATERIAL) data).name+"】吗?";
AlertDialogUtils.showDialog(context, title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
QueryDB.DeleteMaterial((BPA_MATERIAL) data);
Initdata_wl();
ToastUtils.info("删除成功");
dialog.dismiss();
}
});
break;
}
}


+ 168
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_ck.java Voir le fichier

@@ -0,0 +1,168 @@
package com.bonait.bnframework.modules.home.fragment.mode;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.db.QueryDB;
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.res.ResGoodsRecipe;
import com.bonait.bnframework.common.db.res.lcMode;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.goodpf_apapter;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class add_silos_ck extends LinearLayout {

@BindView(R.id.title)
TextView title;

@BindView(R.id.close_from)
Button close_from;

@BindView(R.id.buchongyuanliao)
Button buchongyuanliao;

@BindView(R.id.manguan)
Button manguan;

@BindView(R.id.shezhi)
Button shezhi;

@BindView(R.id.xuhao)
TextView xuhao;
@BindView(R.id.wuliaoname)
TextView name;
@BindView(R.id.wuliaoimage)
ImageView wuliaoimage;
@BindView(R.id.baifenbi)
TextView baifenbi;
/**
* 点击事件
*/
public MyClickListener mListener=null;
private View root;
public add_silos_ck(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
root= LayoutInflater.from(context).inflate(R.layout.dialog_add_silos_ck, this);
ButterKnife.bind(this, root);
Init();
}


public void Init()
{
//初始化界面数据
initData();
//初始化界面控件的事件
initEvent();
}


private void initData()
{

}


private void initEvent()
{
buchongyuanliao.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
QueryDB.UpdateYL(lcMode.id,lcMode.siloszl);
lcMode.silosmargin=lcMode.siloszl;
SetData(lcMode);
//补充原料
if (mListener != null) {
mListener.clickListenerNew(view,1,lcMode);
}
}
});

manguan.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {

//满管
if (mListener != null) {
mListener.clickListenerNew(view,2,lcMode);
}

}
});

shezhi.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {

//设置
if (mListener != null) {
mListener.clickListenerNew(view,3,lcMode);
}

}
});

close_from.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mListener != null) {
mListener.clickListenerNew(v,0,null);
}
}
});
}

lcMode lcMode =null;
public void SetData(lcMode _good)
{
lcMode=_good;
title.setText("查看料仓-("+lcMode.name+")");

xuhao.setText(lcMode.num+"");
name.setText(lcMode.materialName.isEmpty()?"未设置":(lcMode.materialName+""));
if(lcMode.materialName.isEmpty() || lcMode.materialName.equals("未设置"))
{
wuliaoimage.setImageResource(R.mipmap.liaochang_by);
baifenbi.setText("");
}else
{
if(lcMode.siloszl<=lcMode.silosmargin || lcMode.siloszl==0)
{
wuliaoimage.setImageResource(R.mipmap.liaochang_yc);
}else
{
wuliaoimage.setImageResource(R.mipmap.liaochang_zc);
}
baifenbi.setText(get(lcMode.silosmargin,lcMode.siloszl));
}
}

public static String get(int up, int down) {
if (down == 0) {
return "0%";
}
double value = new BigDecimal((float) up / down).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
return new DecimalFormat("#%").format(value);
}

}

+ 13
- 0
app/src/main/res/drawable/border.xml Voir le fichier

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:bottom="-10dp"
android:right="-10dp"
android:top="-10dp">
<shape>
<!-- <solid android:color="#FFF" />-->
<stroke
android:width="0.5dp"
android:color="@color/datatab_tab" />
</shape>
</item>
</layer-list>

+ 1
- 1
app/src/main/res/layout/activity_goodpeifang.xml Voir le fichier

@@ -32,7 +32,7 @@

<Button
android:id="@+id/add_fl"
android:layout_width="100dp"
android:layout_width="160dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:layout_marginLeft="20dp"


+ 31
- 8
app/src/main/res/layout/activity_silos.xml Voir le fichier

@@ -28,15 +28,27 @@
android:layout_height="match_parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_right"
<RelativeLayout
android:layout_width="match_parent"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:layout_height="match_parent"
app:layout_constraintLeft_toRightOf="@+id/rv_left"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_right"
android:layout_width="match_parent"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:layout_height="match_parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.bonait.bnframework.modules.home.fragment.mode.add_silos_ck
android:id="@+id/add_silos"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:focusable="true"/>
</RelativeLayout>

</LinearLayout>

<RelativeLayout
@@ -55,6 +67,17 @@
android:layout_height="wrap_content"
android:text="料仓下发无物料名称,点击料仓图形绑定"
android:textColor="@color/red_primary_dark"/>

<ImageView
android:layout_marginLeft="20dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/zhuyi"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="料仓物料低于最低值会警示"
android:textColor="@color/red_primary_dark"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>


+ 26
- 5
app/src/main/res/layout/datatab/layout/liaochang_item.xml Voir le fichier

@@ -13,19 +13,40 @@
android:id="@+id/xuhao"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="-15dp"
android:fontFamily="serif"
android:text="1"
android:textAlignment="center"
/>
android:textSize="20dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/wuliaoimage"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@mipmap/liaochang"/>
android:layout_width="160dp"
android:layout_height="160dp"
android:src="@mipmap/liaochang_by"/>
<TextView
android:id="@+id/wuliaoname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="调和油"
android:textAlignment="center" />
android:textAlignment="center"
android:textSize="19dp"/>
</LinearLayout>

<LinearLayout
android:layout_marginTop="125dp"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<TextView
android:id="@+id/baifenbi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="30%"
android:textSize="24dp" />
</LinearLayout>


</RelativeLayout>

+ 27
- 26
app/src/main/res/layout/datatab/layout/sx_item.xml Voir le fichier

@@ -38,36 +38,37 @@
android:textSize="13dp"/>
</RelativeLayout>

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


<Button
android:id="@+id/button_item"
android:layout_width="60dp"
android:layout_centerVertical="true"
android:layout_height="30dp"
android:layout_marginLeft="20dp"
android:background="@drawable/button"
android:focusable="false"
android:text="删除"
android:textSize="12dp"/>
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/border">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">

<Button
android:id="@+id/button_add"
android:layout_width="80dp"
android:layout_centerVertical="true"
<ImageView
android:layout_centerInParent="true"
android:id="@+id/button_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/new_delete"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_marginLeft="100dp"
android:background="@drawable/button1"
android:focusable="false"
android:text="增加子属性"
android:textSize="12dp"/>
android:layout_weight="1"
android:background="@drawable/border">
<ImageView
android:layout_centerInParent="true"
android:id="@+id/button_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/new_add"/>
</RelativeLayout>


</RelativeLayout>
</LinearLayout>

</TableRow>
</TableLayout>


+ 28
- 23
app/src/main/res/layout/datatab/layout/wl_item.xml Voir le fichier

@@ -7,7 +7,6 @@
xsi:schemaLocation="http://schemas.android.com/apk/res/android ">

<TableLayout
android:background="@color/activity_background1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@@ -52,31 +51,37 @@
<!-- android:textSize="12dp"/>-->
<!-- </RelativeLayout>-->

<RelativeLayout
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<Button
android:id="@+id/button_update"
android:layout_width="60dp"
android:layout_centerVertical="true"
android:layout_height="30dp"
android:layout_marginLeft="20dp"
android:background="@drawable/button1"
android:focusable="false"
android:text="修改"
android:textSize="12dp"/>
<Button
android:id="@+id/button_item"
android:layout_width="60dp"
android:layout_centerVertical="true"
android:layout_weight="1"
android:background="@drawable/border">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">

<ImageView
android:layout_centerInParent="true"
android:id="@+id/button_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/new_update"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_marginLeft="100dp"
android:background="@drawable/button"
android:focusable="false"
android:text="删除"
android:textSize="12dp"/>
</RelativeLayout>
android:layout_weight="1"
android:background="@drawable/border">
<ImageView
android:layout_centerInParent="true"
android:id="@+id/button_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/new_delete"/>
</RelativeLayout>

</LinearLayout>

</TableRow>
</TableLayout>

+ 17
- 12
app/src/main/res/layout/fragment_jcsjgl_sxgl.xml Voir le fichier

@@ -46,9 +46,11 @@
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginLeft="@dimen/dp_10"
android:background="@drawable/button1"
android:background="@drawable/bg_btn_login_selected"
android:text="+增加属性"
android:textSize="14dp" />
android:textSize="14dp"
android:textColor="@color/white"
/>
</RelativeLayout>

<RelativeLayout
@@ -63,8 +65,8 @@
<!-- 表头 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="26dp"
android:background="@color/activity_background">
android:layout_height="36dp"
android:background="@color/datatab_tab">

<TableLayout
android:layout_width="match_parent"
@@ -85,11 +87,14 @@
android:layout_weight="1">

<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
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
@@ -98,11 +103,14 @@
android:layout_weight="1">

<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
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>
</TableRow>
</TableLayout>
@@ -114,10 +122,7 @@
<ListView
android:id="@+id/datatab_sx"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:divider="#00000000"
android:dividerHeight="3dp" />
android:layout_height="match_parent" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>


+ 15
- 8
app/src/main/res/layout/fragment_jcsjgl_wl.xml Voir le fichier

@@ -54,11 +54,11 @@
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginLeft="@dimen/dp_10"
android:background="@drawable/button1"
android:background="@drawable/bg_btn_login_selected"
android:text="+增加物料"
android:textSize="14dp"
android:textColor="@color/white"
/>

<Button
android:id="@+id/synchronous"
android:layout_width="100dp"
@@ -91,7 +91,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@color/activity_background">
android:background="@color/datatab_tab">

<TableLayout
android:layout_width="match_parent"
@@ -117,7 +117,10 @@
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="物料名称"
android:textAlignment="center"/>
android:textAlignment="center"
android:textStyle="bold"
android:textColor="@color/white"/>

</RelativeLayout>

<!-- <RelativeLayout-->
@@ -144,7 +147,9 @@
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="用户操作"
android:textAlignment="center"/>
android:textAlignment="center"
android:textStyle="bold"
android:textColor="@color/white"/>
</RelativeLayout>
</TableRow>
</TableLayout>
@@ -157,9 +162,11 @@
android:id="@+id/datatab_wl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:divider="#00000000"
android:dividerHeight="3dp" />
/>

<!-- android:layout_marginTop="3dp"-->
<!-- android:divider="#00000000"-->
<!-- android:dividerHeight="3dp"-->
</RelativeLayout>
</LinearLayout>
</RelativeLayout>


+ 203
- 0
app/src/main/res/layout/item/layout/dialog_add_silos_ck.xml Voir le fichier

@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dialogbj">

<RelativeLayout
android:layout_centerInParent="true"
android:layout_margin="20dp"
android:layout_width="400dp"
android:layout_height="350dp"
android:background="@drawable/common_bg_with_radius_and_border">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

</RelativeLayout>
<Button
android:id="@+id/close_from"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:background="@mipmap/close_image"
android:textSize="14dp"
android:textColor="@color/white"/>

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="查看料仓"
android:textSize="20dp"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="30dp">
</TextView>

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

<LinearLayout
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<!--菜谱名称行-->
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>

<!--边框分割细线-->
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color3" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<LinearLayout
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/xuhao"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="-15dp"
android:fontFamily="serif"
android:text="1"
android:textAlignment="center"
android:textSize="20dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/wuliaoimage"
android:layout_width="160dp"
android:layout_height="160dp"
android:src="@mipmap/liaochang_by"/>
<TextView
android:id="@+id/wuliaoname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="调和油"
android:textAlignment="center"
android:textSize="19dp"/>
</LinearLayout>

<LinearLayout
android:layout_marginTop="125dp"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<TextView
android:id="@+id/baifenbi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="30%"
android:textSize="24dp" />
</LinearLayout>
</RelativeLayout>

<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/buchongyuanliao"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg_btn_login_selected"
android:text="补充原料"
android:textColor="@color/white"
android:textSize="18sp"/>

<Button
android:id="@+id/manguan"
android:layout_marginLeft="10dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg_btn_login_selected"
android:text="满管"
android:textColor="@color/white"
android:textSize="18sp"/>

<Button
android:id="@+id/shezhi"
android:layout_marginLeft="10dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg_btn_login_selected"
android:text="设置"
android:textColor="@color/white"
android:textSize="18sp"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

</RelativeLayout>


<RelativeLayout
android:visibility="gone"
android:layout_centerInParent="true"
android:id="@+id/jishiqi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用时: "
android:textColor="@color/white"
android:textSize="24dp"/>
<Chronometer
android:id="@+id/runtime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/purple_primary"
android:textStyle="bold|italic"
android:textSize="30dp"

/>
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 秒"
android:textColor="@color/white"
android:textSize="24dp"/>
</LinearLayout>

</RelativeLayout>
</RelativeLayout>

+ 21
- 13
app/src/main/res/layout/item/layout/item_left_lc.xml Voir le fichier

@@ -4,19 +4,27 @@
android:orientation="horizontal"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="100dp"
android:layout_weight="1">


<RelativeLayout
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_marginLeft="@dimen/dp_10"
android:id="@+id/tv_image"
android:layout_width="3dp"
android:layout_height="match_parent"
android:background="@color/app_color_blue"/>
<TextView
android:id="@+id/tv_type"
android:gravity="center"
android:textSize="18sp"
android:layout_width="match_parent"
android:layout_height="70dp"/>
android:layout_height="match_parent">
<RelativeLayout
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:id="@+id/tv_image"
android:layout_width="3dp"
android:layout_height="40dp"
android:background="@color/app_color_blue"/>
<TextView
android:layout_centerInParent="true"
android:id="@+id/tv_type"
android:gravity="center"
android:textSize="18sp"
android:layout_width="match_parent"
android:layout_height="70dp"
android:text="液料仓"/>
</RelativeLayout>
</LinearLayout>

+ 1
- 1
app/src/main/res/layout/item/layout/item_zsx.xml Voir le fichier

@@ -6,7 +6,7 @@

<LinearLayout
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"








+ 1
- 0
app/src/main/res/values/colors.xml Voir le fichier

@@ -6,6 +6,7 @@
<color name="dialogbj">#A5000000</color>
<color name="text4">#ADC3E1</color>
<color name="app_color_blue111">#9F00A8E1</color>
<color name="datatab_tab">#BBBBBB</color>

<color name="vifrification">#00000000</color> <!-- 透明 -->
<!--<color name="colorPrimary">#008577</color>


Chargement…
Annuler
Enregistrer