点检 免检申请管理 接口 列表调用完成

master
hwf452 10 months ago
parent da450e5fa1
commit f7dcab6507

@ -257,6 +257,14 @@
android:name=".ui.activity.sbxdjgl.MjApplyActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.sbxdjgl.MjApplyManageActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.sbxdjgl.MjApplySubmitActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.sbxdjgl.QxgdListActivity"
android:exported="false"

@ -0,0 +1,5 @@
package com.rehome.dywoa.adapter;
public interface MjAdapterBtnClickListener {
void onClick(int position);
}

@ -0,0 +1,48 @@
package com.rehome.dywoa.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.rehome.dywoa.base.BaseViewBindingAdapter
import com.rehome.dywoa.bean.MjApplyBean
import com.rehome.dywoa.databinding.AdapterMjApplyBinding
class MjApplyAdapter(var context: Context,
var data: MutableList<MjApplyBean.Row>, var btnMjOnClickListener: MjAdapterBtnClickListener) : BaseViewBindingAdapter<AdapterMjApplyBinding>(context) {
override fun getCount(): Int {
return data.count()
}
override fun getItem(position: Int): Any {
return data[position]
}
override fun getItemId(position: Int): Long {
return position.toLong()
}
override fun getBinding(
inflater: LayoutInflater,
parent: ViewGroup?
) = AdapterMjApplyBinding.inflate(inflater, parent, false)
override fun handleData(position: Int, binding: AdapterMjApplyBinding) {
val item: MjApplyBean.Row = data[position]
binding.tvJhmc.text = item.jhmc
binding.tvZy.text = item.zymc
binding.tvZxsj.text = item.zxsj
binding.tvZds.text = item.zds
binding.tvYjds.text = item.yjds
binding.tvLjds.text = item.ljds
binding.btnMjApply.setOnClickListener {
btnMjOnClickListener.onClick(position)
}
}
}

@ -0,0 +1,51 @@
package com.rehome.dywoa.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.rehome.dywoa.base.BaseViewBindingAdapter
import com.rehome.dywoa.bean.MjApplyManageBean
import com.rehome.dywoa.databinding.AdapterMjApplyManageBinding
class MjApplyManageAdapter(var context: Context,
var data: MutableList<MjApplyManageBean.Row>) : BaseViewBindingAdapter<AdapterMjApplyManageBinding>(context) {
override fun getCount(): Int {
return data.count()
}
override fun getItem(position: Int): Any {
return data[position]
}
override fun getItemId(position: Int): Long {
return position.toLong()
}
override fun getBinding(
inflater: LayoutInflater,
parent: ViewGroup?
) = AdapterMjApplyManageBinding.inflate(inflater, parent, false)
override fun handleData(position: Int, binding: AdapterMjApplyManageBinding) {
val item: MjApplyManageBean.Row = data[position]
binding.tvSqr.text = item.applyName
binding.tvSqsj.text = item.applyTime
binding.tvSqbm.text = item.department
binding.tvReason.text = item.reason
if("审批通过" == item.status){
binding.btnMjDsp.visibility= View.GONE
binding.btnMjSptg.visibility= View.VISIBLE
}else{
binding.btnMjDsp.visibility= View.VISIBLE
binding.btnMjSptg.visibility= View.GONE
}
}
}

@ -0,0 +1,92 @@
package com.rehome.dywoa.bean;
import java.util.List;
public class MjApplyBean extends BaseListBean{
private List<Row> Rows;
public List<Row> getRows() {
return Rows;
}
public void setRows(List<Row> rows) {
Rows = rows;
}
public static class Row {
private String JHID;
private String JHMC;
private String ZYMC;
private String ZXSJ;
private String ZXZT;
private String ZDS;
private String YJDS;
private String LJDS;
public String getJHID() {
return JHID;
}
public void setJHID(String JHID) {
this.JHID = JHID;
}
public String getJHMC() {
return JHMC;
}
public void setJHMC(String JHMC) {
this.JHMC = JHMC;
}
public String getZYMC() {
return ZYMC;
}
public void setZYMC(String ZYMC) {
this.ZYMC = ZYMC;
}
public String getZXSJ() {
return ZXSJ;
}
public void setZXSJ(String ZXSJ) {
this.ZXSJ = ZXSJ;
}
public String getZDS() {
return ZDS;
}
public void setZDS(String ZDS) {
this.ZDS = ZDS;
}
public String getYJDS() {
return YJDS;
}
public void setYJDS(String YJDS) {
this.YJDS = YJDS;
}
public String getZXZT() {
return ZXZT;
}
public void setZXZT(String ZXZT) {
this.ZXZT = ZXZT;
}
public String getLJDS() {
return LJDS;
}
public void setLJDS(String LJDS) {
this.LJDS = LJDS;
}
}
}

@ -0,0 +1,73 @@
package com.rehome.dywoa.bean;
import java.util.List;
public class MjApplyManageBean extends BaseListBean{
private List<Row> Rows;
public List<Row> getRows() {
return Rows;
}
public void setRows(List<Row> rows) {
Rows = rows;
}
public static class Row {
private String mjid;
private String applyName;
private String department;
private String reason;
private String status;
private String applyTime;
public String getMjid() {
return mjid;
}
public void setMjid(String mjid) {
this.mjid = mjid;
}
public String getApplyName() {
return applyName;
}
public void setApplyName(String applyName) {
this.applyName = applyName;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getApplyTime() {
return applyTime;
}
public void setApplyTime(String applyTime) {
this.applyTime = applyTime;
}
}
}

@ -1,12 +1,20 @@
package com.rehome.dywoa.ui.activity.sbxdjgl
import android.content.Intent
import android.util.Log
import android.view.View
import com.rehome.dywoa.Contans
import com.rehome.dywoa.adapter.DjZhTjAdapter
import com.rehome.dywoa.adapter.MjAdapterBtnClickListener
import com.rehome.dywoa.adapter.MjApplyAdapter
import com.rehome.dywoa.base.BaseActivityOaToolbarViewBinding
import com.rehome.dywoa.bean.DjZhTjBean
import com.rehome.dywoa.bean.KksDataBean
import com.rehome.dywoa.bean.MjApplyBean
import com.rehome.dywoa.databinding.ActivityMjApplyBinding
import com.rehome.dywoa.utils.GsonUtils
import com.rehome.dywoa.utils.HttpListener
import com.rehome.dywoa.utils.NoProgresshttpUtils
import com.rehome.dywoa.utils.NohttpUtils
import com.yolanda.nohttp.NoHttp
import com.yolanda.nohttp.RequestMethod
@ -21,6 +29,9 @@ class MjApplyActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplyBinding>
private lateinit var calendar:Calendar
private lateinit var calendarSunday:Calendar;
private lateinit var adapter: MjApplyAdapter
private var datas: MutableList<MjApplyBean.Row> = mutableListOf()
//格式化日期的对象(转化成习惯的时间格式)
private val sdFormat = SimpleDateFormat("yyyy-MM-dd")
@ -33,6 +44,25 @@ class MjApplyActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplyBinding>
}
adapter = MjApplyAdapter(context, datas
) { position ->
val item: MjApplyBean.Row = datas[position];
val intentMjApplySumbit = Intent(
context,
MjApplySubmitActivity::class.java
)
intentMjApplySumbit.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
intentMjApplySumbit.putExtra("item",GsonUtils.GsonString(item))
startActivity(intentMjApplySumbit)
}
binding.lv.adapter = adapter
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility=View.GONE
//MjApplyAdapter adapter_mj_apply MjApplyBean
//MjApplySubmitActivity
resetCurrentWeek()
// binding.tvSt.setOnClickListener(View.OnClickListener { view: View? ->
@ -106,10 +136,23 @@ class MjApplyActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplyBinding>
resetCurrentYear()
getListData()
}
binding.tvMjApplyManage.setOnClickListener {
val intentMjApplyManage = Intent(
context,
MjApplyManageActivity::class.java
)
intentMjApplyManage.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
startActivity(intentMjApplyManage)
}
}
override fun initData() {
getListData()
checkServerConnectStatus()
}
override fun onRestart() {
super.onRestart()
checkServerConnectStatus()
}
private fun resetCurrentWeek(){
@ -361,6 +404,40 @@ class MjApplyActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplyBinding>
binding.tvEt.text = sundayStr
}
//检查服务器连接状态
private fun checkServerConnectStatus() {
var param = HashMap<String,String>()
param["login"] = "dywoa";
val json = GsonUtils.GsonString(param)
val url = Contans.IP + Contans.check_server_connect
Log.i("app",url)
Log.i("app",json)
val request = NoHttp.createStringRequest(
url,
RequestMethod.POST
)
request.setDefineRequestBodyForJson(json)
NoProgresshttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {
override fun onSucceed(what: Int, response: Response<String?>?) {
val result = response?.get()
if (result != null) {
showLog("-----onSucceed----")
showLog(result)
if(result == "1"){
showLog("connect server success")
//获取数据
getListData()
}
}
}
override fun onFailed(what: Int, response: Response<String?>?) {
showLog("connect server onFailed")
showToast("无法连接到服务器,请检查网络环境")
}
})
}
private fun getListData() {
var param = HashMap<String,String>()
@ -377,19 +454,26 @@ class MjApplyActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplyBinding>
if (response != null) {
val result = response.get()
showLog(result)
// val bean = GsonUtils.GsonToBean(result, KksDataBean::class.java)
// if (bean != null && bean.total != 0) {
// if (bean.rows != null && bean.rows.size>0) {
// binding.lv.visibility= View.VISIBLE
// binding.tvNodata.visibility= View.GONE
// val row: KksDataBean.Row = bean.rows[0]
//
//
// }else {
// binding.tvNodata.visibility= View.VISIBLE
// binding.lv.visibility= View.GONE
// }
// }
val bean = GsonUtils.GsonToBean(result, MjApplyBean::class.java)
if (bean != null && bean.total != 0) {
if (bean.rows != null && bean.rows.size>0) {
binding.lv.visibility= View.VISIBLE
binding.tvNodata.visibility= View.GONE
datas.clear()
datas.addAll(bean.rows)
adapter.notifyDataSetChanged()
}else {
datas.clear()
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility= View.GONE
}
}else {
datas.clear()
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility=View.GONE
}
}
}

@ -0,0 +1,427 @@
package com.rehome.dywoa.ui.activity.sbxdjgl
import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.rehome.dywoa.Contans
import com.rehome.dywoa.R
import com.rehome.dywoa.adapter.MjApplyAdapter
import com.rehome.dywoa.adapter.MjApplyManageAdapter
import com.rehome.dywoa.base.BaseActivityOaToolbarViewBinding
import com.rehome.dywoa.bean.MjApplyBean
import com.rehome.dywoa.bean.MjApplyManageBean
import com.rehome.dywoa.databinding.ActivityMjApplyManageBinding
import com.rehome.dywoa.utils.GsonUtils
import com.rehome.dywoa.utils.HttpListener
import com.rehome.dywoa.utils.NoProgresshttpUtils
import com.rehome.dywoa.utils.NohttpUtils
import com.rehome.dywoa.weiget.OAToolbar
import com.yolanda.nohttp.NoHttp
import com.yolanda.nohttp.RequestMethod
import com.yolanda.nohttp.rest.Response
import java.text.SimpleDateFormat
import java.util.Calendar
class MjApplyManageActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplyManageBinding>() {
private var stime: String = ""
private var etime: String = ""
private lateinit var calendar: Calendar
private lateinit var calendarSunday: Calendar;
private lateinit var adapter: MjApplyManageAdapter
private var datas: MutableList<MjApplyManageBean.Row> = mutableListOf()
//格式化日期的对象(转化成习惯的时间格式)
private val sdFormat = SimpleDateFormat("yyyy-MM-dd")
override fun getViewBinding() = ActivityMjApplyManageBinding.inflate(layoutInflater)
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("免检申请管理", "") {
}
adapter = MjApplyManageAdapter(context, datas)
binding.lv.adapter = adapter
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility= View.GONE
resetCurrentYear()
binding.tvLastMonth.setOnClickListener {
resetLastMonth()
getListData()
}
binding.tvCurrentMonth.setOnClickListener {
resetCurrentMonth()
getListData()
}
binding.tvLastWeek.setOnClickListener {
resetLastWeek()
getListData()
}
binding.tvCurrentWeek.setOnClickListener {
resetCurrentWeek()
getListData()
}
binding.tvLastDay.setOnClickListener {
resetYesterday()
getListData()
}
binding.tvCurrentQuarter.setOnClickListener {
resetCurrentQuarter()
getListData()
}
binding.tvLastQuarter.setOnClickListener {
resetLastQuarter()
getListData()
}
binding.tvCurrentYear.setOnClickListener {
resetCurrentYear()
getListData()
}
}
override fun initData() {
checkServerConnectStatus()
}
private fun resetCurrentWeek(){
calendar = Calendar.getInstance()
val dayOfWeek: Int = calendar.get(Calendar.DAY_OF_WEEK) // 获取当前是周几1代表周日2代表周一依次类推
if (dayOfWeek == Calendar.SUNDAY) {
calendar.add(Calendar.DAY_OF_MONTH, -6) // 如果是周日向前推6天
} else {
calendar.add(
Calendar.DAY_OF_MONTH,
-dayOfWeek + 2
) // 向前推dayOfWeek-2天dayOfWeek减2代表前一周的周一
}
val startDateStr = sdFormat.format(calendar.time)
showLog("周一:")
showLog(startDateStr)
calendarSunday = Calendar.getInstance()
calendarSunday.time=calendar.time;
calendarSunday.add(Calendar.DAY_OF_MONTH, 6) // 如果是周日向前推6天
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("本周日:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetLastWeek(){
calendar = Calendar.getInstance()
val dayOfWeek: Int = calendar.get(Calendar.DAY_OF_WEEK) // 获取当前是周几1代表周日2代表周一依次类推
if (dayOfWeek == Calendar.SUNDAY) {
calendar.add(Calendar.DAY_OF_MONTH, -6) // 如果是周日向前推6天
} else {
calendar.add(
Calendar.DAY_OF_MONTH,
-dayOfWeek + 2
) // 向前推dayOfWeek-2天dayOfWeek减2代表前一周的周一
}
calendar.add(Calendar.DAY_OF_MONTH, -7)
val startDateStr = sdFormat.format(calendar.time)
showLog("上周一:")
showLog(startDateStr)
calendarSunday = Calendar.getInstance()
calendarSunday.time=calendar.time;
calendarSunday.add(Calendar.DAY_OF_MONTH, 6) // 如果是周日向前推6天
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("上周日:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetCurrentMonth(){
// 获取当前日期
calendar = Calendar.getInstance()
// 将日期设置为本月1号
calendar[Calendar.DAY_OF_MONTH] = 1
val startDateStr = sdFormat.format(calendar.time)
showLog("本月1号")
showLog(startDateStr)
// 获取当前日期
calendarSunday = Calendar.getInstance()
// 将日期设置为本月第一天
calendarSunday[Calendar.DAY_OF_MONTH] = 1
// 将日期向前推一天,即上个月的最后一天
calendarSunday.add(Calendar.MONTH, 1)
calendarSunday.add(Calendar.DAY_OF_MONTH, -1)
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("本月最后一天:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetLastMonth(){
// 获取当前日期
calendar = Calendar.getInstance()
// 将日期设置为本月1号
calendar[Calendar.DAY_OF_MONTH] = 1
calendar.add(Calendar.MONTH, -1)
val startDateStr = sdFormat.format(calendar.time)
showLog("上月1号")
showLog(startDateStr)
// 获取当前日期
calendarSunday = Calendar.getInstance()
// 将日期设置为本月第一天
calendarSunday[Calendar.DAY_OF_MONTH] = 1
// 将日期向前推一天,即上个月的最后一天
calendarSunday.add(Calendar.DAY_OF_MONTH, -1)
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("上月最后一天:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetYesterday(){
calendar = Calendar.getInstance()
calendar.add(Calendar.DAY_OF_MONTH, -1)
val startDateStr = sdFormat.format(calendar.time)
showLog("昨天:")
showLog(startDateStr)
calendarSunday = Calendar.getInstance()
calendarSunday.add(Calendar.DAY_OF_MONTH, -1)
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("昨天:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetCurrentQuarter(){
// 获取当前日期
calendar = Calendar.getInstance()
// 获取当前月份
val month = calendar[Calendar.MONTH]
// 计算当前季度的第一个月
val firstMonthOfQuarter = (month / 3) * 3
// 设置日期为本季度的第一天
calendar[Calendar.MONTH] = firstMonthOfQuarter
calendar[Calendar.DAY_OF_MONTH] = 1
val startDateStr = sdFormat.format(calendar.time)
showLog("季度的第一天:")
showLog(startDateStr)
// 获取当前日期
calendarSunday = Calendar.getInstance()
// 获取当前月份
val monthEnd = calendarSunday[Calendar.MONTH]
// 计算当前季度的最后一个月
val lastMonthOfQuarter = ((monthEnd / 3) + 1) * 3 - 1
// 设置月份为当前季度的最后一个月
calendarSunday[Calendar.MONTH] = lastMonthOfQuarter
// 获取当前季度的最后一天
val lastDayOfQuarter = calendarSunday.getActualMaximum(Calendar.DAY_OF_MONTH)
// 设置日期为当前季度的最后一天
calendarSunday[Calendar.DAY_OF_MONTH] = lastDayOfQuarter
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("当前季度的最后一天:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetLastQuarter(){
// 获取当前日期
calendar = Calendar.getInstance()
// 获取当前月份
val currentMonth = calendar[Calendar.MONTH]
// 计算上一季度的月份
var previousQuarterMonth = ((currentMonth / 3) * 3) - 3
if (previousQuarterMonth < 0) {
previousQuarterMonth += 12
calendar.add(Calendar.YEAR, -1) // 如果上一季度在上一年,年份减一
}
// 设置月份为上一季度的第一个月
calendar[Calendar.MONTH] = previousQuarterMonth
// 设置日期为1号
calendar[Calendar.DAY_OF_MONTH] = 1
val startDateStr = sdFormat.format(calendar.time)
showLog("上一季度的第一天:")
showLog(startDateStr)
// 获取当前日期
calendarSunday = Calendar.getInstance()
// 获取当前月份
val currentMonthEnd = calendarSunday[Calendar.MONTH]
// 计算上一季度的最后一个月
var lastQuarterEndMonth = ((currentMonthEnd / 3) * 3) - 1
// 如果上一季度的最后一个月是负数,说明当前季度是第一季度,上一季度就是去年的第四季度
if (lastQuarterEndMonth < 0) {
lastQuarterEndMonth = Calendar.DECEMBER // 12月
calendarSunday.add(Calendar.YEAR, -1) // 年份减一
}
// 设置月份为上一季度的最后一个月
calendarSunday[Calendar.MONTH] = lastQuarterEndMonth
// 获取上一季度的最后一天
val lastDayOfLastQuarter = calendarSunday.getActualMaximum(Calendar.DAY_OF_MONTH)
// 设置日期为上一季度的最后一天
calendarSunday[Calendar.DAY_OF_MONTH] = lastDayOfLastQuarter
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("上一季度的最后一天:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
private fun resetCurrentYear(){
// 获取当前日期实例
calendar = Calendar.getInstance()
// 将日期设置为今年的第一天
calendar[Calendar.DAY_OF_YEAR] = 1
val startDateStr = sdFormat.format(calendar.time)
showLog("今年的第一天:")
showLog(startDateStr)
// 获取当前日期
calendarSunday = Calendar.getInstance()
// 设置年份为当前年份月份为12月11表示12月因为月份从0开始日期为1日
calendarSunday[Calendar.YEAR] = calendarSunday[Calendar.YEAR]
calendarSunday[Calendar.MONTH] = Calendar.DECEMBER
calendarSunday[Calendar.DAY_OF_MONTH] = 1
// 获取今年最后一天
val lastDayOfYear = calendarSunday.getActualMaximum(Calendar.DAY_OF_YEAR)
// 设置日期为今年最后一天
calendarSunday[Calendar.DAY_OF_YEAR] = lastDayOfYear
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("今年的最后一天:")
showLog(sundayStr)
binding.tvSt.text = startDateStr
binding.tvEt.text = sundayStr
}
//检查服务器连接状态
private fun checkServerConnectStatus() {
var param = HashMap<String,String>()
param["login"] = "dywoa";
val json = GsonUtils.GsonString(param)
val url = Contans.IP + Contans.check_server_connect
Log.i("app",url)
Log.i("app",json)
val request = NoHttp.createStringRequest(
url,
RequestMethod.POST
)
request.setDefineRequestBodyForJson(json)
NoProgresshttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {
override fun onSucceed(what: Int, response: Response<String?>?) {
val result = response?.get()
if (result != null) {
showLog("-----onSucceed----")
showLog(result)
if(result == "1"){
showLog("connect server success")
//获取数据
getListData()
}
}
}
override fun onFailed(what: Int, response: Response<String?>?) {
showLog("connect server onFailed")
showToast("无法连接到服务器,请检查网络环境")
}
})
}
private fun getListData() {
var param = HashMap<String,String>()
param["startDate"] = binding.tvSt.text.toString().trim();
param["endDate"] = binding.tvEt.text.toString().trim();
val json = GsonUtils.GsonString(param)
showLog(json)
val url: String = Contans.IP + Contans.GET_NEED_MJ_MANAGE_LIST
val request = NoHttp.createStringRequest(url, RequestMethod.POST)
request.setDefineRequestBodyForJson(json)
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String> {
override fun onSucceed(what: Int, response: Response<String>?) {
if (response != null) {
val result = response.get()
showLog(result)
val bean = GsonUtils.GsonToBean(result, MjApplyManageBean::class.java)
if (bean != null && bean.total != 0) {
if (bean.rows != null && bean.rows.size>0) {
binding.lv.visibility= View.VISIBLE
binding.tvNodata.visibility= View.GONE
datas.clear()
datas.addAll(bean.rows)
adapter.notifyDataSetChanged()
}else {
datas.clear()
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility= View.GONE
}
}else {
datas.clear()
adapter.notifyDataSetChanged()
binding.tvNodata.visibility= View.VISIBLE
binding.lv.visibility=View.GONE
}
}
}
override fun onFailed(what: Int, response: Response<String>?) {
}
}, true, true, "正在加载数据...")
}
}

@ -0,0 +1,152 @@
package com.rehome.dywoa.ui.activity.sbxdjgl
import android.content.DialogInterface
import android.graphics.Color
import android.text.TextUtils
import android.util.Log
import com.rehome.dywoa.App
import com.rehome.dywoa.Contans
import com.rehome.dywoa.base.BaseActivityOaToolbarViewBinding
import com.rehome.dywoa.bean.MjApplyBean
import com.rehome.dywoa.bean.StatusInfo
import com.rehome.dywoa.databinding.ActivityMjApplySubmitBinding
import com.rehome.dywoa.utils.GsonUtils
import com.rehome.dywoa.utils.HttpListener
import com.rehome.dywoa.utils.NohttpUtils
import com.rehome.dywoa.weiget.ConfirmDialog
import com.yolanda.nohttp.NoHttp
import com.yolanda.nohttp.RequestMethod
import com.yolanda.nohttp.rest.Response
class MjApplySubmitActivity : BaseActivityOaToolbarViewBinding<ActivityMjApplySubmitBinding>() {
private lateinit var item: MjApplyBean.Row
private lateinit var username: String
private lateinit var sqrName: String
override fun getViewBinding() = ActivityMjApplySubmitBinding.inflate(layoutInflater)
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("免检申请提交", "提交") {
if (TextUtils.isEmpty(binding.etMjReason.getContentText())) {
showToast("免检原因必填,请填写免检原因后再提交")
}else{
val builder = android.app.AlertDialog.Builder(context)
builder.setMessage("您确定要提交免检申请吗?")
builder.setTitle("提示")
builder.setPositiveButton(
"确定"
) { dialog, _ ->
dialog.dismiss()
checkServerConnectStatus()
}
builder.setNegativeButton(
"取消"
) { dialog, _ -> dialog.dismiss()}
val dialog = builder.create()
dialog.show()
//确定按钮
val btnPos = dialog.getButton(DialogInterface.BUTTON_POSITIVE)
//取消按钮
val btnNeg = dialog.getButton(DialogInterface.BUTTON_NEGATIVE)
btnPos.setTextColor(Color.BLACK)
btnNeg.setTextColor(Color.BLACK)
}
}
item = GsonUtils.GsonToBean(intent.getStringExtra("item")!!,MjApplyBean.Row::class.java)
username = App.getInstance().userInfo.manid
sqrName = App.getInstance().userInfo.usernames
binding.ilSqr.content = sqrName
binding.ilJhmc.content = item.jhmc
binding.ilMjdj.content = item.ljds
binding.ilZxsj.content = item.zxsj
}
override fun initData() {
}
//检查服务器连接状态
private fun checkServerConnectStatus() {
var param = HashMap<String,String>()
param["login"] = "dywoa";
val json = GsonUtils.GsonString(param)
val url = Contans.IP + Contans.check_server_connect
Log.i("app",url)
Log.i("app",json)
val request = NoHttp.createStringRequest(
url,
RequestMethod.POST
)
request.setDefineRequestBodyForJson(json)
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {
override fun onSucceed(what: Int, response: Response<String?>?) {
val result = response?.get()
if (result != null) {
showLog("-----onSucceed----")
showLog(result)
if(result == "1"){
showLog("connect server success")
//提交免检
submitData()
}
}
}
override fun onFailed(what: Int, response: Response<String?>?) {
showLog("connect server onFailed")
showToast("无法连接到服务器,请检查网络环境")
}
})
}
private fun submitData() {
var param = HashMap<String,String>()
param["JHID"] = item.jhid
param["reason"] = binding.etMjReason.contentText.trim();
param["gh"] = username
val json = GsonUtils.GsonString(param)
showLog(json)
val url: String = Contans.IP + Contans.SUBMIT_MJ_APPLY_API
val request = NoHttp.createStringRequest(url, RequestMethod.POST)
request.setDefineRequestBodyForJson(json)
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String> {
override fun onSucceed(what: Int, response: Response<String>?) {
if (response != null) {
val result = response.get()
showLog(result)
val bean = GsonUtils.GsonToBean(result, StatusInfo::class.java)
if (bean != null && bean.state == 1) {
//提交成功
val confirmDialog = ConfirmDialog(
context, "免检申请提交成功"
) { finish() }
confirmDialog.setTvTitle("提示")
confirmDialog.setCancelable(true)
confirmDialog.show()
}else {
//免检申请提交失败
showToast("免检申请提交失败")
}
}
}
override fun onFailed(what: Int, response: Response<String>?) {
}
}, true, true, "数据处理中,请稍候...")
}
}

@ -334,7 +334,7 @@ public class SdjgzActivity extends BaseActivity {
DjjhRwQy djjhItem = djjhs.get(0);
if(TextUtils.isEmpty(djjhItem.getSecond())){
showLog(djjhItem.getSecond());
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setCancelable(false);
builder.setTitle("系统提示");
builder.setMessage("是否要浏览该区域下的工作内容");

@ -168,7 +168,14 @@ public class SjcjFragment extends BaseFragment {
getActivity().finish();
}
});
builder.create().show();
AlertDialog dialog = builder.create();
dialog.show();
//确定按钮
Button btnPos = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
//取消按钮
Button btnNeg = dialog.getButton(DialogInterface.BUTTON_NEGATIVE);
btnPos.setTextColor(Color.BLACK);
btnNeg.setTextColor(Color.BLACK);
} else {
getActivity().finish();
}

@ -7,6 +7,7 @@ import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
@ -331,7 +332,7 @@ public class PrimaryAuthActivity extends BaseActivity implements SFAuthResultLis
runOnUiThread(new Runnable() {
@Override
public void run() {
Dialog messageDialog = new AlertDialog.Builder(PrimaryAuthActivity.this)
AlertDialog messageDialog = new AlertDialog.Builder(PrimaryAuthActivity.this)
.setTitle(PrimaryAuthActivity.this.getString(com.sangfor.sdk.R.string.info))
.setMessage(errMsg)
.setIcon(android.R.drawable.ic_dialog_alert)
@ -344,6 +345,12 @@ public class PrimaryAuthActivity extends BaseActivity implements SFAuthResultLis
.create();
messageDialog.show();
//确定按钮
Button btnPos = messageDialog.getButton(DialogInterface.BUTTON_POSITIVE);
//取消按钮
Button btnNeg = messageDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
btnPos.setTextColor(Color.BLACK);
btnNeg.setTextColor(Color.BLACK);
}
});
}
@ -473,6 +480,13 @@ public class PrimaryAuthActivity extends BaseActivity implements SFAuthResultLis
.create();
//显示认证对话框
mAuthDialog.show();
//确定按钮
Button btnPos = mAuthDialog.getButton(DialogInterface.BUTTON_POSITIVE);
//取消按钮
Button btnNeg = mAuthDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
btnPos.setTextColor(Color.BLACK);
btnNeg.setTextColor(Color.BLACK);
}
/**

@ -291,7 +291,7 @@ public class HomeFragment extends BaseFragment {
break;
case 5:
//点检
if((firstDeparment!=null&&firstDeparment.equals("设备部"))||(firstDeparment!=null&&firstDeparment.equals("承包商"))||(username!=null&&username.equals("371522"))||(username!=null&&username.equals("ceshi1"))||(username!=null&&username.equals("RH00001"))){
if((firstDeparment!=null&&firstDeparment.equals("设备部"))||(firstDeparment!=null&&firstDeparment.equals("粤电服大亚湾项目部"))||(firstDeparment!=null&&firstDeparment.equals("承包商"))||(username!=null&&username.equals("371522"))||(username!=null&&username.equals("ceshi1"))||(username!=null&&username.equals("RH00001"))){
Intent intentDj= new Intent(mActivity, SbxdjglActivity.class);
intentDj.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intentDj.putExtra("edit",false);

@ -4,6 +4,9 @@ package com.rehome.dywoa.vpn;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Color;
import android.widget.Button;
import com.rehome.dywoa.R;
import com.sangfor.sdk.entry.SFLaunchInfo;
@ -62,6 +65,12 @@ public class AuthSessionDialog {
}
mDialog.show();
//确定按钮
Button btnPos = mDialog.getButton(DialogInterface.BUTTON_POSITIVE);
//取消按钮
Button btnNeg = mDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
btnPos.setTextColor(Color.BLACK);
btnNeg.setTextColor(Color.BLACK);
}
public void dismiss() {

@ -0,0 +1,241 @@
package com.rehome.dywoa.weiget;
import android.content.Context;
import android.content.res.TypedArray;
import androidx.annotation.Nullable;
import android.text.Html;
import android.text.InputType;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import com.rehome.dywoa.R;
import com.zhy.autolayout.AutoLinearLayout;
import com.zhy.autolayout.utils.AutoUtils;
/**
* Created by Rehome-rjb1 on 2017/5/9.
* <p>
*
* <declare-styleable name="InputLayout">
* <attr name="tv_title" format="string" /><!-- -->
* <attr name="isShowSelect" format="boolean" /><!-- -->
* <attr name="isShowTextView" format="boolean" /><!-- -->
* <attr name="isShowNumSubView" format="boolean" /><!-- -->
* <attr name="minValue" format="integer" /><!-- -->
* <attr name="hintText" format="string" /><!-- -->
* <attr name="must" format="boolean" /><!-- * -->
* </declare-styleable>
*/
public class InputLayout extends AutoLinearLayout {
TextView tvTitle;
ClearEditText etContent;
TextView tvContent;
NumAddSubView numAddSubView;
ImageButton ibtnSelect;
private View view;
public InputLayout(Context context) {
super(context, null);
initView();
}
public InputLayout(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initView();
if (attrs != null) {
TypedArray type = context.obtainStyledAttributes(attrs, R.styleable.InputLayout);
String title = type.getString(R.styleable.InputLayout_tv_title);
Boolean isShowSelect = type.getBoolean(R.styleable.InputLayout_isShowSelect, false);
Boolean isShowTextView = type.getBoolean(R.styleable.InputLayout_isShowTextView, false);
Boolean isShowNumSubView = type.getBoolean(R.styleable.InputLayout_isShowNumSubView, false);
String hintText = type.getString(R.styleable.InputLayout_hintText);
Boolean must = type.getBoolean(R.styleable.InputLayout_must, false);
int minValue = type.getInt(R.styleable.InputLayout_minValue, 1);
numAddSubView.setMinNum(minValue);
setHintText(hintText);
setTvTitle(title, must);
isShowIbtnSelect(isShowSelect);
isShowTextView(isShowTextView);
isShowNumSubView(isShowNumSubView);
type.recycle();
}
}
public InputLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView();
}
private void findView(){
tvTitle = view.findViewById(R.id.tv_title);
etContent = view.findViewById(R.id.et_content);
tvContent = view.findViewById(R.id.tv_content);
numAddSubView = view.findViewById(R.id.numAddSubView);
ibtnSelect = view.findViewById(R.id.ibtn_select);
}
private void initView() {
if (view == null) {
view = View.inflate(getContext(), R.layout.layout_input, this);
AutoUtils.auto(view);
findView();
}
etContent.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (event != null) {
return (event.getKeyCode() == KeyEvent.KEYCODE_ENTER);
} else {
return false;
}
}
});
}
public void setTvTitle(String title, boolean must) {
if (must) {
String mustTitle = title + "<font color='red'>*</font>";
tvTitle.setText(Html.fromHtml(mustTitle + ":"));
} else {
tvTitle.setText(title + ":");
}
}
public void isShowIbtnSelect(boolean isShow) {
ibtnSelect.setVisibility(isShow ? VISIBLE : GONE);
}
public void isShowTextView(boolean isShow) {
if (isShow) {
tvContent.setVisibility(VISIBLE);
etContent.setVisibility(GONE);
}
}
public void isShowNumSubView(boolean isShow) {
numAddSubView.setVisibility(isShow ? VISIBLE : GONE);
}
/**
*
*
* @param listener
*/
public void setIbtnSelectOnClickListener(OnClickListener listener) {
ibtnSelect.setOnClickListener(listener);
}
/**
*
*
* @param listener
*/
public void setTvContentOnClickListener(OnClickListener listener) {
tvContent.setOnClickListener(listener);
}
/**
*
*
* @param content
*/
public void setContent(String content) {
if (tvContent.getVisibility() == VISIBLE) {
tvContent.setText(content);
} else {
etContent.setText(content);
}
}
public void setHintText(String hintText) {
tvContent.setHint(hintText);
}
/**
*
*
* @return
*/
public String getContent() {
String content;
if (tvContent.getVisibility() == VISIBLE) {
content = tvContent.getText().toString();
} else {
content = etContent.getText().toString();
}
return content;
}
/**
* +
*/
public void setIbtnSelectIcon() {
ibtnSelect.setImageResource(R.mipmap.add_gray);
}
/**
*
*
* @return
*/
public String getNum() {
return numAddSubView.getNum();
}
public void setNum(String num) {
numAddSubView.setNum(num);
}
/**
*
*
* @param enabled
*/
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
etContent.setVisibility(VISIBLE);
tvContent.setVisibility(GONE);
etContent.setEnabled(enabled);
tvContent.setEnabled(enabled);
ibtnSelect.setEnabled(enabled);
numAddSubView.setEnabled(enabled);
}
/**
* InputType
*/
public void setEtNumInputType() {
etContent.setInputType(InputType.TYPE_CLASS_NUMBER);
}
/**
* InputType
*/
public void setNo() {
etContent.setInputType(InputType.TYPE_CLASS_PHONE);
}
}

@ -0,0 +1,118 @@
package com.rehome.dywoa.weiget;
import android.content.Context;
import android.content.res.TypedArray;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.rehome.dywoa.R;
/**
*
*/
public class NumAddSubView extends LinearLayout {
ImageButton ibtnSub;
TextView tvNum;
ImageButton ibtnAdd;
private View view;
private int maxNum = 100;
private int minNum = 1;
public NumAddSubView(Context context) {
super(context, null);
initView();
}
public NumAddSubView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initView();
if (attrs != null) {
TypedArray type = context.obtainStyledAttributes(attrs, R.styleable.NumAddSubView);
maxNum = type.getInt(R.styleable.NumAddSubView_maxNum, 100);
minNum = type.getInt(R.styleable.NumAddSubView_minNum, 1);
}
}
public NumAddSubView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView();
}
private void initView() {
if (view == null) {
view = View.inflate(getContext(), R.layout.num_add_sub_layout, this);
findView();
}
tvNum.setText("1");
}
private void findView(){
ibtnSub = view.findViewById(R.id.ibtn_sub);
tvNum = view.findViewById(R.id.tv_num);
ibtnAdd = view.findViewById(R.id.ibtn_add);
ibtnAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int nowMax = getNum(tvNum) + 1;
if (nowMax <= maxNum) {
tvNum.setText(nowMax + "");
if (listener != null) {
listener.numChange(tvNum.getText().toString());
}
}
}
});
ibtnSub.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int nowMin = getNum(tvNum) - 1;
if (nowMin >= minNum) {
tvNum.setText(nowMin + "");
if (listener != null) {
listener.numChange(tvNum.getText().toString());
}
}
}
});
}
public void setMaxNum(int maxNum) {
this.maxNum = maxNum;
}
public void setMinNum(int minNum) {
this.minNum = minNum;
}
public void setNum(String num) {
tvNum.setText(num);
}
public int getNum(TextView num) {
return Integer.parseInt(num.getText().toString());
}
public String getNum() {
return tvNum.getText().toString();
}
private NumChangeListener listener;
public void setListener(NumChangeListener listener) {
this.listener = listener;
}
public interface NumChangeListener {
void numChange(String num);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#e8dcb0" />
<stroke
android:width="1dip"
android:color="#4fa5d5" />
<corners android:radius="3dp" />
</shape>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#c5ebd2" />
<stroke
android:width="1dip"
android:color="#4fa5d5" />
<corners android:radius="3dp" />
</shape>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 正常状态 -->
<item android:drawable="@drawable/btn_normal_mj" android:state_pressed="false"/>
<!-- 按下状态 -->
<item android:drawable="@drawable/btn_pressed" android:state_pressed="true"/>
</selector>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 正常状态 -->
<item android:drawable="@drawable/btn_normal_mj_tg" android:state_pressed="false"/>
<!-- 按下状态 -->
<item android:drawable="@drawable/btn_pressed" android:state_pressed="true"/>
</selector>

@ -179,8 +179,8 @@
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000"
android:dividerHeight="0px"/>
android:divider="#dddddd"
android:dividerHeight="5dp"/>
<TextView
android:id="@+id/tv_nodata"
@ -197,7 +197,7 @@
android:background="@color/colorPrimary"
android:orientation="vertical">
<TextView
android:id="@+id/tv_report"
android:id="@+id/tv_mjApplyManage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/white"

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.activity.sbxdjgl.MjApplyManageActivity">
<include
android:id="@+id/toolbarView"
layout="@layout/layout_base" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#dddddd"
android:padding="5dp"
android:minHeight="30px">
<TextView
android:id="@+id/tv_zxsj"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="center"
android:minHeight="50px"
android:text="申请时间:"
android:textSize="24px" />
<TextView
android:id="@+id/tv_st"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:text="开始时间"
android:textSize="24px" />
<TextView
android:id="@+id/tv_to"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="0.2"
android:gravity="center"
android:minHeight="50px"
android:text="至"
android:textSize="24px" />
<TextView
android:id="@+id/tv_et"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:text="结束时间"
android:textSize="24px" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#dddddd"
android:orientation="horizontal"
android:padding="5dp"
android:minHeight="30px">
<Button
android:id="@+id/tv_last_month"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="上一月"
android:textSize="24px" />
<Button
android:id="@+id/tv_current_month"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="本月"
android:textSize="24px" />
<Button
android:id="@+id/tv_last_week"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="上一周"
android:textSize="24px" />
<Button
android:id="@+id/tv_current_week"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="本周"
android:textSize="24px" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#dddddd"
android:orientation="horizontal"
android:padding="5dp"
android:minHeight="30px">
<Button
android:id="@+id/tv_last_day"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="昨天"
android:textSize="24px" />
<Button
android:id="@+id/tv_current_quarter"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="本季"
android:textSize="24px" />
<Button
android:id="@+id/tv_last_quarter"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="上一季"
android:textSize="24px" />
<Button
android:id="@+id/tv_current_year"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="今年"
android:textSize="24px" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="5dp"
android:layout_weight="1">
<ListView
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#dddddd"
android:dividerHeight="5dp"/>
<TextView
android:id="@+id/tv_nodata"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/viewfinder_mask"
android:gravity="center"
android:text="暂无数据"/>
</FrameLayout>
</LinearLayout>

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main_qx"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fitsSystemWindows="true"
tools:context=".ui.activity.sbxdjgl.MjApplySubmitActivity">
<include
android:id="@+id/toolbarView"
layout="@layout/layout_base" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.rehome.dywoa.weiget.InputLayout
android:id="@+id/il_sqr"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintText="申请人"
app:isShowTextView="true"
app:must="true"
app:tv_title="申请人" />
<com.rehome.dywoa.weiget.InputLayout
android:id="@+id/il_jhmc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintText="计划名称"
app:isShowTextView="true"
app:must="true"
app:tv_title="计划名称" />
<com.rehome.dywoa.weiget.InputLayout
android:id="@+id/il_mjdj"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintText="免检点数"
app:isShowTextView="true"
app:must="true"
app:tv_title="免检点数" />
<com.rehome.dywoa.weiget.InputLayout
android:id="@+id/il_zxsj"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintText="执行时间"
app:isShowTextView="true"
app:must="true"
app:tv_title="执行时间" />
<com.xuexiang.xui.widget.edittext.MultiLineEditText
android:id="@+id/et_mj_reason"
android:layout_width="match_parent"
app:mlet_maxCount="500"
app:mlet_contentViewHeight="110dp"
app:mlet_contentTextSize="14sp"
android:layout_margin="10dp"
android:layout_height="150dp"
app:mlet_hintText="免检原因:"
android:padding="5dp" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</LinearLayout>

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.8"
android:layout_margin="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="计划名称:" />
<TextView
android:id="@+id/tv_jhmc"
style="@style/dagerDetailRightStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="应检点数:" />
<TextView
android:id="@+id/tv_zds"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已检项目:" />
<TextView
android:id="@+id/tv_yjds"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="漏检项目:" />
<TextView
android:id="@+id/tv_ljds"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="专业名称:" />
<TextView
android:id="@+id/tv_zy"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="执行时间:" />
<TextView
android:id="@+id/tv_zxsj"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="状态:" />
<TextView
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="漏检"
android:textSize="15sp"
android:textColor="#ff0000"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.2"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:gravity="center"
android:orientation="vertical">
<Button
android:id="@+id/btn_mjApply"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:padding="3dp"
android:layout_gravity="center"
android:minHeight="25dp"
android:background="@drawable/btn_selector"
android:textColor="#ffffff"
android:text="免检申请"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.8"
android:layout_margin="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="申请人:" />
<TextView
android:id="@+id/tv_sqr"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="申请时间:" />
<TextView
android:id="@+id/tv_sqsj"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="申请部门:" />
<TextView
android:id="@+id/tv_sqbm"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="免检原因:" />
<TextView
android:id="@+id/tv_reason"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.2"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:gravity="center"
android:orientation="vertical">
<Button
android:id="@+id/btn_mj_dsp"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:visibility="gone"
android:padding="3dp"
android:layout_gravity="center"
android:minHeight="25dp"
android:background="@drawable/btn_selector_mj_status"
android:textColor="#ed8b40"
android:text="待设备部管理员审批"
android:textSize="12sp" />
<Button
android:id="@+id/btn_mj_sptg"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:padding="3dp"
android:layout_gravity="center"
android:minHeight="25dp"
android:background="@drawable/btn_selector_mj_status_tg"
android:textColor="#3ee022"
android:text="审批通过"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,84 @@
<?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:layout_marginLeft="20px"
android:layout_marginRight="20px"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:gravity="center"
android:minHeight="45dp"
android:minWidth="100dp"
android:text="标题"
android:textColor="@color/black"
android:textSize="30px" />
<com.rehome.dywoa.weiget.ClearEditText
android:id="@+id/et_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:background="@null"
android:inputType="textMultiLine"
android:minHeight="45dp"
android:paddingBottom="15dp"
android:textColor="@color/textColor"
android:textSize="30px"
android:visibility="visible" />
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:minHeight="45dp"
android:paddingBottom="10dp"
android:textSize="35px"
android:visibility="gone" />
<com.rehome.dywoa.weiget.NumAddSubView
android:id="@+id/numAddSubView"
android:layout_width="180px"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="5dp"
android:background="#00ff"
android:minHeight="45dp"
android:visibility="gone" />
<ImageButton
android:id="@+id/ibtn_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="5dp"
android:background="#00ff"
android:minHeight="45dp"
android:src="@mipmap/edit"
android:visibility="gone" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="5px"
android:background="@color/gray" />
</LinearLayout>

@ -0,0 +1,33 @@
<?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="horizontal">
<ImageButton
android:id="@+id/ibtn_sub"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00ffffff"
android:src="@mipmap/sub" />
<TextView
android:textColor="@color/bule"
android:id="@+id/tv_num"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:textSize="18sp" />
<ImageButton
android:id="@+id/ibtn_add"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00ffffff"
android:src="@mipmap/add" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Loading…
Cancel
Save