提交 840769ac authored 作者: lgd's avatar lgd

1.bat页面商店第一个页面

2.//TODO erp用户激活,忘记密码测试,bat,mes,消息,我的,刷新token
上级 8081ca2a
package com.wd.workoffice.bean.workEnum;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public enum PermissType {
// 供应流程 PROCESS_SUPPLY 接单:SUPPLY_SELL 下单:SUPPLY_BUY
//* 内部交易流程 PROCESS_INSIDE 接单:INSIDE_SELL 下单:INSIDE_BUY
//
//* 坩埚流程 PROCESS_CRUCIBLE 接单:CRUCIBLE_SELL 下单:CRUCIBLE_BUY
//
//* 销售流程 PROCESS_SALE 接单:ES_SELL 下单:ES_BUY 查看:ES_GET
//
//* 外采购流程 PROCESS_PURCHASE 接单:PURCHASE_SELL 下单:PURCHASE_BUY
//
//* 维修流程 PROCESS_REPAIR 接单:REPAIR_SELL 下单:REPAIR_BUY
//* 财税流程 PROCESS_FISCAL_TAX 接单:FISCAL_TAX_SELL 下单:FISCAL_TAX_BUY
PROCESS_SUPPLY("PROCESS_SUPPLY", "供应流程"), SUPPLY_SELL("SUPPLY_SELL", "接单"), SUPPLY_BUY("SUPPLY_BUY", "下单"),
PROCESS_INSIDE("PROCESS_INSIDE", "内部交易流程"), INSIDE_SELL("INSIDE_SELL", "接单"), INSIDE_BUY("INSIDE_BUY", "下单"),
PROCESS_CRUCIBLE("PROCESS_CRUCIBLE", "坩埚流程"), CRUCIBLE_SELL("CRUCIBLE_SELL", "接单"), CRUCIBLE_BUY("CRUCIBLE_BUY", "下单"),
PROCESS_SALE("PROCESS_SALE", "销售流程"), ES_SELL("ES_SELL", "接单"), ES_BUY("ES_BUY", "下单"), ES_GET("ES_GET", "查看"),
PROCESS_PURCHASE("PROCESS_PURCHASE", "外采购流程"), PURCHASE_SELL("PURCHASE_SELL", "接单"), PURCHASE_BUY("PURCHASE_BUY", "下单"),
PROCESS_REPAIR("PROCESS_REPAIR", "维修流程"), REPAIR_SELL("REPAIR_SELL", "接单"), REPAIR_BUY("REPAIR_BUY", "下单"),
PROCESS_FISCAL_TAX("PROCESS_FISCAL_TAX", "财税流程"), FISCAL_TAX_SELL("FISCAL_TAX_SELL", "接单"), FISCAL_TAX_BUY("FISCAL_TAX_BUY", "下单");
private String code;
private String name;
public String getName() {
return name;
}
public String getCode() {
return code;
}
PermissType(String code, String name) {
this.code = code;
this.name = name;
}
}
package com.wd.workoffice.contract;
import com.wd.workoffice.app.BaseBean;
import flexible.xd.android_base.mvpBase.IBaseModel;
import flexible.xd.android_base.mvpBase.IBasePresenter;
import flexible.xd.android_base.mvpBase.IBaseView;
import io.reactivex.Observable;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public interface BatSaleContract {
interface Model extends IBaseModel {
Observable<BaseBean> getProcess(String phone, String type);
Observable<BaseBean> getProduct(String phone, String verifyCode, String type);
Observable<BaseBean> getDep(String permission);
}
interface View extends IBaseView {
void codeSuccess();
void verifySuccess();
}
interface Presenter extends IBasePresenter<View> {
void getCode(String phone, String type);
void verifyCode(String phone, String verifyCode, String type);
}
}
package com.wd.workoffice.model;
import com.wd.workoffice.contract.BatSaleContract;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class BatSaleModel implements BatSaleContract.Model {
}
package com.wd.workoffice.presenter;
import com.wd.workoffice.contract.BatSaleContract;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class BatSalePresenter implements BatSaleContract.Presenter {
}
...@@ -135,10 +135,12 @@ public interface ApiService { ...@@ -135,10 +135,12 @@ public interface ApiService {
* 登录 * 登录
* grant_type=userNew * grant_type=userNew
* grant_type=phone * grant_type=phone
*
* @return * @return
*/ */
@POST("/login") @POST("/login")
Call<BaseBean> login(@Query("grant_type")String type, @Body RequestBody requestBody); Call<BaseBean> login(@Query("grant_type") String type, @Body RequestBody requestBody);
/** /**
* 退出登录 * 退出登录
* *
...@@ -146,6 +148,7 @@ public interface ApiService { ...@@ -146,6 +148,7 @@ public interface ApiService {
*/ */
@POST("/authorities/logout") @POST("/authorities/logout")
Observable<BaseBean> logout(); Observable<BaseBean> logout();
/** /**
* 忘记密码(短信验证码的方式,重置密码) * 忘记密码(短信验证码的方式,重置密码)
* *
...@@ -153,7 +156,7 @@ public interface ApiService { ...@@ -153,7 +156,7 @@ public interface ApiService {
*/ */
@PUT("/open/change-pwd-forget") @PUT("/open/change-pwd-forget")
Observable<BaseBean> forgetPwd(@Query("phone") String phone, Observable<BaseBean> forgetPwd(@Query("phone") String phone,
@Query("verifyCode") String verifyCode, @Query("newPassword") String newPassword); @Query("verifyCode") String verifyCode, @Query("newPassword") String newPassword);
/** /**
* 激活员工前获取该员工信息 * 激活员工前获取该员工信息
...@@ -171,7 +174,7 @@ public interface ApiService { ...@@ -171,7 +174,7 @@ public interface ApiService {
* @return * @return
*/ */
@GET("/open/sms/ckCode/{phone}") @GET("/open/sms/ckCode/{phone}")
Observable<BaseBean> code(@Path("phone") String phone,@Query("type") String type); Observable<BaseBean> code(@Path("phone") String phone, @Query("type") String type);
/** /**
* 验证验证码 * 验证验证码
...@@ -199,4 +202,24 @@ public interface ApiService { ...@@ -199,4 +202,24 @@ public interface ApiService {
*/ */
@GET("/open/sys/dept/list") @GET("/open/sys/dept/list")
Observable<BaseBean> depList(); Observable<BaseBean> depList();
/**
* 根据权限 获取生产厂
*
* @return
*/
@GET("/sub-process/dept-list")
Observable<BaseBean> getDepByPermisson(String permission);
/**
* 根据部门、流程、往来单位获取子流程
*
* @param processCode
* @param transitPartId 往来单位id(客戶id)
* @return
*/
@GET("/sub-process/listByDPT")
Observable<BaseBean> getProcess(String processCode, String transitPartId);
} }
package com.wd.workoffice.ui.activity.bat;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/*
* 商店-销售
*/
public class StoreSaleActivity extends WorkToolBarActivity {
@BindView(R.id.tv_client)
TextView tvClient;
@BindView(R.id.rl_client)
RelativeLayout rlClient;
@BindView(R.id.tv_dep)
TextView tvDep;
@BindView(R.id.rl_dep)
RelativeLayout rlDep;
@BindView(R.id.tv_process)
TextView tvProcess;
@BindView(R.id.rl_process)
RelativeLayout rlProcess;
@BindView(R.id.tv_product)
TextView tvProduct;
@BindView(R.id.rl_product)
RelativeLayout rlProduct;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_bat_sale;
}
@OnClick({R.id.rl_client, R.id.rl_dep, R.id.rl_process, R.id.rl_product})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.rl_client:
break;
case R.id.rl_dep:
break;
case R.id.rl_process:
break;
case R.id.rl_product:
break;
}
}
}
package com.wd.workoffice.ui.activity.bat;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/*
* 商店-销售-选择客户
*/
public class StoreSaleClientActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_bat_sale_client;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fff0f5f8"/>
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
差异被折叠。
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
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="10mm"
android:layout_height="10mm"
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" />
</LinearLayout>
<Button
android:id="@+id/btn_search"
android:layout_width="50mm"
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_client"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="20mm"
android:layout_marginTop="4mm">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -7,4 +7,6 @@ ...@@ -7,4 +7,6 @@
<color name="mainTextColor">#32475C</color> <color name="mainTextColor">#32475C</color>
<color name="main_icon_select">#3F617F</color> <color name="main_icon_select">#3F617F</color>
<color name="main_icon">#C3CED7</color> <color name="main_icon">#C3CED7</color>
<color name="flexible_background">#fff6f9fb</color>
</resources> </resources>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论