Browse Source

Merge remote-tracking branch 'origin/master'

master
pry 1 year ago
parent
commit
96d49dcc45
11 changed files with 57 additions and 68 deletions
  1. +1
    -1
      .idea/misc.xml
  2. +9
    -11
      app/src/main/java/com/example/bpa/view/adapter/lc_item_adapter.java
  3. +4
    -3
      app/src/main/java/com/example/bpa/view/from/lcsz_activity.java
  4. +10
    -2
      app/src/main/java/com/example/bpa/view/mode/ResGoodsRecipe.java
  5. +1
    -5
      app/src/main/res/layout/datatab/layout/selectitem_item.xml
  6. +1
    -5
      app/src/main/res/layout/from/layout/activity_add_pf.xml
  7. +0
    -2
      app/src/main/res/layout/from/layout/activity_lcsz.xml
  8. +26
    -37
      app/src/main/res/layout/item/layout/lc_item.xml
  9. +3
    -2
      app/src/main/res/layout/item/layout/meunbuttonitem.xml
  10. BIN
     
  11. +2
    -0
      app/src/main/res/values/styles.xml

+ 1
- 1
.idea/misc.xml View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="corretto-11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">


+ 9
- 11
app/src/main/java/com/example/bpa/view/adapter/lc_item_adapter.java View File

@@ -41,7 +41,6 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View inflate = mLayoutInflater.inflate(R.layout.lc_item, parent, false); View inflate = mLayoutInflater.inflate(R.layout.lc_item, parent, false);
return new MyLCViewHolder(inflate); return new MyLCViewHolder(inflate);

} }


@Override @Override
@@ -54,14 +53,11 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
myViewHolder.num.setText(Integer.toString(list.get(position).num) ); myViewHolder.num.setText(Integer.toString(list.get(position).num) );
myViewHolder.id = list.get(position).id; myViewHolder.id = list.get(position).id;
myViewHolder.MaterialName = list.get(position).materialName; myViewHolder.MaterialName = list.get(position).materialName;


} }
} }
catch (Exception e){ catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }

} }


@Override @Override
@@ -70,8 +66,17 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
} }


public static class MyLCViewHolder extends RecyclerView.ViewHolder { public static class MyLCViewHolder extends RecyclerView.ViewHolder {
/**
* 料仓名称
*/
public TextView materialName; public TextView materialName;
/**、
* 料仓仓号
*/
TextView num; TextView num;
/**
* 料仓余量
*/
TextView silosmargin; TextView silosmargin;


public String id; public String id;
@@ -84,15 +89,8 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
materialName = (TextView) view.findViewById(R.id.lc_item_materialName); materialName = (TextView) view.findViewById(R.id.lc_item_materialName);
num = (TextView) view.findViewById(R.id.lc_item_num); num = (TextView) view.findViewById(R.id.lc_item_num);
silosmargin = (TextView) view.findViewById(R.id.lc_item_silosmargin); silosmargin = (TextView) view.findViewById(R.id.lc_item_silosmargin);





} }




} }


} }

+ 4
- 3
app/src/main/java/com/example/bpa/view/from/lcsz_activity.java View File

@@ -124,9 +124,6 @@ public class lcsz_activity extends AppCompatActivity implements View.OnClickList
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }



} }


/** /**
@@ -191,6 +188,10 @@ public class lcsz_activity extends AppCompatActivity implements View.OnClickList


} }


/**
* 页面点击事件
* @param v
*/
@Override @Override
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {


+ 10
- 2
app/src/main/java/com/example/bpa/view/mode/ResGoodsRecipe.java View File

@@ -6,9 +6,17 @@ import com.example.bpa.db.mode.BPA_GOODSRECIPE;
* 界面显示商品配方结构 * 界面显示商品配方结构
*/ */
public class ResGoodsRecipe extends BPA_GOODSRECIPE { public class ResGoodsRecipe extends BPA_GOODSRECIPE {
/**
* 唯一ID
*/
public String id; public String id;
//物料名称
/**
* 物料名称
*/
public String materialName; public String materialName;

/**
* 1 为物料
* 2 为果糖
*/
public int materialType; public int materialType;
} }

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

@@ -19,7 +19,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:background="@mipmap/bgxz"
android:background="@mipmap/bgbtbj"
> >
<TextView <TextView
android:id="@+id/name" android:id="@+id/name"
@@ -27,14 +27,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"

android:text="草莓" android:text="草莓"

android:textColor="@color/colorAccent" android:textColor="@color/colorAccent"
android:textSize="24dp" /> android:textSize="24dp" />
</RelativeLayout> </RelativeLayout>


</TableRow> </TableRow>
</TableLayout> </TableLayout>
</RelativeLayout> </RelativeLayout>

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

@@ -8,8 +8,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:background="@mipmap/dpbj"> android:background="@mipmap/dpbj">


<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="30dp"
@@ -145,6 +143,7 @@


</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:layout_marginTop="10dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<Spinner <Spinner
@@ -152,7 +151,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/commonSpinnerStyle"/> style="@style/commonSpinnerStyle"/>

<Button <Button
android:id="@+id/btn_addwuliao" android:id="@+id/btn_addwuliao"
android:background="@drawable/btn_button" android:background="@drawable/btn_button"
@@ -164,7 +162,6 @@
android:layout_height="26dp" android:layout_height="26dp"
android:text="添加物料" android:text="添加物料"
/> />

<Spinner <Spinner
android:id="@+id/guotanglist_spinner" android:id="@+id/guotanglist_spinner"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -181,7 +178,6 @@
android:layout_height="26dp" android:layout_height="26dp"
android:text="添加果糖"/> android:text="添加果糖"/>
</LinearLayout> </LinearLayout>

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


+ 0
- 2
app/src/main/res/layout/from/layout/activity_lcsz.xml View File

@@ -91,13 +91,11 @@
android:layout_height="match_parent" android:layout_height="match_parent"
/> />
<RelativeLayout <RelativeLayout

android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#80000000" android:background="#80000000"
android:visibility="gone"> android:visibility="gone">
<ListView <ListView
android:background="@color/warm_blue"
android:id="@+id/materials" android:id="@+id/materials"
android:layout_width="200dp" android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"


+ 26
- 37
app/src/main/res/layout/item/layout/lc_item.xml View File

@@ -1,59 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center_horizontal"
android:background="@drawable/lcbg_border">
android:padding="10dp">
<RelativeLayout <RelativeLayout
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="5dp"
android:background="@mipmap/dglc">

android:layout_height="120dp"
android:layout_width="120dp"
android:background="@mipmap/nbbj1">
<TextView <TextView
android:id="@+id/lc_item_num" android:id="@+id/lc_item_num"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:layout_centerHorizontal="true"
android:layout_marginTop="4dp"
android:rotationX="18" android:rotationX="18"
android:text="12"
android:textColor="#FFA500"
android:text="1"
android:textColor="@color/white"
android:textSize="16dp" /> android:textSize="16dp" />

<RelativeLayout <RelativeLayout
android:layout_width="20dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="5dp"
android:layout_marginBottom="9dp"
android:rotation="-12"
android:rotationY="64"
android:scaleX="2">

android:layout_width="80dp"
android:layout_height="80dp"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_marginTop="5dp"
android:background="@mipmap/liaochang">
<TextView <TextView
android:id="@+id/lc_item_silosmargin" android:id="@+id/lc_item_silosmargin"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="12"
android:text="48.56g"
android:textColor="#FFA500" android:textColor="#FFA500"
android:textSize="12dp" /> android:textSize="12dp" />


</RelativeLayout> </RelativeLayout>


<TextView
android:id="@+id/lc_item_materialName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"
android:gravity="center"
android:textColor="@color/white"
android:text="未设置" />
</RelativeLayout> </RelativeLayout>
<TextView
android:id="@+id/lc_item_materialName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="#FF0000"
android:text="未设置" />
</LinearLayout> </LinearLayout>

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

@@ -10,15 +10,16 @@
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:background="@mipmap/nbbj1"> android:background="@mipmap/nbbj1">

<ImageView <ImageView
android:id="@+id/meun_imageview" android:id="@+id/meun_imageview"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_centerInParent="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@mipmap/lcsz"/>
android:src="@mipmap/lcsz" />
<TextView <TextView
android:id="@+id/meun_textview" android:id="@+id/meun_textview"
android:layout_width="wrap_content" android:layout_width="wrap_content"


BIN
View File


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

@@ -188,6 +188,8 @@
<item name="android:paddingTop">4dp</item> <item name="android:paddingTop">4dp</item>
<item name="android:paddingBottom">4dp</item> <item name="android:paddingBottom">4dp</item>
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>
<item name="android:layout_height">26dp</item>
<item name="android:layout_marginLeft">5dp</item>
</style> </style>
<style name="EnableEditTextStyle" parent="@android:style/Widget.EditText"> <style name="EnableEditTextStyle" parent="@android:style/Widget.EditText">
<item name="android:textColor">@color/colorAccent</item> <item name="android:textColor">@color/colorAccent</item>


Loading…
Cancel
Save