bug修改等
This commit is contained in:
parent
6d005c57c4
commit
bd1ee7c917
|
|
@ -40,6 +40,7 @@ import com.bonus.canteen.core.BaseActivity;
|
|||
import com.bonus.canteen.db.AppDatabase;
|
||||
import com.bonus.canteen.db.entity.base.DeviceInfo;
|
||||
import com.bonus.canteen.entity.KitchenSampleDishesRecord;
|
||||
import com.bonus.canteen.entity.SpinnerBean;
|
||||
import com.bonus.canteen.utils.DateTimeHelper;
|
||||
import com.bonus.canteen.utils.OkHttpService;
|
||||
import com.bonus.canteen.utils.ThreadPoolManager;
|
||||
|
|
@ -52,6 +53,7 @@ import com.xuexiang.xui.utils.XToastUtils;
|
|||
import com.xuexiang.xui.widget.dialog.DialogLoader;
|
||||
import com.xuexiang.xui.widget.dialog.materialdialog.MaterialDialog;
|
||||
import com.xuexiang.xui.widget.picker.widget.TimePickerView;
|
||||
import com.xuexiang.xui.widget.picker.widget.builder.TimePickerBuilder;
|
||||
|
||||
import org.easydarwin.easypusher.R;
|
||||
import org.easydarwin.easypusher.databinding.ActivityOutRecordBinding;
|
||||
|
|
@ -99,7 +101,8 @@ public class OutCabinet extends BaseActivity<ActivityOutRecordBinding> {
|
|||
WidgetUtils.initRecyclerView(recyclerView);
|
||||
recyclerView.setAdapter(adapter = new OutRecordAdapter(this, kitchenSampleDishesRecords));
|
||||
swipeRefreshLayout = findViewById(R.id.refreshLayout);
|
||||
|
||||
showDatePickerDialog();
|
||||
initSpinners();
|
||||
titleView = findViewById(R.id.page_title);
|
||||
temperatureView = findViewById(R.id.temperature);
|
||||
temperatureView.setText(String.valueOf(serialPortManger.getTemperature()));
|
||||
|
|
@ -147,7 +150,39 @@ public class OutCabinet extends BaseActivity<ActivityOutRecordBinding> {
|
|||
super.onResume();
|
||||
setupImmersiveMode();
|
||||
}
|
||||
private void showDatePickerDialog() {
|
||||
mDatePicker = new TimePickerBuilder(this, (date, v) -> {
|
||||
String dayTime = DateTimeHelper.format(date,"yyyy-MM-dd");
|
||||
binding.macQueryTime.setText(dayTime);
|
||||
}).setTimeSelectChangeListener(date -> Log.i("pvTime", "onTimeSelectChanged")).setTitleText("日期选择")
|
||||
.setType(true, true, true, false, false, false)
|
||||
.build();
|
||||
}
|
||||
private void initSpinners() {
|
||||
//设置入库类型选择器
|
||||
List<SpinnerBean> inboundTypes = new ArrayList<>();
|
||||
inboundTypes.add(new SpinnerBean("0", "全部"));
|
||||
inboundTypes.add(new SpinnerBean("1", "早餐"));
|
||||
inboundTypes.add(new SpinnerBean("2", "午餐"));
|
||||
inboundTypes.add(new SpinnerBean("4", "晚餐"));
|
||||
binding.statusSpinner.setItems(inboundTypes);
|
||||
binding.statusSpinner.setOnItemSelectedListener((view12, position, id, item) -> {
|
||||
if (item instanceof SpinnerBean) {
|
||||
SpinnerBean selectedType = (SpinnerBean) item;
|
||||
Log.d(TAG, "Selected Inbound Type: " + selectedType.getName());
|
||||
} else {
|
||||
Log.e(TAG, "Selected item is not a SpinnerBean");
|
||||
}
|
||||
});
|
||||
binding.statusSpinner.setSelectedIndex(0);
|
||||
}
|
||||
private void initListener() {
|
||||
binding.btnSearch.setOnClickListener(v -> {
|
||||
Log.e(TAG, "Query button clicked");
|
||||
swipeRefreshLayout.setRefreshing(true);
|
||||
resetQueryParams();
|
||||
loadDataAsync();
|
||||
});
|
||||
Button selectAllButton = findViewById(R.id.select_all);
|
||||
Button enterCabinetButton = findViewById(R.id.enter_cabinet);
|
||||
selectAllButton.setOnClickListener(view -> {
|
||||
|
|
|
|||
|
|
@ -102,10 +102,9 @@ public class SampleRetentionRecordActivity extends BaseActivity<ActivityRecordBi
|
|||
//设置入库类型选择器
|
||||
List<SpinnerBean> inboundTypes = new ArrayList<>();
|
||||
inboundTypes.add(new SpinnerBean("0", "全部"));
|
||||
inboundTypes.add(new SpinnerBean("1", "未入柜"));
|
||||
inboundTypes.add(new SpinnerBean("2", "在柜"));
|
||||
inboundTypes.add(new SpinnerBean("3", "离柜"));
|
||||
inboundTypes.add(new SpinnerBean("4", "超时自动离柜"));
|
||||
inboundTypes.add(new SpinnerBean("1", "早餐"));
|
||||
inboundTypes.add(new SpinnerBean("2", "午餐"));
|
||||
inboundTypes.add(new SpinnerBean("4", "晚餐"));
|
||||
binding.statusSpinner.setItems(inboundTypes);
|
||||
binding.statusSpinner.setOnItemSelectedListener((view12, position, id, item) -> {
|
||||
if (item instanceof SpinnerBean) {
|
||||
|
|
@ -153,7 +152,7 @@ public class SampleRetentionRecordActivity extends BaseActivity<ActivityRecordBi
|
|||
saveStatusBeanList.clear();
|
||||
saveStatusBeanList.add(new SaveStatusBean("0", "全部"));
|
||||
saveStatusBeanList.add(new SaveStatusBean("1", "早餐"));
|
||||
saveStatusBeanList.add(new SaveStatusBean("2", "中餐"));
|
||||
saveStatusBeanList.add(new SaveStatusBean("2", "午餐"));
|
||||
saveStatusBeanList.add(new SaveStatusBean("4", "晚餐"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:maxLength="20"
|
||||
android:text="18158863319"
|
||||
android:text="15155587515"
|
||||
android:hint="@string/please_enter_username"
|
||||
android:textColorHint="#999999"
|
||||
android:inputType="textPersonName"
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
android:layout_marginEnd="5dp"
|
||||
android:inputType="textPassword"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="Bonus$2025" />
|
||||
android:text="Bonus$2026" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/check_password"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,56 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/config_margin_10dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:padding="@dimen/config_margin_5dp">
|
||||
<EditText
|
||||
android:id="@+id/et_keyword"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
android:maxLength="20"
|
||||
android:hint="请输入样品名称"
|
||||
android:textColorHint="#999999"
|
||||
android:inputType="textPersonName"
|
||||
android:background="@drawable/edittext_border"
|
||||
android:autofillHints="" />
|
||||
<EditText
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="40dp"
|
||||
android:editable="false"
|
||||
android:layout_marginLeft="@dimen/config_margin_10dp"
|
||||
android:layout_marginRight="@dimen/config_margin_10dp"
|
||||
android:background="@drawable/edittext_border"
|
||||
android:hint="请选择日期"
|
||||
android:textColorHint="@color/app_color_grey"
|
||||
android:id="@+id/mac_query_time"
|
||||
/>
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/status_spinner"
|
||||
style="@style/CustomSpinner"
|
||||
android:layout_width="150dp"
|
||||
android:hint="请选择餐次"
|
||||
android:textSize="13sp"
|
||||
android:textColorHint="@color/app_color_grey"
|
||||
android:layout_height="40dp" />
|
||||
|
||||
<com.xuexiang.xui.widget.layout.XUIButton
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:backgroundTint="#4C81F4"
|
||||
android:id="@+id/btn_search"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@
|
|||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/status_spinner"
|
||||
style="@style/CustomSpinner"
|
||||
android:layout_width="200dp"
|
||||
android:hint="请选择存放状态"
|
||||
android:layout_width="150dp"
|
||||
android:hint="请选择餐次"
|
||||
android:textSize="13sp"
|
||||
android:textColorHint="@color/app_color_grey"
|
||||
android:layout_height="40dp" />
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
<color name="colorAccent">#299EE3</color>
|
||||
|
||||
<color name="config_color_select_bg">#FFF1F1F1</color>
|
||||
|
||||
<color name="blue_light">#E3F2FD</color> <!-- 浅蓝色背景 -->
|
||||
<color name="grey_light">#EEEEEE</color> <!-- 浅灰色边框 -->
|
||||
|
||||
<!--Toast,可自定义喜欢的颜色-->
|
||||
<color name="toast_default_text_color" tools:ignore="PrivateResource">@color/xui_config_color_white</color>
|
||||
|
|
|
|||
Loading…
Reference in New Issue