1.1.0
This commit is contained in:
@@ -114,4 +114,5 @@ dependencies {
|
||||
|
||||
|
||||
implementation project(path: ':mylibrary')
|
||||
implementation project(path: ':keybordlib')
|
||||
}
|
||||
@@ -2367,6 +2367,11 @@
|
||||
"area": [
|
||||
"中原区",
|
||||
"金水区",
|
||||
"高新区",
|
||||
"航空港区",
|
||||
"国际物流园区",
|
||||
"经开区",
|
||||
"郑东新区",
|
||||
"二七区",
|
||||
"管城回族区",
|
||||
"上街区",
|
||||
|
||||
@@ -14,6 +14,7 @@ public class BusInfoBean implements Serializable {
|
||||
private String code;
|
||||
private String enterpriseName;
|
||||
private String pwd;
|
||||
private String unifiedSocialCreditCode;//统一社会信用代码
|
||||
private String nationalClassA;//国家A级
|
||||
private String businessType;//业务类型
|
||||
private String avatarUrl;
|
||||
@@ -25,6 +26,14 @@ public class BusInfoBean implements Serializable {
|
||||
private String name;//厂区地址
|
||||
private ParamsDao params;
|
||||
|
||||
public String getUnifiedSocialCreditCode() {
|
||||
return unifiedSocialCreditCode;
|
||||
}
|
||||
|
||||
public void setUnifiedSocialCreditCode(String unifiedSocialCreditCode) {
|
||||
this.unifiedSocialCreditCode = unifiedSocialCreditCode;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ public class PassBean implements Serializable {
|
||||
private String driverPhone;
|
||||
private String startPoint;
|
||||
private String endPoint;
|
||||
private String driverIdcard;
|
||||
private String createTime;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
@@ -45,6 +46,14 @@ public class PassBean implements Serializable {
|
||||
private String notUsedNumMF;
|
||||
private String notUsedNumSF;
|
||||
|
||||
public String getDriverIdcard() {
|
||||
return driverIdcard;
|
||||
}
|
||||
|
||||
public void setDriverIdcard(String driverIdcard) {
|
||||
this.driverIdcard = driverIdcard;
|
||||
}
|
||||
|
||||
public String getNotUsedNumMF() {
|
||||
return notUsedNumMF;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,37 @@
|
||||
package com.dahe.pass.ui.account.activity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Message
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.pass.R
|
||||
import com.dahe.pass.base.AppConfig
|
||||
import com.dahe.pass.bean.BusInfoBean
|
||||
import com.dahe.pass.bean.JsonBean
|
||||
import com.dahe.pass.net.BaseObserver
|
||||
import com.dahe.pass.net.DataManager
|
||||
import com.dahe.pass.net.RxHttpCallBack
|
||||
import com.dahe.pass.ui.account.LoginActivity
|
||||
import com.dahe.pass.utils.AppActivityUtils
|
||||
import com.dahe.pass.utils.GetJsonDataUtil
|
||||
import com.google.gson.Gson
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.lxj.xpopup.util.KeyboardUtils
|
||||
import kotlinx.android.synthetic.main.activity_add_go.*
|
||||
import kotlinx.android.synthetic.main.activity_apply.*
|
||||
import kotlinx.android.synthetic.main.activity_apply.etPhone
|
||||
import kotlinx.android.synthetic.main.activity_business_info.*
|
||||
import kotlinx.android.synthetic.main.activity_business_info.etQymc
|
||||
import org.json.JSONArray
|
||||
import java.util.ArrayList
|
||||
|
||||
/**
|
||||
* @ClassName BusinessInfoActivity
|
||||
@@ -29,6 +47,8 @@ class BusinessInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
btnGo.setOnClickListener(this)
|
||||
tv_yhxy.setOnClickListener(this)
|
||||
tv_yszc.setOnClickListener(this)
|
||||
etDj.setOnClickListener(this)
|
||||
etDz.setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
@@ -36,39 +56,63 @@ class BusinessInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
override fun onClick(view: View) {
|
||||
super.onClick(view)
|
||||
when(view.id){
|
||||
R.id.btnGo->go()
|
||||
when (view.id) {
|
||||
R.id.btnGo -> go()
|
||||
R.id.etDz -> {
|
||||
KeyboardUtils.hideSoftInput(etQymc)
|
||||
if (isLoaded) {
|
||||
setProText()
|
||||
} else {
|
||||
mHandler.sendEmptyMessage(MSG_LOAD_DATA)
|
||||
}
|
||||
}
|
||||
|
||||
R.id.tv_yhxy -> AppActivityUtils.openWebViewActivity(this,
|
||||
"用户服务协议",
|
||||
"https://downtest.dahehuodongbao.com/passcheck/user-agreement.html");
|
||||
R.id.tv_yszc -> AppActivityUtils.openWebViewActivity(this, "隐私政策",
|
||||
"https://downtest.dahehuodongbao.com/passcheck/user-privacy.html")
|
||||
R.id.etDj -> {
|
||||
XPopup.Builder(this).hasShadowBg(false).offsetY(50).atView(etDj)
|
||||
.popupWidth(500)
|
||||
.asAttachList(arrayOf("2A", "3A", "4A", "5A", "其他"),
|
||||
null,
|
||||
{ position, text -> etDj.text = text }).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun go(){
|
||||
fun go() {
|
||||
val qymc = etQymc.text.toString()
|
||||
val ywlx = etYwlx.text.toString()
|
||||
// val ywlx = etYwlx.text.toString()
|
||||
val etDz = etDz.text.toString()
|
||||
val etTbr = etTbr.text.toString()
|
||||
|
||||
if (qymc.isNullOrEmpty()){
|
||||
if (qymc.isNullOrEmpty()) {
|
||||
showToast("请输入企业名称")
|
||||
return
|
||||
}
|
||||
|
||||
if (ywlx.isNullOrEmpty()){
|
||||
showToast("请输入业务类型")
|
||||
return
|
||||
}
|
||||
// if (ywlx.isNullOrEmpty()) {
|
||||
// showToast("请输入业务类型")
|
||||
// return
|
||||
// }
|
||||
|
||||
if (etDz.isNullOrEmpty()){
|
||||
if (etDz.isNullOrEmpty()) {
|
||||
showToast("请输入注册地址")
|
||||
return
|
||||
}
|
||||
|
||||
if (etNsr.text.toString().isNullOrEmpty() || etFzr.text.toString().isNullOrEmpty() ||
|
||||
etFzrPhone.text.toString().isNullOrEmpty() || etDj.text.toString().isNullOrEmpty() ||
|
||||
etGsdz.text.toString().isNullOrEmpty()
|
||||
) {
|
||||
showToast("请完善信息")
|
||||
return
|
||||
}
|
||||
|
||||
val extras = intent.extras
|
||||
val bean : BusInfoBean= extras?.getSerializable(AppConfig.BEAN) as BusInfoBean
|
||||
val bean: BusInfoBean = extras?.getSerializable(AppConfig.BEAN) as BusInfoBean
|
||||
|
||||
val busInfoBean = BusInfoBean()
|
||||
val paramsDao = BusInfoBean.ParamsDao()
|
||||
@@ -76,12 +120,13 @@ class BusinessInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
busInfoBean.phone = bean.phone
|
||||
busInfoBean.params = paramsDao
|
||||
busInfoBean.pwd = bean.pwd
|
||||
busInfoBean.unifiedSocialCreditCode = etNsr.text.toString()
|
||||
busInfoBean.enterpriseName = qymc
|
||||
busInfoBean.nationalClassA = etDj.text.toString()
|
||||
busInfoBean.businessType = ywlx
|
||||
// busInfoBean.businessType = ywlx
|
||||
busInfoBean.placeOfRegistration = etDz
|
||||
busInfoBean.companyAddress = etGsdz.text.toString()
|
||||
busInfoBean.plantAddress = etCqdz.text.toString()
|
||||
// busInfoBean.plantAddress = etCqdz.text.toString()
|
||||
busInfoBean.contacts = etFzr.text.toString()
|
||||
busInfoBean.contactsPhone = etFzrPhone.text.toString()
|
||||
busInfoBean.name = etTbr
|
||||
@@ -90,11 +135,134 @@ class BusinessInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
DataManager.getInstance().register(busInfoBean)
|
||||
.compose(DataManager.setThread())
|
||||
.subscribe(BaseObserver(mContext,object : RxHttpCallBack<Any>(){
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
||||
override fun onSuccess(t: CommonResponseBean<Any>?) {
|
||||
super.onSuccess(t)
|
||||
ActivityUtils.finishOtherActivities(LoginActivity::class.java)
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
private var options1Items = ArrayList<JsonBean>()
|
||||
private val options2Items = ArrayList<ArrayList<String>>()
|
||||
private val options3Items = ArrayList<ArrayList<ArrayList<String>>>()
|
||||
private val MSG_LOAD_DATA = 0x0001
|
||||
private val MSG_LOAD_SUCCESS = 0x0002
|
||||
private val MSG_LOAD_FAILED = 0x0003
|
||||
private var thread: Thread? = null
|
||||
private var isLoaded = false
|
||||
|
||||
|
||||
private fun setProText() {
|
||||
val pvOptions: OptionsPickerView<*> = OptionsPickerBuilder(this
|
||||
) { options1, options2, options3, v ->
|
||||
//返回的分别是三个级别的选中位置
|
||||
val opt1tx =
|
||||
if (options1Items.size > 0) options1Items.get(options1).getPickerViewText() else ""
|
||||
val opt2tx = if (options2Items.size > 0
|
||||
&& options2Items.get(options1).size > 0
|
||||
) options2Items.get(options1).get(options2) else ""
|
||||
val opt3tx =
|
||||
if (options2Items.size > 0 && options3Items.get(options1).size > 0 && options3Items.get(
|
||||
options1).get(options2).size > 0
|
||||
) options3Items.get(options1).get(options2).get(options3) else ""
|
||||
val tx = "$opt1tx-$opt2tx-$opt3tx"
|
||||
etDz.text = tx
|
||||
}
|
||||
.setSubmitColor(Color.parseColor("#F1474B")) //确定按钮文字颜色
|
||||
.setCancelColor(Color.parseColor("#F1474B")) //取消按钮文字颜色
|
||||
.setTitleBgColor(Color.parseColor("#FFFFFF"))
|
||||
.setBgColor(Color.parseColor("#F5F5F5"))
|
||||
.setContentTextSize(20)
|
||||
.build<Any>()
|
||||
pvOptions.setPicker(options1Items as List<Nothing>?,
|
||||
options2Items as List<Nothing>?, options3Items as List<Nothing>?) //三级选择器
|
||||
pvOptions.show()
|
||||
}
|
||||
|
||||
private fun initJsonData() { //解析数据
|
||||
/**
|
||||
* 注意:assets 目录下的Json文件仅供参考,实际使用可自行替换文件
|
||||
* 关键逻辑在于循环体
|
||||
*
|
||||
*/
|
||||
val JsonData: String =
|
||||
GetJsonDataUtil().getJson(this, "province.json") //获取assets目录下的json文件数据
|
||||
// String JsonData1 = new GetJsonDataUtil().getJson(this, "city.json");//获取assets目录下的json文件数据
|
||||
val jsonBean: ArrayList<JsonBean> = parseData(JsonData) //用Gson 转成实体
|
||||
// ArrayList<Province> data = getData(JsonData1);
|
||||
/**
|
||||
* 添加省份数据
|
||||
*
|
||||
* 注意:如果是添加的JavaBean实体,则实体类需要实现 IPickerViewData 接口,
|
||||
* PickerView会通过getPickerViewText方法获取字符串显示出来。
|
||||
*/
|
||||
options1Items = jsonBean
|
||||
for (i in jsonBean.indices) { //遍历省份
|
||||
val cityList = ArrayList<String>() //该省的城市列表(第二级)
|
||||
val province_AreaList = ArrayList<ArrayList<String>>() //该省的所有地区列表(第三极)
|
||||
for (c in 0 until jsonBean[i].cityList.size) { //遍历该省份的所有城市
|
||||
val cityName = jsonBean[i].cityList[c].name
|
||||
cityList.add(cityName) //添加城市
|
||||
val city_AreaList = ArrayList<String>() //该城市的所有地区列表
|
||||
|
||||
//如果无地区数据,建议添加空字符串,防止数据为null 导致三个选项长度不匹配造成崩溃
|
||||
/*if (jsonBean.get(i).getCityList().get(c).getArea() == null
|
||||
|| jsonBean.get(i).getCityList().get(c).getArea().size() == 0) {
|
||||
city_AreaList.add("");
|
||||
} else {
|
||||
city_AreaList.addAll(jsonBean.get(i).getCityList().get(c).getArea());
|
||||
}*/city_AreaList.addAll(jsonBean[i].cityList[c].area)
|
||||
province_AreaList.add(city_AreaList) //添加该省所有地区数据
|
||||
}
|
||||
/**
|
||||
* 添加城市数据
|
||||
*/
|
||||
options2Items.add(cityList)
|
||||
/**
|
||||
* 添加地区数据
|
||||
*/
|
||||
options3Items.add(province_AreaList)
|
||||
}
|
||||
mHandler.sendEmptyMessage(MSG_LOAD_SUCCESS)
|
||||
}
|
||||
|
||||
fun parseData(result: String): ArrayList<JsonBean> { //Gson 解析
|
||||
val detail = ArrayList<JsonBean>()
|
||||
try {
|
||||
val data = JSONArray(result)
|
||||
val gson = Gson()
|
||||
for (i in 0 until data.length()) {
|
||||
val entity = gson.fromJson(data.optJSONObject(i).toString(), JsonBean::class.java)
|
||||
detail.add(entity)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
mHandler.sendEmptyMessage(MSG_LOAD_FAILED)
|
||||
}
|
||||
return detail
|
||||
}
|
||||
|
||||
@SuppressLint("HandlerLeak")
|
||||
private val mHandler: Handler = object : Handler() {
|
||||
override fun handleMessage(msg: Message) {
|
||||
when (msg.what) {
|
||||
MSG_LOAD_DATA -> if (thread == null) { //如果已创建就不再重新创建子线程了
|
||||
thread = Thread { // 子线程中解析省市区数据
|
||||
initJsonData()
|
||||
}
|
||||
thread?.start()
|
||||
}
|
||||
MSG_LOAD_SUCCESS -> {
|
||||
// Toast.makeText(MyInfoActivity.this, "Parse Succeed", Toast.LENGTH_SHORT).show();
|
||||
setProText()
|
||||
isLoaded = true
|
||||
}
|
||||
MSG_LOAD_FAILED -> Toast.makeText(this@BusinessInfoActivity,
|
||||
"地区解析失败",
|
||||
Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ import com.dahe.pass.net.RxHttpCallBack
|
||||
import com.dahe.pass.utils.GetJsonDataUtil
|
||||
import com.dahe.pass.utils.SPUtils
|
||||
import com.google.gson.Gson
|
||||
import com.king.keyboard.KingKeyboard
|
||||
import com.lxj.xpopup.util.KeyboardUtils
|
||||
import kotlinx.android.synthetic.main.activity_add_go.*
|
||||
import org.json.JSONArray
|
||||
@@ -39,6 +40,8 @@ import java.util.*
|
||||
* @Description TODO
|
||||
*/
|
||||
class AddGoActivity : BaseActivity(), View.OnClickListener {
|
||||
private lateinit var kingKeyboard : KingKeyboard
|
||||
|
||||
override fun getLayout() = R.layout.activity_add_go
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
@@ -50,13 +53,29 @@ class AddGoActivity : BaseActivity(), View.OnClickListener {
|
||||
tvStartTime.setOnClickListener(this)
|
||||
tvEndTime.setOnClickListener(this)
|
||||
tvSflx.setOnClickListener(this)
|
||||
tvSTime.text = SPUtils.get(mContext,AppConfig.START_TIME, "").toString()
|
||||
tvETime.text = SPUtils.get(mContext,AppConfig.END_TIME, "").toString()
|
||||
// tvSTime.text = SPUtils.get(mContext,AppConfig.START_TIME, "").toString()
|
||||
// tvETime.text = SPUtils.get(mContext,AppConfig.END_TIME, "").toString()
|
||||
|
||||
kingKeyboard = KingKeyboard(this,keyboardParent)
|
||||
kingKeyboard.register(etCarNum,KingKeyboard.KeyboardType.LICENSE_PLATE_PROVINCE)
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 在Activity或Fragment的生命周期中调用对应的方法
|
||||
*/
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
kingKeyboard.onResume()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
kingKeyboard.onDestroy()
|
||||
}
|
||||
|
||||
override fun onClick(view: View) {
|
||||
super.onClick(view)
|
||||
when (view.id) {
|
||||
@@ -73,10 +92,10 @@ class AddGoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
fun sub() {
|
||||
KeyboardUtils.hideSoftInput(tvTxbh)
|
||||
if (tvTxbh.text.toString().isNullOrEmpty() || tvSTime.text.toString().isNullOrEmpty() ||
|
||||
if (tvTxbh.text.toString().isNullOrEmpty() ||
|
||||
etCarNum.text.toString().isNullOrEmpty() || etName.text.toString().isNullOrEmpty() ||
|
||||
etPhone.text.toString().isNullOrEmpty() || etWpzl.text.toString().isNullOrEmpty() ||
|
||||
etDs.text.toString().isNullOrEmpty() || etQd.text.toString().isNullOrEmpty()|| tvSflx.text.toString().isNullOrEmpty()
|
||||
etDs.text.toString().isNullOrEmpty() || etQd.text.toString().isNullOrEmpty()|| etCardId.text.toString().isNullOrEmpty()
|
||||
) {
|
||||
showToast("请完善信息")
|
||||
return
|
||||
@@ -84,7 +103,7 @@ class AddGoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
|
||||
val passBean = PassBean()
|
||||
passBean.passNo = tvTxbh.text.toString()
|
||||
passBean.passNo = """FG-${tvTxbh.text.toString()}"""
|
||||
passBean.vehicle = etCarNum.text.toString()
|
||||
passBean.driverName = etName.text.toString()
|
||||
passBean.driverPhone = etPhone.text.toString()
|
||||
@@ -92,12 +111,13 @@ class AddGoActivity : BaseActivity(), View.OnClickListener {
|
||||
passBean.transportTonnage = etDs.text.toString()
|
||||
passBean.startPoint = etQd.text.toString()
|
||||
passBean.endPoint = etZd.text.toString()
|
||||
passBean.driverIdcard = etCardId.text.toString()
|
||||
passBean.useStartTime = tvSTime.text.toString()
|
||||
passBean.useEndTime = tvETime.text.toString()
|
||||
// passBean.useEndTime = tvETime.text.toString()
|
||||
passBean.startTime = tvStartTime.text.toString()
|
||||
passBean.endTime = tvEndTime.text.toString()
|
||||
passBean.remarks = tvBz.text.toString()
|
||||
passBean.chargeType = tvSflx.text.toString()
|
||||
// passBean.chargeType = tvSflx.text.toString()
|
||||
DataManager.getInstance().addPass(passBean)
|
||||
.compose(DataManager.setThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
||||
|
||||
@@ -67,6 +67,7 @@ class EditGoActivity : BaseActivity(), View.OnClickListener {
|
||||
tvStartTime.text = passBean.startTime
|
||||
tvEndTime.text = passBean.endTime
|
||||
tvSflx.text = passBean.chargeType
|
||||
etCardId.text = passBean.driverIdcard
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
override fun initDate() {
|
||||
DataManager.getInstance().userInfo
|
||||
.compose(DataManager.setThread())
|
||||
.subscribe(BaseObserver(mContext,object :RxHttpCallBack<BusInfoBean>(){
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<BusInfoBean>() {
|
||||
override fun onSuccess(t: CommonResponseBean<BusInfoBean>?) {
|
||||
super.onSuccess(t)
|
||||
etQymc.text = t?.data?.enterpriseName
|
||||
@@ -112,8 +112,8 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
// Toast.makeText(this@MainActivity, str, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
.build<CompanyBean>()
|
||||
mutableListOf.add(CompanyBean("免费","0"))
|
||||
mutableListOf.add(CompanyBean("收费","1"))
|
||||
mutableListOf.add(CompanyBean("免费", "0"))
|
||||
mutableListOf.add(CompanyBean("收费", "1"))
|
||||
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
jb = mutableListOf.get(options1).signName
|
||||
tvJb.text = mutableListOf.get(options1).signName
|
||||
}
|
||||
.setTitleText("国家A级")
|
||||
.setTitleText("国家等级")
|
||||
.setContentTextSize(20) //设置滚轮文字大小
|
||||
.setDividerColor(Color.LTGRAY) //设置分割线的颜色
|
||||
.setSelectOptions(0, 1) //默认选中项
|
||||
@@ -151,11 +151,11 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
// Toast.makeText(this@MainActivity, str, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
.build<CompanyBean>()
|
||||
mutableListOf.add(CompanyBean("否"))
|
||||
mutableListOf.add(CompanyBean("A"))
|
||||
mutableListOf.add(CompanyBean("AA"))
|
||||
mutableListOf.add(CompanyBean("AAA"))
|
||||
mutableListOf.add(CompanyBean("AAAA"))
|
||||
mutableListOf.add(CompanyBean("2A"))
|
||||
mutableListOf.add(CompanyBean("3A"))
|
||||
mutableListOf.add(CompanyBean("4A"))
|
||||
mutableListOf.add(CompanyBean("5A"))
|
||||
mutableListOf.add(CompanyBean("其他"))
|
||||
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
val mutableListOf = mutableListOf<CompanyTypeBean>()
|
||||
val build = OptionsPickerBuilder(mContext
|
||||
) { options1, options2, options3, v -> //返回的分别是三个级别的选中位置
|
||||
if (options1>=mutableListOf.size)
|
||||
if (options1 >= mutableListOf.size)
|
||||
return@OptionsPickerBuilder
|
||||
curCompanyType = mutableListOf.get(options1)
|
||||
tvQylx.text = mutableListOf.get(options1).enterpriseTypeName
|
||||
@@ -277,10 +277,10 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
fun sub() {
|
||||
|
||||
if (!::curCompanyBean.isInitialized || !::curCompanyType.isInitialized || !::jb.isInitialized ||
|
||||
if (!::curCompanyBean.isInitialized || !::jb.isInitialized ||
|
||||
!::shi.isInitialized || etQymc.text.toString().isNullOrEmpty() ||
|
||||
etLxr.text.toString().isNullOrEmpty() || etPhone.text.toString().isNullOrEmpty() ||
|
||||
etCl.text.toString().isNullOrEmpty() || etTxz.text.toString().isNullOrEmpty()|| tvSflx.text.toString().isNullOrEmpty()
|
||||
etCl.text.toString().isNullOrEmpty() || etTxz.text.toString().isNullOrEmpty()
|
||||
) {
|
||||
showToast("请完善信息")
|
||||
return
|
||||
@@ -289,7 +289,7 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
val applySendBean = ApplySendBean()
|
||||
applySendBean.sign = curCompanyBean.sign
|
||||
applySendBean.enterpriseName = etQymc.text.toString()
|
||||
applySendBean.typeId = curCompanyType.typeId
|
||||
// applySendBean.typeId = curCompanyType.typeId
|
||||
applySendBean.provinceName = sheng
|
||||
applySendBean.cityName = shi
|
||||
applySendBean.countyName = xian
|
||||
@@ -298,7 +298,7 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
applySendBean.enterpriseContactPhone = etPhone.text.toString()
|
||||
applySendBean.vehiclesNumber = etCl.text.toString()
|
||||
applySendBean.numberOfPassesRequired = etTxz.text.toString()
|
||||
applySendBean.chargeType = tvSflx.text.toString()
|
||||
// applySendBean.chargeType = tvSflx.text.toString()
|
||||
|
||||
DataManager.getInstance().applySend(applySendBean)
|
||||
.compose(DataManager.setThread())
|
||||
@@ -361,7 +361,7 @@ class ApplyActivity : BaseActivity(), View.OnClickListener {
|
||||
.setCancelColor(Color.parseColor("#F1474B")) //取消按钮文字颜色
|
||||
.setTitleBgColor(Color.parseColor("#FFFFFF"))
|
||||
.setBgColor(Color.parseColor("#F5F5F5"))
|
||||
.setSelectOptions(15,0,0)
|
||||
.setSelectOptions(15, 0, 0)
|
||||
.setContentTextSize(20)
|
||||
.build<Any>()
|
||||
pvOptions.setPicker(options1Items as List<Nothing>?,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
@@ -51,6 +52,7 @@
|
||||
android:background="@color/color_line"></View>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
@@ -113,6 +115,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
@@ -120,6 +123,7 @@
|
||||
android:background="@color/color_line"></View>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/llQylx"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
@@ -272,6 +276,7 @@
|
||||
android:gravity="right"
|
||||
android:hint="请输入电话"
|
||||
android:maxLength="11"
|
||||
android:inputType="phone"
|
||||
android:paddingRight="6dp"
|
||||
android:textSize="14dp"></EditText>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="企业名称,必填"
|
||||
android:hint="企业名称"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
@@ -84,7 +84,38 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="管理人姓名,必填"
|
||||
android:hint="法人人姓名"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="26dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="26dp"
|
||||
android:background="@drawable/shape_gray_bg25"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/nsr"></ImageView>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etNsr"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="统一社会信用代码"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
@@ -115,7 +146,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="负责人,必填"
|
||||
android:hint="通行证管理人"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
@@ -146,7 +177,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="负责人电话,必填"
|
||||
android:hint="管理人电话"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
@@ -173,7 +204,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dj"></ImageView>
|
||||
|
||||
<EditText
|
||||
<TextView
|
||||
android:textSize="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/etDj"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
@@ -181,13 +214,16 @@
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="等级"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle=""
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
android:maxLines="1"></TextView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="26dp"
|
||||
@@ -211,7 +247,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="业务类型,必填"
|
||||
android:hint="业务类型"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
@@ -235,16 +271,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/dz"></ImageView>
|
||||
|
||||
<EditText
|
||||
<TextView
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="16dp"
|
||||
android:id="@+id/etDz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="注册地址,必填"
|
||||
android:hint="注册地址"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"></EditText>
|
||||
android:textColor="@color/black"
|
||||
android:maxLines="1"></TextView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -274,13 +313,14 @@
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:hint="公司地址"
|
||||
android:hint="公司园区地址"
|
||||
android:maxLines="1"></EditText>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/ll_pass"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
@@ -48,6 +49,7 @@
|
||||
android:background="@color/color_line"></View>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
@@ -73,6 +75,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
@@ -81,6 +84,7 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
@@ -106,6 +110,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
@@ -114,6 +119,7 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
@@ -205,6 +211,43 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@color/color_line"></View>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="6dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="司机身份证号"
|
||||
android:textColor="@color/black"></TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/etCardId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:paddingRight="6dp"
|
||||
android:maxLength="18"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
android:digits="0123456789xyzXYZ"
|
||||
android:textSize="14dp"></TextView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="4dp"
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/tvType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
android:textSize="10dp"></TextView>
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/tvType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user