@@ -4,10 +4,10 @@ | |||
<selectionStates> | |||
<SelectionState runConfigName="app"> | |||
<option name="selectionMode" value="DROPDOWN" /> | |||
<DropdownSelection timestamp="2024-05-21T09:01:34.719952400Z"> | |||
<DropdownSelection timestamp="2024-05-21T10:18:30.232371300Z"> | |||
<Target type="DEFAULT_BOOT"> | |||
<handle> | |||
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=74bb378d" /> | |||
<DeviceId pluginId="Default" identifier="serial=192.168.1.12:5555;connection=5c9e2c42" /> | |||
</handle> | |||
</Target> | |||
</DropdownSelection> | |||
@@ -119,38 +119,33 @@ public class APIService { | |||
* @param goodsAttributeList | |||
*/ | |||
private static void GoodPropSynchronous(String goodsTypeId, List<GoodsAttributeList> goodsAttributeList){ | |||
goodsAttributeList.forEach(goodProperty->{ | |||
if(goodsAttributeList==null){ | |||
return; | |||
} | |||
for(int n=0;n<goodsAttributeList.size();n++){ | |||
//属性添加 | |||
BPA_GOODPROPERTY bpa_goodproperty = new BPA_GOODPROPERTY(); | |||
bpa_goodproperty.name = goodProperty.goodsAttributeName; | |||
bpa_goodproperty.name = goodsAttributeList.get(n).goodsAttributeName; | |||
bpa_goodproperty.parentid ="0"; | |||
bpa_goodproperty.id = goodProperty.goodsAttributeId; | |||
bpa_goodproperty.sort =n+1; | |||
bpa_goodproperty.id = goodsAttributeList.get(n).goodsAttributeId; | |||
bpa_goodproperty.userID="超级管理员"; | |||
bpa_goodproperty.GoodsTypeId=goodsTypeId; | |||
QueryDB.AddGoodsProperty(bpa_goodproperty); | |||
//子属性添加 | |||
if(goodProperty.goodsAttributeValueList!=null){ | |||
for(int i=0;i<goodProperty.goodsAttributeValueList.size();i++){ | |||
if(goodsAttributeList.get(n).goodsAttributeValueList!=null){ | |||
for(int i=0;i<goodsAttributeList.get(n).goodsAttributeValueList.size();i++){ | |||
BPA_GOODPROPERTY bpa_goodpropertySub = new BPA_GOODPROPERTY(); | |||
bpa_goodpropertySub.name = goodProperty.goodsAttributeValueList.get(i).attributeValue; | |||
bpa_goodpropertySub.parentid = goodProperty.goodsAttributeId; | |||
bpa_goodpropertySub.id = goodProperty.goodsAttributeValueList.get(i).goodsAttributeValueId; | |||
bpa_goodpropertySub.name = goodsAttributeList.get(n).goodsAttributeValueList.get(i).attributeValue; | |||
bpa_goodpropertySub.parentid = goodsAttributeList.get(n).goodsAttributeId; | |||
bpa_goodpropertySub.id = goodsAttributeList.get(n).goodsAttributeValueList.get(i).goodsAttributeValueId; | |||
bpa_goodpropertySub.sort = i+1; | |||
bpa_goodproperty.userID="超级管理员"; | |||
QueryDB.AddGoodsProperty(bpa_goodpropertySub); | |||
} | |||
} | |||
// goodProperty.goodsAttributeValueList.forEach(attributeValue->{ | |||
// BPA_GOODPROPERTY bpa_goodpropertySub = new BPA_GOODPROPERTY(); | |||
// bpa_goodpropertySub.name = attributeValue.attributeValue; | |||
// bpa_goodpropertySub.parentid = goodProperty.goodsAttributeId; | |||
// bpa_goodpropertySub.id = attributeValue.goodsAttributeValueId; | |||
// bpa_goodproperty.userID="超级管理员"; | |||
// QueryDB.AddGoodsProperty(bpa_goodpropertySub); | |||
// }); | |||
}) ; | |||
} | |||
} | |||
/** | |||
@@ -239,11 +234,13 @@ public class APIService { | |||
FuncModel func= action.Content.stream().filter(p->p.actionName.equals("主料名称")).findFirst().get(); | |||
BPA_MATERIAL bpaMaterial= bpaMaterials.stream().filter(p->p.name.equals(func.actionValue)).findFirst().get(); | |||
FuncModel weight= action.Content.stream().filter(p->p.actionName.equals("主料重量")).findFirst().get(); | |||
FuncModel sort= action.Content.stream().filter(p->p.actionName.equals("执行步骤")).findFirst().get(); | |||
if(bpaMaterial!=null){ | |||
BPA_GOODSRECIPE bpa_goodsrecipe = new BPA_GOODSRECIPE(); | |||
bpa_goodsrecipe.goodsID = goodinfo.goodsId; | |||
bpa_goodsrecipe.materialID = bpaMaterial.id; | |||
bpa_goodsrecipe.value =weight.actionValue; | |||
bpa_goodsrecipe.sort = Integer.parseInt(sort.actionValue); | |||
bpa_goodsrecipe.recipeID=bpa_goodsrecipename.id; | |||
QueryDB.AddGoodsSrecipe(bpa_goodsrecipe); | |||
} | |||
@@ -303,10 +303,10 @@ public class DataBus { | |||
{ | |||
if(item.subOrder.id.equals(suborderID)) | |||
{ | |||
item.makeStatus=MakeStatus.制作完成; | |||
item.makeStatus=MakeStatus.取消; | |||
item.makeMs=""; | |||
item.makeProcess=100; | |||
item.subOrder.status=2; | |||
item.subOrder.status=4; | |||
QueryDB.UpdateSubOrder(item.subOrder); | |||
good=item; | |||
} | |||
@@ -1333,7 +1333,7 @@ public class QueryDB { | |||
* @param | |||
* @return | |||
*/ | |||
public static BPA_GOODSRECIPENAME GetGoodsRecipeNameDesignId(String zfid,String goodid) { | |||
public static BPA_GOODSRECIPENAME GetGoodsRecipeNameDesignId2(String zfid,String goodid) { | |||
try { | |||
String orderby = Desc_Time_Up;//出料顺序 | |||
String where = "isDelete=? and design=? and goodsID=?"; | |||
@@ -1349,6 +1349,55 @@ public class QueryDB { | |||
return null; | |||
} | |||
} | |||
/** | |||
* 做法ID查询配方关联表 | |||
* | |||
* @param | |||
* @return | |||
*/ | |||
public static BPA_GOODSRECIPENAME GetGoodsRecipeNameDesignId(String zfid,String goodid) { | |||
try { | |||
boolean exist = false; | |||
String orderby = Desc_Time_Up;//出料顺序 | |||
String where = "isDelete=? and goodsID=?"; | |||
String[] args = new String[]{"0",goodid}; | |||
ArrayList<BPA_GOODSRECIPENAME> data = new ArrayList<>(); | |||
ArrayList<Object> obj = Get(BPA_GOODSRECIPENAME.class, where, args, orderby); | |||
for (Object k : obj) { | |||
BPA_GOODSRECIPENAME bean = (BPA_GOODSRECIPENAME) k; | |||
if (zfid.isEmpty()) { | |||
if(bean.design == null || bean.design.isEmpty()){ | |||
return bean; | |||
} | |||
} else if (bean.design.contains(",") && zfid.contains(",")) { | |||
String[] res = bean.design.split(","); | |||
String[] res2 = zfid.split(","); | |||
if (res.length == res2.length) { | |||
boolean xx = true; | |||
for (String s : res) { | |||
if (!zfid.contains(s)) { | |||
xx = false; | |||
} | |||
} | |||
if (xx) { | |||
return bean; | |||
} | |||
} | |||
}else{ | |||
if(!bean.design.isEmpty()){ | |||
if(zfid.equals(bean.design)){ | |||
return bean; | |||
} | |||
} | |||
} | |||
} | |||
return null; | |||
} catch (Exception e) { | |||
Log.d("商品ID查询配方信息", "商品ID查询配方信息异常: " + e.getMessage()); | |||
return null; | |||
} | |||
} | |||
//endregion | |||
//region BPA_GOODSRECIPE 商品配方明细表 | |||
@@ -13,7 +13,7 @@ public class BPA_SUBORDER extends ModeBase{ | |||
public String recipeID; | |||
//数量:例如 *1 *2 | |||
public int number; | |||
//状态:0 未开始 1 制作中 2 已制作 3 已超时 | |||
//状态:0 未开始 1 制作中 2 已制作 3 已超时 4 取消 | |||
public int status; | |||
//商品图片 | |||
public String goodImg; | |||
@@ -3,5 +3,6 @@ package com.bonait.bnframework.common.db.res; | |||
public enum MakeStatus { | |||
等待中, | |||
制作中, | |||
取消, | |||
制作完成 | |||
} |
@@ -5,4 +5,5 @@ public class SuOrderTJ { | |||
public int Count; | |||
public int Yzz_Count; | |||
public int Yc_Count; | |||
public int Cancel_Count; | |||
} |
@@ -1,6 +1,11 @@ | |||
package com.bonait.bnframework.common.linktab.good; | |||
import android.annotation.SuppressLint; | |||
import android.content.Context; | |||
import android.content.res.Resources; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import androidx.annotation.LayoutRes; | |||
import androidx.annotation.NonNull; | |||
@@ -10,6 +15,7 @@ import androidx.recyclerview.widget.RecyclerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.linktab.LinkMode; | |||
import com.bonait.bnframework.common.view.MyLayoutManager; | |||
import com.bonait.bnframework.modules.home.adapter.AttributeSetAdapter; | |||
import com.bonait.bnframework.modules.home.adapter.liaochang_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.newgood_adapter; | |||
import com.chad.library.adapter.base.BaseQuickAdapter; | |||
@@ -18,26 +24,57 @@ import com.chad.library.adapter.base.viewholder.BaseViewHolder; | |||
import java.util.List; | |||
public class GoodRightAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder> { | |||
public class GoodRightAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |||
public List<LinkMode> Fdata; | |||
public Resources resources; | |||
public GoodRightAdapter(@LayoutRes int layoutResId, @Nullable List<LinkMode> data, Resources _resources) { | |||
super(layoutResId, data); | |||
resources=_resources; | |||
private final LayoutInflater mLayoutInflater; | |||
private Context context; | |||
public GoodRightAdapter(Context context, @Nullable List<LinkMode> data) { | |||
// super(layoutResId, data); | |||
Fdata=data; | |||
mLayoutInflater = LayoutInflater.from(context); | |||
this.context = context; | |||
} | |||
// @Override | |||
// protected void convert(BaseViewHolder holder, LinkMode item) { | |||
// RecyclerView view= holder.getView(R.id.recycler_view); | |||
// | |||
// MyLayoutManager layout = new MyLayoutManager(); | |||
// layout.setAutoMeasureEnabled(true); | |||
// view.setLayoutManager(layout); | |||
// newgood_adapter adapter = new newgood_adapter(getContext(), item.content); | |||
// view.setAdapter(adapter); | |||
// } | |||
@NonNull | |||
@Override | |||
protected void convert(BaseViewHolder holder, LinkMode item) { | |||
RecyclerView view= holder.getView(R.id.recycler_view); | |||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { | |||
View inflate = mLayoutInflater.inflate(R.layout.item_right_lc, parent, false); | |||
return new MyLCViewHolder1(inflate); | |||
} | |||
@Override | |||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
MyLCViewHolder1 myLCViewHolder1 = (MyLCViewHolder1)holder; | |||
MyLayoutManager layout = new MyLayoutManager(); | |||
layout.setAutoMeasureEnabled(true); | |||
view.setLayoutManager(layout); | |||
newgood_adapter adapter = new newgood_adapter(getContext(), item.content); | |||
view.setAdapter(adapter); | |||
myLCViewHolder1.recyclerView.setLayoutManager(layout); | |||
newgood_adapter adapter = new newgood_adapter(position,context, Fdata.get(position).content); | |||
myLCViewHolder1.recyclerView.setAdapter(adapter); | |||
} | |||
@Override | |||
public int getItemCount() { | |||
return Fdata.size(); | |||
} | |||
public static class MyLCViewHolder1 extends RecyclerView.ViewHolder{ | |||
RecyclerView recyclerView; | |||
public MyLCViewHolder1(@NonNull View itemView) { | |||
super(itemView); | |||
recyclerView= itemView.findViewById(R.id.recycler_view); | |||
} | |||
} | |||
} |
@@ -40,15 +40,17 @@ public class ddtj_adapter extends ArrayAdapter<SuOrderTJ> { | |||
//为每一个子项加载设定的布局 | |||
View view = LayoutInflater.from(getContext()).inflate(this.resource, parent, false); | |||
//分别获取 image view 和 textview 的实例 | |||
TextView name,ddzl,ddzl_yzz,ddzl_yc; | |||
TextView name,ddzl,ddzl_yzz,ddzl_yc,ddzl_cancel; | |||
name = (TextView) view.findViewById(R.id.name); | |||
ddzl = (TextView) view.findViewById(R.id.ddzl); | |||
ddzl_yzz = (TextView) view.findViewById(R.id.ddzl_yzz); | |||
ddzl_yc = (TextView) view.findViewById(R.id.ddzl_yc); | |||
ddzl_cancel = (TextView) view.findViewById(R.id.ddzl_cancel); | |||
name.setText(order.name+""); | |||
ddzl.setText(order.Count+""); | |||
ddzl_yzz.setText(order.Yzz_Count+""); | |||
ddzl_yc.setText(order.Yc_Count+""); | |||
ddzl_cancel.setText(order.Cancel_Count+""); | |||
return view; | |||
} | |||
private Activity findActivity(@NonNull Context context) { | |||
@@ -9,6 +9,7 @@ import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.ImageView; | |||
import android.widget.RelativeLayout; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
@@ -25,6 +26,7 @@ import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.glide.GlideUtil; | |||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
import com.bonait.bnframework.common.model.mode.GoodsAPositionBean; | |||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; | |||
@@ -42,13 +44,15 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
//图标 | |||
private MyBitmapUtils myBitmapUtils = new MyBitmapUtils(); | |||
private int currentPos;//分类位置 | |||
public List<Object> Data = new ArrayList<>(); | |||
public newgood_adapter(Context context, List<Object> data) { | |||
public newgood_adapter(int position,Context context, List<Object> data) { | |||
this.context = context; | |||
mLayoutInflater = LayoutInflater.from(context); | |||
Data = data; | |||
this.currentPos = position; | |||
} | |||
@Override | |||
@@ -83,6 +87,12 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
/** | |||
* 图片点击后打开 | |||
*/ | |||
myViewHolder.Tag_text.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
MessageManager.getInstance().sendMessage(MessageName.ClickGoodNew,goods); | |||
} | |||
}); | |||
myViewHolder.ImageUrl.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
@@ -96,7 +106,7 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
myViewHolder.Sc_text.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
MessageManager.getInstance().sendMessage(MessageName.UpdateGood,goods); | |||
MessageManager.getInstance().sendMessage(MessageName.UpdateGood,new GoodsAPositionBean(currentPos,goods)); | |||
} | |||
}); | |||
@@ -106,16 +116,8 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
myViewHolder.delete_text.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
AlertDialogUtils.showDialog(context, | |||
"删除提示!", | |||
"客官确定要删除商品,[" + goods.name + "]吗?", | |||
new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
MessageManager.getInstance().sendMessage(MessageName.DeleteGood1,goods); | |||
dialog.dismiss(); | |||
} | |||
}); | |||
MessageManager.getInstance().sendMessage(MessageName.DeleteGood1,new GoodsAPositionBean(currentPos,goods)); | |||
} | |||
}); | |||
@@ -128,7 +130,7 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
/** | |||
* 删除数据 | |||
* | |||
* @param index | |||
* @param | |||
*/ | |||
public void Detele(BPA_GOODS goods) { | |||
QueryDB.DeleteGoods(goods); | |||
@@ -75,8 +75,6 @@ import com.bonait.bnframework.common.helper.ThreadManager; | |||
import com.bonait.bnframework.common.helper.WrapContentLinearLayoutManager; | |||
import com.bonait.bnframework.common.linktab.LinkMode; | |||
import com.bonait.bnframework.common.linktab.TopItemDecoration; | |||
import com.bonait.bnframework.common.linktab.good.GoodLeftAdapter; | |||
import com.bonait.bnframework.common.linktab.good.GoodRightAdapter; | |||
import com.bonait.bnframework.common.linktab.makegood.MakeGoodLeftAdapter; | |||
import com.bonait.bnframework.common.linktab.makegood.MakeGoodRightAdapter; | |||
import com.bonait.bnframework.common.message.MessageLooper; | |||
@@ -18,6 +18,7 @@ import android.view.View; | |||
import android.widget.Button; | |||
import android.widget.RelativeLayout; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
@@ -51,6 +52,7 @@ import com.bonait.bnframework.common.model.mode.ActionJsonMode; | |||
import com.bonait.bnframework.common.model.mode.BatchingInfo; | |||
import com.bonait.bnframework.common.model.mode.BomTechnologyActionInfo; | |||
import com.bonait.bnframework.common.model.mode.CloudGood; | |||
import com.bonait.bnframework.common.model.mode.GoodsAPositionBean; | |||
import com.bonait.bnframework.common.model.mode.GoodsTechnology; | |||
import com.bonait.bnframework.common.model.mode.TechnologyAction; | |||
import com.bonait.bnframework.common.model.mode.UpdateBomInfo; | |||
@@ -155,6 +157,7 @@ public class GoodPeiFangActivity extends BaseActivity { | |||
} | |||
private int typePos = 0; | |||
private void initTopBar() { | |||
mTopBar.setTitle("商品配方管理"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui, R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@@ -168,9 +171,10 @@ public class GoodPeiFangActivity extends BaseActivity { | |||
@Override | |||
public void onMessage(Object msg) { | |||
if (msg != null) { | |||
BPA_GOODS xx = (BPA_GOODS) msg; | |||
add_good.setData("保存", xx, goodstypes, activity); | |||
GoodsAPositionBean xx = (GoodsAPositionBean) msg; | |||
add_good.setData("保存", xx.goods, goodstypes, activity); | |||
add_good.setVisibility(View.VISIBLE); | |||
typePos = xx.position; | |||
} | |||
} | |||
}); | |||
@@ -179,21 +183,40 @@ public class GoodPeiFangActivity extends BaseActivity { | |||
@Override | |||
public void onMessage(Object msg) { | |||
if (msg != null) { | |||
BPA_GOODS xx = (BPA_GOODS) msg; | |||
ArrayList<BPA_GOODSRECIPENAME> name=QueryDB.GetGoodsRecipeNameGoodId(xx.id); | |||
for (BPA_GOODSRECIPENAME item:name) | |||
{ | |||
ArrayList<ResGoodsRecipe> re= QueryDB.GetGoodsSreciperecipeList(item.id); | |||
for(ResGoodsRecipe item1:re) | |||
{ | |||
QueryDB.DeleteGoodsSrecipe(item1); | |||
GoodsAPositionBean xx = (GoodsAPositionBean) msg; | |||
rv_right.post(new Runnable() { | |||
@Override | |||
public void run() { | |||
AlertDialogUtils.showDialog(rv_right.getContext(), | |||
"删除提示!", | |||
"客官确定要删除商品,[" + xx.goods.name + "]吗?", | |||
new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
ArrayList<BPA_GOODSRECIPENAME> name=QueryDB.GetGoodsRecipeNameGoodId(xx.goods.id); | |||
for (BPA_GOODSRECIPENAME item:name) | |||
{ | |||
ArrayList<ResGoodsRecipe> re= QueryDB.GetGoodsSreciperecipeList(item.id); | |||
for(ResGoodsRecipe item1:re) | |||
{ | |||
QueryDB.DeleteGoodsSrecipe(item1); | |||
} | |||
QueryDB.DeleteGoodsRecipeName(item); | |||
} | |||
// Fdata.clear(); | |||
QueryDB.DeleteGoods(xx.goods); | |||
// Initdata(); | |||
BPA_GOODSTYPE bpaGoodstype = goodstypes.get(xx.position); | |||
ArrayList<BPA_GOODS> goodsm = QueryDB.GetGoodsTypeId(bpaGoodstype.id); | |||
Fdata.set(xx.position,new LinkMode(bpaGoodstype, Arrays.asList(goodsm.toArray()), false)); | |||
rightAdapter.notifyItemChanged(xx.position); | |||
ToastUtils.info("删除成功!!!"); | |||
dialog.dismiss(); | |||
} | |||
}); | |||
} | |||
QueryDB.DeleteGoodsRecipeName(item); | |||
} | |||
QueryDB.DeleteGoods(xx); | |||
Initdata(); | |||
ToastUtils.info("删除成功!!!"); | |||
}); | |||
} | |||
} | |||
}); | |||
@@ -222,11 +245,13 @@ public class GoodPeiFangActivity extends BaseActivity { | |||
if (k == 0) { | |||
add_good.setVisibility(View.GONE); | |||
} else if (k == 1) { | |||
Initdata(); | |||
// Initdata(); | |||
rightAdapter.notifyItemChanged(typePos); | |||
ToastUtils.info("执行成功!!!"); | |||
add_good.setVisibility(View.GONE); | |||
} else if (k == 2) { //保存并新建配方 | |||
Initdata(); | |||
// Initdata(); | |||
rightAdapter.notifyItemChanged(typePos); | |||
ToastUtils.info("执行成功!!!"); | |||
add_good.setVisibility(View.GONE); | |||
@@ -346,7 +371,7 @@ public class GoodPeiFangActivity extends BaseActivity { | |||
Initdata(); | |||
} | |||
}); | |||
rightAdapter = new GoodRightAdapter(R.layout.item_right_lc, Fdata, getResources()); | |||
rightAdapter = new GoodRightAdapter(getContext(), Fdata); | |||
rv_left.setAdapter(leftAdapter); | |||
rv_right.setAdapter(rightAdapter); | |||
@@ -197,6 +197,7 @@ public class SalesStatisticsActivity extends BaseActivity { | |||
tj.name=item.name; | |||
int count=0; | |||
int countyzz=0; | |||
int countCancel=0; | |||
for (ResSubOrder order:subOrders) | |||
{ | |||
if(order.goodsID.equals(item.id)) | |||
@@ -205,12 +206,15 @@ public class SalesStatisticsActivity extends BaseActivity { | |||
if(order.status==2) | |||
{ | |||
countyzz++; | |||
}else if(order.status == 4){ | |||
countCancel++; | |||
} | |||
} | |||
} | |||
tj.Count=count; | |||
tj.Yzz_Count=countyzz; | |||
tj.Yc_Count=count-countyzz; | |||
tj.Cancel_Count=countCancel; | |||
tj.Yc_Count=count-countyzz-countCancel; | |||
subOrdersStatic.add(tj); | |||
} | |||
@@ -158,6 +158,23 @@ | |||
android:textColor="@color/white" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="2"> | |||
<TextView | |||
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" | |||
@@ -69,6 +69,24 @@ | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="2"> | |||
<TextView | |||
android:id="@+id/ddzl_cancel" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_centerInParent="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="取消" | |||
android:textAlignment="center" | |||
android:textColor="@color/black" | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="30dp" | |||
@@ -6,6 +6,7 @@ | |||
> | |||
<RelativeLayout | |||
android:id="@+id/image" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:layout_marginBottom="@dimen/dp_10" | |||
@@ -46,8 +47,11 @@ | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="10dp" | |||
android:paddingRight="30dp" | |||
android:textSize="16dp" | |||
android:textColor="@color/light_blue_primary" | |||
android:paddingTop="3dp" | |||
android:paddingBottom="3dp" | |||
android:text="修改"/> | |||
<TextView | |||
android:id="@+id/delete_text" | |||
@@ -57,6 +61,9 @@ | |||
android:textSize="16dp" | |||
android:layout_alignParentRight="true" | |||
android:textColor="@color/red_primary_dark" | |||
android:paddingLeft="30dp" | |||
android:paddingTop="3dp" | |||
android:paddingBottom="3dp" | |||
android:text="删除"/> | |||
</RelativeLayout> | |||