@@ -472,7 +472,7 @@ public class ExecuteTheRecipe { | |||||
public void Run() { | public void Run() { | ||||
IsComplete[0] = true; | IsComplete[0] = true; | ||||
if(GoodMake!=null&& GoodMake.good!=null){ | if(GoodMake!=null&& GoodMake.good!=null){ | ||||
MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "[" + GoodMake.good.name + "]步骤【" + key + "】配料完成!"); | |||||
// MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "[" + GoodMake.good.name + "]步骤【" + key + "】配料完成!"); | |||||
} | } | ||||
} | } | ||||
}; | }; | ||||
@@ -385,7 +385,6 @@ public class DataBus { | |||||
* 属性数据 | * 属性数据 | ||||
*/ | */ | ||||
public ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | public ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | ||||
public pfsx_adapter sxadapter=null; | |||||
/** | /** | ||||
* 加载商品配方 | * 加载商品配方 | ||||
*/ | */ | ||||
@@ -5,6 +5,7 @@ import android.database.Cursor; | |||||
import android.database.sqlite.SQLiteDatabase; | import android.database.sqlite.SQLiteDatabase; | ||||
import android.util.Log; | import android.util.Log; | ||||
import com.apkfuns.logutils.LogUtils; | |||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.file.DBHelper; | import com.bonait.bnframework.common.db.file.DBHelper; | ||||
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | ||||
@@ -12,14 +13,12 @@ import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | ||||
import com.bonait.bnframework.common.db.file.DBHelper; | |||||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | ||||
import com.bonait.bnframework.common.db.mode.BPA_CRAFT; | import com.bonait.bnframework.common.db.mode.BPA_CRAFT; | ||||
import com.bonait.bnframework.common.db.mode.BPA_CRAFTPROCESS; | import com.bonait.bnframework.common.db.mode.BPA_CRAFTPROCESS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_LOG; | import com.bonait.bnframework.common.db.mode.BPA_LOG; | ||||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||||
import com.bonait.bnframework.common.db.mode.BPA_MENU; | import com.bonait.bnframework.common.db.mode.BPA_MENU; | ||||
import com.bonait.bnframework.common.db.mode.BPA_MENUANDUSER; | import com.bonait.bnframework.common.db.mode.BPA_MENUANDUSER; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER; | import com.bonait.bnframework.common.db.mode.BPA_ORDER; | ||||
@@ -39,15 +38,13 @@ import com.bonait.bnframework.common.db.mode.ModeBase; | |||||
import com.bonait.bnframework.common.db.res.ResAlertLog; | import com.bonait.bnframework.common.db.res.ResAlertLog; | ||||
import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | ||||
import com.bonait.bnframework.common.db.res.ResLog; | import com.bonait.bnframework.common.db.res.ResLog; | ||||
import com.bonait.bnframework.common.db.res.ResSilosMode; | |||||
import com.bonait.bnframework.common.db.res.ResSubOrder; | import com.bonait.bnframework.common.db.res.ResSubOrder; | ||||
import com.bonait.bnframework.common.db.util.ListAddUtil; | |||||
import com.bonait.bnframework.common.helper.Tools; | import com.bonait.bnframework.common.helper.Tools; | ||||
import com.bonait.bnframework.common.utils.PreferenceUtils; | |||||
import java.lang.reflect.Field; | import java.lang.reflect.Field; | ||||
import java.text.SimpleDateFormat; | import java.text.SimpleDateFormat; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Collections; | |||||
import java.util.Date; | import java.util.Date; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Map; | import java.util.Map; | ||||
@@ -1351,6 +1348,7 @@ public class QueryDB { | |||||
for (Object k : obj) { | for (Object k : obj) { | ||||
data.add((BPA_GOODSRECIPENAME) k); | data.add((BPA_GOODSRECIPENAME) k); | ||||
} | } | ||||
LogUtils.d("GetGoodsRecipeNameGoodId data="+data.toString()); | |||||
return data; | return data; | ||||
} catch (Exception e) { | } catch (Exception e) { | ||||
Log.d("商品ID查询配方信息", "商品ID查询配方信息异常: " + e.getMessage()); | Log.d("商品ID查询配方信息", "商品ID查询配方信息异常: " + e.getMessage()); | ||||
@@ -3520,7 +3518,7 @@ public class QueryDB { | |||||
* @param orderby "date("+COLUMN_DATE+") desc" "TYPE desc"; desc 倒序 | * @param orderby "date("+COLUMN_DATE+") desc" "TYPE desc"; desc 倒序 | ||||
* @return | * @return | ||||
*/ | */ | ||||
private static ArrayList<Object> Get(Class c, String whereClause, String[] Args, String orderby) { | |||||
public static ArrayList<Object> Get(Class c, String whereClause, String[] Args, String orderby) { | |||||
lock.lock(); | lock.lock(); | ||||
ArrayList<Object> rlts = new ArrayList<Object>(); | ArrayList<Object> rlts = new ArrayList<Object>(); | ||||
SQLiteDatabase db = helper.getReadableDatabase(); | SQLiteDatabase db = helper.getReadableDatabase(); | ||||
@@ -19,4 +19,15 @@ public class BPA_GOODPROPERTY extends ModeBase { | |||||
* 商品类型id | * 商品类型id | ||||
*/ | */ | ||||
public String GoodsTypeId; | public String GoodsTypeId; | ||||
@Override | |||||
public String toString() { | |||||
return "BPA_GOODPROPERTY{" + | |||||
"name='" + name + '\'' + | |||||
", foreignKeyRe='" + foreignKeyRe + '\'' + | |||||
", parentid='" + parentid + '\'' + | |||||
", sort=" + sort + | |||||
", GoodsTypeId='" + GoodsTypeId + '\'' + | |||||
'}'; | |||||
} | |||||
} | } |
@@ -12,4 +12,13 @@ public class BPA_GOODSRECIPENAME extends ModeBase { | |||||
public String name; | public String name; | ||||
//规格集合 ids | //规格集合 ids | ||||
public String design;//商品规格 | public String design;//商品规格 | ||||
@Override | |||||
public String toString() { | |||||
return "BPA_GOODSRECIPENAME{" + | |||||
"goodsID='" + goodsID + '\'' + | |||||
", name='" + name + '\'' + | |||||
", design='" + design + '\'' + | |||||
'}'; | |||||
} | |||||
} | } |
@@ -10,6 +10,17 @@ import java.util.List; | |||||
* 查询 | * 查询 | ||||
*/ | */ | ||||
public class ResGoodProperty extends BPA_GOODPROPERTY { | public class ResGoodProperty extends BPA_GOODPROPERTY { | ||||
public Boolean isSelect; | |||||
public Boolean isSelect = false; | |||||
public ArrayList<ResGoodProperty> child; | public ArrayList<ResGoodProperty> child; | ||||
@Override | |||||
public String toString() { | |||||
return "ResGoodProperty==>{" + | |||||
"isSelect=" + isSelect + | |||||
", child=" + child + | |||||
", id='" + id + '\'' + | |||||
", parentid='" + parentid + '\'' + | |||||
", name='" + name + '\'' + | |||||
'}'; | |||||
} | |||||
} | } |
@@ -0,0 +1,70 @@ | |||||
package com.bonait.bnframework.common.db.util; | |||||
import android.util.Log; | |||||
import com.apkfuns.logutils.LogUtils; | |||||
import com.bonait.bnframework.common.db.QueryDB; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
/** | |||||
* @author: liup | |||||
* @description: | |||||
* @date: 2024/6/5 17:37. | |||||
*/ | |||||
public class GoodsRecipeUtil { | |||||
/** | |||||
* 商品ID查询配方关联表 | |||||
* | |||||
* @param id | |||||
* @return | |||||
*/ | |||||
public static ArrayList<BPA_GOODSRECIPENAME> GetGoodsRecipeNameGoodId(String id) { | |||||
try { | |||||
LogUtils.d("GetGoodsRecipeNameGoodId id="+id); | |||||
String orderby = QueryDB.Desc_Time_Up;//出料顺序 | |||||
String where = "isDelete=? and goodsID=?"; | |||||
String[] args = new String[]{"0", id}; | |||||
ArrayList<BPA_GOODSRECIPENAME> data = new ArrayList<>(); | |||||
ArrayList<Object> obj = QueryDB.Get(BPA_GOODSRECIPENAME.class, where, args, orderby); | |||||
for (Object k : obj) { | |||||
data.add((BPA_GOODSRECIPENAME) k); | |||||
} | |||||
LogUtils.d("GetGoodsRecipeNameGoodId data="+data.toString()); | |||||
return data; | |||||
} catch (Exception e) { | |||||
Log.d("商品ID查询配方信息", "商品ID查询配方信息异常: " + e.getMessage()); | |||||
return null; | |||||
} | |||||
} | |||||
public static ArrayList<BPA_GOODSRECIPENAME> GetGoodsRecipeNameLikes(String id, List<String> list) { | |||||
try { | |||||
String orderby = QueryDB.Desc_Time_Up;//出料顺序 | |||||
String where = "isDelete=? and goodsID=?"; | |||||
if(!list.isEmpty()){ | |||||
StringBuilder likes = new StringBuilder(); | |||||
for (int i=0;i<list.size();i++){ | |||||
likes.append(" and design like '%").append(list.get(i)).append("%'"); | |||||
} | |||||
where = "isDelete=? and goodsID=?"+likes; | |||||
} | |||||
GetGoodsRecipeNameGoodId(id); | |||||
LogUtils.d("GetGoodsRecipeNameLikes list="+list); | |||||
LogUtils.d("GetGoodsRecipeNameLikes goodsID="+id+"; where = " +where); | |||||
String[] args = new String[]{"0", id}; | |||||
ArrayList<BPA_GOODSRECIPENAME> data = new ArrayList<>(); | |||||
ArrayList<Object> obj = QueryDB.Get(BPA_GOODSRECIPENAME.class, where, args, orderby); | |||||
for (Object k : obj) { | |||||
data.add((BPA_GOODSRECIPENAME) k); | |||||
} | |||||
LogUtils.d("GetGoodsRecipeNameLikes data="+data.toString()); | |||||
return data; | |||||
} catch (Exception e) { | |||||
Log.d("商品ID查询配方信息", "商品ID查询配方信息异常: " + e.getMessage()); | |||||
return null; | |||||
} | |||||
} | |||||
} |
@@ -1,8 +1,9 @@ | |||||
package com.bonait.bnframework.common.db; | |||||
package com.bonait.bnframework.common.db.util; | |||||
import android.content.ContentValues; | import android.content.ContentValues; | ||||
import android.database.sqlite.SQLiteDatabase; | import android.database.sqlite.SQLiteDatabase; | ||||
import com.bonait.bnframework.common.db.QueryDB; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; |
@@ -44,8 +44,8 @@ public class GoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder> | |||||
holder.setText(R.id.tv_type, type.name); | holder.setText(R.id.tv_type, type.name); | ||||
int index_d = Fdata.indexOf(item); | int index_d = Fdata.indexOf(item); | ||||
if (item.isChoose) { | if (item.isChoose) { | ||||
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.main_background)); | |||||
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.app_color_blue)); | |||||
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.app_color_blue7f)); | |||||
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.white)); | |||||
holder.setVisible(R.id.tv_image, true); | holder.setVisible(R.id.tv_image, true); | ||||
holder.setVisible(R.id.tv_update, true); | holder.setVisible(R.id.tv_update, true); | ||||
holder.setVisible(R.id.tv_delete, true); | holder.setVisible(R.id.tv_delete, true); | ||||
@@ -0,0 +1,43 @@ | |||||
package com.bonait.bnframework.common.view; | |||||
import android.content.Context; | |||||
import android.util.AttributeSet; | |||||
import android.widget.ScrollView; | |||||
/** | |||||
* @author liupeng | |||||
* @description: 因OnScrollChangeListener()API23低版本报错,必须重写 | |||||
* @date :2022/2/17 11:29 | |||||
*/ | |||||
public class NewScrollView extends ScrollView { | |||||
private OnScrollChange listener; | |||||
public void setOnScrollListener(OnScrollChange listener){ | |||||
this.listener = listener; | |||||
} | |||||
public NewScrollView(Context context) { | |||||
super(context); | |||||
} | |||||
public NewScrollView(Context context, AttributeSet attrs) { | |||||
super(context, attrs); | |||||
} | |||||
public NewScrollView(Context context, AttributeSet attrs, int defStyleAttr) { | |||||
super(context, attrs, defStyleAttr); | |||||
} | |||||
@Override | |||||
protected void onScrollChanged(int l, int t, int oldl, int oldt) { | |||||
super.onScrollChanged(l, t, oldl, oldt); | |||||
if(listener!=null){ | |||||
listener.onScroll(l,t,oldl,oldt); | |||||
} | |||||
} | |||||
public interface OnScrollChange{ | |||||
void onScroll(int l,int t,int oldl,int oldt); | |||||
} | |||||
} |
@@ -0,0 +1,177 @@ | |||||
package com.bonait.bnframework.modules.home.adapter; | |||||
import android.view.View; | |||||
import androidx.recyclerview.widget.RecyclerView; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
/** | |||||
* @author: liup | |||||
* @description: adapter基类 | |||||
* @date: 2024/6/6 9:02. | |||||
*/ | |||||
public abstract class BaseAdapter<T, VH extends RecyclerView.ViewHolder> | |||||
extends RecyclerView.Adapter<VH> { | |||||
/** | |||||
* 数据 | |||||
*/ | |||||
protected List<T> mData; | |||||
/** | |||||
* 当前位置 | |||||
*/ | |||||
protected int mCurrentPosition = -1; | |||||
/** | |||||
* 不初始化数据 | |||||
*/ | |||||
public BaseAdapter() { | |||||
this(null); | |||||
} | |||||
/** | |||||
* 初始化数据 | |||||
* | |||||
* @param data 数据 | |||||
*/ | |||||
public BaseAdapter(List<T> data) { | |||||
super(); | |||||
mData = data; | |||||
} | |||||
/** | |||||
* 获取当前位置 | |||||
* | |||||
* @return 当前位置 | |||||
*/ | |||||
public int getCurrentPosition() { | |||||
return mCurrentPosition; | |||||
} | |||||
/** | |||||
* 设置当前位置 | |||||
* | |||||
* @param currentPosition 当前位置 | |||||
*/ | |||||
public void setCurrentPosition(int currentPosition) { | |||||
mCurrentPosition = currentPosition; | |||||
} | |||||
/** | |||||
* 获取数据 | |||||
* | |||||
* @return 数据 | |||||
*/ | |||||
public List<T> getData() { | |||||
if (mData == null) { | |||||
mData = new ArrayList<>(); | |||||
} | |||||
return mData; | |||||
} | |||||
/** | |||||
* 设置数据 | |||||
* | |||||
* @param data 数据 | |||||
*/ | |||||
public void setNewData(List<T> data) { | |||||
mData = data == null ? new ArrayList<>() : data; | |||||
notifyDataSetChanged(); | |||||
} | |||||
/** | |||||
* 添加数据 | |||||
* | |||||
* @param newData 新数据 | |||||
*/ | |||||
public void addData(List<T> newData) { | |||||
mData.addAll(newData); | |||||
notifyItemRangeInserted(mData.size() - newData.size(), newData.size()); | |||||
} | |||||
/** | |||||
* 更新数据 | |||||
* | |||||
* @param data 数据 | |||||
*/ | |||||
public void updateData(List<T> data) { | |||||
if (data != null) { | |||||
int size = data.size(); | |||||
int mSize = mData.size(); | |||||
if (mSize >= size) { | |||||
if (size > 0) { | |||||
for (int i = 0; i < size; i++) { | |||||
mData.set(i, data.get(i)); | |||||
} | |||||
notifyItemRangeChanged(0, size); | |||||
} | |||||
if (mSize > size) { | |||||
for (int i = 0; i < mSize - size; i++) { | |||||
mData.remove(mData.size() - 1); | |||||
} | |||||
notifyItemRangeRemoved(size, mSize - size); | |||||
} | |||||
} else { | |||||
for (int i = 0; i < mSize; i++) { | |||||
mData.set(i, data.get(i)); | |||||
} | |||||
notifyItemRangeChanged(0, mSize); | |||||
for (int i = mSize; i < size; i++) { | |||||
mData.add(data.get(i)); | |||||
} | |||||
notifyItemRangeInserted(mSize, size - mSize); | |||||
} | |||||
} | |||||
} | |||||
/** | |||||
* 替换数据 | |||||
* | |||||
* @param data 数据 | |||||
*/ | |||||
public void replaceData(List<T> data) { | |||||
if (data != mData) { | |||||
mCurrentPosition = 0; | |||||
if(mData==null){ | |||||
mData=data; | |||||
}else { | |||||
mData.clear(); | |||||
mData.addAll(data); | |||||
notifyDataSetChanged(); | |||||
} | |||||
} | |||||
} | |||||
/** | |||||
* 清空数据 | |||||
*/ | |||||
public void clearData() { | |||||
if(mData!=null) { | |||||
mCurrentPosition = 0; | |||||
mData.clear(); | |||||
notifyDataSetChanged(); | |||||
} | |||||
} | |||||
@Override | |||||
public int getItemViewType(int position) { | |||||
return position; | |||||
} | |||||
@Override | |||||
public int getItemCount() { | |||||
if (mData == null || mData.isEmpty()) { | |||||
return 0; | |||||
} | |||||
return mData.size(); | |||||
} | |||||
/** | |||||
* 当项被点击 | |||||
* | |||||
* @param v 视图 | |||||
* @param position 位置 | |||||
*/ | |||||
protected abstract void onItemClick(View v, int position); | |||||
} |
@@ -0,0 +1,43 @@ | |||||
//package com.bonait.bnframework.modules.home.adapter; | |||||
// | |||||
// | |||||
//import android.view.LayoutInflater; | |||||
//import android.view.View; | |||||
//import android.view.ViewGroup; | |||||
// | |||||
//import androidx.annotation.NonNull; | |||||
//import androidx.recyclerview.widget.RecyclerView; | |||||
// | |||||
//import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | |||||
// | |||||
///** | |||||
// * @author: liup | |||||
// * @description: | |||||
// * @date: 2024/6/6 17:30. | |||||
// */ | |||||
//public class GoodGroupNameAdapter extends BaseAdapter<BPA_GOODSRECIPENAME,GoodGroupNameAdapter.ViewHolder> { | |||||
// @Override | |||||
// protected void onItemClick(View v, int position) { | |||||
// | |||||
// } | |||||
// | |||||
// @NonNull | |||||
// @Override | |||||
// public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { | |||||
// return new ViewHolder(ItemStepBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)); | |||||
// } | |||||
// | |||||
// @Override | |||||
// public void onBindViewHolder(@NonNull ViewHolder holder, int position) { | |||||
// | |||||
// } | |||||
// | |||||
// public static class ViewHolder extends RecyclerView.ViewHolder { | |||||
// | |||||
// | |||||
// public ViewHolder(ItemStepBinding view) { | |||||
// super(view.getRoot()); | |||||
// binding = view; | |||||
// } | |||||
// } | |||||
//} |
@@ -1,5 +1,6 @@ | |||||
package com.bonait.bnframework.modules.home.adapter; | package com.bonait.bnframework.modules.home.adapter; | ||||
import android.annotation.SuppressLint; | |||||
import android.app.Activity; | import android.app.Activity; | ||||
import android.content.Context; | import android.content.Context; | ||||
import android.content.ContextWrapper; | import android.content.ContextWrapper; | ||||
@@ -13,9 +14,12 @@ import androidx.recyclerview.widget.RecyclerView; | |||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.MessageName; | import com.bonait.bnframework.common.constant.MessageName; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | |||||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | import com.bonait.bnframework.common.db.res.ResGoodProperty; | ||||
import com.bonait.bnframework.common.db.res.ResMaterilas; | import com.bonait.bnframework.common.db.res.ResMaterilas; | ||||
import com.bonait.bnframework.common.db.util.GoodsRecipeUtil; | |||||
import com.bonait.bnframework.common.message.MessageManager; | import com.bonait.bnframework.common.message.MessageManager; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -27,6 +31,21 @@ public class newpropertyselect_adapter extends RecyclerView.Adapter<RecyclerView | |||||
private Context context; | private Context context; | ||||
ArrayList<ResGoodProperty> Data = new ArrayList<>(); | ArrayList<ResGoodProperty> Data = new ArrayList<>(); | ||||
// private List<String> idList = new ArrayList<>(); | |||||
// private String goodId=""; | |||||
// private int parentPosition = 0; | |||||
// | |||||
// public void setParentPosition(int parentPosition) { | |||||
// this.parentPosition = parentPosition; | |||||
// } | |||||
// | |||||
// public void setGoodId(String goodId) { | |||||
// this.goodId = goodId; | |||||
// } | |||||
// | |||||
// public void setIdList(List<String> idList) { | |||||
// this.idList = idList; | |||||
// } | |||||
public newpropertyselect_adapter(Context context, ArrayList<ResGoodProperty> data) { | public newpropertyselect_adapter(Context context, ArrayList<ResGoodProperty> data) { | ||||
this.context = context; | this.context = context; | ||||
@@ -43,19 +62,49 @@ public class newpropertyselect_adapter extends RecyclerView.Adapter<RecyclerView | |||||
} | } | ||||
@Override | @Override | ||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { | |||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||||
try { | try { | ||||
// List<BPA_GOODSRECIPENAME> goodsrecipenames = new ArrayList<>(); | |||||
// if(goodId!=null && !goodId.isEmpty()&&idList!=null && !idList.isEmpty()){ | |||||
// List<String> list = new ArrayList<>(); | |||||
// for (int i=0;i<idList.size();i++){ | |||||
// if(i!=parentPosition){ | |||||
// list.add(idList.get(i)); | |||||
// } | |||||
// } | |||||
// goodsrecipenames = GoodsRecipeUtil.GetGoodsRecipeNameLikes(goodId,list); | |||||
// } | |||||
if (holder instanceof MyLCViewHolder1) { | if (holder instanceof MyLCViewHolder1) { | ||||
ResGoodProperty goods = (ResGoodProperty) Data.get(position); | ResGoodProperty goods = (ResGoodProperty) Data.get(position); | ||||
MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder; | MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder; | ||||
myViewHolder.button_select.setText(goods.name); | myViewHolder.button_select.setText(goods.name); | ||||
if (goods.isSelect) | if (goods.isSelect) | ||||
{ | { | ||||
myViewHolder.button_select.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.button3)); | |||||
// boolean isExit = false; | |||||
// for(BPA_GOODSRECIPENAME goodsrecipename :goodsrecipenames){ | |||||
// if(goodsrecipename.design.contains(goods.id)){ | |||||
// isExit = true; | |||||
// } | |||||
// } | |||||
// if(isExit){ | |||||
myViewHolder.button_select.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.button3)); | |||||
// }else { | |||||
// goods.isSelect = false; | |||||
// myViewHolder.button_select.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.button4)); | |||||
// } | |||||
}else | }else | ||||
{ | { | ||||
myViewHolder.button_select.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.button2)); | |||||
// boolean isExit = false; | |||||
// for(BPA_GOODSRECIPENAME goodsrecipename :goodsrecipenames){ | |||||
// if(goodsrecipename.design.contains(goods.id)){ | |||||
// isExit = true; | |||||
// } | |||||
// } | |||||
// if(isExit){ | |||||
myViewHolder.button_select.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.button2)); | |||||
// }else { | |||||
// myViewHolder.button_select.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.button4)); | |||||
// } | |||||
} | } | ||||
//按钮点击 | //按钮点击 | ||||
@@ -63,6 +112,7 @@ public class newpropertyselect_adapter extends RecyclerView.Adapter<RecyclerView | |||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
SetSelect(goods); | SetSelect(goods); | ||||
clickCallBack.onClickItem(view,position,goods.id); | |||||
MessageManager.getInstance().sendMessage(MessageName.ClickProperty,"ClickProperty"); | MessageManager.getInstance().sendMessage(MessageName.ClickProperty,"ClickProperty"); | ||||
} | } | ||||
}); | }); | ||||
@@ -78,7 +128,7 @@ public class newpropertyselect_adapter extends RecyclerView.Adapter<RecyclerView | |||||
{ | { | ||||
if(item.id.equals(pro.id)) | if(item.id.equals(pro.id)) | ||||
{ | { | ||||
item.isSelect=true; | |||||
item.isSelect = !item.isSelect; | |||||
}else | }else | ||||
{ | { | ||||
item.isSelect=false; | item.isSelect=false; | ||||
@@ -131,4 +181,22 @@ public class newpropertyselect_adapter extends RecyclerView.Adapter<RecyclerView | |||||
button_select = view.findViewById(R.id.button_select); | button_select = view.findViewById(R.id.button_select); | ||||
} | } | ||||
} | } | ||||
private ItemClickCallBack clickCallBack; | |||||
public void setClickCallBack(ItemClickCallBack clickCallBack){ | |||||
this.clickCallBack=clickCallBack; | |||||
} | |||||
public interface ItemClickCallBack{ | |||||
/** | |||||
* | |||||
* @param view | |||||
* @param position 子属性位置 | |||||
* @param attributeId 子属性id | |||||
*/ | |||||
void onClickItem(View view,int position,String attributeId); | |||||
} | |||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.bonait.bnframework.modules.home.adapter; | package com.bonait.bnframework.modules.home.adapter; | ||||
import android.annotation.SuppressLint; | |||||
import android.app.Activity; | import android.app.Activity; | ||||
import android.content.Context; | import android.content.Context; | ||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
@@ -35,8 +36,17 @@ public class pfsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||||
int resource1; | int resource1; | ||||
public Context contextA; | public Context contextA; | ||||
private final LayoutInflater mLayoutInflater; | private final LayoutInflater mLayoutInflater; | ||||
// private List<String> idList = new ArrayList<>(); | |||||
// private String goodId=""; | |||||
// public void setGoodId(String goodId) { | |||||
// this.goodId = goodId; | |||||
// } | |||||
// | |||||
// public void setIdList(List<String> idList) { | |||||
// this.idList = idList; | |||||
// } | |||||
public pfsx_adapter(Context context,ArrayList<ResGoodProperty> ac) { | |||||
public pfsx_adapter(Context context, ArrayList<ResGoodProperty> ac) { | |||||
this.contextA = context; | this.contextA = context; | ||||
datas=ac; | datas=ac; | ||||
mLayoutInflater = LayoutInflater.from(context); | mLayoutInflater = LayoutInflater.from(context); | ||||
@@ -48,7 +58,7 @@ public class pfsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||||
} | } | ||||
@Override | @Override | ||||
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { | |||||
public void onBindViewHolder(RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||||
if (holder instanceof MyViewHolder) { | if (holder instanceof MyViewHolder) { | ||||
MyViewHolder myViewHolder = (MyViewHolder) holder; | MyViewHolder myViewHolder = (MyViewHolder) holder; | ||||
ResGoodProperty bpa_goodproperty =datas.get(position); | ResGoodProperty bpa_goodproperty =datas.get(position); | ||||
@@ -59,6 +69,16 @@ public class pfsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||||
layout.setAutoMeasureEnabled(true); | layout.setAutoMeasureEnabled(true); | ||||
myViewHolder.recyclerView.setLayoutManager(layout); | myViewHolder.recyclerView.setLayoutManager(layout); | ||||
newpropertyselect_adapter zsxadapter = new newpropertyselect_adapter(contextA,bpa_goodproperty.child); | newpropertyselect_adapter zsxadapter = new newpropertyselect_adapter(contextA,bpa_goodproperty.child); | ||||
zsxadapter.setClickCallBack(new newpropertyselect_adapter.ItemClickCallBack() { | |||||
@Override | |||||
public void onClickItem(View view, int pos, String attributeId) { | |||||
if(clickCallBack!=null){ | |||||
clickCallBack.onClickItem(view,position,attributeId); | |||||
} | |||||
} | |||||
}); | |||||
// zsxadapter.setIdList(idList); | |||||
// zsxadapter.setGoodId(goodId); | |||||
myViewHolder.recyclerView.setAdapter(zsxadapter); | myViewHolder.recyclerView.setAdapter(zsxadapter); | ||||
// 设置要显示的图片和文字 | // 设置要显示的图片和文字 | ||||
@@ -80,4 +100,20 @@ public class pfsx_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||||
} | } | ||||
} | } | ||||
private ItemClickCallBack clickCallBack; | |||||
public void setClickCallBack(ItemClickCallBack clickCallBack) { | |||||
this.clickCallBack = clickCallBack; | |||||
} | |||||
public interface ItemClickCallBack{ | |||||
/** | |||||
* | |||||
* @param view | |||||
* @param position 父属性位置 | |||||
* @param attributeId 子属性id | |||||
*/ | |||||
void onClickItem(View view,int position,String attributeId); | |||||
} | |||||
} | } |
@@ -52,7 +52,7 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis | |||||
@BindView(R.id.datatab_sx) | @BindView(R.id.datatab_sx) | ||||
RecyclerView datatab_sx; | RecyclerView datatab_sx; | ||||
@BindView(R.id.root) | @BindView(R.id.root) | ||||
LinearLayout root; | |||||
QMUIWindowInsetLayout root; | |||||
@BindView(R.id.recyclerView) | @BindView(R.id.recyclerView) | ||||
RecyclerView recyclerView; | RecyclerView recyclerView; | ||||
@BindView(R.id.ll_content) | @BindView(R.id.ll_content) | ||||
@@ -0,0 +1,371 @@ | |||||
package com.bonait.bnframework.modules.home.fragment.mode; | |||||
import android.app.Activity; | |||||
import android.content.Context; | |||||
import android.content.Intent; | |||||
import android.util.AttributeSet; | |||||
import android.view.LayoutInflater; | |||||
import android.view.View; | |||||
import android.widget.LinearLayout; | |||||
import androidx.annotation.Nullable; | |||||
import androidx.recyclerview.widget.LinearLayoutManager; | |||||
import com.apkfuns.logutils.LogUtils; | |||||
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_GOODS; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; | |||||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | |||||
import com.bonait.bnframework.common.db.res.ResMaterilas; | |||||
import com.bonait.bnframework.common.glide.GlideUtil; | |||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||||
import com.bonait.bnframework.common.helper.WrapContentLinearLayoutManager; | |||||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||||
import com.bonait.bnframework.common.message.MessageLooper; | |||||
import com.bonait.bnframework.common.message.MessageManager; | |||||
import com.bonait.bnframework.common.utils.ToastUtils; | |||||
import com.bonait.bnframework.common.view.MyLayoutManager; | |||||
import com.bonait.bnframework.databinding.GoodsEditLayoutBinding; | |||||
import com.bonait.bnframework.modules.home.adapter.newmeatrilselect_adapter; | |||||
import com.bonait.bnframework.modules.home.adapter.pfsx_adapter; | |||||
import com.bonait.bnframework.modules.home.fragment.from.ImageChooseActivity; | |||||
import java.util.ArrayList; | |||||
import java.util.Arrays; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
/** | |||||
* @author: liup | |||||
* @description: | |||||
* @date: 2024/6/6 15:38. | |||||
*/ | |||||
public class GoodsEditView extends LinearLayout { | |||||
private GoodsEditLayoutBinding viewBinding; | |||||
private Activity activity; | |||||
private String url;//图片地址 | |||||
/** | |||||
* 点击事件 | |||||
*/ | |||||
public MyClickListener mListener=null; | |||||
/** | |||||
* 商品 | |||||
*/ | |||||
public BPA_GOODS goodsData=null; | |||||
/** | |||||
* 当前物料数据 | |||||
*/ | |||||
public ArrayList<ResMaterilas> resMaterilas=new ArrayList<>(); | |||||
public GoodsEditView(Context context, @Nullable AttributeSet attrs) { | |||||
super(context, attrs); | |||||
View root = LayoutInflater.from(context).inflate(R.layout.goods_edit_layout, this); | |||||
viewBinding = GoodsEditLayoutBinding.bind(root); | |||||
initView(); | |||||
} | |||||
private void initView(){ | |||||
initListener(); | |||||
} | |||||
/** | |||||
* 设置数据 | |||||
* | |||||
* @param data | |||||
*/ | |||||
public void setData(BPA_GOODS data, Activity activity) { | |||||
if(data==null){ | |||||
ToastUtils.info("数据为空"); | |||||
return; | |||||
} | |||||
setVisibility(VISIBLE); | |||||
goodsData = data; | |||||
this.activity=activity; | |||||
initData(); | |||||
} | |||||
/** | |||||
* 初始化界面控件的显示数据 | |||||
*/ | |||||
private void initData() { | |||||
//数据不为空 那么就是修改 | |||||
viewBinding.edittextName.setText(goodsData.name); | |||||
viewBinding.edittextFk.setText(goodsData.foreignKeyRe); | |||||
new MyBitmapUtils().disPlay(viewBinding.imgGoods,goodsData.url); | |||||
url=goodsData.url; | |||||
//初始化属性信息 | |||||
initPropertyData(); | |||||
} | |||||
public void setListener(MyClickListener mListener){ | |||||
this.mListener = mListener; | |||||
} | |||||
/** | |||||
* 按键监听 | |||||
*/ | |||||
private void initListener(){ | |||||
viewBinding.titleGoods.setOnClickListener(v->{ | |||||
if(viewBinding.contentGoods.getVisibility() == VISIBLE){ | |||||
viewBinding.contentGoods.setVisibility(GONE); | |||||
viewBinding.icArrowGoods.setBackgroundResource(R.mipmap.ic_arrow_left); | |||||
viewBinding.tvGoods.setText("收起"); | |||||
}else { | |||||
viewBinding.contentGoods.setVisibility(VISIBLE); | |||||
viewBinding.icArrowGoods.setBackgroundResource(R.mipmap.ic_arrow_down); | |||||
viewBinding.tvGoods.setText("展开"); | |||||
} | |||||
}); | |||||
viewBinding.titleAttribute.setOnClickListener(v->{ | |||||
if(viewBinding.contentAttribut.getVisibility() == VISIBLE){ | |||||
viewBinding.contentAttribut.setVisibility(GONE); | |||||
viewBinding.icArrowAttribute.setBackgroundResource(R.mipmap.ic_arrow_left); | |||||
viewBinding.tvArrowAttribute.setText("收起"); | |||||
}else { | |||||
viewBinding.contentAttribut.setVisibility(VISIBLE); | |||||
viewBinding.icArrowAttribute.setBackgroundResource(R.mipmap.ic_arrow_down); | |||||
viewBinding.tvArrowAttribute.setText("展开"); | |||||
} | |||||
}); | |||||
viewBinding.titleDetail.setOnClickListener(v->{ | |||||
if(viewBinding.contentDetail.getVisibility() == VISIBLE){ | |||||
viewBinding.contentDetail.setVisibility(GONE); | |||||
viewBinding.icArrowDetail.setBackgroundResource(R.mipmap.ic_arrow_left); | |||||
viewBinding.tvArrowDetail.setText("收起"); | |||||
}else { | |||||
viewBinding.contentDetail.setVisibility(VISIBLE); | |||||
viewBinding.icArrowDetail.setBackgroundResource(R.mipmap.ic_arrow_down); | |||||
viewBinding.tvArrowDetail.setText("展开"); | |||||
} | |||||
}); | |||||
viewBinding.llImg.setOnClickListener(v->{ | |||||
Intent intent = new Intent(getContext(), ImageChooseActivity.class); | |||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK); | |||||
getContext().startActivity(intent); | |||||
}); | |||||
//图标选择 | |||||
MessageManager.getInstance().registerMessageReceiver(activity, MessageName.ClickImage, new MessageLooper.OnMessageListener() { | |||||
@Override | |||||
public void onMessage(Object msg) { | |||||
if (msg != null) { | |||||
url=(String) msg; | |||||
new MyBitmapUtils().disPlay(viewBinding.imgGoods,url); | |||||
GlideUtil.showImage(viewBinding.imgGoods.getContext(),url,viewBinding.imgGoods,R.mipmap.loading3); | |||||
goodsData.url = url; | |||||
QueryDB.UpdateGoods(goodsData); | |||||
} | |||||
} | |||||
}); | |||||
//商品 | |||||
viewBinding.updateGoods.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View v) { | |||||
if(viewBinding.edittextName.getText().toString().isEmpty()) | |||||
{ | |||||
ToastUtils.info("名称不能为空!"); | |||||
return; | |||||
} | |||||
boolean isSucess = QueryDB.GetGoodsIs(viewBinding.edittextName.getText().toString()); | |||||
if(isSucess) | |||||
{ | |||||
ToastUtils.info("菜谱名称已存在!"); | |||||
return; | |||||
} | |||||
goodsData.name = viewBinding.edittextGroup.getText().toString(); | |||||
goodsData.url = url; | |||||
goodsData.foreignKeyRe=viewBinding.edittextFk.getText().toString(); | |||||
QueryDB.UpdateGoods(goodsData); | |||||
if (mListener != null) { | |||||
mListener.clickListenerNew(v,1,goodsData); | |||||
} | |||||
ToastUtils.info("修改成功"); | |||||
} | |||||
}); | |||||
viewBinding.closeFrom.setOnClickListener(v->{ | |||||
setVisibility(GONE); | |||||
}); | |||||
//属性 | |||||
viewBinding.addGroup.setOnClickListener(v->{ | |||||
if(viewBinding.edittextGroup.getText().toString().isEmpty()) | |||||
{ | |||||
ToastUtils.info("名称不能为空!"); | |||||
return; | |||||
} | |||||
viewBinding.addGroup.setText("修改名称"); | |||||
BPA_GOODSRECIPENAME goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,goodsData.id); | |||||
if(goodsrecipename!=null) | |||||
{ | |||||
goodsrecipename.name = viewBinding.edittextGroup.getText().toString(); | |||||
goodsrecipename.design=ggids; | |||||
goodsrecipename.goodsID=goodsData.id; | |||||
QueryDB.AddGoodsRecipeName(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+"】配方成功"); | |||||
} | |||||
}); | |||||
} | |||||
BPA_GOODSRECIPENAME goodsrecipename = null; | |||||
String ggids = "";//规格id集合 | |||||
String groupName =""; | |||||
/** | |||||
* 查询是否有配方 | |||||
*/ | |||||
public boolean hasGroup() { | |||||
//1.数据名称不能为空 | |||||
ggids = ""; | |||||
groupName =""; | |||||
for (ResGoodProperty item : bpa_goodproperties) { | |||||
for (ResGoodProperty k : item.child) { | |||||
if (k.isSelect) { | |||||
ggids += k.id + ","; | |||||
groupName +="/"+k.name; | |||||
} | |||||
} | |||||
} | |||||
if (!ggids.isEmpty()) { | |||||
ggids = ggids.substring(0, ggids.length() - 1); | |||||
} | |||||
goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,goodsData.id); | |||||
if (goodsrecipename == null) { | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
/** | |||||
* 属性信息 | |||||
*/ | |||||
ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | |||||
private pfsx_adapter sxadapter; | |||||
private void initPropertyData() { | |||||
//2.填充规则数据,查询所有属性大类 | |||||
viewBinding.recyclerProperty.setLayoutManager(new WrapContentLinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL,false)); | |||||
ArrayList<BPA_GOODSRECIPENAME> goodsrecipenames = QueryDB.GetGoodsRecipeNameGoodId(goodsData.id); | |||||
assert goodsrecipenames != null; | |||||
LogUtils.d("add_makegood_control goodsrecipenames = "+goodsrecipenames.size()); | |||||
List<String> attributeNameList = new ArrayList<>(); | |||||
for(BPA_GOODSRECIPENAME goodsrecipename1 : goodsrecipenames){ | |||||
if(goodsrecipename1.design.contains(",")){ | |||||
String[] res = goodsrecipename1.design.split(","); | |||||
attributeNameList.addAll(Arrays.asList(res)); | |||||
}else { | |||||
attributeNameList.add(goodsrecipename1.design); | |||||
} | |||||
} | |||||
bpa_goodproperties.clear(); | |||||
ArrayList<BPA_GOODPROPERTY> parentAttributes = QueryDB.GetGoodsPropertyByTypeId(goodsData.goodtype); | |||||
for(BPA_GOODPROPERTY bpaGoodproperty : parentAttributes ){ | |||||
ArrayList<BPA_GOODPROPERTY> zsx= QueryDB.GetGoodsPropertyALL(bpaGoodproperty.id); | |||||
ArrayList<ResGoodProperty> 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); | |||||
} | |||||
} | |||||
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); | |||||
} | |||||
} | |||||
List<String> idList = new ArrayList<>(); | |||||
for (ResGoodProperty item:bpa_goodproperties) | |||||
{ | |||||
int i = 0; | |||||
for (ResGoodProperty c : item.child) { | |||||
c.isSelect = i == 0; | |||||
if(i==0){ | |||||
idList.add(c.id); | |||||
} | |||||
i++; | |||||
} | |||||
} | |||||
LogUtils.d("idList = "+idList); | |||||
sxadapter = new pfsx_adapter(getContext(),bpa_goodproperties); | |||||
sxadapter.setClickCallBack(new pfsx_adapter.ItemClickCallBack() { | |||||
@Override | |||||
public void onClickItem(View view, int position, String attributeId) { | |||||
if(hasGroup()){ | |||||
viewBinding.tvGroupTip.setText("存在配方"); | |||||
viewBinding.addGroup.setText("修改名称"); | |||||
}else { | |||||
viewBinding.tvGroupTip.setText("不存在配方"); | |||||
viewBinding.addGroup.setText("新建配方"); | |||||
} | |||||
viewBinding.edittextGroup.setText(groupName); | |||||
} | |||||
}); | |||||
viewBinding.recyclerProperty.setAdapter(sxadapter); | |||||
viewBinding.recyclerProperty.postDelayed(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
if(hasGroup()){ | |||||
viewBinding.tvGroupTip.setText("存在配方"); | |||||
viewBinding.addGroup.setText("修改名称"); | |||||
}else { | |||||
viewBinding.tvGroupTip.setText("不存在配方"); | |||||
viewBinding.addGroup.setText("新建配方"); | |||||
} | |||||
viewBinding.edittextGroup.setText(groupName); | |||||
} | |||||
},100); | |||||
} | |||||
/** | |||||
* 配方详情 | |||||
*/ | |||||
/** | |||||
* 销毁 | |||||
*/ | |||||
public void destroy(){ | |||||
MessageManager.getInstance().unRegisterMessageReceiver(activity); | |||||
goodsData = null; | |||||
mListener = null; | |||||
resMaterilas.clear(); | |||||
resMaterilas = null; | |||||
url = null; | |||||
viewBinding.recyclerProperty.setAdapter(null); | |||||
sxadapter = null; | |||||
activity = null; | |||||
} | |||||
} |
@@ -14,6 +14,7 @@ import androidx.annotation.Nullable; | |||||
import androidx.recyclerview.widget.LinearLayoutManager; | import androidx.recyclerview.widget.LinearLayoutManager; | ||||
import androidx.recyclerview.widget.RecyclerView; | import androidx.recyclerview.widget.RecyclerView; | ||||
import com.apkfuns.logutils.LogUtils; | |||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.business.ExecuteTheRecipe; | import com.bonait.bnframework.business.ExecuteTheRecipe; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
@@ -38,6 +39,8 @@ import com.bonait.bnframework.modules.home.adapter.pfsx_adapter; | |||||
import com.bonait.bnframework.modules.home.adapter.xxpf_adapter; | import com.bonait.bnframework.modules.home.adapter.xxpf_adapter; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Arrays; | |||||
import java.util.List; | |||||
import butterknife.BindView; | import butterknife.BindView; | ||||
import butterknife.ButterKnife; | import butterknife.ButterKnife; | ||||
@@ -61,6 +64,8 @@ public class add_makegood_control extends LinearLayout{ | |||||
@BindView(R.id.chubeiliang) | @BindView(R.id.chubeiliang) | ||||
TextView chubeiliang; | TextView chubeiliang; | ||||
@BindView(R.id.tv_tip) | |||||
TextView tvTip; | |||||
/** | /** | ||||
* 点击事件 | * 点击事件 | ||||
@@ -86,47 +91,106 @@ public class add_makegood_control extends LinearLayout{ | |||||
} | } | ||||
ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | ||||
private pfsx_adapter sxadapter; | |||||
private void initData() { | private void initData() { | ||||
//2.填充规则数据,查询所有属性大类 | //2.填充规则数据,查询所有属性大类 | ||||
// LinearLayoutManager layoutManager=new LinearLayoutManager(getContext()); | |||||
// layoutManager.setOrientation(LinearLayoutManager.VERTICAL); | |||||
datatab_makesx.setLayoutManager(new WrapContentLinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL,false)); | datatab_makesx.setLayoutManager(new WrapContentLinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL,false)); | ||||
//if(DataBus.getInstance().sxadapter==null) | |||||
{ | |||||
bpa_goodproperties.clear(); | |||||
for (ResGoodProperty pro:DataBus.getInstance().bpa_goodproperties) | |||||
{ | |||||
if(pro.GoodsTypeId!=null && !pro.GoodsTypeId.isEmpty()) | |||||
{ | |||||
if(pro.GoodsTypeId.contains(Good.goodtype)) | |||||
{ | |||||
bpa_goodproperties.add(pro); | |||||
} | |||||
}else | |||||
{ | |||||
bpa_goodproperties.add(pro); | |||||
} | |||||
ArrayList<BPA_GOODSRECIPENAME> goodsrecipenames = QueryDB.GetGoodsRecipeNameGoodId(Good.id); | |||||
assert goodsrecipenames != null; | |||||
LogUtils.d("add_makegood_control goodsrecipenames = "+goodsrecipenames.size()); | |||||
List<String> attributeNameList = new ArrayList<>(); | |||||
for(BPA_GOODSRECIPENAME goodsrecipename1 : goodsrecipenames){ | |||||
if(goodsrecipename1.design.contains(",")){ | |||||
String[] res = goodsrecipename1.design.split(","); | |||||
attributeNameList.addAll(Arrays.asList(res)); | |||||
}else { | |||||
attributeNameList.add(goodsrecipename1.design); | |||||
} | } | ||||
} | |||||
for (ResGoodProperty item:bpa_goodproperties) | |||||
{ | |||||
int i = 0; | |||||
for (ResGoodProperty c : item.child) { | |||||
if (i == 0) { | |||||
c.isSelect = true; | |||||
}else | |||||
{ | |||||
c.isSelect =false; | |||||
} | |||||
i++; | |||||
bpa_goodproperties.clear(); | |||||
ArrayList<BPA_GOODPROPERTY> parentAttributes = QueryDB.GetGoodsPropertyByTypeId(Good.goodtype); | |||||
for(BPA_GOODPROPERTY bpaGoodproperty : parentAttributes ){ | |||||
ArrayList<BPA_GOODPROPERTY> zsx= QueryDB.GetGoodsPropertyALL(bpaGoodproperty.id); | |||||
ArrayList<ResGoodProperty> 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); | |||||
} | } | ||||
} | } | ||||
DataBus.getInstance().sxadapter = new pfsx_adapter(contextMian,bpa_goodproperties); | |||||
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); | |||||
} | |||||
} | } | ||||
datatab_makesx.setAdapter(DataBus.getInstance().sxadapter); | |||||
List<String> idList = new ArrayList<>(); | |||||
for (ResGoodProperty item:bpa_goodproperties) | |||||
{ | |||||
int i = 0; | |||||
for (ResGoodProperty c : item.child) { | |||||
c.isSelect = i == 0; | |||||
if(i==0){ | |||||
idList.add(c.id); | |||||
} | |||||
i++; | |||||
} | |||||
} | |||||
LogUtils.d("idList = "+idList); | |||||
sxadapter = new pfsx_adapter(contextMian,bpa_goodproperties); | |||||
// sxadapter.setIdList(idList); | |||||
// sxadapter.setGoodId(Good.id); | |||||
sxadapter.setClickCallBack(new pfsx_adapter.ItemClickCallBack() { | |||||
@Override | |||||
public void onClickItem(View view, int position, String attributeId) { | |||||
// idList.set(position,attributeId); | |||||
// for(int i=0;i<bpa_goodproperties.size();i++){ | |||||
// if(i!=position){ | |||||
// sxadapter.setIdList(idList); | |||||
// sxadapter.notifyItemChanged(i); | |||||
// } | |||||
// } | |||||
if(DataValidation()){ | |||||
tvTip.setText("存在配方"); | |||||
quzhizuo.setBackgroundDrawable(getResources().getDrawable(R.drawable.button3)); | |||||
}else { | |||||
tvTip.setText("不存在配方"); | |||||
quzhizuo.setBackgroundDrawable(getResources().getDrawable(R.drawable.button4)); | |||||
} | |||||
} | |||||
}); | |||||
datatab_makesx.setAdapter(sxadapter); | |||||
datatab_makesx.postDelayed(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
if(DataValidation()){ | |||||
tvTip.setText("存在配方"); | |||||
quzhizuo.setBackgroundDrawable(getResources().getDrawable(R.drawable.button3)); | |||||
}else { | |||||
tvTip.setText("不存在配方"); | |||||
quzhizuo.setBackgroundDrawable(getResources().getDrawable(R.drawable.button4)); | |||||
} | |||||
} | |||||
},100); | |||||
} | } | ||||
/** | /** | ||||
@@ -196,6 +260,7 @@ public class add_makegood_control extends LinearLayout{ | |||||
return true; | return true; | ||||
}else | }else | ||||
{ | { | ||||
ToastUtils.info("没有查询到配方,不能制作!"); | |||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
@@ -224,7 +289,7 @@ public class add_makegood_control extends LinearLayout{ | |||||
goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,Good.id); | goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,Good.id); | ||||
if (goodsrecipename == null) { | if (goodsrecipename == null) { | ||||
ToastUtils.info("没有查询到配方,不能制作!"); | |||||
// ToastUtils.info("没有查询到配方,不能制作!"); | |||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
@@ -0,0 +1,27 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:color="#7FEF5362" | |||||
android:radius="-1dp"> | |||||
<item android:state_pressed="true"> | |||||
<shape> | |||||
<solid android:color="#7fF44336" /> | |||||
<corners android:radius="6dp" /> | |||||
</shape> | |||||
</item> | |||||
<item android:state_enabled="false"> | |||||
<shape> | |||||
<solid android:color="#cccccc" /> | |||||
<corners android:radius="6dp" /> | |||||
</shape> | |||||
</item> | |||||
<item> | |||||
<shape> | |||||
<solid android:color="@color/red_primary" /> | |||||
<corners android:radius="6dp" /> | |||||
</shape> | |||||
</item> | |||||
</ripple> |
@@ -0,0 +1,29 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:color="@color/black" | |||||
android:radius="-1dp"> | |||||
<item android:state_pressed="true"> | |||||
<shape> | |||||
<solid android:color="#cccccc" /> | |||||
<corners android:radius="10dp" /> | |||||
</shape> | |||||
</item> | |||||
<item android:state_enabled="false"> | |||||
<shape> | |||||
<solid android:color="#cccccc" /> | |||||
<corners android:radius="10dp" /> | |||||
</shape> | |||||
</item> | |||||
<item> | |||||
<shape> | |||||
<solid android:color="#cccccc" /> | |||||
<corners android:radius="10dp" /> | |||||
<stroke | |||||
android:width="1dp" | |||||
android:color="#cccccc" /> | |||||
</shape> | |||||
</item> | |||||
</ripple> |
@@ -13,28 +13,24 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:background="@color/app_color_blue"/> | android:background="@color/app_color_blue"/> | ||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
<com.qmuiteam.qmui.widget.tab.QMUITabSegment | |||||
android:id="@+id/tabs" | |||||
android:layout_marginTop="54dp" | android:layout_marginTop="54dp" | ||||
android:orientation="vertical" | |||||
android:layout_height="match_parent"> | |||||
<com.qmuiteam.qmui.widget.tab.QMUITabSegment | |||||
android:id="@+id/tabs" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="43dp" | |||||
android:background="@drawable/qmui_list_item_bg_with_border_bottom" | |||||
android:textSize="14sp" | |||||
app:qmui_tab_selected_text_size="16sp" | |||||
app:qmui_tab_normal_text_size="14sp" | |||||
app:qmui_tab_indicator_height="2dp" | |||||
app:qmui_tab_indicator_top="false" | |||||
app:qmui_tab_has_indicator="true" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.QMUIViewPager | |||||
android:id="@+id/viewpager_wl" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:background="?attr/app_content_bg_color" /> | |||||
</LinearLayout> | |||||
android:layout_width="match_parent" | |||||
android:layout_height="43dp" | |||||
android:background="@drawable/qmui_list_item_bg_with_border_bottom" | |||||
android:textSize="14sp" | |||||
app:qmui_tab_selected_text_size="16sp" | |||||
app:qmui_tab_normal_text_size="14sp" | |||||
app:qmui_tab_indicator_height="2dp" | |||||
app:qmui_tab_indicator_top="false" | |||||
app:qmui_tab_has_indicator="true" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.QMUIViewPager | |||||
android:id="@+id/viewpager_wl" | |||||
android:layout_marginTop="97dp" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:background="?attr/app_content_bg_color" /> | |||||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> | </com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -1,173 +1,180 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | xmlns:app="http://schemas.android.com/apk/res-auto" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:id="@+id/root" | android:id="@+id/root" | ||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
tools:context=".modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment"> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recyclerView" | |||||
android:layout_width="90dp" | |||||
android:layout_height="match_parent" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
/> | |||||
<TextView | |||||
android:layout_width="3dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/app_color_blue7f"/> | |||||
<TextView | |||||
android:id="@+id/tip" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:textSize="36sp" | |||||
android:visibility="gone" | |||||
android:textColor="@color/color3" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:text="没有分类数据,请先创建分类" | |||||
/> | |||||
android:fitsSystemWindows="true" | |||||
> | |||||
<LinearLayout | <LinearLayout | ||||
android:id="@+id/ll_content" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | |||||
android:layout_marginStart="5dp" | |||||
android:background="@color/main_background" | |||||
android:orientation="vertical"> | |||||
android:orientation="horizontal" | |||||
android:layout_height="match_parent"> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recyclerView" | |||||
android:layout_width="90dp" | |||||
android:layout_height="wrap_content" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
/> | |||||
<TextView | |||||
android:layout_width="3dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_marginStart="5dp" | |||||
android:background="@color/app_color_blue7f"/> | |||||
<TextView | |||||
android:id="@+id/tip" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:textSize="36sp" | |||||
android:visibility="gone" | |||||
android:textColor="@color/color3" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:text="没有分类数据,请先创建分类" | |||||
/> | |||||
<!-- 属性管理 --> | |||||
<LinearLayout | <LinearLayout | ||||
android:id="@+id/ll_content" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | |||||
android:background="@color/qmui_config_color_white" | |||||
android:orientation="vertical" | |||||
android:paddingLeft="5dp" | |||||
android:paddingTop="@dimen/dp_10" | |||||
android:paddingRight="@dimen/dp_10"> | |||||
android:layout_height="match_parent" | |||||
android:layout_marginStart="5dp" | |||||
android:background="@color/main_background" | |||||
android:orientation="vertical"> | |||||
<RelativeLayout | |||||
<!-- 属性管理 --> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentBottom="true" | |||||
android:layout_marginBottom="5dp"> | |||||
android:background="@color/qmui_config_color_white" | |||||
android:orientation="vertical" | |||||
android:paddingTop="@dimen/dp_10" | |||||
android:paddingRight="@dimen/dp_10"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="wrap_content" | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_marginLeft="10dp" | |||||
android:layout_centerVertical="true" | |||||
android:textColor="@color/amber_primary_dark" | |||||
android:text="(温馨提示:点击行可修改内容.)" | |||||
android:textSize="12dp" /> | |||||
<Button | |||||
android:id="@+id/add_sx" | |||||
android:layout_width="100dp" | |||||
android:layout_height="40dp" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_centerInParent="true" | |||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="+增加属性" | |||||
android:textColor="@color/white" | |||||
android:textSize="14dp" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:layout_marginTop="5dp"> | |||||
<LinearLayout | |||||
android:layout_alignParentBottom="true" | |||||
android:layout_marginBottom="5dp"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="10dp" | |||||
android:layout_centerVertical="true" | |||||
android:textColor="@color/amber_primary_dark" | |||||
android:text="(温馨提示:点击行可修改内容.)" | |||||
android:textSize="12dp" /> | |||||
<Button | |||||
android:id="@+id/add_sx" | |||||
android:layout_width="100dp" | |||||
android:layout_height="40dp" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_centerInParent="true" | |||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="+增加属性" | |||||
android:textColor="@color/white" | |||||
android:textSize="14dp" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:orientation="vertical"> | |||||
<!-- 表头 --> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="36dp" | |||||
android:background="@color/datatab_tab"> | |||||
android:layout_marginTop="5dp"> | |||||
<TableLayout | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:orientation="vertical"> | |||||
<!-- 表头 --> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | |||||
android:layout_centerVertical="true" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:stretchColumns="0"> | |||||
<TableRow | |||||
android:layout_width="fill_parent" | |||||
android:layout_height="36dp" | |||||
android:background="@color/datatab_tab"> | |||||
<TableLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:gravity="center_horizontal"> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
android:layout_centerVertical="true" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:stretchColumns="0"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignParentLeft="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:text="排序" | |||||
android:textAlignment="center" | |||||
android:textStyle="bold" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
<TableRow | |||||
android:layout_width="fill_parent" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_weight="1"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:gravity="center_horizontal"> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentLeft="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:text="属性名称" | |||||
android:textAlignment="center" | |||||
android:textStyle="bold" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:layout_weight="1"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignParentLeft="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:text="排序" | |||||
android:textAlignment="center" | |||||
android:textStyle="bold" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentLeft="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:text="用户操作" | |||||
android:textAlignment="center" | |||||
android:textStyle="bold" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
</TableRow> | |||||
</TableLayout> | |||||
</RelativeLayout> | |||||
<!-- 数据 --> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent"> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/datatab_sx" | |||||
android:layout_weight="1"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignParentLeft="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:text="属性名称" | |||||
android:textAlignment="center" | |||||
android:textStyle="bold" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignParentLeft="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:text="用户操作" | |||||
android:textAlignment="center" | |||||
android:textStyle="bold" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
</TableRow> | |||||
</TableLayout> | |||||
</RelativeLayout> | |||||
<!-- 数据 --> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
android:layout_height="match_parent" /> | |||||
</RelativeLayout> | |||||
</LinearLayout> | |||||
</RelativeLayout> | |||||
android:layout_height="match_parent"> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/datatab_sx" | |||||
android:layout_width="match_parent" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
android:layout_height="match_parent" /> | |||||
</RelativeLayout> | |||||
</LinearLayout> | |||||
</RelativeLayout> | |||||
</LinearLayout> | |||||
</LinearLayout> | </LinearLayout> | ||||
</LinearLayout> | </LinearLayout> | ||||
</LinearLayout> | |||||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -1,8 +1,8 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<RelativeLayout | |||||
xmlns:android="http://schemas.android.com/apk/res/android" | |||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:id="@+id/root" | android:id="@+id/root" | ||||
android:background="@color/dialogbj"> | android:background="@color/dialogbj"> | ||||
@@ -94,6 +94,16 @@ | |||||
android:layout_gravity="end" | android:layout_gravity="end" | ||||
android:gravity="end" | android:gravity="end" | ||||
android:orientation="horizontal"> | android:orientation="horizontal"> | ||||
<TextView | |||||
android:id="@+id/tv_tip" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/app_color_blue" | |||||
tools:text="存在配方" | |||||
android:textSize="24dp" | |||||
android:layout_marginEnd="550dp" | |||||
/> | |||||
<TextView | <TextView | ||||
android:layout_marginLeft="20dp" | android:layout_marginLeft="20dp" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
@@ -136,7 +146,7 @@ | |||||
android:layout_height="80dp" | android:layout_height="80dp" | ||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:layout_marginBottom="@dimen/dp_10" | android:layout_marginBottom="@dimen/dp_10" | ||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:background="@drawable/button3" | |||||
android:text="去制作" | android:text="去制作" | ||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
android:textSize="32sp"/> | android:textSize="32sp"/> | ||||
@@ -0,0 +1,351 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||||
android:orientation="vertical" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_marginEnd="20dp" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_height="match_parent"> | |||||
<RelativeLayout | |||||
android:id="@+id/close_from" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="80dp" | |||||
android:layout_gravity="end" | |||||
android:gravity="end" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginBottom="10dp" | |||||
> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:gravity="center" | |||||
android:textColor="@color/black" | |||||
android:textSize="32sp" | |||||
android:text="商品编辑" | |||||
/> | |||||
<TextView | |||||
android:layout_width="80dp" | |||||
android:layout_height="80dp" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_alignParentTop="true" | |||||
android:background="@mipmap/close_image" | |||||
android:textColor="@color/white"/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:id="@+id/title_goods" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="70dp"> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="70dp" | |||||
android:text="商品信息" | |||||
android:textStyle="bold" | |||||
android:textSize="32sp" | |||||
android:gravity="center_vertical" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/tv_goods" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:layout_alignParentEnd="true" | |||||
android:text="展开" | |||||
android:textSize="32sp" | |||||
android:gravity="center_vertical" | |||||
android:textColor="@color/app_color_blue" | |||||
android:layout_marginEnd="70dp" | |||||
/> | |||||
<ImageView | |||||
android:id="@+id/ic_arrow_goods" | |||||
android:layout_width="60dp" | |||||
android:layout_height="60dp" | |||||
android:layout_centerVertical="true" | |||||
android:layout_alignParentEnd="true" | |||||
android:background="@mipmap/ic_arrow_left" | |||||
/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:id="@+id/content_goods" | |||||
android:layout_width="match_parent" | |||||
android:layout_below="@id/title_goods" | |||||
android:visibility="gone" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_marginEnd="20dp" | |||||
tools:visibility="visible" | |||||
android:layout_marginBottom="10dp" | |||||
android:layout_height="wrap_content"> | |||||
<LinearLayout | |||||
android:id="@+id/ll_img" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:orientation="vertical"> | |||||
<ImageView | |||||
android:id="@+id/img_goods" | |||||
android:layout_width="160dp" | |||||
android:layout_height="100dp" | |||||
android:layout_marginStart="3dp" | |||||
android:layout_marginTop="3dp" | |||||
android:layout_marginEnd="3dp" | |||||
android:layout_marginBottom="3dp" | |||||
android:src="@mipmap/loading3" /> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:textAlignment="center" | |||||
android:text="点击修改封面" | |||||
android:textSize="18dp"/> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_toRightOf="@id/ll_img" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_marginEnd="20dp" | |||||
android:layout_width="800dp" | |||||
android:layout_height="wrap_content"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="商品名称:" | |||||
android:textSize="32sp"/> | |||||
<!--账号输入框--> | |||||
<EditText | |||||
android:id="@+id/edittext_name" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="5dp" | |||||
android:background="@drawable/input_bj" | |||||
android:hint="请输入" | |||||
android:inputType="text" | |||||
android:maxLines="1" | |||||
android:maxLength="30" | |||||
android:padding="3dp" | |||||
android:textSize="32sp" /> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_toRightOf="@id/ll_img" | |||||
android:layout_marginTop="80dp" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_marginEnd="20dp" | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_width="800dp" | |||||
android:layout_height="wrap_content"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="商品外键:" | |||||
android:textSize="32sp"/> | |||||
<!--账号输入框--> | |||||
<EditText | |||||
android:id="@+id/edittext_fk" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="5dp" | |||||
android:background="@drawable/input_bj" | |||||
android:hint="请输入" | |||||
android:inputType="text" | |||||
android:maxLines="1" | |||||
android:padding="3dp" | |||||
android:textSize="32sp" /> | |||||
</LinearLayout> | |||||
<Button | |||||
android:id="@+id/update_goods" | |||||
android:layout_width="200dp" | |||||
android:layout_height="70dp" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_centerVertical="true" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="修改商品" | |||||
android:textColor="@color/white" | |||||
android:textSize="32sp"/> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:id="@+id/title_attribute" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="70dp"> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="70dp" | |||||
android:text="属性选择" | |||||
android:textStyle="bold" | |||||
android:textSize="32sp" | |||||
android:gravity="center_vertical" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/tv_arrow_attribute" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:layout_alignParentEnd="true" | |||||
android:text="展开" | |||||
android:textSize="32sp" | |||||
android:gravity="center_vertical" | |||||
android:textColor="@color/app_color_blue" | |||||
android:layout_marginEnd="70dp" | |||||
/> | |||||
<ImageView | |||||
android:id="@+id/ic_arrow_attribute" | |||||
android:layout_width="60dp" | |||||
android:layout_height="60dp" | |||||
android:layout_centerVertical="true" | |||||
android:layout_alignParentEnd="true" | |||||
android:background="@mipmap/ic_arrow_left" | |||||
/> | |||||
</RelativeLayout> | |||||
<LinearLayout | |||||
android:id="@+id/content_attribut" | |||||
android:layout_width="match_parent" | |||||
android:layout_marginStart="20dp" | |||||
android:orientation="vertical" | |||||
android:visibility="gone" | |||||
tools:visibility="visible" | |||||
android:layout_marginEnd="20dp" | |||||
android:layout_marginBottom="10dp" | |||||
android:layout_height="wrap_content"> | |||||
<LinearLayout | |||||
android:layout_marginTop="5dp" | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_marginRight="10dp" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="配方名称:" | |||||
android:textSize="32sp"/> | |||||
<!--输入框--> | |||||
<EditText | |||||
android:id="@+id/edittext_group" | |||||
android:layout_width="700dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="5dp" | |||||
android:background="@drawable/input_bj" | |||||
android:maxLength="30" | |||||
android:hint="请输入" | |||||
android:inputType="text" | |||||
android:maxLines="1" | |||||
android:padding="3dp" | |||||
tools:text="泡椒鸡杂面_清汤干拌_标准_大份" | |||||
android:textSize="32sp" /> | |||||
<TextView | |||||
android:id="@+id/tv_group_tip" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/app_color_blue" | |||||
tools:text="存在配方" | |||||
android:textSize="24sp" | |||||
android:layout_marginStart="20dp" | |||||
/> | |||||
<Button | |||||
android:id="@+id/add_group" | |||||
android:layout_width="200dp" | |||||
android:layout_height="70dp" | |||||
android:layout_marginStart="20dp" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="新建配方" | |||||
android:textColor="@color/white" | |||||
android:textSize="32sp"/> | |||||
</LinearLayout> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_property" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
/> | |||||
</LinearLayout> | |||||
<RelativeLayout | |||||
android:id="@+id/title_detail" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="70dp"> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="70dp" | |||||
android:text="配方详情" | |||||
android:textStyle="bold" | |||||
android:textSize="32sp" | |||||
android:gravity="center_vertical" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/tv_arrow_detail" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:layout_alignParentEnd="true" | |||||
android:text="收起" | |||||
android:textSize="32sp" | |||||
android:gravity="center_vertical" | |||||
android:textColor="@color/app_color_blue" | |||||
android:layout_marginEnd="70dp" | |||||
/> | |||||
<ImageView | |||||
android:id="@+id/ic_arrow_detail" | |||||
android:layout_width="60dp" | |||||
android:layout_height="60dp" | |||||
android:layout_centerVertical="true" | |||||
android:layout_alignParentEnd="true" | |||||
android:background="@mipmap/ic_arrow_down" | |||||
/> | |||||
</RelativeLayout> | |||||
<LinearLayout | |||||
android:id="@+id/content_detail" | |||||
android:layout_width="match_parent" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_marginEnd="20dp" | |||||
android:layout_marginBottom="10dp" | |||||
android:layout_height="match_parent" | |||||
android:orientation="vertical"> | |||||
<!-- 表头 --> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:orientation="horizontal" | |||||
android:background="@color/app_color_blue" | |||||
android:layout_height="50dp"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="名称" | |||||
android:gravity="center" | |||||
android:textSize="32sp" | |||||
android:textColor="@color/white"/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="重量(g)" | |||||
android:gravity="center" | |||||
android:textSize="32sp" | |||||
android:textColor="@color/white"/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="删除操作" | |||||
android:gravity="center" | |||||
android:textSize="32sp" | |||||
android:textColor="@color/white"/> | |||||
</LinearLayout> | |||||
<!-- 数据 --> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_detail" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
android:orientation="vertical" | |||||
/> | |||||
</LinearLayout> | |||||
</LinearLayout> |
@@ -0,0 +1,121 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:orientation="horizontal" | |||||
android:layout_height="40dp"> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
/> | |||||
<LinearLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="3"> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
android:layout_marginStart="50dp" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="3" | |||||
tools:text="未设置" | |||||
android:gravity="center" | |||||
android:background="@drawable/input_bj" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/app_color_blue"/> | |||||
</LinearLayout> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="3"> | |||||
<EditText | |||||
android:id="@+id/edittext_zl" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:background="@drawable/input_bj" | |||||
android:hint="请输入重量" | |||||
android:inputType="number|numberDecimal" | |||||
android:digits="0123456789." | |||||
android:gravity="center" | |||||
android:maxLines="1" | |||||
android:padding="3dp" | |||||
android:textSize="24sp" | |||||
/> | |||||
</RelativeLayout> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<LinearLayout | |||||
android:id="@+id/ll_arrow" | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="3"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | |||||
android:text="删除" | |||||
android:gravity="center" | |||||
android:textSize="24sp" | |||||
android:background="@drawable/input_bj" | |||||
android:textColor="@color/red_primary"/> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
android:layout_marginEnd="50dp" | |||||
/> | |||||
</LinearLayout> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_marginStart="100dp" | |||||
android:layout_marginEnd="100dp" | |||||
android:visibility="gone" | |||||
android:layout_height="60dp"> | |||||
<TextView | |||||
android:id="@+id/btn_add" | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | |||||
android:text="+添加物料" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/white" | |||||
android:gravity="center" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/btn_save" | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | |||||
android:text="保存配方" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/white" | |||||
android:gravity="center" | |||||
android:background="@drawable/bg_btn_red_selected" | |||||
/> | |||||
</LinearLayout> | |||||
</FrameLayout> |
@@ -0,0 +1,93 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:orientation="horizontal" | |||||
android:background="@drawable/input_bj" | |||||
android:id="@+id/root" | |||||
android:layout_height="40dp"> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="3" | |||||
tools:text="名称" | |||||
android:gravity="center" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/black"/> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="3" | |||||
tools:text="" | |||||
android:gravity="center" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/black"/> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:id="@+id/btn_copy" | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | |||||
android:text="复制" | |||||
android:gravity="center" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/app_color_blue"/> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | |||||
android:text="删除" | |||||
android:gravity="center" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/red_primary"/> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
<LinearLayout | |||||
android:id="@+id/ll_arrow" | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:gravity="center" | |||||
android:layout_weight="1"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:text="展开" | |||||
android:gravity="center" | |||||
android:textSize="24sp" | |||||
android:textColor="@color/app_color_blue"/> | |||||
<ImageView | |||||
android:layout_width="30dp" | |||||
android:layout_height="30dp" | |||||
android:background="@mipmap/ic_arrow_left2" | |||||
/> | |||||
</LinearLayout> | |||||
<TextView | |||||
android:layout_width="1dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
/> | |||||
</LinearLayout> |