diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 772941d..8ad8eb3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,12 +12,12 @@ android:allowBackup="true" android:icon="@mipmap/ncd" android:label="@string/app_name" + android:requestLegacyExternalStorage="true" android:supportsRtl="false" android:theme="@style/AppTheme" - android:requestLegacyExternalStorage="true" tools:targetApi="31"> GetGoodsSrecipeList(String id) + public static ArrayList GetGoodsSrecipeList(String id) { String orderby=Desc_Sort_Up+','+Desc_Time_Up;//先按排序 创建时间倒序 String where="isDelete=? and goodsID=?"; String[] args=new String[] { "0",id }; - ArrayList data=new ArrayList<>(); + ArrayList data=new ArrayList<>(); ArrayList obj=Get(BPA_GOODSRECIPE.class,where,args,orderby); - for (Object k:obj) { - data.add(((BPA_GOODSRECIPE)k)); + for (Object item:obj) { + BPA_GOODSRECIPE k=(BPA_GOODSRECIPE)item; + BPA_MATERIAL ma= GetMaterialID(k.materialID); + if(ma!=null) + { + ResGoodsRecipe par=new ResGoodsRecipe(); + par.id=k.id; + par.createTime=k.createTime; + par.updateTime=k.updateTime; + par.deleteTime=k.deleteTime; + par.deviceID=k.deviceID; + par.userID=k.userID; + par.isDelete=k.isDelete; + par.exp=k.exp; + par.materialName=ma.name; + + par.goodsID=k.goodsID; + par.materialID=k.materialID; + par.value=k.value; + par.sort=k.sort; + data.add(par); + } } return data; } + /** + * 根据商品id删除配料信息 + * @param id + * @return + */ + public static Boolean DeleteGoodsSrecipeList(String id) + { + if (id.isEmpty()) + return false; + SQLiteDatabase db = helper.getWritableDatabase(); + long delete=db.delete(BPA_GOODSRECIPE.class.getSimpleName(), "goodsID=?", + new String[] { id }); + db.close(); + return delete>0; + } //endregion //region BPA_ORDER 订单表 diff --git a/app/src/main/java/com/example/bpa/view/adapter/pf_adapter.java b/app/src/main/java/com/example/bpa/view/adapter/pf_adapter.java new file mode 100644 index 0000000..cfb7d2b --- /dev/null +++ b/app/src/main/java/com/example/bpa/view/adapter/pf_adapter.java @@ -0,0 +1,95 @@ +package com.example.bpa.view.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.Spinner; +import android.widget.SpinnerAdapter; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import com.example.bpa.R; +import com.example.bpa.db.mode.BPA_MATERIAL; +import com.example.bpa.helper.T; +import com.example.bpa.view.inteface.MyClickListener; +import com.example.bpa.view.mode.ResGoodsRecipe; + +import java.util.ArrayList; +import java.util.List; + +/** + * 配料数据表格 + */ +public class pf_adapter extends ArrayAdapter { + /** + * 内部点击事件 + */ + private MyClickListener mListener; + private List datas; + + ArrayList wuliao=new ArrayList<>(); + + public pf_adapter(@NonNull Context context, int resource, @NonNull List objects, ArrayList wl, MyClickListener listener) { + super(context, resource, objects); + mListener = listener; + datas=objects; + if(wuliao.size()<=0) + { + wuliao=new ArrayList<>(); + for (BPA_MATERIAL me:wl) + { + wuliao.add(me.name); + } + } + } + //每个子项被滚动到屏幕内的时候会被调用 + @NonNull + @Override + public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { + ResGoodsRecipe resGoodsRecipe = (ResGoodsRecipe) getItem(position);//得到当前项选中item实例 + //为每一个子项加载设定的布局 + View view = LayoutInflater.from(getContext()).inflate(R.layout.pf_item, parent, false); + //分别获取 image view 和 textview 的实例 + Spinner name = view.findViewById(R.id.name); + TextView sort = view.findViewById(R.id.sort); + TextView value = view.findViewById(R.id.value); + Button button = view.findViewById(R.id.button_item); + // 设置要显示的图片和文字 + ArrayAdapter mAdapter = new android.widget.ArrayAdapter(view.getContext(), + android.R.layout.simple_spinner_item); + mAdapter.addAll(wuliao); + name.setAdapter(mAdapter); + + if(resGoodsRecipe.materialName!=null && !resGoodsRecipe.materialName.isEmpty()) + { + SpinnerAdapter apsAdapter= name.getAdapter(); + int k= apsAdapter.getCount(); + for(int i=0;i { //分别获取 image view 和 textview 的实例 TextView name = view.findViewById(R.id.name); TextView sort = view.findViewById(R.id.sort); + TextView time = view.findViewById(R.id.time); Button button = view.findViewById(R.id.button_item); Button button_up = view.findViewById(R.id.button_item_Up); Button button_down = view.findViewById(R.id.button_item_Down); + Button button_update = view.findViewById(R.id.button_item_update); + // 设置要显示的图片和文字 name.setText(bpa_goods.name); + time.setText(bpa_goods.createTime); sort.setText(bpa_goods.sort+""); button.setOnClickListener(new View.OnClickListener() { @Override @@ -87,6 +89,18 @@ public class sp_adapter extends ArrayAdapter { } } }); + button_update.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + try + { + mListener.clickListener(view,bpa_goods); + } catch (Exception e) + { + T.show(view.getContext(),"商品修改出错:"+e.getMessage()); + } + } + }); return view; } } \ No newline at end of file diff --git a/app/src/main/java/com/example/bpa/view/fragment/SystemCapabilitiesFragment.java b/app/src/main/java/com/example/bpa/view/fragment/SystemCapabilitiesFragment.java index 14ca30a..c9c9aa8 100644 --- a/app/src/main/java/com/example/bpa/view/fragment/SystemCapabilitiesFragment.java +++ b/app/src/main/java/com/example/bpa/view/fragment/SystemCapabilitiesFragment.java @@ -2,7 +2,6 @@ package com.example.bpa.view.fragment; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.RecyclerView; @@ -11,14 +10,10 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; -import com.example.bpa.LoginActivity; -import com.example.bpa.MainActivity; import com.example.bpa.R; -import com.example.bpa.config.ConfigName; import com.example.bpa.helper.T; import com.example.bpa.view.control.ItemClickListener; import com.example.bpa.view.control.MainMeunAdapter; @@ -27,7 +22,6 @@ import com.example.bpa.view.from.ddyjrz_activity; import com.example.bpa.view.from.dzcjy_activity; import com.example.bpa.view.from.lcsz_activity; import com.example.bpa.view.from.lsjy_activity; -import com.example.bpa.view.from.spgl_activity; import com.example.bpa.view.from.wlgl_activity; import com.example.bpa.view.from.yfcl_activity; import com.example.bpa.view.from.yfpf_activity; @@ -71,7 +65,6 @@ public class SystemCapabilitiesFragment extends Fragment { menuModes.clear(); menuModes.add(new MenuMode("物料管理",R.mipmap.wlgl)); - menuModes.add(new MenuMode("商品管理",R.mipmap.spgl)); menuModes.add(new MenuMode("料仓设置",R.mipmap.lcsz)); menuModes.add(new MenuMode("电子秤校验",R.mipmap.dzcjy)); menuModes.add(new MenuMode("流速校验",R.mipmap.lsjy)); @@ -100,9 +93,6 @@ public class SystemCapabilitiesFragment extends Fragment { case "物料管理": intent = new Intent(view.getContext(), wlgl_activity.class); break; - case "商品管理": - intent = new Intent(view.getContext(), spgl_activity.class); - break; case "料仓设置": intent = new Intent(view.getContext(), lcsz_activity.class); break; diff --git a/app/src/main/java/com/example/bpa/view/from/add_pf_activity.java b/app/src/main/java/com/example/bpa/view/from/add_pf_activity.java new file mode 100644 index 0000000..63414bc --- /dev/null +++ b/app/src/main/java/com/example/bpa/view/from/add_pf_activity.java @@ -0,0 +1,227 @@ +package com.example.bpa.view.from; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; + +import com.example.bpa.R; +import com.example.bpa.config.ConfigName; +import com.example.bpa.db.QueryDB; +import com.example.bpa.db.mode.BPA_GOODS; +import com.example.bpa.db.mode.BPA_GOODSRECIPE; +import com.example.bpa.db.mode.BPA_MATERIAL; +import com.example.bpa.helper.Json; +import com.example.bpa.helper.T; +import com.example.bpa.view.adapter.pf_adapter; +import com.example.bpa.view.adapter.sp_adapter; +import com.example.bpa.view.inteface.MyClickListener; +import com.example.bpa.view.mode.ResGoodsRecipe; + +import java.util.ArrayList; + +public class add_pf_activity extends AppCompatActivity implements View.OnClickListener, MyClickListener { + //region 变量 + /** + * 返回按钮 + */ + ImageView gongneng_fanhui; + /** + * 标题设置 + */ + TextView gongneng_title; + //endregion + + //region 操作变量 + /** + * 输入框 + */ + TextView edittext; + /** + * 增加按钮 + */ + Button buttonsave, buttonaddwuliao; + /** + * 表格显示 + */ + ListView datatab; + /** + * 配方数据 + */ + ArrayList bpa_pf = new ArrayList<>(); + /** + * 当前传入的商品数据 + */ + BPA_GOODS good = null; + + /** + * 商品数据 + */ + ArrayList bpa_goods=new ArrayList<>(); + /** + * wulaipo + */ + ArrayList wuliao=new ArrayList<>(); + //endregion + + //region 私有函数 + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_add_pf); + Init(); + initEvents(); + } + //endregion + + //region 公共函数 + + /** + * 初始化 + */ + private void Init() { + gongneng_fanhui = this.findViewById(R.id.gongneng_fanhui); + gongneng_title = this.findViewById(R.id.gongneng_title); + edittext = this.findViewById(R.id.edittext); + buttonsave = this.findViewById(R.id.buttonsave); + buttonaddwuliao = this.findViewById(R.id.buttonaddwuliao); + datatab = this.findViewById(R.id.datatab); + //通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据 + String msg = getIntent().getStringExtra("title"); + String data = getIntent().getStringExtra("data"); + if (!data.isEmpty()) { + good = new Json().jsonToobject(BPA_GOODS.class, data); + edittext.setText(good.name); + } + gongneng_title.setText(msg); + Initdata(); + bpa_goods= QueryDB.GetGoodsALL(); + wuliao=QueryDB.GetMaterialALL(); + } + + /** + * 初始化按钮事件 + */ + private void initEvents() { + gongneng_fanhui.setOnClickListener(this); + buttonsave.setOnClickListener(this); + buttonaddwuliao.setOnClickListener(this); + } + + /** + * 初始化数据加载 + */ + public void Initdata() { + bpa_pf = new ArrayList<>(); + try { + if (good != null)//修改 + { + bpa_pf= QueryDB.GetGoodsSrecipeList(good.id); + } + } catch (Exception e) { + + } + } + + /** + * 刷新DataTab + */ + public void DataTab() + { + pf_adapter adapter = new pf_adapter(add_pf_activity.this, R.layout.pf_item, bpa_pf,wuliao,this); + datatab.setAdapter(adapter); + } + //endregion + + //region 点击事件 + + /** + * 本页面点击事件监听22 + * + * @param v + */ + @Override + public void onClick(View v) { + switch (v.getId()) { + case R.id.gongneng_fanhui://返回按钮 + this.finish(); + break; + case R.id.buttonaddwuliao://新增空白行 + ResGoodsRecipe recipe=new ResGoodsRecipe(); + recipe.sort=bpa_pf.size()+1; + bpa_pf.add(recipe); + DataTab(); + break; + case R.id.buttonsave://保存按钮点击 + if(bpa_pf.size()<=0) + { + T.show(this, "配方信息不能为空!"); + return; + } + if (good == null)//新增 + { + String name = edittext.getText().toString(); + if (name.isEmpty()) { + T.show(this, "商品名称不能为空!"); + return; + } + if (QueryDB.GetGoodsIs(name)) { + T.show(this, "商品名称重复,请重新输入后重试!"); + return; + } + BPA_GOODS goodx = new BPA_GOODS(); + goodx.name = name; + goodx.sort = bpa_goods.size() + 1; + goodx.status = 1; + goodx.deviceID = ConfigName.getInstance().DeviceId; + goodx.userID = ConfigName.getInstance().user.userID; + QueryDB.AddGoods(goodx); + good=goodx; + }else //修改 + { + QueryDB.UpdateGoods(good); + QueryDB.DeleteGoodsSrecipeList(good.id); + } + + for (ResGoodsRecipe item:bpa_pf) + { + BPA_GOODSRECIPE da=new BPA_GOODSRECIPE(); + da.goodsID = good.id; + da.materialID = item.materialID; + da.value = item.value; + da.sort =item.sort; + da.deviceID = ConfigName.getInstance().DeviceId; + da.userID = ConfigName.getInstance().user.userID; + QueryDB.AddGoodsSrecipe(da); + } + T.show(this, "操作成功!"); + this.finish(); + break; + } + } + + /** + * 接口方法,响应ListView按钮点击事件 + */ + @Override + public void clickListener(View v, Object data) { + switch (v.getId()) { + case R.id.button_item://删除 + bpa_pf.remove(data); + DataTab(); + break; + case R.id.button_item_Up://上移动 + + break; + case R.id.button_item_Down://下移动 + + break; + } + } + //endregion +} \ No newline at end of file diff --git a/app/src/main/java/com/example/bpa/view/from/spgl_activity.java b/app/src/main/java/com/example/bpa/view/from/spgl_activity.java deleted file mode 100644 index 83c9461..0000000 --- a/app/src/main/java/com/example/bpa/view/from/spgl_activity.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.example.bpa.view.from; - -import androidx.appcompat.app.AppCompatActivity; - -import android.os.Bundle; -import android.util.Log; -import android.view.View; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.ListView; -import android.widget.TextView; - -import com.example.bpa.R; -import com.example.bpa.config.ConfigName; -import com.example.bpa.db.QueryDB; -import com.example.bpa.db.mode.BPA_GOODS; -import com.example.bpa.db.mode.BPA_MATERIAL; -import com.example.bpa.helper.T; -import com.example.bpa.view.adapter.sp_adapter; -import com.example.bpa.view.adapter.wl_adapter; -import com.example.bpa.view.inteface.MyClickListener; - -import java.util.ArrayList; - -public class spgl_activity extends AppCompatActivity implements View.OnClickListener, MyClickListener { - - //region 变量 - /** - * 返回按钮 - */ - ImageView gongneng_fanhui; - /** - * 标题设置 - */ - TextView gongneng_title; - - //endregion - - //region 操作变量 - /** - * 输入框 - */ - TextView edittext; - /** - * 增加按钮 - */ - Button buttonadd; - /** - * 表格显示 - */ - ListView datatab; - /** - * 商品数据 - */ - ArrayList bpa_goods=new ArrayList<>(); - //endregion - - //region 私有函数 - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_spgl); - Init(); - initEvents(); - } - //endregion - - //region 公共函数 - - /** - * 初始化 - */ - private void Init(){ - gongneng_fanhui = this.findViewById(R.id.gongneng_fanhui); - gongneng_title = this.findViewById(R.id.gongneng_title); - edittext= this.findViewById(R.id.edittext); - buttonadd= this.findViewById(R.id.buttonadd); - datatab= this.findViewById(R.id.datatab); - //通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据 - String msg=getIntent().getStringExtra("data"); - gongneng_title.setText(msg); - Initdata(); - } - - /** - * 初始化按钮事件 - */ - private void initEvents() { - gongneng_fanhui.setOnClickListener(this); - buttonadd.setOnClickListener(this); - } - - /** - * 初始化数据加载 - */ - public void Initdata() - { - try{ - bpa_goods= QueryDB.GetGoodsALL(); - sp_adapter adapter = new sp_adapter(spgl_activity.this, R.layout.sp_item, bpa_goods,this); - datatab.setAdapter(adapter); - }catch(Exception e){ - - } - } - //endregion - - //region 点击事件 - /** - * 本页面点击事件监听 - * - * @param v - */ - @Override - public void onClick(View v) { - switch (v.getId()) { - case R.id.gongneng_fanhui://返回按钮 - this.finish(); - break; - case R.id.buttonadd://增加按钮点击 - String name= edittext.getText().toString(); - if(name.isEmpty()){ - T.show(this, "商品名称不能为空!"); - return; - } - if(QueryDB.GetGoodsIs(name)){ - T.show(this, "商品名称重复,请重新输入后重试!"); - return; - } - BPA_GOODS good=new BPA_GOODS(); - good.name=name; - good.sort=bpa_goods.size()+1; - good.status=1; - good.deviceID= ConfigName.getInstance().DeviceId; - good.userID=ConfigName.getInstance().user.userID; - QueryDB.AddGoods(good); - T.show(this, "新增成功!"); - Initdata(); - break; - } - } - - /** - * 接口方法,响应ListView按钮点击事件 - */ - @Override - public void clickListener(View v,Object data) { - switch (v.getId()) - { - case R.id.button_item://删除按钮 - int sort=((BPA_GOODS)data).sort; - String id=((BPA_GOODS)data).id; - Log.i("日志",sort + "--- "+id); - QueryDB.DeleteGoods((BPA_GOODS)data); - Initdata(); - for (BPA_GOODS k:bpa_goods) { - if(k.sort>sort) - { - QueryDB.GetGoodsSort(k,1); - } - } - Initdata(); - break; - case R.id.button_item_Up://上移动按钮 - BPA_GOODS good=(BPA_GOODS)data; - if(good.sort==1) - { - T.show(this, "已是最顶部!"); - return; - } - QueryDB.GetGoodsSort((BPA_GOODS)data,1); - Initdata(); - break; - case R.id.button_item_Down://下移动按钮 - BPA_GOODS good2=(BPA_GOODS)data; - if(good2.sort==bpa_goods.size()) - { - T.show(this, "已是最底部!"); - return; - } - QueryDB.GetGoodsSort((BPA_GOODS)data,0); - Initdata(); - break; - } - } - //endregion -} \ No newline at end of file diff --git a/app/src/main/java/com/example/bpa/view/from/yfpf_activity.java b/app/src/main/java/com/example/bpa/view/from/yfpf_activity.java index 4894e56..e07aa53 100644 --- a/app/src/main/java/com/example/bpa/view/from/yfpf_activity.java +++ b/app/src/main/java/com/example/bpa/view/from/yfpf_activity.java @@ -2,17 +2,30 @@ package com.example.bpa.view.from; import androidx.appcompat.app.AppCompatActivity; +import android.content.Intent; import android.os.Bundle; +import android.util.Log; import android.view.View; +import android.widget.Button; import android.widget.ImageView; +import android.widget.ListView; import android.widget.TextView; import com.example.bpa.R; +import com.example.bpa.config.ConfigName; +import com.example.bpa.db.QueryDB; +import com.example.bpa.db.mode.BPA_GOODS; +import com.example.bpa.helper.Json; +import com.example.bpa.helper.T; +import com.example.bpa.view.adapter.sp_adapter; +import com.example.bpa.view.inteface.MyClickListener; + +import java.util.ArrayList; /** * 配方研发 */ -public class yfpf_activity extends AppCompatActivity implements View.OnClickListener{ +public class yfpf_activity extends AppCompatActivity implements View.OnClickListener, MyClickListener { //region 变量 /** * 返回按钮 @@ -24,6 +37,21 @@ public class yfpf_activity extends AppCompatActivity implements View.OnClickList TextView gongneng_title; //endregion + //region 操作变量 + /** + * 增加按钮 + */ + Button buttonaddpf; + /** + * 表格显示 + */ + ListView datatab; + /** + * 商品数据 + */ + ArrayList bpa_goods=new ArrayList<>(); + //endregion + //region 私有函数 @Override protected void onCreate(Bundle savedInstanceState) { @@ -42,11 +70,12 @@ public class yfpf_activity extends AppCompatActivity implements View.OnClickList private void Init(){ gongneng_fanhui = this.findViewById(R.id.gongneng_fanhui); gongneng_title = this.findViewById(R.id.gongneng_title); + buttonaddpf=this.findViewById(R.id.buttonaddpf); + datatab= this.findViewById(R.id.datatab); //通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据 String msg=getIntent().getStringExtra("data"); gongneng_title.setText(msg); - - ((TextView)this.findViewById(R.id.test_view)).setText(msg); + Initdata(); } /** @@ -54,12 +83,27 @@ public class yfpf_activity extends AppCompatActivity implements View.OnClickList */ private void initEvents() { gongneng_fanhui.setOnClickListener(this); + buttonaddpf.setOnClickListener(this); + } + + /** + * 初始化数据加载 + */ + public void Initdata() + { + try{ + bpa_goods= QueryDB.GetGoodsALL(); + sp_adapter adapter = new sp_adapter(yfpf_activity.this, R.layout.sp_item, bpa_goods,this); + datatab.setAdapter(adapter); + }catch(Exception e){ + + } } //endregion //region 点击事件 /** - * 本页面点击事件监听 + * 本页面点击事件监听22 * * @param v */ @@ -69,6 +113,62 @@ public class yfpf_activity extends AppCompatActivity implements View.OnClickList case R.id.gongneng_fanhui://返回按钮 this.finish(); break; + case R.id.buttonaddpf://新建配方 + Intent intent = new Intent(this, add_pf_activity.class); + intent.putExtra("title", "新建配方"); + intent.putExtra("data", ""); + startActivity(intent); + break; + } + } + + /** + * 接口方法,响应ListView按钮点击事件 + */ + @Override + public void clickListener(View v,Object data) { + switch (v.getId()) + { + case R.id.button_item://删除按钮 + int sort=((BPA_GOODS)data).sort; + String id=((BPA_GOODS)data).id; + Log.i("日志",sort + "--- "+id); + QueryDB.DeleteGoods((BPA_GOODS)data); + Initdata(); + for (BPA_GOODS k:bpa_goods) { + if(k.sort>sort) + { + QueryDB.GetGoodsSort(k,1); + } + } + Initdata(); + break; + case R.id.button_item_Up://上移动按钮 + BPA_GOODS good=(BPA_GOODS)data; + if(good.sort==1) + { + T.show(this, "已是最顶部!"); + return; + } + QueryDB.GetGoodsSort((BPA_GOODS)data,1); + Initdata(); + break; + case R.id.button_item_Down://下移动按钮 + BPA_GOODS good2=(BPA_GOODS)data; + if(good2.sort==bpa_goods.size()) + { + T.show(this, "已是最底部!"); + return; + } + QueryDB.GetGoodsSort((BPA_GOODS)data,0); + Initdata(); + break; + case R.id.button_item_update://修改按钮 + Intent intent = new Intent(this, add_pf_activity.class); + intent.putExtra("title", "新建配方"); + intent.putExtra("data",new Json().objectToJson(BPA_GOODS.class,data)); + startActivity(intent); + break; } } //endregion diff --git a/app/src/main/java/com/example/bpa/view/mode/ResGoodsRecipe.java b/app/src/main/java/com/example/bpa/view/mode/ResGoodsRecipe.java new file mode 100644 index 0000000..d601f67 --- /dev/null +++ b/app/src/main/java/com/example/bpa/view/mode/ResGoodsRecipe.java @@ -0,0 +1,11 @@ +package com.example.bpa.view.mode; + +import com.example.bpa.db.mode.BPA_GOODSRECIPE; + +/** + * 界面显示商品配方结构 + */ +public class ResGoodsRecipe extends BPA_GOODSRECIPE { + //物料名称 + public String materialName; +} diff --git a/app/src/main/res/layout/datatab/layout/pf_item.xml b/app/src/main/res/layout/datatab/layout/pf_item.xml new file mode 100644 index 0000000..3ebbb12 --- /dev/null +++ b/app/src/main/res/layout/datatab/layout/pf_item.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + +