提交 f77afcd0 authored 作者: lgd's avatar lgd

1.设备初始页面

2.//TODO 设备三个子菜单,退件详情(top流程图,审核历史(缺接口)),领用申请列表(数据不对),坩埚下单,mes其他页面,编辑任务担当无法修改.支数参数
上级 8e3be407
...@@ -56,6 +56,7 @@ public class UseApplyActivity extends WorkToolBarActivity { ...@@ -56,6 +56,7 @@ public class UseApplyActivity extends WorkToolBarActivity {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("state", order[i]); bundle.putString("state", order[i]);
bundle.putString("orderId", getIntent().getStringExtra("orderId")); bundle.putString("orderId", getIntent().getStringExtra("orderId"));
bundle.putString("productId", getIntent().getStringExtra("productId"));
bundle.putString("orderType", getIntent().getStringExtra("orderType")); bundle.putString("orderType", getIntent().getStringExtra("orderType"));
bundle.putString("simpleCode", getIntent().getStringExtra("simpleCode")); bundle.putString("simpleCode", getIntent().getStringExtra("simpleCode"));
bundle.putString("product", getIntent().getStringExtra("product")); bundle.putString("product", getIntent().getStringExtra("product"));
......
package com.wd.workoffice.ui.activity.bat.work;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 设备
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkDeviceActivity extends WorkToolBarActivity {
@BindView(R.id.rl_device)
RelativeLayout rlDevice;
@BindView(R.id.rl_service)
RelativeLayout rlService;
@BindView(R.id.rl_buy)
RelativeLayout rlBuy;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_work_device;
}
@OnClick({R.id.rl_device, R.id.rl_service, R.id.rl_buy})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.rl_device:
startActivity(WorkDeviceListActivity.class);
break;
case R.id.rl_service:
break;
case R.id.rl_buy:
break;
}
}
}
package com.wd.workoffice.ui.activity.bat.work;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.material.tabs.TabLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.workEnum.OrderType;
import com.wd.workoffice.bean.workEnum.PagePermissionType;
import com.wd.workoffice.ui.activity.bat.order.SendApplyAddActivity;
import com.wd.workoffice.ui.adapter.VpDataAdapter;
import com.wd.workoffice.ui.fg.SendApplyFragment;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 发货申请列表
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class WorkDeviceListActivity extends WorkToolBarActivity {
@BindView(R.id.tl_tab)
TabLayout tlTab;
@BindView(R.id.vp_data)
ViewPager vpData;
private String tab[] = {
"设备列表", "备件列表"};
@Override
protected void initView() {
ButterKnife.bind(this);
tlTab.setupWithViewPager(vpData);
tlTab.setTabMode(TabLayout.MODE_FIXED);
}
@Override
protected void initData() {
FragmentManager sfm = getSupportFragmentManager();
List<Fragment> data = new ArrayList<>();
SendApplyFragment saleFragment = new SendApplyFragment();
Bundle bundle = new Bundle();
bundle.putString("orderId", getIntent().getStringExtra("orderId"));
bundle.putString("orderType", getIntent().getStringExtra("orderType"));
saleFragment.setArguments(bundle);
data.add(saleFragment);
VpDataAdapter vpFgAdapter = new VpDataAdapter(sfm, data);
vpData.setAdapter(vpFgAdapter);
for (int i = 0; i < tab.length; i++) {
tlTab.getTabAt(i).setText(tab[i]);
}
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_order;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
String orderType = getIntent().getStringExtra("orderType");
if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
if (WorkUtils.hasPermission(PagePermissionType.SO_OUT_SAVE.getPermission())) {
getMenuInflater().inflate(R.menu.menu_add, menu);
}
} else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
if (WorkUtils.hasPermission(PagePermissionType.PO_OUT_SAVE.getPermission())) {
getMenuInflater().inflate(R.menu.menu_add, menu);
}
} else if (TextUtils.equals(orderType, OrderType.CRUCIBLE.getCode())) {
if (WorkUtils.hasPermission(PagePermissionType.CO_OUT_SAVE.getPermission())) {
getMenuInflater().inflate(R.menu.menu_add, menu);
}
}
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.add:
startActivity(SendApplyAddActivity.class,
"orderType", getIntent().getStringExtra("orderType"),
"id", getIntent().getStringExtra("orderId"));
break;
}
return super.onOptionsItemSelected(item);
}
}
...@@ -62,6 +62,7 @@ public class UseApplyFragment extends WorkBaseFg { ...@@ -62,6 +62,7 @@ public class UseApplyFragment extends WorkBaseFg {
private String simpleCode; private String simpleCode;
private String product; private String product;
private String orderType; private String orderType;
private String productId;
@Override @Override
protected void initView() { protected void initView() {
...@@ -95,6 +96,7 @@ public class UseApplyFragment extends WorkBaseFg { ...@@ -95,6 +96,7 @@ public class UseApplyFragment extends WorkBaseFg {
simpleCode = arguments.getString("simpleCode"); simpleCode = arguments.getString("simpleCode");
product = arguments.getString("product"); product = arguments.getString("product");
orderType = arguments.getString("orderType"); orderType = arguments.getString("orderType");
productId = arguments.getString("productId");
} }
} }
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/rl_device"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="设备列表" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@mipmap/arrow_right_blue" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:id="@+id/rl_service"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="设备维修" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@mipmap/arrow_right_blue" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:id="@+id/rl_buy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="设备采购" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@mipmap/arrow_right_blue" />
</RelativeLayout>
<View style="@style/dividerX" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/srl_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:paddingHorizontal="20mm"
android:paddingVertical="10mm">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/shape_client_search"
android:gravity="center_vertical"
android:paddingHorizontal="10mm">
<ImageView
android:layout_width="15mm"
android:layout_height="15mm"
android:src="@mipmap/client_search" />
<EditText
android:id="@+id/et_key"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2mm"
android:background="@null"
android:hint="搜索"
android:textColor="#91ABBA"
android:textColorHint="#91ABBA"
android:textSize="14sp" />
</LinearLayout>
<Button
android:id="@+id/btn_search"
android:layout_width="60mm"
android:layout_height="wrap_content"
android:layout_marginLeft="10mm"
android:background="@color/mainTextColor"
android:text="搜索"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论