@@ -89,7 +89,7 @@ android { | |||
//数据库配置 | |||
greendao { | |||
//指定数据库schema版本号,迁移等操作会用到 | |||
schemaVersion 5 | |||
schemaVersion 6 | |||
//设置生成数据库文件的目录,默认是在build中,可以将生成的文件放到我们的java目录中 | |||
targetGenDir 'src/main/java' | |||
//设置生成的数据库相关文件的包名,默认为entity所在的包名 | |||
@@ -112,18 +112,18 @@ public class CrashHandler implements UncaughtExceptionHandler { | |||
LogUtils.d("saveCrashLogToFile ///////////// 准备重启"+mContext.getPackageName()); | |||
SystemClock.sleep(3000); | |||
ServerManager.uploadCrashLog(new File(Environment.getExternalStorageDirectory(),"/jdzhandroid/crash.log"), new IHttpCallBack<Object>() { | |||
@Override | |||
public void onSuccess(Object o) { | |||
} | |||
@Override | |||
public void onError(int failCode, String msg) { | |||
} | |||
@Override | |||
public void onFailed(int failCode, Throwable throwable, String message) { | |||
} | |||
}); | |||
// ServerManager.uploadCrashLog(new File(Environment.getExternalStorageDirectory(),"/jdzhandroid/crash.log"), new IHttpCallBack<Object>() { | |||
// @Override | |||
// public void onSuccess(Object o) { | |||
// | |||
// } | |||
// @Override | |||
// public void onError(int failCode, String msg) { | |||
// } | |||
// @Override | |||
// public void onFailed(int failCode, Throwable throwable, String message) { | |||
// } | |||
// }); | |||
Intent intent = mContext.getPackageManager().getLaunchIntentForPackage(mContext.getPackageName()); | |||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK); | |||
@@ -21,6 +21,7 @@ public class BPA_RecipeBathingUseDetail { | |||
* 配方使用表id | |||
*/ | |||
private String recipeUseId; | |||
private boolean isWeight; | |||
/** | |||
* 物料名称 | |||
*/ | |||
@@ -53,13 +54,14 @@ public class BPA_RecipeBathingUseDetail { | |||
createAt= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); | |||
} | |||
@Generated(hash = 2025030842) | |||
@Generated(hash = 1946584799) | |||
public BPA_RecipeBathingUseDetail(String id, String recipeUseId, | |||
String batchingName, float useWeight, String storeName, | |||
String deviceName, String useDate, String createAt, String createBy, | |||
String groupId) { | |||
boolean isWeight, String batchingName, float useWeight, | |||
String storeName, String deviceName, String useDate, String createAt, | |||
String createBy, String groupId) { | |||
this.id = id; | |||
this.recipeUseId = recipeUseId; | |||
this.isWeight = isWeight; | |||
this.batchingName = batchingName; | |||
this.useWeight = useWeight; | |||
this.storeName = storeName; | |||
@@ -149,4 +151,12 @@ public class BPA_RecipeBathingUseDetail { | |||
public void setGroupId(String groupId) { | |||
this.groupId = groupId; | |||
} | |||
public boolean getIsWeight() { | |||
return this.isWeight; | |||
} | |||
public void setIsWeight(boolean isWeight) { | |||
this.isWeight = isWeight; | |||
} | |||
} |
@@ -18,6 +18,8 @@ public class BPA_RecipeUseDetail { | |||
@Id | |||
private String id; | |||
private String RecipeName; | |||
private String RecipeId; | |||
private boolean isWeight; | |||
/** | |||
* 属性组合名 | |||
*/ | |||
@@ -49,12 +51,15 @@ public class BPA_RecipeUseDetail { | |||
createAt= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); | |||
} | |||
@Generated(hash = 1246934803) | |||
public BPA_RecipeUseDetail(String id, String RecipeName, String AttributeName, | |||
String StoreName, String DeviceName, String UseDate, String JsonData, | |||
String createAt, String createBy, String groupId, boolean upLoad) { | |||
@Generated(hash = 941553618) | |||
public BPA_RecipeUseDetail(String id, String RecipeName, String RecipeId, | |||
boolean isWeight, String AttributeName, String StoreName, | |||
String DeviceName, String UseDate, String JsonData, String createAt, | |||
String createBy, String groupId, boolean upLoad) { | |||
this.id = id; | |||
this.RecipeName = RecipeName; | |||
this.RecipeId = RecipeId; | |||
this.isWeight = isWeight; | |||
this.AttributeName = AttributeName; | |||
this.StoreName = StoreName; | |||
this.DeviceName = DeviceName; | |||
@@ -66,6 +71,14 @@ public class BPA_RecipeUseDetail { | |||
this.upLoad = upLoad; | |||
} | |||
public String getRecipeId() { | |||
return RecipeId; | |||
} | |||
public void setRecipeId(String recipeId) { | |||
RecipeId = recipeId; | |||
} | |||
public boolean isUpLoad() { | |||
return upLoad; | |||
} | |||
@@ -157,4 +170,12 @@ public class BPA_RecipeUseDetail { | |||
public boolean getUpLoad() { | |||
return this.upLoad; | |||
} | |||
public boolean getIsWeight() { | |||
return this.isWeight; | |||
} | |||
public void setIsWeight(boolean isWeight) { | |||
this.isWeight = isWeight; | |||
} | |||
} |
@@ -22,6 +22,7 @@ import com.jdzh.jdzhandroid.databinding.FragmentRoundLineChartBinding; | |||
import com.jdzh.jdzhandroid.model.BatchingUseNum; | |||
import com.jdzh.jdzhandroid.model.NameColorBean; | |||
import com.jdzh.jdzhandroid.util.DisplayManager; | |||
import com.jdzh.jdzhandroid.util.PreferenceUtils; | |||
import com.jdzh.jdzhandroid.util.ToastUtil; | |||
import java.text.DecimalFormat; | |||
@@ -61,6 +62,7 @@ public class BatchingRecordActivity extends ActivityBase { | |||
private BatchingUseNum totalUseNum; | |||
private String colorMain = "#039BE5"; | |||
private NameColorListAdapter adapter; | |||
private boolean isWeight = false; | |||
public static BatchingRecordActivity newInstance() { | |||
return new BatchingRecordActivity(); | |||
@@ -75,6 +77,11 @@ public class BatchingRecordActivity extends ActivityBase { | |||
binding.desc1.setText("原料使用占比"); | |||
binding.desc2.setText("原料使用走势图"); | |||
binding.selectName.setText("原料选择"); | |||
isWeight = Config.getInstance().isWeight; | |||
binding.tbRecipeMode.setChecked(Config.getInstance().isWeight); | |||
binding.tbRecipeMode.setOnCheckedChangeListener((compoundButton, b) -> { | |||
isWeight = !isWeight; | |||
}); | |||
initCalendarTime(); | |||
init(); | |||
} | |||
@@ -213,6 +220,7 @@ public class BatchingRecordActivity extends ActivityBase { | |||
lineData.setAxisXBottom(axisX); | |||
lineData.setAxisYLeft(axisY); | |||
lineData.setBaseValue(Float.NEGATIVE_INFINITY); | |||
binding.chartLine.setVisibility(lines.isEmpty()?View.GONE:View.VISIBLE); | |||
binding.chartLine.setLineChartData(lineData); | |||
binding.chartLine.setOnValueTouchListener(new LineChartOnValueSelectListener() { | |||
@Override | |||
@@ -235,7 +243,9 @@ public class BatchingRecordActivity extends ActivityBase { | |||
totalUseNum = new BatchingUseNum(); | |||
List<BPA_RecipeBathingUseDetail> totalList = SqliteHelper.get().queryByQueryBuilder(BPA_RecipeBathingUseDetail.class, | |||
BPA_RecipeBathingUseDetailDao.Properties.CreateAt.ge(parseStartTime(binding.starttime.getText().toString(),"01")), | |||
BPA_RecipeBathingUseDetailDao.Properties.CreateAt.le(parseEndTime(binding.starttime.getText().toString(),"12"))); | |||
BPA_RecipeBathingUseDetailDao.Properties.CreateAt.le(parseEndTime(binding.starttime.getText().toString(),"12")), | |||
BPA_RecipeBathingUseDetailDao.Properties.IsWeight.eq(isWeight) | |||
); | |||
totalUseNum.setName("其他"); | |||
float number = 0f; | |||
for(BPA_RecipeBathingUseDetail bean:totalList){ | |||
@@ -34,6 +34,7 @@ public class RecipeBillingActivity extends ActivityBase { | |||
private RecipeBillingAdapter adapter; | |||
private List<BPA_RecipeUseDetail> recipeUseDetails = new ArrayList<>(); | |||
private TimePickerView pvTime; | |||
private boolean isWeight; | |||
public static RecipeBillingActivity newInstance() { | |||
return new RecipeBillingActivity(); | |||
@@ -45,6 +46,11 @@ public class RecipeBillingActivity extends ActivityBase { | |||
binding= ActivityRecipeBillingBinding.inflate(getLayoutInflater()); | |||
setContentView(binding.getRoot()); | |||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||
isWeight = Config.getInstance().isWeight; | |||
binding.tbRecipeMode.setChecked(Config.getInstance().isWeight); | |||
binding.tbRecipeMode.setOnCheckedChangeListener((compoundButton, b) -> { | |||
isWeight = !isWeight; | |||
}); | |||
initCalendarTime(); | |||
initView(); | |||
initData(); | |||
@@ -106,6 +112,7 @@ public class RecipeBillingActivity extends ActivityBase { | |||
.where(BPA_RecipeUseDetailDao.Properties.CreateAt.ge(binding.starttime.getText().toString())) | |||
.where(BPA_RecipeUseDetailDao.Properties.CreateAt.le(binding.endtime.getText().toString())) | |||
.where(BPA_RecipeUseDetailDao.Properties.RecipeName.eq(binding.recipeName1.getText())) | |||
.where(BPA_RecipeUseDetailDao.Properties.IsWeight.eq(isWeight)) | |||
.orderDesc(BPA_RecipeUseDetailDao.Properties.CreateAt) | |||
.list(); | |||
recipeUseDetails.addAll(useDetails); | |||
@@ -255,8 +255,10 @@ public class RecipeExecuteDialog extends DialogFragment { | |||
//配方使用记录 | |||
BPA_RecipeUseDetail useDetail = new BPA_RecipeUseDetail(); | |||
useDetail.setRecipeName(recipe.getName()); | |||
useDetail.setRecipeId(recipe.getId()); | |||
useDetail.setUseDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); | |||
useDetail.setAttributeName(names); | |||
useDetail.setIsWeight(Config.getInstance().isWeight); | |||
useDetail.setStoreName(PreferenceUtils.getString(Config.SHARE_KEY_storeName,"")); | |||
useDetail.setDeviceName(PreferenceUtils.getString(Config.SHARE_KEY_deviceName,"")); | |||
SqliteHelper.get().insert(useDetail); | |||
@@ -273,6 +275,7 @@ public class RecipeExecuteDialog extends DialogFragment { | |||
BPA_RecipeBathingUseDetail useDetail1 = new BPA_RecipeBathingUseDetail(); | |||
useDetail1.setRecipeUseId(useDetail.getId()); | |||
useDetail1.setBatchingName(batching.getName()); | |||
useDetail1.setIsWeight(Config.getInstance().isWeight); | |||
useDetail1.setUseWeight(bean.getWeight()); | |||
useDetail1.setUseDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); | |||
useDetail1.setDeviceName(PreferenceUtils.getString(Config.SHARE_KEY_deviceName,"")); | |||
@@ -51,10 +51,12 @@ public class RecipeNameListRecordDialog extends Dialog { | |||
private int COLOR_RED = Color.parseColor("#FF4444"); | |||
private int COLOR_6 = Color.parseColor("#8577FF"); | |||
private int[] COLORS = new int[]{COLOR_6, COLOR_GREEN, COLOR_ORANGE, COLOR_RED,COLOR_BLUE, COLOR_VIOLET}; | |||
private boolean isWeight; | |||
public RecipeNameListRecordDialog(@NonNull Context context) { | |||
public RecipeNameListRecordDialog(@NonNull Context context,boolean isWeight) { | |||
super(context); | |||
this.mContext = context; | |||
this.isWeight = isWeight; | |||
binding = DialogRecipeNameListRecordBinding.inflate(getLayoutInflater()); | |||
setContentView(binding.getRoot()); | |||
setCanceledOnTouchOutside(true); | |||
@@ -111,7 +113,7 @@ public class RecipeNameListRecordDialog extends Dialog { | |||
recipeGroups.clear(); | |||
recipeGroups.addAll(SqliteHelper.get().queryByBuilder(BPA_RecipeGroup.class, | |||
BPA_RecipeGroupDao.Properties.IsWeight.eq(Config.getInstance().isWeight))); | |||
BPA_RecipeGroupDao.Properties.IsWeight.eq(isWeight))); | |||
menuGourpAdapter = new RecipeGroupAdapter(); | |||
menuGourpAdapter.setmDatas(recipeGroups); | |||
menuGourpAdapter.setOnItemClickListener(new RecipeGroupAdapter.OnItemClickListener() { | |||
@@ -160,7 +160,7 @@ public class ParSetFragment extends Fragment { | |||
* @param recipeListBean 配方数据 | |||
*/ | |||
private void synchronizeData(ArrayList<BPA_Batching> bpaBatchings,RecipeListBean recipeListBean){ | |||
DialogManager.showWarn("获取获取所有配方成功,即将删除本地配方和物料数据并使用云端数据,物料通道绑定关系若有变动需重新校准,请确认?", DialogButton.OKCancel, new IRunT<Boolean>() { | |||
DialogManager.showWarn("获取所有配方成功,即将删除本地配方和物料数据并使用云端数据,物料通道绑定关系若有变动需重新校准,请确认?", DialogButton.OKCancel, new IRunT<Boolean>() { | |||
@Override | |||
public void Run(Boolean aBoolean) { | |||
if (aBoolean){ | |||
@@ -14,8 +14,10 @@ import androidx.fragment.app.Fragment; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bigkoo.pickerview.TimePickerView; | |||
import com.jdzh.jdzhandroid.Sqlite.DAO.BPA_RecipeGroupDao; | |||
import com.jdzh.jdzhandroid.Sqlite.DAO.BPA_RecipeInfoDao; | |||
import com.jdzh.jdzhandroid.Sqlite.DAO.BPA_RecipeUseDetailDao; | |||
import com.jdzh.jdzhandroid.Sqlite.Model.BPA_RecipeGroup; | |||
import com.jdzh.jdzhandroid.Sqlite.Model.BPA_RecipeInfo; | |||
import com.jdzh.jdzhandroid.Sqlite.Model.BPA_RecipeUseDetail; | |||
import com.jdzh.jdzhandroid.Sqlite.SqliteHelper; | |||
@@ -66,6 +68,8 @@ public class RecipeUseLineChartFragment extends Fragment { | |||
private RecipeUseNum totalUseNum; | |||
private String colorMain = "#039BE5"; | |||
private NameColorListAdapter adapter; | |||
private boolean isWeight; | |||
@Override | |||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |||
binding= FragmentRoundLineChartBinding.inflate(inflater,container,false); | |||
@@ -82,11 +86,17 @@ public class RecipeUseLineChartFragment extends Fragment { | |||
} | |||
private void init(){ | |||
isWeight = Config.getInstance().isWeight; | |||
binding.tbRecipeMode.setChecked(Config.getInstance().isWeight); | |||
binding.tbRecipeMode.setOnCheckedChangeListener((compoundButton, b) -> { | |||
isWeight = !isWeight; | |||
}); | |||
adapter = new NameColorListAdapter(); | |||
adapter.setNewData(nameList); | |||
binding.recycle.setAdapter(adapter); | |||
binding.selectName.setOnClickListener(v->{ | |||
RecipeNameListRecordDialog dialog = new RecipeNameListRecordDialog(getContext()); | |||
RecipeNameListRecordDialog dialog = new RecipeNameListRecordDialog(getContext(),isWeight); | |||
dialog.setListener(new RecipeNameListRecordDialog.OnDialogClickListener() { | |||
@Override | |||
public void onSelectName(List<NameColorBean> list) { | |||
@@ -101,7 +111,16 @@ public class RecipeUseLineChartFragment extends Fragment { | |||
}); | |||
List<RecipeUseNum> defaultList = new ArrayList<>(); | |||
List<BPA_RecipeInfo> recipeInfos = SqliteHelper.get().queryByBuilder(BPA_RecipeInfo.class, BPA_RecipeInfoDao.Properties.Name.isNotNull()); | |||
List<BPA_RecipeGroup> recipeGroups = SqliteHelper.get().queryByBuilder(BPA_RecipeGroup.class, | |||
BPA_RecipeGroupDao.Properties.IsWeight.eq(isWeight)); | |||
List<BPA_RecipeInfo> recipeInfos = new ArrayList<>(); | |||
for(BPA_RecipeGroup bean:recipeGroups){ | |||
recipeInfos.addAll(SqliteHelper.get().queryByQueryBuilder(BPA_RecipeInfo.class, | |||
BPA_RecipeInfoDao.Properties.Name.notEq(""), | |||
BPA_RecipeInfoDao.Properties.Name.isNotNull(), | |||
BPA_RecipeInfoDao.Properties.RecipeGroupId.eq(bean.getId()) | |||
)); | |||
} | |||
for(BPA_RecipeInfo recipeInfo:recipeInfos){ | |||
if(recipeInfo.getName()!=null && !recipeInfo.getName().isEmpty()){ | |||
List<BPA_RecipeUseDetail> recipeUseDetails = SqliteHelper.get().queryByQueryBuilder(BPA_RecipeUseDetail.class, | |||
@@ -231,6 +250,7 @@ public class RecipeUseLineChartFragment extends Fragment { | |||
lineData.setAxisYLeft(axisY); | |||
lineData.setBaseValue(Float.NEGATIVE_INFINITY); | |||
binding.chartLine.setLineChartData(lineData); | |||
binding.chartLine.setVisibility(lines.isEmpty()?View.GONE:View.VISIBLE); | |||
binding.chartLine.setOnValueTouchListener(new LineChartOnValueSelectListener() { | |||
@Override | |||
public void onValueSelected(int lineIndex, int pointIndex, PointValue value) { | |||
@@ -13,8 +13,10 @@ import androidx.annotation.Nullable; | |||
import androidx.fragment.app.Fragment; | |||
import com.bigkoo.pickerview.TimePickerView; | |||
import com.jdzh.jdzhandroid.Sqlite.DAO.BPA_RecipeGroupDao; | |||
import com.jdzh.jdzhandroid.Sqlite.DAO.BPA_RecipeInfoDao; | |||
import com.jdzh.jdzhandroid.Sqlite.DAO.BPA_RecipeUseDetailDao; | |||
import com.jdzh.jdzhandroid.Sqlite.Model.BPA_RecipeGroup; | |||
import com.jdzh.jdzhandroid.Sqlite.Model.BPA_RecipeInfo; | |||
import com.jdzh.jdzhandroid.Sqlite.Model.BPA_RecipeUseDetail; | |||
import com.jdzh.jdzhandroid.Sqlite.SqliteHelper; | |||
@@ -60,6 +62,7 @@ public class RecipeUseRankFragment extends Fragment { | |||
private TimePickerView pvTime; | |||
private List<RecipeUseNum> nameList = new ArrayList<>(); | |||
private RecipeNameRecordAdapter adapter; | |||
private boolean isWeight; | |||
@Override | |||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |||
binding= FragmentColumnChartBinding.inflate(inflater,container,false); | |||
@@ -76,6 +79,11 @@ public class RecipeUseRankFragment extends Fragment { | |||
} | |||
private void init(){ | |||
isWeight = Config.getInstance().isWeight; | |||
binding.tbRecipeMode.setChecked(Config.getInstance().isWeight); | |||
binding.tbRecipeMode.setOnCheckedChangeListener((compoundButton, b) -> { | |||
isWeight = !isWeight; | |||
}); | |||
adapter = new RecipeNameRecordAdapter(); | |||
adapter.setListener(new RecipeNameRecordAdapter.CallBackListener() { | |||
@Override | |||
@@ -224,13 +232,24 @@ public class RecipeUseRankFragment extends Fragment { | |||
*/ | |||
private void queryData(){ | |||
nameList.clear(); | |||
List<BPA_RecipeInfo> recipeInfos = SqliteHelper.get().queryByBuilder(BPA_RecipeInfo.class, BPA_RecipeInfoDao.Properties.Name.isNotNull()); | |||
List<BPA_RecipeGroup> recipeGroups = SqliteHelper.get().queryByBuilder(BPA_RecipeGroup.class, | |||
BPA_RecipeGroupDao.Properties.IsWeight.eq(isWeight)); | |||
List<BPA_RecipeInfo> recipeInfos = new ArrayList<>(); | |||
for(BPA_RecipeGroup bean:recipeGroups){ | |||
recipeInfos.addAll(SqliteHelper.get().queryByQueryBuilder(BPA_RecipeInfo.class, | |||
BPA_RecipeInfoDao.Properties.Name.notEq(""), | |||
BPA_RecipeInfoDao.Properties.Name.isNotNull(), | |||
BPA_RecipeInfoDao.Properties.RecipeGroupId.eq(bean.getId()) | |||
)); | |||
} | |||
for(BPA_RecipeInfo recipeInfo:recipeInfos){ | |||
if(recipeInfo.getName()!=null && !recipeInfo.getName().isEmpty()){ | |||
List<BPA_RecipeUseDetail> recipeUseDetails = SqliteHelper.get().queryByQueryBuilder(BPA_RecipeUseDetail.class, | |||
BPA_RecipeUseDetailDao.Properties.CreateAt.ge(binding.starttime.getText().toString()), | |||
BPA_RecipeUseDetailDao.Properties.CreateAt.le(binding.endtime.getText().toString()), | |||
BPA_RecipeUseDetailDao.Properties.RecipeName.eq(recipeInfo.getName()) | |||
BPA_RecipeUseDetailDao.Properties.RecipeName.eq(recipeInfo.getName()), | |||
BPA_RecipeUseDetailDao.Properties.IsWeight.eq(isWeight) | |||
); | |||
if(!recipeUseDetails.isEmpty()){ | |||
RecipeUseNum recipeUseNum = new RecipeUseNum(recipeInfo.getId(),recipeInfo.getName(),recipeUseDetails.size()); | |||
@@ -101,7 +101,7 @@ public class ServerManager { | |||
data.setId(bean.getId()); | |||
data.setName(bean.getName()); | |||
data.setStockUint(1); | |||
data.setType(1); | |||
data.setType(2); | |||
data.setKey(""); | |||
dataList.add(data); | |||
} | |||
@@ -96,9 +96,21 @@ | |||
android:layout_gravity="center_vertical" | |||
android:layout_marginStart="10dp" | |||
android:textSize="18sp"/> | |||
<ToggleButton | |||
android:id="@+id/tb_recipe_mode" | |||
android:layout_width="@dimen/dp150" | |||
android:layout_marginStart="@dimen/dp20" | |||
android:layout_height="match_parent" | |||
android:layout_alignParentBottom="true" | |||
android:textSize="22sp" | |||
android:textOff="配方模式" | |||
android:layout_centerHorizontal="true" | |||
android:textOn="计量模式"/> | |||
<Button | |||
android:id="@+id/btn_query" | |||
android:layout_marginHorizontal="@dimen/dp20" | |||
android:layout_marginStart="@dimen/dp20" | |||
android:background="@drawable/btn_normal_bg" | |||
android:layout_gravity="center_vertical" | |||
android:text="查 询" | |||
@@ -56,7 +56,16 @@ | |||
android:layout_gravity="center_vertical" | |||
android:layout_marginStart="10dp" | |||
android:textSize="18sp"/> | |||
<ToggleButton | |||
android:id="@+id/tb_recipe_mode" | |||
android:layout_width="@dimen/dp150" | |||
android:layout_marginStart="@dimen/dp20" | |||
android:layout_height="match_parent" | |||
android:layout_alignParentBottom="true" | |||
android:textSize="22sp" | |||
android:textOff="配方模式" | |||
android:layout_centerHorizontal="true" | |||
android:textOn="计量模式"/> | |||
<Button | |||
android:id="@+id/btn_query" | |||
android:layout_marginHorizontal="@dimen/dp20" | |||
@@ -28,7 +28,7 @@ | |||
android:textSize="22sp" | |||
android:textOff="配方模式" | |||
android:layout_centerHorizontal="true" | |||
android:textOn="计量模式"></ToggleButton> | |||
android:textOn="计量模式"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_weight="5" | |||
@@ -13,6 +13,18 @@ | |||
android:orientation="horizontal" | |||
> | |||
<ToggleButton | |||
android:layout_marginHorizontal="@dimen/dp20" | |||
android:id="@+id/tb_recipe_mode" | |||
android:layout_width="@dimen/dp150" | |||
android:layout_height="match_parent" | |||
android:layout_alignParentBottom="true" | |||
android:textSize="22sp" | |||
android:textOff="配方模式" | |||
android:layout_centerHorizontal="true" | |||
android:textOn="计量模式"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
@@ -48,7 +60,6 @@ | |||
android:layout_marginStart="20dp" | |||
android:textSize="22sp"/> | |||
<Button | |||
android:id="@+id/btn_query" | |||
android:layout_marginHorizontal="@dimen/dp20" | |||
@@ -56,6 +67,7 @@ | |||
android:layout_gravity="center_vertical" | |||
android:text="查 询" | |||
android:textSize="@dimen/sp22" | |||
android:visibility="gone" | |||
android:layout_width="@dimen/dp100" | |||
android:layout_height="50dp" | |||
/> | |||
@@ -108,7 +120,7 @@ | |||
android:layout_toEndOf="@id/chart_round" | |||
android:layout_below="@id/names" | |||
android:layout_width="match_parent" | |||
android:padding="20dp" | |||
android:padding="30dp" | |||
android:layout_marginBottom="20dp" | |||
android:layout_height="match_parent" > | |||
</lecho.lib.hellocharts.view.LineChartView> | |||
@@ -2,7 +2,7 @@ | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_width="600dp" | |||
android:layout_width="700dp" | |||
android:layout_height="320dp" | |||
android:columnCount="1" | |||
android:rowCount="3" | |||
@@ -43,7 +43,7 @@ | |||
android:layout_height="match_parent" | |||
android:gravity="center" | |||
android:textColor="#000000" | |||
android:textSize="22sp" | |||
android:textSize="28sp" | |||
android:text="请输入物料名称:"/> | |||
<EditText | |||
android:id="@+id/materialName" | |||
@@ -52,6 +52,7 @@ | |||
android:layout_marginStart="10dp" | |||
android:layout_gravity="center" | |||
android:textColor="#000000" | |||
android:textSize="28sp" | |||
android:focusable="true" | |||
android:focusableInTouchMode="true" | |||
android:background="@drawable/textview_border" /> | |||
@@ -67,7 +68,7 @@ | |||
android:layout_height="match_parent" | |||
android:gravity="center" | |||
android:textColor="#000000" | |||
android:textSize="22sp" | |||
android:textSize="28sp" | |||
android:text="请选择料仓编号:"/> | |||
<Spinner | |||
android:id="@+id/channelNames" | |||