Browse Source

55600055

茶饮新(现场)
fyf 1 year ago
parent
commit
dbd69ed37d
11 changed files with 1096 additions and 21 deletions
  1. +2
    -0
      app/build.gradle
  2. +101
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/ddgl_adapter.java
  3. +91
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/yjrz_adapter.java
  4. +166
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/LogActivity.java
  5. +172
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/OrderListActivity.java
  6. +3
    -0
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java
  7. +176
    -15
      app/src/main/res/layout/activity_log.xml
  8. +218
    -0
      app/src/main/res/layout/activity_orderlist.xml
  9. +88
    -0
      app/src/main/res/layout/datatab/layout/ddgl_item.xml
  10. +77
    -0
      app/src/main/res/layout/datatab/layout/yjrz_item.xml
  11. +2
    -2
      app/src/main/res/values/colors.xml

+ 2
- 0
app/build.gradle View File

@@ -155,4 +155,6 @@ dependencies {


//基类 //基类
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4' implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'

implementation 'com.contrarywind:Android-PickerView:3.2.6'
} }

+ 101
- 0
app/src/main/java/com/bonait/bnframework/modules/home/adapter/ddgl_adapter.java View File

@@ -0,0 +1,101 @@
package com.bonait.bnframework.modules.home.adapter;

import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.res.ResSubOrder;

import java.util.List;

public class ddgl_adapter extends ArrayAdapter<ResSubOrder> {
private List<ResSubOrder> datas;
private Context context;

private int resource;

public ddgl_adapter(@NonNull Context context, int resource, @NonNull List<ResSubOrder> objects) {
super(context, resource, objects);
this.context = context;
this.resource=resource;
datas=objects;
}
//每个子项被滚动到屏幕内的时候会被调用
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
ResSubOrder order = (ResSubOrder) getItem(position);//得到当前项选中item实例
//为每一个子项加载设定的布局
View view = LayoutInflater.from(getContext()).inflate(this.resource, parent, false);
//分别获取 image view 和 textview 的实例
TextView bh,time,name,status,bz;
bh = (TextView) view.findViewById(R.id.bh);
time = (TextView) view.findViewById(R.id.time);
name = (TextView) view.findViewById(R.id.name);
status = (TextView) view.findViewById(R.id.status);
bz = (TextView) view.findViewById(R.id.bz);
bh.setText(order.id);
time.setText(order.createTime);
name.setText(order.goodsName);
time.setText(order.createTime);
status.setText(order.statusText);
bz.setText(order.exp);
switch (order.status)
{
case 0://未开始
status.setTextColor(ConfigName.getInstance().dishesCon.getResources().getColor(R.color.tab_text_normal));
break;
case 1://制作中
status.setTextColor(ConfigName.getInstance().dishesCon.getResources().getColor(R.color.lime_primary));
break;
case 2://已完成
status.setTextColor(ConfigName.getInstance().dishesCon.getResources().getColor(R.color.black));
break;
case 3://已超时
status.setTextColor(ConfigName.getInstance().dishesCon.getResources().getColor(R.color.red_primary));
break;

}

return view;
}
private Activity findActivity(@NonNull Context context) {
if (context instanceof Activity) {
return (Activity) context;
} else if (context instanceof ContextWrapper) {
return findActivity(((ContextWrapper) context).getBaseContext());
} else {
return null;
}
}
/**
* 刷新
* @param
*/
public void refresh(){
Activity activity= findActivity(context);
if(activity!=null)
{
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
try {
notifyDataSetChanged();
} catch (Exception e) {

}
}
});
}
}
}

+ 91
- 0
app/src/main/java/com/bonait/bnframework/modules/home/adapter/yjrz_adapter.java View File

@@ -0,0 +1,91 @@
package com.bonait.bnframework.modules.home.adapter;

import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.db.res.ResAlertLog;

import java.util.List;

public class yjrz_adapter extends ArrayAdapter<ResAlertLog> {
private List<ResAlertLog> datas;
private Context context;

private int resource;

public yjrz_adapter(@NonNull Context context, int resource, @NonNull List<ResAlertLog> objects) {
super(context, resource, objects);
this.context = context;
this.resource=resource;
datas=objects;
}
//每个子项被滚动到屏幕内的时候会被调用
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
ResAlertLog log = (ResAlertLog) getItem(position);//得到当前项选中item实例
//为每一个子项加载设定的布局
View view = LayoutInflater.from(getContext()).inflate(this.resource, parent, false);
//分别获取 image view 和 textview 的实例
TextView name,type,time,message;
//name = (TextView) view.findViewById(R.id.name);
type = (TextView) view.findViewById(R.id.type);
time = (TextView) view.findViewById(R.id.time);
message = (TextView) view.findViewById(R.id.message);
//name.setText(log.Name);
switch (log.type)
{
case 1:
type.setText("异常订单未制作日志");
break;
case 2:
type.setText("料仓缺料日志");
break;
case 3:
type.setText("传感器异常日志");
break;
}
time.setText(log.createTime);
message.setText(log.text);
return view;
}
private Activity findActivity(@NonNull Context context) {
if (context instanceof Activity) {
return (Activity) context;
} else if (context instanceof ContextWrapper) {
return findActivity(((ContextWrapper) context).getBaseContext());
} else {
return null;
}
}
/**
* 刷新
* @param
*/
public void refresh(){
Activity activity= findActivity(context);
if(activity!=null)
{
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
try {
notifyDataSetChanged();
} catch (Exception e) {

}
}
});
}
}
}

+ 166
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/LogActivity.java View File

@@ -5,13 +5,26 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;


import android.content.Context; import android.content.Context;
import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;


import com.bigkoo.pickerview.TimePickerView;
import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment; import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.res.ResAlertLog;
import com.bonait.bnframework.common.helper.DateUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.yjrz_adapter;
import com.bonait.bnframework.modules.home.fragment.GuanLifragment; import com.bonait.bnframework.modules.home.fragment.GuanLifragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment; import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment;
import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_wl_fragment; import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_wl_fragment;
@@ -21,17 +34,64 @@ import com.qmuiteam.qmui.widget.QMUITopBarLayout;
import com.qmuiteam.qmui.widget.QMUIViewPager; import com.qmuiteam.qmui.widget.QMUIViewPager;
import com.qmuiteam.qmui.widget.tab.QMUITabSegment; import com.qmuiteam.qmui.widget.tab.QMUITabSegment;


import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick;


public class LogActivity extends BaseFragment { public class LogActivity extends BaseFragment {


@BindView(R.id.topbar) @BindView(R.id.topbar)
QMUITopBarLayout mTopBar; QMUITopBarLayout mTopBar;
@BindView(R.id.tabs)
QMUITabSegment tabs;
@BindView(R.id.viewpager_wl)
QMUIViewPager viewpager_wl;

//region 操作变量
/**
* 输入框
*/
@BindView(R.id.edittext)
TextView edittext;
/**
* 查询按钮
*/
@BindView(R.id.button)
Button button;
/**
* 表格显示
*/
@BindView(R.id.datatab)
ListView datatab;
/**
* 日志数据
*/
ArrayList<ResAlertLog> bpa_logs = new ArrayList<>();
/**
* 员工操作日志控制器
*/
yjrz_adapter adapter;
/**
* 日期选择器
*/
TimePickerView pvTime;
/**
* 开始时间-结束时间
*/
@BindView(R.id.starttime)
EditText starttime;
@BindView(R.id.stoptime)
EditText stoptime;
/**
* 日志类型
*/
@BindView(R.id.rzlx)
Spinner rzlx;
Map<String,Integer> lx_map = new LinkedHashMap<>();
//endregion
private Context context; private Context context;


@Override @Override
@@ -47,6 +107,7 @@ public class LogActivity extends BaseFragment {
context = getContext(); context = getContext();
initTopBar(); initTopBar();
initFragment(); initFragment();
Init();
} }


private void initTopBar() { private void initTopBar() {
@@ -64,6 +125,107 @@ public class LogActivity extends BaseFragment {
private void initFragment() { private void initFragment() {


} }

/**
* 初始化
*/
private void Init(){

lx_map.put("全部日志",0);
lx_map.put("异常订单未制作日志",1);
lx_map.put("料仓缺料日志",2);
lx_map.put("传感器异常日志",3);
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(context, R.layout.spinner_text_item, new ArrayList<>(lx_map.keySet()));
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item);
rzlx.setAdapter(adapter2);

starttime.setText(new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(new Date()));
stoptime.setText(new SimpleDateFormat("yyyy-MM-dd 23:59:59").format(new Date()));
starttime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (pvTime != null) {
pvTime.show(starttime);
}
}
});
stoptime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (pvTime != null) {
pvTime.show(stoptime);
}
}
});
CalendarTime();
Initdata();
}
/**
* CalendarTime
* 时间选择器
*/
public void CalendarTime() {
//控制时间范围(如果不设置范围,则使用默认时间1900-2100年,此段代码可注释)
//因为系统Calendar的月份是从0-11的,所以如果是调用Calendar的set方法来设置时间,月份的范围也要是从0-11
Calendar selectedDate = Calendar.getInstance();
Calendar startDate = Calendar.getInstance();
startDate.set(2023, 0, 23);
Calendar endDate = Calendar.getInstance();
endDate.set(2099, 11, 28);
//时间选择器
pvTime = new TimePickerView.Builder(context, new TimePickerView.OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {//选中事件回调
// 这里回调过来的v,就是show()方法里面所添加的 View 参数,如果show的时候没有添加参数,v则为null
TextView btn = (TextView) v;
btn.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date));
}
})
//年月日时分秒 的显示与否,不设置则默认全部显示
.setType(new boolean[]{true, true, true, true, true, false})
.setLabel("年", "月", "日", "时", "分", "秒")
.isCenterLabel(true)
.setDividerColor(Color.DKGRAY)
.setContentSize(16)//字号
.setDate(selectedDate)
.setRangDate(startDate, endDate)
.setDecorView(null)
.build();
}


/**
* 初始化数据加载
*/
public void Initdata() {
try {
String str= starttime.getText().toString();
String stop= stoptime.getText().toString();
if(DateUtils.compareDate(stop,str))
{
ToastUtils.warning("开始时间不能大于结束时间!!!");
return;
}
String lx= rzlx.getSelectedItem().toString();
String text= edittext.getText().toString();
bpa_logs= QueryDB.GetAlertlogs(str,stop, lx_map.get(lx),text);
adapter = new yjrz_adapter(context,R.layout.yjrz_item,bpa_logs);
datatab.setAdapter(adapter);
} catch (Exception e) {

}
}

//region 点击事件
@OnClick({R.id.button})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.button://查询按钮
Initdata();
break;
}
}
//endregion
//-------------------------配置viewPager与fragment关联----------------------------// //-------------------------配置viewPager与fragment关联----------------------------//


@Override @Override


+ 172
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/OrderListActivity.java View File

@@ -5,25 +5,92 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;


import android.content.Context; import android.content.Context;
import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;


import com.bigkoo.pickerview.TimePickerView;
import com.bonait.bnframework.R; import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseFragment; import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName; import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.res.ResSubOrder;
import com.bonait.bnframework.common.helper.DateUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.ddgl_adapter;
import com.bonait.bnframework.modules.home.fragment.DingDanfragment; import com.bonait.bnframework.modules.home.fragment.DingDanfragment;
import com.bonait.bnframework.modules.home.fragment.GuanLifragment; import com.bonait.bnframework.modules.home.fragment.GuanLifragment;
import com.qmuiteam.qmui.widget.QMUITopBarLayout; import com.qmuiteam.qmui.widget.QMUITopBarLayout;


import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick;


public class OrderListActivity extends BaseFragment { public class OrderListActivity extends BaseFragment {




@BindView(R.id.topbar) @BindView(R.id.topbar)
QMUITopBarLayout mTopBar; QMUITopBarLayout mTopBar;

//region 操作变量
/**
* 输入框
*/
@BindView(R.id.edittext)
TextView edittext;
/**
* 查询按钮
*/
@BindView(R.id.button)
Button button;
/**
* 表格显示
*/
@BindView(R.id.datatab)
ListView datatab;
/**
* 子订单数据
*/
ArrayList<ResSubOrder> subOrders = new ArrayList<>();
/**
* 订单管理控制器
*/
ddgl_adapter adapter;
/**
* 日期选择器
*/
TimePickerView pvTime;
/**
* 开始时间-结束时间
*/
@BindView(R.id.starttime)
EditText starttime;
@BindView(R.id.stoptime)
EditText stoptime;

@BindView(R.id.count)
TextView count;
/**
* 日志类型
*/
@BindView(R.id.rzlx)
Spinner rzlx;
Map<String,Integer> lx_map = new LinkedHashMap<>();
//endregion
private Context context; private Context context;


@Override @Override
@@ -39,6 +106,7 @@ public class OrderListActivity extends BaseFragment {
context = getContext(); context = getContext();
initTopBar(); initTopBar();
initFragment(); initFragment();
Init();
} }


private void initTopBar() { private void initTopBar() {
@@ -50,6 +118,110 @@ public class OrderListActivity extends BaseFragment {
} }
}); });
} }

/**
* 初始化
*/
private void Init(){
//通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据
lx_map.put("全部",-1);
lx_map.put("未开始",0);
lx_map.put("制作中",1);
lx_map.put("已制作",2);
lx_map.put("已超时",3);
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(context, R.layout.spinner_text_item, new ArrayList<>(lx_map.keySet()));
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item);
rzlx.setAdapter(adapter2);

starttime.setText(new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(new Date()));
stoptime.setText(new SimpleDateFormat("yyyy-MM-dd 23:59:59").format(new Date()));
starttime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (pvTime != null) {
pvTime.show(starttime);
}
}
});
stoptime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (pvTime != null) {
pvTime.show(stoptime);
}
}
});
CalendarTime();
Initdata();
}
/**
* CalendarTime
* 时间选择器
*/
public void CalendarTime() {
//控制时间范围(如果不设置范围,则使用默认时间1900-2100年,此段代码可注释)
//因为系统Calendar的月份是从0-11的,所以如果是调用Calendar的set方法来设置时间,月份的范围也要是从0-11
Calendar selectedDate = Calendar.getInstance();
Calendar startDate = Calendar.getInstance();
startDate.set(2023, 0, 23);
Calendar endDate = Calendar.getInstance();
endDate.set(2099, 11, 28);
//时间选择器
pvTime = new TimePickerView.Builder(context, new TimePickerView.OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {//选中事件回调
// 这里回调过来的v,就是show()方法里面所添加的 View 参数,如果show的时候没有添加参数,v则为null
TextView btn = (TextView) v;
btn.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date));
}
})
//年月日时分秒 的显示与否,不设置则默认全部显示
.setType(new boolean[]{true, true, true, true, true, false})
.setLabel("年", "月", "日", "时", "分", "秒")
.isCenterLabel(true)
.setDividerColor(Color.DKGRAY)
.setContentSize(16)//字号
.setDate(selectedDate)
.setRangDate(startDate, endDate)
.setDecorView(null)
.build();
}

/**
* 初始化数据加载
*/
public void Initdata() {
try {
String str= starttime.getText().toString();
String stop= stoptime.getText().toString();
if(DateUtils.compareDate(stop,str))
{
ToastUtils.warning("开始时间不能大于结束时间!!!");
return;
}
String lx= rzlx.getSelectedItem().toString();
String text= edittext.getText().toString();
subOrders= QueryDB.GetSubOrders(str,stop, lx_map.get(lx),text);
count.setText(subOrders.size()+"");
adapter = new ddgl_adapter(context,R.layout.ddgl_item,subOrders);
datatab.setAdapter(adapter);
} catch (Exception e) {

}
}
//endregion

//region 点击事件

@OnClick({R.id.button})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.button://查询按钮
Initdata();
break;
}
}
//endregion
/** /**
* viewPager里添加fragment * viewPager里添加fragment
*/ */


+ 3
- 0
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/LoginActivity.java View File

@@ -31,7 +31,9 @@ import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.constant.SPConstants; import com.bonait.bnframework.common.constant.SPConstants;
import com.bonait.bnframework.common.db.QueryDB; import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_USER; import com.bonait.bnframework.common.db.mode.BPA_USER;
import com.bonait.bnframework.common.db.res.UserLogEnum;
import com.bonait.bnframework.common.helper.ActiveMax; import com.bonait.bnframework.common.helper.ActiveMax;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.utils.AlertDialogUtils; import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.AnimationToolUtils; import com.bonait.bnframework.common.utils.AnimationToolUtils;
import com.bonait.bnframework.common.utils.AppUtils; import com.bonait.bnframework.common.utils.AppUtils;
@@ -212,6 +214,7 @@ public class LoginActivity extends BaseActivity implements Validator.ValidationL
BPA_USER user= QueryDB.UserLogin(userAccount,password); BPA_USER user= QueryDB.UserLogin(userAccount,password);
if(user!=null) if(user!=null)
{ {
MessageLog.ShowUserMessage(UserLogEnum.登录日志,user.name+"-登录成功");
ConfigName.getInstance().user=user; ConfigName.getInstance().user=user;
ConfigData.getInstance().SavePZ(); ConfigData.getInstance().SavePZ();
//跳转到主页 //跳转到主页


+ 176
- 15
app/src/main/res/layout/activity_log.xml View File

@@ -8,25 +8,186 @@
android:background="@color/white" android:background="@color/white"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">


<com.qmuiteam.qmui.widget.tab.QMUITabSegment
<RelativeLayout
android:id="@+id/tabs" android:id="@+id/tabs"
android:layout_marginTop="54dp" android:layout_marginTop="54dp"
android:layout_width="match_parent" 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="100dp"
android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/app_content_bg_color" />
android:background="@color/main_background"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<EditText
android:id="@+id/starttime"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:inputType="text"
android:padding="3dp"
android:textColor="@color/foreground"
android:background="@drawable/input_bj"
android:layout_marginLeft="5dp"
android:maxLines="1"
android:focusable="false"
android:text="2023-02-33 00:00:00"
android:textSize="@dimen/textSize"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:textColor="@color/foreground"
android:text="--">
</TextView>
<EditText
android:id="@+id/stoptime"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:inputType="text"
android:padding="3dp"
android:focusable="false"
android:textColor="@color/foreground"
android:background="@drawable/input_bj"
android:layout_marginLeft="5dp"
android:maxLines="1"
android:text="2023-02-33 00:00:00"
android:textSize="@dimen/textSize"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:textColor="@color/foreground"
android:text="日志类型">
</TextView>
<Spinner
android:id="@+id/rzlx"
android:layout_width="wrap_content"
android:layout_height="24dp"
style="@style/commonSpinnerStyle"/>
<EditText
android:id="@+id/edittext"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:inputType="text"
android:padding="3dp"
android:textColor="@color/foreground"
android:background="@drawable/input_bj"
android:layout_marginLeft="5dp"
android:hint="请输入查询条件"
android:maxLines="1"
android:textSize="@dimen/textSize"/>
<Button
android:id="@+id/button"
android:text="查询"
android:background="@drawable/button3"
android:textSize="@dimen/textSize"
android:textColor="@color/foreground"
android:layout_marginLeft="5dp"
android:layout_gravity="center"
android:layout_width="60dp"
android:layout_height="26dp"
/>
</LinearLayout>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:background="@color/main_background"
android:layout_height="26dp">

<TableLayout
android:layout_centerVertical="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:stretchColumns="0">
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志类型"
android:textColor="@color/dataGridColumnHeaderColor"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志时间"
android:textColor="@color/dataGridColumnHeaderColor"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志描述"
android:textColor="@color/dataGridColumnHeaderColor"
android:textSize="@dimen/textSize" />
</RelativeLayout>

</TableRow>
</TableLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/datatab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000"
android:dividerHeight="3dp"
android:layout_marginTop="3dp"
/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>


</RelativeLayout>


<com.qmuiteam.qmui.widget.QMUITopBarLayout <com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar" android:id="@+id/topbar"


+ 218
- 0
app/src/main/res/layout/activity_orderlist.xml View File

@@ -15,7 +15,225 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/main_background" android:background="@color/main_background"
> >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">


<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">

<EditText
android:id="@+id/starttime"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:focusable="false"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="2023-02-33 00:00:00"
android:textSize="@dimen/textSize"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="--"></TextView>

<EditText
android:id="@+id/stoptime"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:focusable="false"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:text="2023-02-33 00:00:00"
android:textSize="@dimen/textSize"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="制作状态"></TextView>

<Spinner
android:id="@+id/rzlx"
style="@style/commonSpinnerStyle"
android:layout_width="wrap_content"
android:layout_height="24dp" />

<EditText
android:id="@+id/edittext"
android:layout_width="200dp"
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:textColor="@color/foreground"
android:textSize="@dimen/textSize"/>

<Button
android:id="@+id/button"
android:layout_width="60dp"
android:layout_height="26dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:background="@drawable/button3"
android:text="查询"
android:textColor="@color/white"
android:textSize="@dimen/textSize" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:text="数量:"></TextView>
<TextView
android:id="@+id/count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="129"
android:textColor="@color/deep_purple_primary"></TextView>
</LinearLayout>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="vertical">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="26dp"
android:background="@color/activity_background">


<TableLayout
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="wrap_content"
android:gravity="center_horizontal">

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2.5">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="订单编号"
android:textSize="@dimen/textSize" />
</RelativeLayout>

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="创建时间"
android:textSize="@dimen/textSize" />
</RelativeLayout>

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="商品名称"
android:textSize="@dimen/textSize" />
</RelativeLayout>

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="订单状态"
android:textSize="@dimen/textSize" />
</RelativeLayout>

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="备注"
android:textSize="@dimen/textSize" />
</RelativeLayout>

</TableRow>
</TableLayout>
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ListView
android:id="@+id/datatab"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="3dp"
android:divider="#00000000"
android:dividerHeight="3dp" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout> </RelativeLayout>


<com.qmuiteam.qmui.widget.QMUITopBarLayout <com.qmuiteam.qmui.widget.QMUITopBarLayout


+ 88
- 0
app/src/main/res/layout/datatab/layout/ddgl_item.xml View File

@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TableLayout
android:background="@color/activity_background1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:stretchColumns="0">
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">

<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2.5">

<TextView
android:id="@+id/bh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20dp"
android:text="订单编号"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2">
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="创建时间"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="商品名称"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="订单状态"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2">
<TextView
android:id="@+id/bz"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="备注"
android:textSize="@dimen/textSize" />
</RelativeLayout>

</TableRow>
</TableLayout>
</RelativeLayout>

+ 77
- 0
app/src/main/res/layout/datatab/layout/yjrz_item.xml View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TableLayout
android:background="@color/activity_background1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:stretchColumns="0">
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<!-- <RelativeLayout-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1">-->
<!-- <TextView-->
<!-- android:id="@+id/name"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="20dp"-->
<!-- android:layout_alignParentLeft="true"-->
<!-- android:text="员工名称"-->
<!-- android:textColor="@color/foreground"-->
<!-- android:textSize="@dimen/textSize" />-->
<!-- </RelativeLayout>-->
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志类型"
android:textColor="@color/foreground"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2">
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志时间"
android:textColor="@color/foreground"
android:textSize="@dimen/textSize" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4">
<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志描述日志描述"
android:textColor="@color/foreground"
android:textSize="@dimen/textSize" />
</RelativeLayout>

</TableRow>
</TableLayout>
</RelativeLayout>

+ 2
- 2
app/src/main/res/values/colors.xml View File

@@ -20,8 +20,8 @@
<color name="file_bottom_line">#ECECEC</color> <color name="file_bottom_line">#ECECEC</color>
<color name="selebottom">#3604BFEF</color> <color name="selebottom">#3604BFEF</color>
<!-- common --> <!-- common -->
<color name="dataGridColumnHeaderColor">#00c2f4</color>
<color name="foreground">#a2c2e8</color>
<color name="dataGridColumnHeaderColor">#A5000000</color>
<color name="foreground">#A5000000</color>
<color name="borderBrush">#FF074B92</color> <color name="borderBrush">#FF074B92</color>






Loading…
Cancel
Save