diff --git a/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java b/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java index 116dc33c..df362b66 100644 --- a/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java +++ b/app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java @@ -1643,6 +1643,7 @@ public class QueryDB { data.add(par); } } + LogUtils.d("GetGoodsSrecipeList 根据商品id查询配方信息 data.size="+data.size()); return data; } diff --git a/app/src/main/java/com/bonait/bnframework/event/ImageUrlSelectEvent.java b/app/src/main/java/com/bonait/bnframework/event/ImageUrlSelectEvent.java new file mode 100644 index 00000000..9cd4e72c --- /dev/null +++ b/app/src/main/java/com/bonait/bnframework/event/ImageUrlSelectEvent.java @@ -0,0 +1,13 @@ +package com.bonait.bnframework.event; + +/** + * @author: liup + * @description: + * @date: 2024/6/7 16:51. + */ +public class ImageUrlSelectEvent { + public String url; + public ImageUrlSelectEvent(String url){ + this.url = url; + } +} diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/GoodGroupDetailAdapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/GoodGroupDetailAdapter.java index b4ab609f..421e5ae6 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/GoodGroupDetailAdapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/GoodGroupDetailAdapter.java @@ -55,9 +55,9 @@ public class GoodGroupDetailAdapter extends BaseAdapter28||holder.binding.btnMaterialDelete.getTextSize()<24){ DisplayManager.scaleViewGroup(holder.binding.getRoot()); } - holder.binding.btnMaterialDelete.setOnClickListener(view -> { - - }); + if(mData.get(position).value!=null && !mData.get(position).value.isEmpty()){ + holder.binding.edittextWeight.setText(mData.get(position).value); + } List names = new ArrayList<>(); for(BPA_MATERIAL material : materilasList){ names.add(material.name); @@ -100,12 +100,12 @@ public class GoodGroupDetailAdapter extends BaseAdapter{ ArrayList re= QueryDB.GetGoodsSreciperecipeList(mData.get(position).id); @@ -101,20 +106,27 @@ public abstract class GoodGroupNameAdapter extends BaseAdapter{ if(holder.binding.tvExpand.getText().toString().equals("展开")){ - holder.binding.tvExpand.setText("展开"); + holder.binding.imgArrow.setBackgroundResource(R.mipmap.ic_arrow_down2); + holder.binding.tvExpand.setText("收起"); holder.binding.recycleDetail.setVisibility(View.VISIBLE); + holder.binding.llControl.setVisibility(View.VISIBLE); + }else { - holder.binding.tvExpand.setText("收起"); + holder.binding.imgArrow.setBackgroundResource(R.mipmap.ic_arrow_left2); + holder.binding.tvExpand.setText("展开"); holder.binding.recycleDetail.setVisibility(View.GONE); + holder.binding.llControl.setVisibility(View.GONE); } }); holder.binding.root.setOnClickListener(v->{ if(holder.binding.tvExpand.getText().toString().equals("展开")){ holder.binding.tvExpand.setText("收起"); holder.binding.recycleDetail.setVisibility(View.VISIBLE); + holder.binding.llControl.setVisibility(View.VISIBLE); }else { holder.binding.tvExpand.setText("展开"); holder.binding.recycleDetail.setVisibility(View.GONE); + holder.binding.llControl.setVisibility(View.GONE); } }); } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/newgood_adapter.java b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/newgood_adapter.java index f0f07904..a893dcd8 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/adapter/newgood_adapter.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/adapter/newgood_adapter.java @@ -90,13 +90,13 @@ public class newgood_adapter extends RecyclerView.Adapter myViewHolder.recyclerView.setAdapter(zsxadapter); // 设置要显示的图片和文字 - myViewHolder.name.setText(bpa_goodproperty.name); + myViewHolder.name.setText(bpa_goodproperty.name+":"); } } @Override diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java index 82671e8b..2cf0e78e 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/GoodPeiFangActivity.java @@ -60,9 +60,10 @@ import com.bonait.bnframework.common.model.mode.UpdateCloudGood; import com.bonait.bnframework.common.oss.OssHelper; import com.bonait.bnframework.common.utils.AlertDialogUtils; import com.bonait.bnframework.common.utils.ToastUtils; -import com.bonait.bnframework.common.view.AddGoodDialog; import com.bonait.bnframework.common.view.GoodEditDialog; +import com.bonait.bnframework.databinding.ActivityGoodpeifangBinding; import com.bonait.bnframework.modules.home.fragment.GongnengFragment; +import com.bonait.bnframework.modules.home.fragment.mode.AddGoodDialog; import com.bonait.bnframework.modules.home.fragment.mode.add_good_control; import com.bonait.bnframework.modules.home.fragment.mode.add_pf_control; import com.bonait.bnframework.modules.home.fragment.mode.add_pf_home_control; @@ -89,6 +90,7 @@ import okhttp3.RequestBody; public class GoodPeiFangActivity extends BaseActivity { + private ActivityGoodpeifangBinding viewBinding; /** * 顶部标题 */ @@ -117,23 +119,7 @@ public class GoodPeiFangActivity extends BaseActivity { @BindView(R.id.rv_right) RecyclerView rv_right; - /** - * 增加商品 - */ - @BindView(R.id.add_good) - add_good_control add_good; - -// /** -// * 增加配方选择页 -// */ -// @BindView(R.id.add_pf_home) -// add_pf_home_control add_pf_home; -// -// /** -// * 增加配方 -// */ -// @BindView(R.id.add_pf) -// add_pf_control add_pf; + private AddGoodDialog addGoodDialog; /** * 商品类型 @@ -142,12 +128,13 @@ public class GoodPeiFangActivity extends BaseActivity { private Context context; - private Activity activity; + private GoodPeiFangActivity activity; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.activity_goodpeifang); + viewBinding = ActivityGoodpeifangBinding.inflate(getLayoutInflater()); + setContentView(viewBinding.getRoot()); ButterKnife.bind(this); activity = this; @@ -156,7 +143,6 @@ public class GoodPeiFangActivity extends BaseActivity { Initdata(); } - private int typePos = 0; private void initTopBar() { mTopBar.setTitle("商品配方管理"); @@ -171,10 +157,10 @@ public class GoodPeiFangActivity extends BaseActivity { @Override public void onMessage(Object msg) { if (msg != null) { - GoodsAPositionBean xx = (GoodsAPositionBean) msg; - add_good.setData("保存", xx.goods, goodstypes, activity); - add_good.setVisibility(View.VISIBLE); - typePos = xx.position; + GoodsAPositionBean bean = (GoodsAPositionBean) msg; + typePos = bean.position; + viewBinding.goodEditView.setData(bean.goods,activity); + viewBinding.goodEditView.setVisibility(View.VISIBLE); } } }); @@ -226,13 +212,14 @@ public class GoodPeiFangActivity extends BaseActivity { @Override public void onMessage(Object msg) { if (msg != null) { - BPA_GOODS goods = (BPA_GOODS) msg; - - add_pf_home.SetData(goods, goodstypes); - add_pf_home.setVisibility(View.VISIBLE); + GoodsAPositionBean bean = (GoodsAPositionBean) msg; + typePos = bean.position; + viewBinding.goodEditView.setData(bean.goods,activity); + viewBinding.goodEditView.setVisibility(View.VISIBLE); } } }); + /* //增加商品 add_good.mListener = new MyClickListener() { @@ -314,13 +301,9 @@ public class GoodPeiFangActivity extends BaseActivity { ToastUtils.info("保存成功!!!"); } } - }; + };*/ } - /** - * 属性数据 - */ - ArrayList bpa_goodproperties = new ArrayList<>(); public List Fdata = new ArrayList<>(); private GoodLeftAdapter leftAdapter; private GoodRightAdapter rightAdapter; @@ -330,33 +313,6 @@ public class GoodPeiFangActivity extends BaseActivity { */ public void Initdata() { - bpa_goodproperties.clear(); - ArrayList da = QueryDB.GetGoodsPropertyALL("0"); - for (BPA_GOODPROPERTY item : da) { - ResGoodProperty re = new ResGoodProperty(); - re.id = item.id; - re.name = item.name; - - ArrayList zsx = QueryDB.GetGoodsPropertyALL(item.id); - re.child = new ArrayList<>(); - - - ArrayList _chid = new ArrayList<>(); - for (BPA_GOODPROPERTY k : zsx) { - ResGoodProperty m = new ResGoodProperty(); - m.id = k.id; - m.name = k.name; - m.isSelect = false; - _chid.add(m); - } - re.child = _chid; - re.GoodsTypeId=item.GoodsTypeId; - re.sort= item.sort; - bpa_goodproperties.add(re); - } - - - //1.商品类型 goodstypes = QueryDB.GetGoodsTypeALL(); Fdata.clear(); @@ -452,24 +408,29 @@ public class GoodPeiFangActivity extends BaseActivity { ToastUtils.info("请先创建至少一个分类"); return; } - add_good.setData("保存", null, goodstypes, activity); - add_good.setVisibility(View.VISIBLE); + if(addGoodDialog == null){ + addGoodDialog = new AddGoodDialog(); + } + addGoodDialog.setSaveCallBack(new AddGoodDialog.SaveCallBack() { + @Override + public void onSave() { + BPA_GOODSTYPE bpaGoodstype = goodstypes.get(typePos); + ArrayList goodsm = QueryDB.GetGoodsTypeId(bpaGoodstype.id); + Fdata.set(typePos,new LinkMode(bpaGoodstype, Arrays.asList(goodsm.toArray()), false)); + rightAdapter.notifyItemChanged(typePos); + ToastUtils.info("添加成功"); + } + }); + addGoodDialog.show(getSupportFragmentManager(),"添加商品名称"); break; } } @Override public void onDestroy() { - add_pf.destroy(); - add_good.destroy(); - add_pf_home.destroy(); super.onDestroy(); - add_good.mListener = null; - add_pf_home.mListener = null; - add_pf.mListener = null; goodstypes.clear(); goodstypes = null; - rv_right.setAdapter(null); rv_left.setAdapter(null); Glide.get(this).clearMemory(); diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java index 31ca965a..edec4e99 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java @@ -21,12 +21,15 @@ import com.bonait.bnframework.common.image.utils.LocalCacheUtils; 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.event.ImageUrlSelectEvent; import com.bonait.bnframework.modules.home.adapter.image_sp_adapter; import com.bonait.bnframework.modules.home.fragment.mode.image_sp; import com.bumptech.glide.Glide; import com.qmuiteam.qmui.widget.QMUITopBar; import com.qmuiteam.qmui.widget.QMUITopBarLayout; +import org.greenrobot.eventbus.EventBus; + import java.io.File; import java.util.ArrayList; import java.util.List; @@ -81,6 +84,7 @@ public class ImageChooseActivity extends BaseActivity { @Override public void clickListener(View v, Object data) { image_sp sp=(image_sp)data; + EventBus.getDefault().post(new ImageUrlSelectEvent(sp.url)); MessageManager.getInstance().sendMessage(MessageName.ClickImage,sp.url); finish(); } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/AddGoodDialog.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/AddGoodDialog.java index aa57034c..106edb1e 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/AddGoodDialog.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/AddGoodDialog.java @@ -1,5 +1,6 @@ package com.bonait.bnframework.modules.home.fragment.mode; +import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; @@ -20,9 +21,16 @@ 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_GOODSTYPE; +import com.bonait.bnframework.common.image.MyBitmapUtils; import com.bonait.bnframework.common.utils.DisplayManager; import com.bonait.bnframework.common.utils.ToastUtils; import com.bonait.bnframework.databinding.DialogAddGoodInfoBinding; +import com.bonait.bnframework.event.ImageUrlSelectEvent; +import com.bonait.bnframework.modules.home.fragment.from.ImageChooseActivity; + +import org.greenrobot.eventbus.EventBus; +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -43,6 +51,7 @@ public class AddGoodDialog extends DialogFragment { public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(STYLE_NORMAL, R.style.DialogScale); + EventBus.getDefault().register(this); } @Nullable @@ -65,8 +74,8 @@ public class AddGoodDialog extends DialogFragment { window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); WindowManager.LayoutParams params = window.getAttributes(); params.gravity = Gravity.CENTER; - params.width = ViewGroup.LayoutParams.WRAP_CONTENT; - params.height = ViewGroup.LayoutParams.WRAP_CONTENT; + params.width = ViewGroup.LayoutParams.MATCH_PARENT; + params.height = ViewGroup.LayoutParams.MATCH_PARENT; window.setAttributes(params); } } @@ -107,6 +116,14 @@ public class AddGoodDialog extends DialogFragment { Data.foreignKeyRe=viewBinding.edittextFk.getText().toString(); Data.goodtype=mapTypes.get(viewBinding.spinner.getSelectedItem().toString()); QueryDB.AddGoods(Data); + if(saveCallBack!=null){ + saveCallBack.onSave(); + } + }); + viewBinding.image.setOnClickListener(v->{ + Intent intent = new Intent(getContext(), ImageChooseActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(intent); }); } @@ -122,8 +139,29 @@ public class AddGoodDialog extends DialogFragment { private void initSpinner() { - ArrayAdapter adapter = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, new ArrayList<>(mapTypes.keySet())); - adapter.setDropDownViewResource(R.layout.spinner_dropdown_item); + ArrayAdapter adapter = new ArrayAdapter<>(getContext(), R.layout.spinner_text32_item, new ArrayList<>(mapTypes.keySet())); + adapter.setDropDownViewResource(R.layout.spinner_dropdown32_item); viewBinding.spinner.setAdapter(adapter); } + private SaveCallBack saveCallBack; + + public void setSaveCallBack(SaveCallBack saveCallBack) { + this.saveCallBack = saveCallBack; + } + + public interface SaveCallBack{ + void onSave(); + } + + @Override + public void onDestroy() { + super.onDestroy(); + EventBus.getDefault().unregister(this); + } + + //接收图片选择事件 + @Subscribe(threadMode = ThreadMode.MAIN) + public void onImageSelectEvent(ImageUrlSelectEvent event){ + new MyBitmapUtils().disPlay(viewBinding.image,event.url); + } } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/CopyRecipeDialog.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/CopyRecipeDialog.java index 359f79a2..75b872ba 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/CopyRecipeDialog.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/CopyRecipeDialog.java @@ -76,8 +76,8 @@ public class CopyRecipeDialog extends DialogFragment { window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); WindowManager.LayoutParams params = window.getAttributes(); params.gravity = Gravity.CENTER; - params.width = ViewGroup.LayoutParams.WRAP_CONTENT; - params.height = ViewGroup.LayoutParams.WRAP_CONTENT; + params.width = ViewGroup.LayoutParams.MATCH_PARENT; + params.height = ViewGroup.LayoutParams.MATCH_PARENT; window.setAttributes(params); } } diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/GoodsEditView.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/GoodsEditView.java index 38b777cd..e8789b42 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/GoodsEditView.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/GoodsEditView.java @@ -53,7 +53,7 @@ import java.util.Map; /** * @author: liup - * @description: + * @description: 添加配方 修改商品 * @date: 2024/6/6 15:38. */ public class GoodsEditView extends LinearLayout { @@ -210,6 +210,10 @@ public class GoodsEditView extends LinearLayout { return; } viewBinding.addGroup.setText("修改名称"); + if(ggids.isEmpty()&&!bpa_goodproperties.isEmpty()){ + ToastUtils.info("请选择属性"); + return; + } BPA_GOODSRECIPENAME goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,goodsData.id); if(goodsrecipename!=null) @@ -217,15 +221,15 @@ public class GoodsEditView extends LinearLayout { goodsrecipename.name = viewBinding.edittextGroup.getText().toString(); goodsrecipename.design=ggids; goodsrecipename.goodsID=goodsData.id; - QueryDB.AddGoodsRecipeName(goodsrecipename); - ToastUtils.info("添加【"+goodsrecipename.name+"】配方成功"); + QueryDB.UpdateGoodsRecipeName(goodsrecipename); + ToastUtils.info("修改【"+goodsrecipename.name+"】配方成功"); }else { goodsrecipename = new BPA_GOODSRECIPENAME(); goodsrecipename.name = viewBinding.edittextGroup.getText().toString(); goodsrecipename.design=ggids; goodsrecipename.goodsID=goodsData.id; - QueryDB.UpdateGoodsRecipeName(goodsrecipename); - ToastUtils.info("修改【"+goodsrecipename.name+"】配方成功"); + QueryDB.AddGoodsRecipeName(goodsrecipename); + ToastUtils.info("新建【"+goodsrecipename.name+"】配方成功"); } }); } @@ -248,6 +252,9 @@ public class GoodsEditView extends LinearLayout { } } } + if(!groupName.isEmpty()&&groupName.length()>1){ + groupName = groupName.substring(1); + } if (!ggids.isEmpty()) { ggids = ggids.substring(0, ggids.length() - 1); @@ -283,38 +290,41 @@ public class GoodsEditView extends LinearLayout { } bpa_goodproperties.clear(); - ArrayList parentAttributes = QueryDB.GetGoodsPropertyByTypeId(goodsData.goodtype); - for(BPA_GOODPROPERTY bpaGoodproperty : parentAttributes ){ - ArrayList zsx= QueryDB.GetGoodsPropertyALL(bpaGoodproperty.id); - ArrayList childList = new ArrayList<>(); - for(BPA_GOODPROPERTY bean:zsx){ - if(attributeNameList.contains(bean.id)){ - ResGoodProperty child = new ResGoodProperty(); - child.id = bean.id; - child.name = bean.name; - child.foreignKeyRe = bean.foreignKeyRe; - child.parentid = bpaGoodproperty.id; - child.sort = bean.sort; - child.GoodsTypeId = bean.GoodsTypeId; - child.isSelect = false; - childList.add(child); - } + ArrayList allGoodProperty = new ArrayList<>(); + ArrayList da = QueryDB.GetGoodsPropertyALL("0"); + for (BPA_GOODPROPERTY item : da) { + ResGoodProperty re = new ResGoodProperty(); + re.id = item.id; + re.name = item.name; + + ArrayList zsx = QueryDB.GetGoodsPropertyALL(item.id); + re.child = new ArrayList<>(); + + ArrayList _chid = new ArrayList<>(); + for (BPA_GOODPROPERTY k : zsx) { + ResGoodProperty m = new ResGoodProperty(); + m.id = k.id; + m.name = k.name; + m.isSelect = false; + _chid.add(m); } - if(!childList.isEmpty()){ - ResGoodProperty resGoodProperty = new ResGoodProperty(); - resGoodProperty.id = bpaGoodproperty.id; - resGoodProperty.name = bpaGoodproperty.name; - resGoodProperty.foreignKeyRe = bpaGoodproperty.foreignKeyRe; - resGoodProperty.parentid = ""; - resGoodProperty.sort = bpaGoodproperty.sort; - resGoodProperty.GoodsTypeId = bpaGoodproperty.GoodsTypeId; - resGoodProperty.isSelect = false; - resGoodProperty.child = new ArrayList<>(childList); - bpa_goodproperties.add(resGoodProperty); + re.child = _chid; + re.GoodsTypeId=item.GoodsTypeId; + re.sort= item.sort; + allGoodProperty.add(re); + } + for (ResGoodProperty pro:allGoodProperty) + { + if(pro.GoodsTypeId!=null && !pro.GoodsTypeId.isEmpty()) + { + if(pro.GoodsTypeId.contains(goodsData.goodtype)) + { + bpa_goodproperties.add(pro); + } } - } + List idList = new ArrayList<>(); for (ResGoodProperty item:bpa_goodproperties) { @@ -333,15 +343,12 @@ public class GoodsEditView extends LinearLayout { @Override public void onClickItem(View view, int position, String attributeId) { if(hasGroup()){ - viewBinding.tvGroupTip.setText("存在配方"); viewBinding.addGroup.setText("修改名称"); - //todo }else { - viewBinding.tvGroupTip.setText("不存在配方"); viewBinding.addGroup.setText("新建配方"); } - viewBinding.edittextGroup.setText(groupName); + viewBinding.edittextGroup.setText(goodsData.name +(groupName.isEmpty()?"":("—"+groupName))); } }); viewBinding.recyclerProperty.setAdapter(sxadapter); @@ -349,15 +356,13 @@ public class GoodsEditView extends LinearLayout { @Override public void run() { if(hasGroup()){ - viewBinding.tvGroupTip.setText("存在配方"); viewBinding.addGroup.setText("修改名称"); }else { - viewBinding.tvGroupTip.setText("不存在配方"); viewBinding.addGroup.setText("新建配方"); } - viewBinding.edittextGroup.setText(groupName); + viewBinding.edittextGroup.setText(goodsData.name +(groupName.isEmpty()?"":("—"+groupName))); } - },100); + },200); } /** diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java index ef207627..3f0db95e 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java +++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_good_control.java @@ -224,8 +224,8 @@ public class add_good_control extends LinearLayout { public void onMessage(Object msg) { if (msg != null) { url=(String) msg; -// new MyBitmapUtils().disPlay(cpfm,url); - GlideUtil.showImage(cpfm.getContext(),url,cpfm,R.mipmap.loading3); + new MyBitmapUtils().disPlay(cpfm,url); +// GlideUtil.showImage(cpfm.getContext(),url,cpfm,R.mipmap.loading3); } } }); diff --git a/app/src/main/res/drawable/bg_form.xml b/app/src/main/res/drawable/bg_form.xml new file mode 100644 index 00000000..cf466fca --- /dev/null +++ b/app/src/main/res/drawable/bg_form.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_form2.xml b/app/src/main/res/drawable/bg_form2.xml new file mode 100644 index 00000000..c161a524 --- /dev/null +++ b/app/src/main/res/drawable/bg_form2.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_form3.xml b/app/src/main/res/drawable/bg_form3.xml new file mode 100644 index 00000000..c2b80095 --- /dev/null +++ b/app/src/main/res/drawable/bg_form3.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_goodpeifang.xml b/app/src/main/res/layout/activity_goodpeifang.xml index 1da91feb..a5f51157 100644 --- a/app/src/main/res/layout/activity_goodpeifang.xml +++ b/app/src/main/res/layout/activity_goodpeifang.xml @@ -128,22 +128,10 @@ android:layout_height="wrap_content" android:background="@color/app_color_blue"/> - - - - + /> \ No newline at end of file diff --git a/app/src/main/res/layout/item/layout/dialog_add_good.xml b/app/src/main/res/layout/item/layout/dialog_add_good.xml index 72e946b3..8ba4fe77 100644 --- a/app/src/main/res/layout/item/layout/dialog_add_good.xml +++ b/app/src/main/res/layout/item/layout/dialog_add_good.xml @@ -12,7 +12,7 @@ android:layout_marginLeft="50dp" android:layout_marginRight="50dp" android:layout_marginTop="10dp" - android:layout_marginBottom="10dp" + android:layout_marginBottom="60dp" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/common_bg_with_radius_and_border"> diff --git a/app/src/main/res/layout/item/layout/dialog_add_good_info.xml b/app/src/main/res/layout/item/layout/dialog_add_good_info.xml index 8ff2bb17..790ee0af 100644 --- a/app/src/main/res/layout/item/layout/dialog_add_good_info.xml +++ b/app/src/main/res/layout/item/layout/dialog_add_good_info.xml @@ -4,13 +4,12 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/dialogbj" - android:focusable="true" android:id="@+id/root" - android:clickable="true"> + > @@ -72,11 +71,15 @@ android:layout_marginBottom="12dp" android:layout_width="match_parent" android:layout_height="wrap_content"> - + android:focusable="true" + android:focusableInTouchMode="true" + android:textSize="32sp"> + + - - - - + - - + android:layout_gravity="end" + android:gravity="end" + android:layout_marginBottom="10dp" + android:background="@drawable/input_bj" + > + + + - - - - - - - - - - - + android:background="@drawable/input_bj" + android:layout_height="70dp"> - + android:layout_height="70dp" + android:text="商品信息" + android:textStyle="bold" + android:textSize="32sp" + android:gravity="center_vertical" + /> + - + + + + - + + + + + + + + + + + + + + + + +