@@ -33,6 +33,9 @@ | |||
tools:ignore="GoogleAppIndexingWarning" | |||
tools:node="merge" | |||
tools:replace="android:icon"> | |||
<activity | |||
android:name=".modules.mine.fragment.from.UserActivity" | |||
android:exported="false" /> | |||
<activity | |||
android:name=".modules.home.fragment.from.fragment.JiaoYan_zdbs_fragment" | |||
android:exported="false" /> | |||
@@ -1,9 +1,11 @@ | |||
package com.bonait.bnframework.common.base; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.media.MediaPlayer; | |||
import android.net.Uri; | |||
import android.provider.Settings; | |||
import android.text.InputType; | |||
import android.view.View; | |||
import androidx.annotation.NonNull; | |||
@@ -14,7 +16,10 @@ import androidx.fragment.app.FragmentTransaction; | |||
import com.bonait.bnframework.MainApplication; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.Constants; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_USER; | |||
import com.bonait.bnframework.common.filepicker.PickerManager; | |||
import com.bonait.bnframework.common.filepicker.adapter.FilePickerShowAdapter; | |||
import com.bonait.bnframework.common.filepicker.adapter.OnFileItemClickListener; | |||
@@ -69,10 +74,62 @@ public abstract class BaseFragment extends QMUIFragment implements EasyPermissio | |||
* 跳转界面 | |||
*/ | |||
public void skipToActivity(Class da) { | |||
// 跳转到登录页面 | |||
Intent intent = new Intent(this.getContext(), da); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
startActivity(intent); | |||
Context context=this.getContext(); | |||
if(ConfigName.getInstance().user.name.equals("admin") | |||
|| ConfigName.getInstance().user.account.equals("admin")) | |||
{ | |||
Intent intent = new Intent(context, da); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
startActivity(intent); | |||
}else | |||
{ | |||
if(da.getName().equals("com.bonait.bnframework.modules.home.fragment.from.OrderListActivity") | |||
|| da.getName().equals("com.bonait.bnframework.modules.home.fragment.from.SalesStatisticsActivity") | |||
) | |||
{ | |||
Intent intent = new Intent(context, da); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
startActivity(intent); | |||
return; | |||
} | |||
// 跳转到登录页面 | |||
final QMUIDialog.EditTextDialogBuilder builder2 = new QMUIDialog.EditTextDialogBuilder(context); | |||
builder2.setTitle("权限验证") | |||
.setPlaceholder("在此输入权限密码") | |||
.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD) | |||
.addAction("取消", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction("确定", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
CharSequence s = builder2.getEditText().getText(); | |||
if (s != null && s.length() > 0) | |||
{ | |||
if(s.toString().equals(ConfigName.getInstance().user.pass)) | |||
{ | |||
Intent intent = new Intent(context, da); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
startActivity(intent); | |||
dialog.dismiss(); | |||
}else | |||
{ | |||
ToastUtils.warning("权限密码不正确!"); | |||
} | |||
}else | |||
{ | |||
ToastUtils.warning("权限密码不能为空!"); | |||
} | |||
} | |||
}) | |||
.show(); | |||
} | |||
} | |||
FragmentManager fragmentManager; | |||
@@ -2256,6 +2256,21 @@ public class QueryDB { | |||
return user; | |||
} | |||
/** | |||
* 修改用户名 | |||
* | |||
* @param id | |||
* @param data | |||
*/ | |||
public static BPA_USER UpdateAccount(String id, String data) { | |||
BPA_USER user = GetUserID(id); | |||
if (user != null) { | |||
user.account = data; | |||
Update(BPA_USER.class, user); | |||
} | |||
return user; | |||
} | |||
/** | |||
* 修改密码 | |||
* | |||
@@ -0,0 +1,8 @@ | |||
package com.bonait.bnframework.common.db.res; | |||
public class SuOrderTJ { | |||
public String name; | |||
public int Count; | |||
public int Yzz_Count; | |||
public int Yc_Count; | |||
} |
@@ -14,6 +14,7 @@ import androidx.annotation.NonNull; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.view.Gravity; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.widget.ImageView; | |||
@@ -253,6 +254,12 @@ public class ToastUtils { | |||
currentToast.setView(toastLayout); | |||
currentToast.setDuration(duration); | |||
currentToast.setGravity(Gravity.TOP,0,100); | |||
// currentToast.setGravity(Gravity.LEFT | Gravity.TOP, 0, 0);//左上角 | |||
// currentToast.setGravity(Gravity.RIGHT | Gravity.TOP, 0, 0);//右上角 | |||
// currentToast.setGravity(Gravity.LEFT | Gravity.BOTTOM, 0, 0);//左下角 | |||
// currentToast.setGravity(Gravity.RIGHT | Gravity.BOTTOM, 0, 100);//右下角 | |||
return currentToast; | |||
} else { | |||
mHandler.post(new Runnable() { | |||
@@ -289,9 +296,17 @@ public class ToastUtils { | |||
currentToast.setView(toastLayout); | |||
currentToast.setDuration(duration); | |||
currentToast.setGravity(Gravity.TOP,0,100); | |||
// currentToast.setGravity(Gravity.LEFT | Gravity.TOP, 0, 0);//左上角 | |||
// currentToast.setGravity(Gravity.RIGHT | Gravity.TOP, 0, 0);//右上角 | |||
// currentToast.setGravity(Gravity.LEFT | Gravity.BOTTOM, 0, 0);//左下角 | |||
// currentToast.setGravity(Gravity.RIGHT | Gravity.BOTTOM, 0, 100);//右下角 | |||
} | |||
}); | |||
} | |||
return currentToast; | |||
} | |||
@@ -0,0 +1,83 @@ | |||
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 com.bonait.bnframework.common.db.res.SuOrderTJ; | |||
import java.util.List; | |||
public class ddtj_adapter extends ArrayAdapter<SuOrderTJ> { | |||
private List<SuOrderTJ> datas; | |||
private Context context; | |||
private int resource; | |||
public ddtj_adapter(@NonNull Context context, int resource, @NonNull List<SuOrderTJ> 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) { | |||
SuOrderTJ order = (SuOrderTJ) getItem(position);//得到当前项选中item实例 | |||
//为每一个子项加载设定的布局 | |||
View view = LayoutInflater.from(getContext()).inflate(this.resource, parent, false); | |||
//分别获取 image view 和 textview 的实例 | |||
TextView name,ddzl,ddzl_yzz,ddzl_yc; | |||
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); | |||
name.setText(order.name+""); | |||
ddzl.setText(order.Count+""); | |||
ddzl_yzz.setText(order.Yzz_Count+""); | |||
ddzl_yc.setText(order.Yc_Count+""); | |||
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) { | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
} |
@@ -0,0 +1,85 @@ | |||
package com.bonait.bnframework.modules.home.adapter; | |||
import android.content.Context; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.Button; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_USER; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import java.util.List; | |||
public class user_adapter extends ArrayAdapter<BPA_USER> { | |||
/** | |||
* 内部点击事件 | |||
*/ | |||
private MyClickListener mListener; | |||
private List<BPA_USER> datas; | |||
int resource1; | |||
public user_adapter(@NonNull Context context, int resource, @NonNull List<BPA_USER> objects, MyClickListener listener) { | |||
super(context, resource, objects); | |||
mListener = listener; | |||
datas=objects; | |||
this.resource1=resource; | |||
} | |||
//每个子项被滚动到屏幕内的时候会被调用 | |||
@NonNull | |||
@Override | |||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { | |||
BPA_USER bpa_material = (BPA_USER) getItem(position);//得到当前项选中item实例 | |||
//为每一个子项加载设定的布局 | |||
View view = LayoutInflater.from(getContext()).inflate(resource1, parent, false); | |||
//分别获取 image view 和 textview 的实例 | |||
TextView name = view.findViewById(R.id.name); | |||
TextView zhanghao = view.findViewById(R.id.zhanghao); | |||
TextView mima = view.findViewById(R.id.mima); | |||
Button button = view.findViewById(R.id.button_item); | |||
// 设置要显示的图片和文字 | |||
name.setText(bpa_material.name); | |||
zhanghao.setText(bpa_material.account); | |||
mima.setText(bpa_material.pass); | |||
name.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(mListener!=null) mListener.clickListener(view,bpa_material); | |||
} | |||
}); | |||
zhanghao.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(mListener!=null) mListener.clickListener(view,bpa_material); | |||
} | |||
}); | |||
mima.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(mListener!=null) mListener.clickListener(view,bpa_material); | |||
} | |||
}); | |||
button.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(mListener!=null) mListener.clickListener(view,bpa_material); | |||
} | |||
}); | |||
return view; | |||
} | |||
} |
@@ -84,7 +84,13 @@ public class xxpf_adapter extends ArrayAdapter<ResGoodsRecipe> { | |||
//notifyDataSetChanged(); | |||
}else | |||
{ | |||
goodsrecipe.sort=Integer.parseInt(so); | |||
try | |||
{ | |||
goodsrecipe.sort=Integer.parseInt(so); | |||
}catch (Exception ex) | |||
{ | |||
goodsrecipe.sort=0; | |||
} | |||
DataBus.getInstance().Recipe.set(position,goodsrecipe); | |||
//notifyDataSetChanged(); | |||
} | |||
@@ -109,7 +115,15 @@ public class xxpf_adapter extends ArrayAdapter<ResGoodsRecipe> { | |||
K=0; | |||
}else | |||
{ | |||
K=Double.parseDouble(so); | |||
try | |||
{ | |||
K=Double.parseDouble(so); | |||
}catch (Exception ex) | |||
{ | |||
ToastUtils.error("重量数据不合法!"); | |||
K=0; | |||
edittext_zl.setText("0.0"); | |||
} | |||
} | |||
if (K==0) | |||
@@ -127,12 +127,15 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
myViewHolder.save_time.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
goodsMake.plcvar=myViewHolder.edittext_pssj.getText().toString()+"|" | |||
+myViewHolder.edittext_xhsj.getText().toString()+"|" | |||
+myViewHolder.edittext_jrsj.getText().toString(); | |||
QueryDB.UpdateSugar(goodsMake); | |||
ToastUtils.info("保存成功!"); | |||
if(DataIs("排水阀排水时间",myViewHolder.edittext_pssj.getText().toString()) | |||
&& DataIs("循环清洗时间",myViewHolder.edittext_xhsj.getText().toString()) && DataIs("加热水池时间",myViewHolder.edittext_jrsj.getText().toString())) | |||
{ | |||
goodsMake.plcvar=myViewHolder.edittext_pssj.getText().toString()+"|" | |||
+myViewHolder.edittext_xhsj.getText().toString()+"|" | |||
+myViewHolder.edittext_jrsj.getText().toString(); | |||
QueryDB.UpdateSugar(goodsMake); | |||
ToastUtils.info("保存成功!"); | |||
} | |||
} | |||
}); | |||
@@ -159,6 +162,26 @@ public class zdqxchid_adapter extends RecyclerView.Adapter<RecyclerView.ViewHold | |||
e.printStackTrace(); | |||
} | |||
} | |||
public boolean DataIs(String name,String data) | |||
{ | |||
try | |||
{ | |||
if(data==null || data.isEmpty()) | |||
{ | |||
ToastUtils.error(name+"不能为空!"); | |||
return false; | |||
} | |||
Double.parseDouble(data); | |||
return true; | |||
}catch (Exception ex) | |||
{ | |||
ToastUtils.error(name+"数据不合法!"); | |||
return false; | |||
} | |||
} | |||
/** | |||
* 刷新 | |||
* @param | |||
@@ -10,14 +10,18 @@ import androidx.recyclerview.widget.RecyclerView; | |||
import androidx.viewpager.widget.ViewPager; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.util.Log; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.widget.AdapterView; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
import android.widget.FrameLayout; | |||
import android.widget.LinearLayout; | |||
import android.widget.ListView; | |||
import android.widget.RelativeLayout; | |||
import android.widget.TextView; | |||
import com.bonait.bnframework.R; | |||
@@ -59,6 +63,16 @@ public class JiaoYanFragment extends BaseFragment { | |||
@BindView(R.id.viewpager_jiaoyan) | |||
FrameLayout viewpager_jiaoyan;//右侧控件 | |||
@BindView(R.id.main_show) | |||
LinearLayout main_show;//权限显示 | |||
@BindView(R.id.quanxian) | |||
RelativeLayout quanxian;//权限显示 | |||
@BindView(R.id.edittext_quanxian) | |||
EditText edittext_quanxian;//权限密码 | |||
@BindView(R.id.quanxianmima) | |||
Button quanxianmima;//权限密码 | |||
private Context context; | |||
public static int mPosition; | |||
@@ -88,6 +102,27 @@ public class JiaoYanFragment extends BaseFragment { | |||
*/ | |||
private void initTopBar() { | |||
mTopBar.setTitle("设备校正"); | |||
quanxianmima.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
String s=edittext_quanxian.getText().toString(); | |||
if (s==null ||s.isEmpty()) | |||
{ | |||
ToastUtils.warning("权限密码不能为空!"); | |||
}else | |||
{ | |||
if(s.equals(ConfigName.getInstance().user.pass)) | |||
{ | |||
quanxian.setVisibility(View.GONE); | |||
main_show.setVisibility(View.VISIBLE); | |||
}else | |||
{ | |||
ToastUtils.warning("权限密码不正确!"); | |||
} | |||
} | |||
} | |||
}); | |||
} | |||
private List<Fragment> fragmentList; | |||
public void initData() | |||
@@ -128,6 +163,12 @@ public class JiaoYanFragment extends BaseFragment { | |||
} | |||
}); | |||
if(ConfigName.getInstance().user.name.equals("admin") | |||
|| ConfigName.getInstance().user.account.equals("admin")) | |||
{ | |||
quanxian.setVisibility(View.GONE); | |||
main_show.setVisibility(View.VISIBLE); | |||
} | |||
} | |||
/** | |||
* 配置ViewPager监听器,手指滑动监听 | |||
@@ -7,26 +7,84 @@ import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
import android.content.Context; | |||
import android.graphics.Color; | |||
import android.os.Bundle; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
import android.widget.ListView; | |||
import android.widget.TextView; | |||
import com.bigkoo.pickerview.TimePickerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.res.ResSubOrder; | |||
import com.bonait.bnframework.common.db.res.SuOrderTJ; | |||
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.adapter.ddtj_adapter; | |||
import com.bonait.bnframework.modules.home.fragment.DingDanfragment; | |||
import com.bonait.bnframework.modules.home.fragment.GuanLifragment; | |||
import com.qmuiteam.qmui.widget.QMUITopBarLayout; | |||
import java.text.SimpleDateFormat; | |||
import java.util.ArrayList; | |||
import java.util.Calendar; | |||
import java.util.Date; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
import butterknife.OnClick; | |||
public class SalesStatisticsActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
//region 操作变量 | |||
/** | |||
* 查询按钮 | |||
*/ | |||
@BindView(R.id.button) | |||
Button button; | |||
/** | |||
* 表格显示 | |||
*/ | |||
@BindView(R.id.datatab) | |||
ListView datatab; | |||
/** | |||
* 子订单数据 | |||
*/ | |||
ArrayList<ResSubOrder> subOrders = new ArrayList<>(); | |||
ArrayList<SuOrderTJ> subOrdersStatic = new ArrayList<>(); | |||
/** | |||
* 订单管理控制器 | |||
*/ | |||
ddtj_adapter adapter; | |||
/** | |||
* 日期选择器 | |||
*/ | |||
TimePickerView pvTime; | |||
/** | |||
* 开始时间-结束时间 | |||
*/ | |||
@BindView(R.id.starttime) | |||
EditText starttime; | |||
@BindView(R.id.stoptime) | |||
EditText stoptime; | |||
private Context context; | |||
private ViewGroup view; | |||
@Override | |||
protected void onCreate(Bundle savedInstanceState) { | |||
@@ -34,8 +92,10 @@ public class SalesStatisticsActivity extends BaseActivity { | |||
setContentView(R.layout.activity_salesstatistics); | |||
ButterKnife.bind(this); | |||
context = getContext(); | |||
view=(ViewGroup)getWindow().getDecorView(); | |||
initTopBar(); | |||
initFragment(); | |||
Init(); | |||
} | |||
private void initTopBar() { | |||
@@ -47,6 +107,124 @@ public class SalesStatisticsActivity extends BaseActivity { | |||
} | |||
}); | |||
} | |||
/** | |||
* 初始化 | |||
*/ | |||
private void Init(){ | |||
//通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据 | |||
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(view) | |||
.build(); | |||
} | |||
/** | |||
* 初始化数据加载 | |||
*/ | |||
public void Initdata() { | |||
try { | |||
String str= starttime.getText().toString(); | |||
String stop= stoptime.getText().toString(); | |||
if(DateUtils.compareDate(stop,str)) | |||
{ | |||
ToastUtils.warning("开始时间不能大于结束时间!!!"); | |||
return; | |||
} | |||
subOrdersStatic.clear(); | |||
subOrders= QueryDB.GetSubOrders(str,stop, -1,""); | |||
ArrayList<BPA_GOODS> goods=QueryDB.GetGoodsALL(); | |||
for (BPA_GOODS item :goods) | |||
{ | |||
SuOrderTJ tj=new SuOrderTJ(); | |||
tj.name=item.name; | |||
int count=0; | |||
int countyzz=0; | |||
for (ResSubOrder order:subOrders) | |||
{ | |||
if(order.goodsID.equals(item.id)) | |||
{ | |||
count++; | |||
if(order.status==2) | |||
{ | |||
countyzz++; | |||
} | |||
} | |||
} | |||
tj.Count=count; | |||
tj.Yzz_Count=countyzz; | |||
tj.Yc_Count=count-countyzz; | |||
subOrdersStatic.add(tj); | |||
} | |||
adapter = new ddtj_adapter(context,R.layout.ddtj_item,subOrdersStatic); | |||
datatab.setAdapter(adapter); | |||
} catch (Exception e) { | |||
} | |||
} | |||
@OnClick({R.id.button}) | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.button://查询按钮 | |||
Initdata(); | |||
break; | |||
} | |||
} | |||
/** | |||
* viewPager里添加fragment | |||
*/ | |||
@@ -77,19 +77,35 @@ public class JiaoYan_zdbs_fragment extends BaseFragment { | |||
save_time.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if(edittext_ycsj.getText().toString().isEmpty()) | |||
if(DataIs("延迟时间",edittext_ycsj.getText().toString())) | |||
{ | |||
ToastUtils.warning("延迟时间不能为空!"); | |||
return; | |||
ConfigName.getInstance().AutomaticWaterRefillTime=edittext_ycsj.getText().toString(); | |||
ConfigData.getInstance().SavePZ(); | |||
ToastUtils.info("保存成功!"); | |||
} | |||
ConfigName.getInstance().AutomaticWaterRefillTime=edittext_ycsj.getText().toString(); | |||
ConfigData.getInstance().SavePZ(); | |||
ToastUtils.info("保存成功!"); | |||
} | |||
}); | |||
} | |||
public boolean DataIs(String name,String data) | |||
{ | |||
try | |||
{ | |||
if(data==null || data.isEmpty()) | |||
{ | |||
ToastUtils.error(name+"不能为空!"); | |||
return false; | |||
} | |||
Double.parseDouble(data); | |||
return true; | |||
}catch (Exception ex) | |||
{ | |||
ToastUtils.error(name+"数据不合法!"); | |||
return false; | |||
} | |||
} | |||
@Override | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
@@ -32,6 +32,7 @@ import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.common.utils.UpdateAppUtils; | |||
import com.bonait.bnframework.manager.ActivityLifecycleManager; | |||
import com.bonait.bnframework.modules.mine.fragment.from.NoticeActivity; | |||
import com.bonait.bnframework.modules.mine.fragment.from.UserActivity; | |||
import com.bonait.bnframework.modules.welcome.activity.LoginActivity; | |||
import com.orhanobut.logger.Logger; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | |||
@@ -168,7 +169,14 @@ public class MyFragment extends BaseFragment { | |||
.show(); | |||
break; | |||
case R.id.stv_user_qx:// | |||
if(ConfigName.getInstance().user.name.equals("admin") | |||
|| ConfigName.getInstance().user.account.equals("admin")) | |||
{ | |||
skipToUserActivity(); | |||
}else | |||
{ | |||
ToastUtils.warning("对不起,你暂无权限!"); | |||
} | |||
break; | |||
case R.id.stv_update:// | |||
//检查权限,并启动版本更新 | |||
@@ -225,6 +233,16 @@ public class MyFragment extends BaseFragment { | |||
startActivity(intent); | |||
} | |||
/** | |||
* 跳转登录界面 | |||
*/ | |||
private void skipToUserActivity() { | |||
// 跳转到登录页面 | |||
Intent intent = new Intent(context, UserActivity.class); | |||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||
startActivity(intent); | |||
} | |||
/** | |||
* 跳转登录界面 | |||
*/ | |||
@@ -0,0 +1,254 @@ | |||
package com.bonait.bnframework.modules.mine.fragment.from; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
import android.os.Bundle; | |||
import android.text.InputType; | |||
import android.view.View; | |||
import android.widget.Button; | |||
import android.widget.ListView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ConfigData; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_USER; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.utils.NetworkUtils; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.modules.home.adapter.user_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.wl_adapter; | |||
import com.qmuiteam.qmui.widget.QMUITopBarLayout; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | |||
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; | |||
import java.util.ArrayList; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
import butterknife.OnClick; | |||
public class UserActivity extends BaseActivity implements MyClickListener { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@BindView(R.id.add_wl) | |||
Button add_wl; | |||
@BindView(R.id.datatab) | |||
ListView datatab; | |||
/** | |||
* 用户数据 | |||
*/ | |||
ArrayList<BPA_USER> bpa_users = new ArrayList<>(); | |||
@Override | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_user); | |||
//属性绑定 | |||
ButterKnife.bind(this); | |||
initTopBar(); | |||
InitView(); | |||
} | |||
private void initTopBar() { | |||
mTopBar.setTitle("账户管理"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
finish(); | |||
} | |||
}); | |||
} | |||
/** | |||
* 初始化界面 | |||
*/ | |||
public void InitView() { | |||
Initdata(); | |||
} | |||
@OnClick({R.id.add_wl, R.id.synchronous}) | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.add_wl://增加物料 | |||
final QMUIDialog.EditTextDialogBuilder builder_add = new QMUIDialog.EditTextDialogBuilder(this); | |||
builder_add.setTitle("用户名称") | |||
.setPlaceholder("在此输入用户名称") | |||
.setInputType(InputType.TYPE_CLASS_TEXT) | |||
.addAction("取消", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction("确定", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
CharSequence text = builder_add.getEditText().getText(); | |||
if (text != null && text.length() > 0) { | |||
if(text.toString().equals("admin")) | |||
{ | |||
ToastUtils.warning("不能设置账号为admin!"); | |||
return; | |||
} | |||
BPA_USER bpa_user = new BPA_USER(); | |||
bpa_user.name = text.toString(); | |||
bpa_user.account = text.toString(); | |||
bpa_user.pass = "123456"; | |||
bpa_user.deviceID = ConfigName.getInstance().DeviceId; | |||
bpa_user.userID = ConfigName.getInstance().user.userID; | |||
QueryDB.AddUser(bpa_user); | |||
ToastUtils.info("新增成功"); | |||
Initdata(); | |||
dialog.dismiss(); | |||
} else { | |||
//请填入昵称 | |||
ToastUtils.info("名称不能为空!"); | |||
} | |||
} | |||
}) | |||
.show(); | |||
break; | |||
} | |||
} | |||
/** | |||
* 初始化数据加载 | |||
*/ | |||
public void Initdata() { | |||
try { | |||
bpa_users = QueryDB.GetUserALL(); | |||
user_adapter adapter = new user_adapter(getBaseContext(), R.layout.user_item, bpa_users, this); | |||
datatab.setAdapter(adapter); | |||
} catch (Exception e) { | |||
} | |||
} | |||
@Override | |||
public void clickListener(View v, Object data) { | |||
String name= ((BPA_USER) data).name; | |||
String ac= ((BPA_USER) data).account; | |||
if(name.equals("admin") || ac.equals("admin")) | |||
{ | |||
ToastUtils.warning("对不起,admin账户禁止操作!"); | |||
return; | |||
} | |||
switch (v.getId()) { | |||
case R.id.name://修改物料名称按钮 | |||
final QMUIDialog.EditTextDialogBuilder builder = new QMUIDialog.EditTextDialogBuilder(this); | |||
builder.setTitle("用户名称") | |||
.setPlaceholder("在此输入用户名称") | |||
.setDefaultText(((BPA_USER) data).name) | |||
.setInputType(InputType.TYPE_CLASS_TEXT) | |||
.addAction("取消", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction("确定", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
CharSequence text = builder.getEditText().getText(); | |||
if (text != null && text.length() > 0 ) { | |||
if(text.toString().equals("admin")) | |||
{ | |||
ToastUtils.warning("不能设置账号为admin!"); | |||
return; | |||
} | |||
QueryDB.UpdateUserName(((BPA_USER) data).id, text.toString()); | |||
Initdata(); | |||
ToastUtils.info("修改成功"); | |||
dialog.dismiss(); | |||
} else { | |||
//请填入昵称 | |||
ToastUtils.warning("不能为空!"); | |||
} | |||
} | |||
}) | |||
.show(); | |||
break; | |||
case R.id.zhanghao://修改物料名称按钮 | |||
final QMUIDialog.EditTextDialogBuilder builder1 = new QMUIDialog.EditTextDialogBuilder(this); | |||
builder1.setTitle("用户账号") | |||
.setPlaceholder("在此输入用户账号") | |||
.setDefaultText(((BPA_USER) data).account) | |||
.setInputType(InputType.TYPE_CLASS_TEXT) | |||
.addAction("取消", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction("确定", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
CharSequence text = builder1.getEditText().getText(); | |||
if (text != null && text.length() > 0) { | |||
if(text.toString().equals("admin")) | |||
{ | |||
ToastUtils.warning("不能设置账号为admin!"); | |||
return; | |||
} | |||
QueryDB.UpdateAccount(((BPA_USER) data).id, text.toString()); | |||
Initdata(); | |||
ToastUtils.info("修改成功"); | |||
dialog.dismiss(); | |||
} else { | |||
//请填入昵称 | |||
ToastUtils.info("不能为空!"); | |||
} | |||
} | |||
}) | |||
.show(); | |||
break; | |||
case R.id.mima://修改物料名称按钮 | |||
final QMUIDialog.EditTextDialogBuilder builder2 = new QMUIDialog.EditTextDialogBuilder(this); | |||
builder2.setTitle("用户密码") | |||
.setPlaceholder("在此输入用户密码") | |||
.setDefaultText(((BPA_USER) data).pass) | |||
.setInputType(InputType.TYPE_CLASS_TEXT) | |||
.addAction("取消", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
dialog.dismiss(); | |||
} | |||
}) | |||
.addAction("确定", new QMUIDialogAction.ActionListener() { | |||
@Override | |||
public void onClick(QMUIDialog dialog, int index) { | |||
CharSequence text = builder2.getEditText().getText(); | |||
if (text != null && text.length() > 0) { | |||
QueryDB.UpdateUserPass(((BPA_USER) data).id, text.toString()); | |||
Initdata(); | |||
ToastUtils.info("修改成功"); | |||
dialog.dismiss(); | |||
} else { | |||
//请填入昵称 | |||
ToastUtils.info("不能为空!"); | |||
} | |||
} | |||
}) | |||
.show(); | |||
break; | |||
case R.id.button_item://删除按钮 | |||
QueryDB.DeleteUser((BPA_USER) data); | |||
Initdata(); | |||
ToastUtils.info("删除成功"); | |||
break; | |||
} | |||
} | |||
@Override | |||
public void clickListenerNew(View v, int k, Object data) { | |||
} | |||
} |
@@ -13,8 +13,173 @@ | |||
android:layout_marginTop="54dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
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"/> | |||
<Button | |||
android:id="@+id/button" | |||
android:layout_width="100dp" | |||
android:layout_height="26dp" | |||
android:layout_gravity="center" | |||
android:layout_marginLeft="15dp" | |||
android:background="@drawable/button3" | |||
android:text="查询" | |||
android:textColor="@color/white" | |||
android:textSize="@dimen/textSize" /> | |||
</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="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="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> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
@@ -0,0 +1,195 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout 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="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/app_color_blue" | |||
android:fitsSystemWindows="true" | |||
android:orientation="vertical" | |||
tools:context=".modules.mine.fragment.from.UserActivity"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/qmui_config_color_white" | |||
android:layout_marginTop="?attr/qmui_topbar_height"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/main_background" | |||
android:orientation="vertical"> | |||
<!-- 物料信息管理 --> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/qmui_config_color_white" | |||
android:orientation="vertical" | |||
android:paddingLeft="@dimen/dp_10" | |||
android:paddingTop="@dimen/dp_10" | |||
android:paddingRight="@dimen/dp_10"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentBottom="true" | |||
android:layout_marginTop="5dp" | |||
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" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<LinearLayout | |||
android:layout_alignParentRight="true" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal"> | |||
<Button | |||
android:id="@+id/add_wl" | |||
android:layout_width="100dp" | |||
android:layout_height="26dp" | |||
android:layout_alignParentRight="true" | |||
android:layout_centerInParent="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:background="@drawable/button1" | |||
android:text="+增加用户" | |||
android:textSize="14dp" | |||
/> | |||
<Button | |||
android:id="@+id/synchronous" | |||
android:layout_width="100dp" | |||
android:layout_height="26dp" | |||
android:layout_alignParentRight="true" | |||
android:layout_centerInParent="true" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:background="@drawable/button1" | |||
android:text="同步云端" | |||
android:textSize="14dp" | |||
android:visibility="gone"/> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_marginTop="5dp"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
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="1"> | |||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="用户名称" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1"> | |||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="用户账号" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1"> | |||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="用户密码" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1"> | |||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="操作" /> | |||
</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> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/app_color_blue" /> | |||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -0,0 +1,80 @@ | |||
<?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/name" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="商品名称" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="2"> | |||
<TextView | |||
android:id="@+id/ddzl" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="订单总量(单)" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="2"> | |||
<TextView | |||
android:id="@+id/ddzl_yzz" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="已制作(单)" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="2"> | |||
<TextView | |||
android:id="@+id/ddzl_yc" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="异常订单(单)" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
</TableRow> | |||
</TableLayout> | |||
</RelativeLayout> |
@@ -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" | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://schemas.android.com/apk/res/android "> | |||
<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="match_parent" | |||
android:layout_weight="1"> | |||
<TextView | |||
android:id="@+id/name" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_centerVertical="true" | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="回锅肉" | |||
android:textSize="14dp"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1"> | |||
<TextView | |||
android:id="@+id/zhanghao" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_centerVertical="true" | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="账号" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1"> | |||
<TextView | |||
android:id="@+id/mima" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_centerVertical="true" | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="密码" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
android:layout_height="match_parent" | |||
android:layout_weight="1"> | |||
<Button | |||
android:id="@+id/button_item" | |||
android:layout_width="60dp" | |||
android:layout_centerVertical="true" | |||
android:layout_height="30dp" | |||
android:layout_marginLeft="10dp" | |||
android:background="@drawable/button" | |||
android:focusable="false" | |||
android:text="删除" | |||
android:textSize="12dp"/> | |||
</RelativeLayout> | |||
</TableRow> | |||
</TableLayout> | |||
</RelativeLayout> |
@@ -11,9 +11,11 @@ | |||
android:layout_height="match_parent" | |||
android:background="@color/main_background"> | |||
<LinearLayout | |||
android:id="@+id/main_show" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:orientation="horizontal"> | |||
android:orientation="horizontal" | |||
android:visibility="gone"> | |||
<!-- 左侧导航 --> | |||
<LinearLayout | |||
@@ -40,6 +42,54 @@ | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="match_parent" />--> | |||
</LinearLayout> | |||
<RelativeLayout | |||
android:id="@+id/quanxian" | |||
android:layout_gravity="top" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:fitsSystemWindows="true"> | |||
<LinearLayout | |||
android:layout_centerInParent="true" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:orientation="vertical"> | |||
<EditText | |||
android:id="@+id/edittext_quanxian" | |||
android:layout_width="200dp" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入权限密码" | |||
android:inputType="text" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="19dp" /> | |||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | |||
android:layout_width="wrap_content" | |||
android:visibility="gone" | |||
android:layout_height="wrap_content" | |||
android:text="密码提示:12****" | |||
android:textColor="@color/colorAccent" | |||
android:textSize="8dp" | |||
android:layout_centerVertical="true" | |||
android:layout_marginRight="@dimen/dp_10" | |||
android:layout_alignParentRight="true"/> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<Button | |||
android:id="@+id/quanxianmima" | |||
android:layout_width="200dp" | |||
android:layout_height="36dp" | |||
android:layout_marginTop="20dp" | |||
android:layout_alignParentRight="true" | |||
android:background="@drawable/button1" | |||
android:text="确认" | |||
android:textColor="@color/black" | |||
android:textSize="14dp" /> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
@@ -104,7 +104,7 @@ | |||
android:layout_width="120dp" | |||
android:layout_height="wrap_content" | |||
stv:imagesrc="@drawable/icon_personal_qx" | |||
android:tag="用户权限" | |||
android:tag="用户管理" | |||
stv:showbk="2"/> | |||
</LinearLayout> | |||