Commit 603713fd authored by shiyl's avatar shiyl

add新建人员管理模块并搭建我的员工页面

parent 7a19c715
......@@ -25,5 +25,8 @@ class XRouterPathConstants {
const val LIFE_ACCOUNT_ENTERPRISE_AUTH_COMPLETE = "/lifeAccountEnterpriseAuthComplete"
const val LIFE_ACCOUNT_ENTERPRISE_AUTH = "/lifeAccountEnterpriseAuth"
const val LIFE_NUMBER = "/lifeNumberActivity"
// 人员管理 —— 我的员工
const val PERSONAL_MY_STAFF = "/personal/myStaffActivity"
}
}
\ No newline at end of file
......@@ -96,6 +96,10 @@
android:name=".ui.auth.LifeAccountEnterpriseAuthActivity"
android:theme="@style/Transparent" />
<activity
android:name=".personnel.ui.MyStaffActivity"
android:theme="@style/Transparent" />
</application>
</manifest>
\ No newline at end of file
......@@ -15,11 +15,13 @@ import com.yidian.common.XRouterPathConstants.Companion.LIFE_ACCOUNT_PERSONAL_AU
import com.yidian.common.XRouterPathConstants.Companion.LOGIN_LIFE_CIRCLE
import com.yidian.common.XRouterPathConstants.Companion.NEWS_CONTENT
import com.yidian.common.XRouterPathConstants.Companion.NEWS_MAIN
import com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import com.yidian.common.XRouterPathConstants.Companion.PROTOCOL
import com.yidian.common.XRouterPathConstants.Companion.SUPPORT
import com.yidian.common.YdBaseApplication
import com.yidian.news.util.ProcessUtil
import com.yidian.nightmode.util.NightModeUtil
import com.yidian.shenghuoquan.newscontent.personnel.ui.MyStaffActivity
import com.yidian.shenghuoquan.newscontent.service.*
import com.yidian.shenghuoquan.newscontent.ui.*
import com.yidian.shenghuoquan.newscontent.ui.auth.*
......@@ -220,6 +222,18 @@ class NewsContentApplication : YdBaseApplication() {
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
context.startActivity(intent)
}
}),
// 人员管理 —— 我的员工
XPageNode(PERSONAL_MY_STAFF, XPageNodePageType.NATIVE, object : XPageHandler {
override fun handler(params: Map<String, Any?>?) {
val intent = Intent()
if (params != null) {
intent.putExtra(XRouterPathConstants.ParamsKey, params as HashMap)
}
intent.setClass(context, MyStaffActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
context.startActivity(intent)
}
})
)
)
......
package com.yidian.shenghuoquan.newscontent.personnel.bean
import com.google.gson.annotations.SerializedName
/**
* 账号列表数据类
*/
data class AccountListDto(
@SerializedName("admin")
val admin: List<Admin>? = null,
@SerializedName("users")
val users: List<User>? = null
)
data class Admin(
@SerializedName("life_account_id")
val lifeAccountId: Long? = null,
@SerializedName("merchant_id")
val merchantId: Int? = null,
@SerializedName("mobile")
val mobile: String? = null,
@SerializedName("nick_name")
val nickName: String? = null,
@SerializedName("role_list")
val roleList: List<String>? = null,
@SerializedName("role_type")
val roleType: Int? = null,
@SerializedName("show_button")
val showButton: Int? = null,
@SerializedName("user_id")
val userId: Long? = null
)
data class User(
@SerializedName("life_account_id")
val lifeAccountId: Long? = null,
@SerializedName("merchant_id")
val merchantId: Int? = null,
@SerializedName("mobile")
val mobile: String? = null,
@SerializedName("nick_name")
val nickName: String? = null,
@SerializedName("role_list")
val roleList: List<String>? = null,
@SerializedName("role_type")
val roleType: Int? = null,
@SerializedName("show_button")
val showButton: Int? = null,
@SerializedName("user_id")
val userId: Int? = null
)
\ No newline at end of file
package com.yidian.shenghuoquan.newscontent.personnel.ui
import android.os.Bundle
import com.yidian.common.XRouterPathConstants.Companion.PERSONAL_MY_STAFF
import com.yidian.common.base.BaseActivity
import com.yidian.shenghuoquan.newscontent.databinding.ActivityMyStaffBinding
/**
* 人员管理 —— 我的员工页面
*/
class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>() {
override fun createViewBinding(): ActivityMyStaffBinding {
return ActivityMyStaffBinding.inflate(layoutInflater)
}
override fun getXPageName(): String {
return PERSONAL_MY_STAFF
}
override fun init(savedInstanceState: Bundle?) {
super.init(savedInstanceState)
// 请求账号列表
}
}
\ No newline at end of file
package com.yidian.shenghuoquan.newscontent.ui
import android.os.Bundle
import android.view.View
import com.orhanobut.hawk.Hawk
import com.yidian.common.HawkConfig
import com.yidian.common.XRouterPathConstants
......@@ -168,4 +169,10 @@ class LoginLifeCircleActivity : BaseActivity<ActivityLoginBinding>() {
}
}
}
// todo 测试人员管理的入口,后续删除
fun testPersonalManagement(view: View) {
XPageManager.push(XRouterPathConstants.PERSONAL_MY_STAFF, null)
}
}
\ No newline at end of file
......@@ -10,39 +10,39 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="99dp"
android:textSize="28sp"
android:text="欢迎入驻生活圈商家版"
android:textColor="#333333"
android:text="欢迎入驻生活圈商家版"/>
android:textSize="28sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="10dp"
android:layout_marginStart="40dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="40dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:text="手机号"/>
android:text="手机号"
android:textColor="#333333"
android:textSize="16sp" />
<EditText
android:id="@+id/et_mobileNo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="17dp"
android:gravity="center_vertical"
android:background="@null"
android:gravity="center_vertical"
android:hint="请输入"
android:inputType="number"
android:maxLength="13"
android:textColor="#333333"
android:textSize="16sp"
tools:ignore="TextFields"
android:hint="请输入"/>
tools:ignore="TextFields" />
</LinearLayout>
......@@ -51,7 +51,7 @@
android:layout_height="2dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="#f2f2f2"/>
android:background="#f2f2f2" />
<RelativeLayout
android:layout_width="match_parent"
......@@ -63,38 +63,38 @@
android:id="@+id/tv_codeShow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="#333333"
android:layout_centerVertical="true"
android:text="验证码"/>
android:text="验证码"
android:textColor="#333333"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_getCode"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="#1852f1"
android:gravity="end"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:text="获取验证码"/>
android:gravity="end"
android:text="获取验证码"
android:textColor="#1852f1"
android:textSize="14sp" />
<EditText
android:id="@+id/et_code"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toEndOf="@id/tv_codeShow"
android:layout_toStartOf="@id/tv_getCode"
android:layout_marginStart="17dp"
android:layout_marginEnd="20dp"
android:gravity="center_vertical"
android:layout_toStartOf="@id/tv_getCode"
android:layout_toEndOf="@id/tv_codeShow"
android:background="@null"
android:gravity="center_vertical"
android:hint="请输入"
android:inputType="number"
android:maxLength="6"
android:textColor="#333333"
android:textSize="16sp"
tools:ignore="TextFields"
android:hint="请输入"/>
tools:ignore="TextFields" />
</RelativeLayout>
......@@ -103,7 +103,7 @@
android:layout_height="2dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="#f2f2f2"/>
android:background="#f2f2f2" />
<TextView
......@@ -111,13 +111,13 @@
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="40dp"
android:background="@drawable/account_btn_gradient_bg"
android:gravity="center"
android:textSize="18sp"
android:text="登 录"
android:textColor="@color/white"
android:background="@drawable/account_btn_gradient_bg"
android:text="登 录" />
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
......@@ -128,33 +128,43 @@
<CheckBox
android:id="@+id/cb_protocol"
style="@style/protocol_checkboxBg"
android:layout_width="25dp"
android:layout_height="23dp"
style="@style/protocol_checkboxBg"/>
android:layout_height="23dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textSize="14sp"
android:text="我同意"
android:textColor="#999999"
android:text="我同意"/>
android:textSize="14sp" />
<TextView
android:id="@+id/tv_protocol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="《用户协议》"
android:textColor="#1852f1"
android:text="《用户协议》"/>
android:textSize="14sp" />
<TextView
android:id="@+id/tv_privacy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="《隐私政策》"
android:textColor="#1852f1"
android:text="《隐私政策》"/>
android:textSize="14sp" />
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:text="测试人员管理"
android:onClick="testPersonalManagement"
android:textColor="@color/black"
android:textSize="18sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<include
android:id="@+id/layout_common_header"
layout="@layout/layout_common_header" />
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="我的员工页面"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
\ No newline at end of file
......@@ -2,7 +2,8 @@
<com.yidian.nightmode.widget.YdConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app='http://schemas.android.com/apk/res-auto'
android:layout_width="match_parent"
android:layout_height="42dp">
android:layout_height="@dimen/toolbar_height"
android:fitsSystemWindows="true">
<com.yidian.nightmode.widget.YdImageView
android:id="@+id/iv_back"
......
......@@ -2,11 +2,13 @@
<dimen name="fab_margin">16dp</dimen>
<dimen name="headbar_text_size">17dp</dimen>
<dimen name="headbar_button_text_size">13sp</dimen>
<dimen name="toolbar_height">44dp</dimen>
<dimen name="back_button_padding_left">15dp</dimen>
<dimen name="back_button_padding_right">10dp</dimen>
<dimen name="back_button_padding_vertical">12dp</dimen>
<dimen name="tab_normal">17sp</dimen>
<dimen name="tab_selected">24sp</dimen>
<!--全局toolbar高度-->
<dimen name="toolbar_height">50dp</dimen>
</resources>
\ No newline at end of file
......@@ -283,6 +283,9 @@ public static final int *;
-keep class com.yidian.framework.mobile.xdiamond.SecretUtil{*;}
-keep class com.yidian.yac.pm.appupdate.*{*;}
#子模块中的实体类记得keep
-keep class com.yidian.shenghuoquan.newscontent.personnel.bean.**{*;}
#极光
-dontoptimize
-dontpreverify
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment