浏览代码

1.一装一卸发布。

石慧云 4 年之前
父节点
当前提交
3326aea2c7
共有 30 个文件被更改,包括 2001 次插入503 次删除
  1. 1 0
      app/src/main/AndroidManifest.xml
  2. 73 0
      app/src/main/java/com/quansu/heifengwuliu/activity/SourceDetailsActivity.kt
  3. 15 0
      app/src/main/java/com/quansu/heifengwuliu/adapter/OrderInfoInadapter.kt
  4. 14 0
      app/src/main/java/com/quansu/heifengwuliu/adapter/OrderInfoadapter.kt
  5. 0 1
      app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerImgFragment.kt
  6. 0 2
      app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerMoreFragment.kt
  7. 92 177
      app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerSingleFragment.kt
  8. 69 13
      app/src/main/java/com/quansu/heifengwuliu/model/DataInfoBean.kt
  9. 10 0
      app/src/main/java/com/quansu/heifengwuliu/model/InfoEditBean.kt
  10. 37 0
      app/src/main/java/com/quansu/heifengwuliu/utils/net/ApiService.kt
  11. 265 0
      app/src/main/java/com/quansu/heifengwuliu/view/PayPwdEditText.java
  12. 17 0
      app/src/main/java/com/quansu/heifengwuliu/vmodel/OwnerSingleVModel.kt
  13. 141 0
      app/src/main/java/com/quansu/heifengwuliu/vmodel/SourceDetailsVModel.kt
  14. 0 83
      app/src/main/java/com/quansu/heifengwuliu/widget/AddressItemEnterView.java
  15. 66 0
      app/src/main/java/com/quansu/heifengwuliu/widget/AddressItemEnterView.kt
  16. 0 90
      app/src/main/java/com/quansu/heifengwuliu/widget/AddressItemView.java
  17. 65 0
      app/src/main/java/com/quansu/heifengwuliu/widget/EnterInfoView.kt
  18. 161 0
      app/src/main/java/com/quansu/heifengwuliu/widget/ShipmentHeadView.kt
  19. 二进制
      app/src/main/res/drawable-xxhdpi/ic_arrow.png
  20. 10 0
      app/src/main/res/drawable/edit_num_bg_red.xml
  21. 339 0
      app/src/main/res/layout/activity_sourcedetails.xml
  22. 4 64
      app/src/main/res/layout/fragment_ownermore.xml
  23. 8 68
      app/src/main/res/layout/fragment_ownersingle.xml
  24. 83 0
      app/src/main/res/layout/item_apy.xml
  25. 145 0
      app/src/main/res/layout/item_enterinfo.xml
  26. 100 0
      app/src/main/res/layout/item_peopleinfo.xml
  27. 272 0
      app/src/main/res/layout/widget_shipmenthead.xml
  28. 4 0
      app/src/main/res/values/strings.xml
  29. 5 2
      base/build.gradle
  30. 5 3
      base/src/main/java/com/ysnows/base/net/NetEngine.java

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -86,6 +86,7 @@
         <activity android:name=".activity.CollectionActivity" />
         <activity android:name=".activity.AddressAddActivity"/>
         <activity android:name=".activity.AreaSelectActivity"/>
+        <activity android:name=".activity.SourceDetailsActivity"/>
 
     </application >
 

+ 73 - 0
app/src/main/java/com/quansu/heifengwuliu/activity/SourceDetailsActivity.kt

@@ -0,0 +1,73 @@
+package com.quansu.heifengwuliu.activity
+
+import android.os.Bundle
+import android.text.TextUtils
+import androidx.lifecycle.Observer
+import com.quansu.heifengwuliu.adapter.OrderInfoInadapter
+import com.quansu.heifengwuliu.adapter.OrderInfoadapter
+import com.quansu.heifengwuliu.base.MBActivity
+import com.quansu.heifengwuliu.databinding.ActivitySourcedetailsBinding
+import com.quansu.heifengwuliu.model.DataInfoBean
+import com.quansu.heifengwuliu.vmodel.SourceDetailsVModel
+
+
+/**
+ *Created by shihuiyun
+ *on 2020/9/15
+ */
+class SourceDetailsActivity: MBActivity<SourceDetailsVModel, ActivitySourcedetailsBinding>() {
+
+
+    override fun initCreate(savedInstanceState: Bundle?) {
+        super.initCreate(savedInstanceState)
+
+        var info_id=intent?.extras?.getString("info_id", "")
+        var type=intent?.extras?.getString("type", "0")//1需要弹出支付的框
+        if(!TextUtils.isEmpty(info_id)) {
+            vm.getInfo(info_id!!)
+        }
+
+        vm.info.observe(this, Observer {
+            //观察
+            initViewPager(vm.info.value!!)
+            if(type.equals("1")){
+                vm.showPayDialog(info_id!!,binding.ll)
+            }
+
+        })
+
+
+    }
+
+
+
+   private fun initViewPager(bean:DataInfoBean){
+       var  adapterOut= OrderInfoadapter()
+       binding.recyclerViewOut.adapter=adapterOut
+       var  outList = bean.order.send
+       adapterOut!!.addData(outList)
+       //入
+       var adapterIn= OrderInfoInadapter(bean.order.send[0].time)
+       binding.recyclerViewIn.adapter=adapterIn
+       var  inList = bean.order.receive
+       adapterIn!!.addData(inList)
+
+    }
+
+    override fun binding(): ActivitySourcedetailsBinding {
+       return ActivitySourcedetailsBinding.inflate(layoutInflater)
+    }
+
+
+    override fun title(): String? {
+        return "货源详情"
+    }
+
+    override fun vmClass(): Class<SourceDetailsVModel> {
+        return SourceDetailsVModel::class.java
+    }
+
+
+
+
+}

+ 15 - 0
app/src/main/java/com/quansu/heifengwuliu/adapter/OrderInfoInadapter.kt

@@ -0,0 +1,15 @@
+package com.quansu.heifengwuliu.adapter
+
+import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
+import com.quansu.heifengwuliu.R
+import com.quansu.heifengwuliu.databinding.ItemEnterinfoBinding
+import com.quansu.heifengwuliu.model.DataInfoBean
+import com.ysnows.base.base.BAdapter
+
+class OrderInfoInadapter(val start_time:String) : BAdapter<DataInfoBean.OrderBean.ReceiveBean, BaseDataBindingHolder<ItemEnterinfoBinding>>(R.layout.item_enterinfo) {
+
+    override fun convert(holder: BaseDataBindingHolder<ItemEnterinfoBinding>, item: DataInfoBean.OrderBean.ReceiveBean) {
+        holder.dataBinding?.timeOn = start_time
+        holder.dataBinding?.item = item
+    }
+}

+ 14 - 0
app/src/main/java/com/quansu/heifengwuliu/adapter/OrderInfoadapter.kt

@@ -0,0 +1,14 @@
+package com.quansu.heifengwuliu.adapter
+
+import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
+import com.quansu.heifengwuliu.R
+import com.quansu.heifengwuliu.databinding.ItemPeopleinfoBinding
+import com.quansu.heifengwuliu.model.DataInfoBean
+import com.ysnows.base.base.BAdapter
+
+class OrderInfoadapter : BAdapter<DataInfoBean.OrderBean.SendBean, BaseDataBindingHolder<ItemPeopleinfoBinding>>(R.layout.item_peopleinfo) {
+    override fun convert(holder: BaseDataBindingHolder<ItemPeopleinfoBinding>, item: DataInfoBean.OrderBean.SendBean) {
+        holder.dataBinding?.item = item
+
+    }
+}

+ 0 - 1
app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerImgFragment.kt

@@ -25,7 +25,6 @@ class OwnerImgFragment : MBFragment<BViewModel<BRepository>, FragmentOwnerimgBin
         val arguments = arguments
         if(null!=arguments) url=arguments.getString("img")
 
-        Log.e("-shy-", "__before:= "+url )
 
     }
 

+ 0 - 2
app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerMoreFragment.kt

@@ -8,8 +8,6 @@ import com.quansu.heifengwuliu.base.MBFragment
 import com.quansu.heifengwuliu.databinding.FragmentOwnermoreBinding
 import com.quansu.heifengwuliu.model.bean.ReceiveBean
 import com.quansu.heifengwuliu.vmodel.OwnerSingleVModel
-import com.ysnows.base.base.BRepository
-import com.ysnows.base.base.BViewModel
 
 /**
  * 一装多卸

+ 92 - 177
app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerSingleFragment.kt

@@ -3,36 +3,19 @@ package com.quansu.heifengwuliu.fragment
 import android.app.Activity
 import android.content.Context
 import android.content.Intent
-import android.graphics.Color
-import android.graphics.Typeface
 import android.os.Bundle
 import android.text.Editable
 import android.text.TextUtils
 import android.text.TextWatcher
 import android.view.LayoutInflater
 import android.view.ViewGroup
-import android.widget.FrameLayout
-import android.widget.TextView
-import androidx.fragment.app.Fragment
 import androidx.lifecycle.Observer
 import com.google.gson.Gson
 import com.hwangjr.rxbus.annotation.Subscribe
 import com.hwangjr.rxbus.annotation.Tag
-import com.qmuiteam.qmui.layout.QMUIFrameLayout
-import com.qmuiteam.qmui.skin.QMUISkinHelper
-import com.qmuiteam.qmui.skin.QMUISkinValueBuilder
-import com.qmuiteam.qmui.util.QMUIDisplayHelper
-import com.qmuiteam.qmui.util.QMUIResHelper
-import com.qmuiteam.qmui.widget.popup.QMUIPopup
-import com.qmuiteam.qmui.widget.popup.QMUIPopups
-import com.qmuiteam.qmui.widget.tab.QMUITab
-import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
-import com.qmuiteam.qmui.widget.tab.QMUITabSegment
-import com.quansu.heifengwuliu.R
 import com.quansu.heifengwuliu.activity.AddressActivity
 import com.quansu.heifengwuliu.activity.AreaSelectActivity
-import com.quansu.heifengwuliu.adapter.BaseFragmentPagerAdapter
-import com.quansu.heifengwuliu.adapter.CarEnterAdapter
+import com.quansu.heifengwuliu.activity.SourceDetailsActivity
 import com.quansu.heifengwuliu.base.MBFragment
 import com.quansu.heifengwuliu.config.ConfigRx
 import com.quansu.heifengwuliu.config.MIntentAction
@@ -60,7 +43,6 @@ import java.text.DecimalFormat
  *on 2020/9/11
  */
 class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBinding>() {
-    var cats = ArrayList<String>()
     private var type = 1// 1:/装货 2卸货
 
     private var selectViewpage = 0
@@ -73,7 +55,6 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
     var is_public = 1//默认 发布到货源大厅
     var is_insurance = 0//默认  不够买保险
 
-
     //出
     var lat_out: String = ""
     var lng_out: String = ""
@@ -94,8 +75,6 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
 
 
 
-
-
     override fun init(savedInstanceState: Bundle?) {
         super.init(savedInstanceState)
         getData()
@@ -105,6 +84,7 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             goodsTypeList.addAll(it.goods_type)
             numsTypeList.addAll(it.nums_type)
             initTab(it)
+
         })
 
         initData()
@@ -122,44 +102,6 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             //发布
             judgeValue()
 
-            return@setOnClickListener
-
-            // var mNormalPopup = QMUIPopups.popup(context, QMUIDisplayHelper.dp2px(getContext(), 250))
-
-            var mNormalPopup = QMUIPopups.fullScreenPopup(context)
-            val builder: QMUISkinValueBuilder = QMUISkinValueBuilder.acquire()
-            val frameLayout = QMUIFrameLayout(context)
-            frameLayout.background = QMUIResHelper.getAttrDrawable(context, R.attr.qmui_skin_support_popup_bg)
-            builder.background(R.attr.qmui_skin_support_popup_bg)
-            QMUISkinHelper.setSkinValue(frameLayout, builder)
-            frameLayout.radius = QMUIDisplayHelper.dp2px(context, 12)
-            val padding = QMUIDisplayHelper.dp2px(context, 20)
-            frameLayout.setPadding(padding, padding, padding, padding)
-
-            //自定义布局
-            val layoutInflater = requireContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
-            var layout = layoutInflater.inflate(R.layout.item_app, null)
-            val tv: TextView = layout.findViewById(R.id.label)
-            tv.text = "123344"
-            tv.setOnClickListener {
-                mNormalPopup.dismiss()
-            }
-            builder.release();
-
-            val size = QMUIDisplayHelper.dp2px(context, 200)
-            val lp: FrameLayout.LayoutParams = FrameLayout.LayoutParams(size, size)
-            frameLayout.addView(layout, lp)
-
-            mNormalPopup.addView(frameLayout)
-            mNormalPopup.onDismiss() {
-                toast("onDismiss")
-            }
-
-            mNormalPopup.dismissIfOutsideTouch(false)
-            mNormalPopup.animStyle(QMUIPopup.ANIM_GROW_FROM_CENTER)
-            mNormalPopup.show(binding.tvPublish)
-
-
         }
 
         binding.llChoseUnits.setOnClickListener {
@@ -182,7 +124,7 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
 
         binding.llIsInsurance.setOnClickListener {
 
-            PopuListUtils.showQMUIPopup(context(), binding.llGoodsType, insurance, object : ChoiceData {
+            PopuListUtils.showQMUIPopup(context(), binding.tvIsInsurance, insurance, object : ChoiceData {
                 override fun onRestuse(name: String?) {
                     vm.insurance.value = name
                     is_insurance = if (name.equals("是")) 1 else 0
@@ -235,17 +177,25 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
 
 
     private fun judgeValue() {
+
+        UiSwitch.bundle(context, SourceDetailsActivity::class.java, Bundle().apply {
+            putString("info_id", "55")
+            putString("type","1")
+        })
+
+        return
+
         if (TextUtils.isEmpty(province_out)) {
             toast("请选择装货地址!")
             return
 
         }
-        var name_out = binding.viewOut.etName.text.toString().trim()
+        var name_out = binding.viewHead.getEtName()!!.text.toString().trim()
         if (TextUtils.isEmpty(name_out)) {
             toast("请输入发货人!")
             return
         }
-        var mobile_out = binding.viewOut.etPhone.text.toString().trim()
+        var mobile_out = binding.viewHead.getEtPhone()!!.text.toString().trim()
         if (TextUtils.isEmpty(mobile_out)) {
             toast("请输入发货人电话!")
             return
@@ -255,9 +205,9 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             return
         }
 
-        var address_out = binding.viewOut.etDetailedAddress.text.toString().trim()
+        var address_out = binding.viewHead.getEtDetailedAddress()!!.text.toString().trim()
 
-        var sendBean = SendBean(lat_out, lng_out, province_out, city_out, address_out, address_out, name_out, mobile_out, time_out, "0")
+        var sendBean = SendBean(lat_out, lng_out, province_out, city_out, area_out, address_out, name_out, mobile_out, time_out, "0")
 
 
         if (TextUtils.isEmpty(province_in)) {
@@ -265,12 +215,12 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             return
 
         }
-        var name_in = binding.viewEnter.etName.text.toString().trim()
+        var name_in = binding.viewEnter.getEtName()!!.text.toString().trim()
         if (TextUtils.isEmpty(name_in)) {
             toast("请输入卸货人!")
             return
         }
-        var mobile_in = binding.viewEnter.etPhone.text.toString().trim()
+        var mobile_in = binding.viewEnter.getEtPhone()!!.text.toString().trim()
         if (TextUtils.isEmpty(mobile_in)) {
             toast("请输入卸货人电话!")
             return
@@ -280,6 +230,13 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             return
         }
 
+        var goods_name=binding.etGoodsName.text.toString().trim()
+
+        if (TextUtils.isEmpty(goods_name)) {
+            toast("请输入货物类型")
+            return
+        }
+
         if (TextUtils.isEmpty(vm.goodstype.value.toString())) {
             toast("请选择货物类型")
             return
@@ -305,10 +262,10 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             toast("请输入卸货时间")
             return
         }
-        var address_in = binding.viewEnter.etDetailedAddress.text.toString().trim()
+        var address_in = binding.viewEnter.getEtDetailedAddress()!!.text.toString().trim()
 
-        var receiveBean = ReceiveBean(lat_in, lng_in, province_in, city_in, address_in, address_in, name_in, mobile_in, time_in, "1",
-                "", vm.goodstype.value.toString(), nums, vm.unit.value.toString(), price, total
+        var receiveBean = ReceiveBean(lat_in, lng_in, province_in, city_in, area_in, address_in, name_in, mobile_in, time_in, "1",
+                goods_name, vm.goodstype.value.toString(), nums, vm.unit.value.toString(), price, total
         )
 
         if (is_agree==0) {
@@ -321,8 +278,16 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             return
         }
         var data=binding.etData.text.toString()
-        var send= Gson().toJson(sendBean)
-        var receive= Gson().toJson(receiveBean)
+
+        var sendList=ArrayList<SendBean>()
+        sendList.add(sendBean)
+
+        var send= Gson().toJson(sendList)
+        var receiveList=ArrayList<ReceiveBean>()
+        receiveList.add(receiveBean)
+
+        var receive= Gson().toJson(receiveList)
+
 
         vm.setReleaseSource(info_id,total,"",carnums,is_public.toString(),is_insurance.toString(),"1",
                data,send,receive)
@@ -355,7 +320,6 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
         }
         binding.etSingCarTotal.setText(total)
 
-
     }
 
 
@@ -367,85 +331,37 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
 
 
     private fun initTab(info: DataInfoBean) {
-        if (null != info.car_type) {
-            for (item in info.car_type) {
-                cats.add(item.type_name)
-            }
-        }
-
-        //设置viewpager
-        val fragments = ArrayList<Fragment>()
-        var index = 0
-        for (cat in cats) {
-            var ownerImgFragment = OwnerImgFragment()
-            ownerImgFragment.arguments = B().putString("img", info.car_type[index].type_img).ok()
-            fragments.add(ownerImgFragment)
-            index++
-        }
-        val adapter = BaseFragmentPagerAdapter(childFragmentManager, fragments)
-        binding.qmViewPager.adapter = adapter
 
-        //设置tab
-        binding.tabs.setIndicator(QMUITabIndicator(QMUIDisplayHelper.dp2px(context(), 2), false, true))
-        val space: Int = QMUIDisplayHelper.dp2px(context, 20)
-        binding.tabs.setPadding(space, 0, space, 0)
-        binding.tabs.mode = QMUITabSegment.MODE_SCROLLABLE
-//        val space: Int = QMUIDisplayHelper.dp2px(context, 16)
-//        binding.tabs.mode = QMUITabSegment.MODE_SCROLLABLE //MODE_SCROLLABLE 自适应宽度+滚动   MODE_FIXED  均分
-//        binding.tabs.setItemSpaceInScrollMode(space)
-//        binding.tabs.setupWithViewPager(binding.qmViewPager, false)
-//        binding.tabs.setPadding(space, 0, space, 0)
-//
-
-        val builder = binding.tabs.tabBuilder()
-        builder
-                .skinChangeWithTintColor(false)
-                .setSelectColor(Color.parseColor("#2E4E71"))
-                .setNormalColor(Color.parseColor("#666666"))
-                .setTypeface(Typeface.DEFAULT_BOLD, Typeface.DEFAULT)
-                .setDynamicChangeIconColor(false)
-
-        val tabs = ArrayList<QMUITab>()
-        for (cat in cats) {
-            val item = builder
-                    .setText(cat)
-                    .build(context())
-
-            tabs.add(item)
-        }
-        tabs.forEach {
-            binding.tabs.addTab(it)
-        }
-        binding.tabs.setupWithViewPager(binding.qmViewPager, false)
 
+        binding.viewHead.setHeadData(info,childFragmentManager)
 
-        binding.imgNext.setOnClickListener {
+        binding.viewHead.getImgNext()!!.setOnClickListener {
 
 
-            selectViewpage = binding.qmViewPager.currentItem
+            selectViewpage = binding.viewHead.getQmViewPager()!!.currentItem
 
-            if (selectViewpage < cats.size - 1) {
-                binding.qmViewPager.currentItem = selectViewpage + 1
+            if (selectViewpage < binding.viewHead.getCats().size - 1) {
+                binding.viewHead.getQmViewPager()!!.currentItem = selectViewpage + 1
             }
 
         }
         //向右
-        binding.imgDown.setOnClickListener {
+        binding.viewHead.getImgDown()!!.setOnClickListener {
             toast("222")
-            selectViewpage = binding.qmViewPager.currentItem
-            if (selectViewpage < cats.size - 1) {
-                binding.qmViewPager.currentItem = selectViewpage + 1
+            selectViewpage =binding.viewHead.getQmViewPager()!!.currentItem
+            if (selectViewpage < binding.viewHead.getCats().size - 1) {
+                binding.viewHead.getQmViewPager()!!.currentItem = selectViewpage + 1
             }
 
 
         }
 
         //向左
-        binding.imgUp.setOnClickListener {
-            selectViewpage = binding.qmViewPager.currentItem
+        binding.viewHead.getImgUp()!!.setOnClickListener {
+            selectViewpage = binding.viewHead.getQmViewPager()!!.currentItem
 
-            if (selectViewpage < cats.size - 1 && selectViewpage > 0) {
-                binding.qmViewPager.currentItem = selectViewpage - 1
+            if (selectViewpage < binding.viewHead.getCats().size - 1 && selectViewpage > 0) {
+                binding.viewHead.getQmViewPager()!!.currentItem = selectViewpage - 1
             }
         }
 
@@ -457,48 +373,48 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
         insurance.add("是")
         insurance.add("否")
 
-
         //卸货信息
-        binding.viewEnter.tvCity.setHint("请选择卸货地址")
-        binding.viewEnter.llChoseMap.setOnClickListener {
+        binding.viewEnter.getTvCity()!!.hint = "请选择卸货地址"
+        binding.viewEnter.getTvChoseTime()!!.hint = "请选择卸货时间"
+
+        binding.viewEnter.getLlChoseMap()!!.setOnClickListener {
             //地图选点
             type = 2
             choseMap()
         }
 
-
-        binding.viewOut.llChoseMap.setOnClickListener {
+        binding.viewHead.getLlChoseMap()!!.setOnClickListener {
             //地图选点
             type = 1
             choseMap()
         }
-        binding.viewOut.llChoseAddress.setOnClickListener {
+        binding.viewHead.getLlChoseAddress()!!.setOnClickListener {
             //地址薄 1
             type = 1
             UiSwitch.bundleRes(this, AddressActivity::class.java,
                     B.with().putString("type", "1").ok(), MIntentAction.REQUEST_CODE_ONE)
         }
-        binding.viewEnter.llChoseAddress.setOnClickListener {
+        binding.viewEnter.getLlChoseAddress()!!.setOnClickListener {
             //地址薄 2
             type = 2
             UiSwitch.bundleRes(this, AddressActivity::class.java,
                     B.with().putString("type", "2").ok(), MIntentAction.REQUEST_CODE_ONE)
         }
 
-        binding.viewEnter.tvCity.setOnClickListener {
+        binding.viewEnter.getTvCity()!!.setOnClickListener {
 
             type = 2
             UiSwitch.singleRes(this, AreaSelectActivity::class.java,
                     MIntentAction.REQUEST_CODE_TWO)
         }
-        binding.viewOut.tvCity.setOnClickListener {
+        binding.viewHead.getTvCity()!!.setOnClickListener {
             type = 1
             UiSwitch.singleRes(this, AreaSelectActivity::class.java,
                     MIntentAction.REQUEST_CODE_TWO)
         }
-        binding.viewEnter.tvChoseTime.setOnClickListener {
+        binding.viewEnter.getTvChoseTime()!!.setOnClickListener {
             //选择时间
-            PopupUtils.setChoseTime(context, binding.viewEnter.tvChoseTime, object : ChoiceData {
+            PopupUtils.setChoseTime(context, binding.viewEnter.getTvChoseTime()!!, object : ChoiceData {
                 override fun onRestuse(time: String?) {
                     if (time != null) {
                         time_in = time
@@ -507,8 +423,8 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             })
         }
 
-        binding.viewOut.tvChoseTime.setOnClickListener {
-            PopupUtils.setChoseTime(context, binding.viewOut.tvChoseTime, object : ChoiceData {
+        binding.viewHead.getTvChoseTime()!!.setOnClickListener {
+            PopupUtils.setChoseTime(context, binding.viewHead.getTvChoseTime(), object : ChoiceData {
                 override fun onRestuse(time: String?) {
                     if (time != null) {
                         time_out = time
@@ -533,13 +449,12 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
                     province_out = bundle.getString("province_code")
                     city_out = bundle.getString("city_code")
 
-                    binding.viewOut.tvCity.text = name
+                    binding.viewHead.getTvCity()!!.text = name
                 } else {
                     area_in = bundle.getString("area_code")
                     province_in = bundle.getString("province_code")
                     city_in = bundle.getString("city_code")
-
-                    binding.viewEnter.tvCity.text = name
+                    binding.viewEnter.getTvCity()!!.text = name
                 }
 
             }
@@ -553,27 +468,31 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
                 var item = bundle.getSerializable("item") as AddressBean
                 //todo
                 if (type == 1) {
-                    binding.viewOut.tvCity.text = item.province?.name + item.city?.name + item.area?.name
-                    binding.viewOut.etDetailedAddress.setText(item.address)
-                    binding.viewOut.tvChoseTime.text = item.create_time
-                    binding.viewOut.etName.setText(item.name)
-                    binding.viewOut.etPhone.setText(item.mobile)
-
-                    var province_code = item.province?.code
-                    var city_code = item.city?.code
-                    var area_code = item.area?.code
-                } else {
-
-                    binding.viewEnter.tvCity.text = item.province?.name + item.city?.name + item.area?.name
-                    binding.viewEnter.etDetailedAddress.setText(item.address)
-                    binding.viewEnter.tvChoseTime.text = item.create_time
-                    binding.viewEnter.etName.setText(item.name)
-                    binding.viewEnter.etPhone.setText(item.mobile)
+                    binding.viewHead.getTvCity()!!.text = item.province?.name + item.city?.name + item.area?.name
+                    binding.viewHead.getEtDetailedAddress()!!.setText(item.address)
+                    binding.viewHead.getTvChoseTime()!!.text = item.create_time
+                    binding.viewHead.getEtName()!!.setText(item.name)
+                    binding.viewHead.getEtPhone()!!.setText(item.mobile)
+                    lat_out = item.lat.toString()
+                    lng_out = item.lng.toString()
+                    area_out = item.area!!.code.toString()
+                    province_out = item.province!!.code.toString()
+                    city_out = item.city!!.code.toString()
+                    time_out = item.create_time.toString()
 
-                    var province_code = item.province?.code
-                    var city_code = item.city?.code
-                    var area_code = item.area?.code
+                } else {
 
+                    binding.viewEnter.getTvCity()!!.text = item.province?.name + item.city?.name + item.area?.name
+                    binding.viewEnter.getEtDetailedAddress()!!.setText(item.address)
+                    binding.viewEnter.getTvChoseTime()!!.text = item.create_time
+                    binding.viewEnter.getEtName()!!.setText(item.name)
+                    binding.viewEnter.getEtPhone()!!.setText(item.mobile)
+                    lat_in = item.lat.toString()
+                    lng_in = item.lng.toString()
+                    area_in = item.area!!.code.toString()
+                    province_in = item.province!!.code.toString()
+                    city_in = item.city!!.code.toString()
+                    time_in = item.create_time.toString()
                 }
 
             }
@@ -582,7 +501,6 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
 
         }
 
-
     }
 
 
@@ -634,9 +552,8 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             area_in = bean.areacode
             province_in = bean.areacode.substring(0, 2) + "0000"
             city_in = bean.areacode.substring(0, 4) + "00"
-
-            binding.viewEnter.etDetailedAddress.setText(bean.position)
-            binding.viewEnter.tvCity.text = bean.provincename + bean.cityname + bean.areaname
+            binding.viewEnter.getEtDetailedAddress()!!.setText(bean.position)
+            binding.viewEnter.getTvCity()!!.text = bean.provincename + bean.cityname + bean.areaname
         } else {
 
             lat_out = bean.latitude
@@ -644,10 +561,8 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             area_out = bean.areacode
             province_out = bean.areacode.substring(0, 2) + "0000"
             city_out = bean.areacode.substring(0, 4) + "00"
-
-
-            binding.viewOut.etDetailedAddress.setText(bean.position)
-            binding.viewOut.tvCity.text = bean.provincename + bean.cityname + bean.areaname
+            binding.viewHead.getEtDetailedAddress()!!.setText(bean.position)
+            binding.viewHead.getTvCity()!!.text = bean.provincename + bean.cityname + bean.areaname
         }
 
 

+ 69 - 13
app/src/main/java/com/quansu/heifengwuliu/model/DataInfoBean.kt

@@ -5,21 +5,77 @@ import com.ysnows.base.inter.IModel
 /**
  *Created by shihuiyun
  *on 2020/9/14
+ * 订单状态 info_state:10->待支付  20->待接单  30->进行中 40-> 已完成  100->已取消
  */
-data class DataInfoBean(var goods_type:List<String>,var nums_type:List<String>,var car_type: List<CarTypeBean>) : IModel {
+data class DataInfoBean(var goods_type: List<String>, var nums_type: List<String>,
+                        var car_type: List<CarTypeBean>, var order: OrderBean) : IModel {
+
+    data class CarTypeBean(var type_id: String, var type_name: String,
+                           var type_icon: String, var type_img: String) : IModel {
+
+    }
+
+    data class OrderBean(var info_id: String, var info_state: String,
+                         var info_sn: String, var is_pay: String,
+                         var uid: String, var price: String,
+                         var total: String, var driver: String,
+                         var nums: String, var is_public: String,
+                         var is_insurance: String, var type: String,
+                         var data: String, var pay_time: String,
+                         var create_time: String, var update_time: String,
+                         var delete_time: String, var send: List<SendBean>,
+                         var receive: List<ReceiveBean>) : IModel {
+
+
+        data class ReceiveBean(var data_id: String, var info_id: String, var lat: String,
+                               var lng: String, var address: String, var name: String, var mobile: String, var goods: String,
+                               var goods_type: GoodsTypeBean, var nums: String, var nums_type: NumsTypeBean, var price: String, var total: String,
+                               var time: String, var type: String, var create_time: String, var update_time: String, var delete_time: String,
+                               var province: ProvinceBean, var city: CityBean, var area: AreaBean
+        ) : IModel {
+            data class ProvinceBean(var name: String, var code: String) : IModel {
+
+            }
+
+            data class CityBean(var name: String, var code: String) : IModel {
+
+            }
+
+            data class AreaBean(var name: String, var code: String) : IModel {
+
+            }
+
+            data class GoodsTypeBean(var name: String, var code: String) : IModel {
+
+            }
+
+            data class NumsTypeBean(var name: String, var code: String) : IModel {
+
+            }
+
+
+        }
+
+        data class SendBean(var data_id: String, var info_id: String, var lat: String,
+                            var lng: String, var address: String, var name: String, var mobile: String,
+                            var time: String, var type: String,
+                            var province: ProvinceBean, var city: CityBean, var area: AreaBean
+        ) : IModel {
+
+            data class ProvinceBean(var name: String, var code: String) : IModel {
+
+            }
+
+            data class CityBean(var name: String, var code: String) : IModel {
+
+            }
+
+            data class AreaBean(var name: String, var code: String) : IModel {
+
+            }
+
+        }
 
-    data class CarTypeBean(var type_id:String, var type_name:String,var type_icon:String, var type_img:String): IModel {
 
     }
-//    var goods_type:List<String>?=null
-//    var nums_type: List<String>?=null
-//    var car_type: List<CarTypeBean>?=null
-//
-//
-//
-//    class CarTypeBean : IModel {
-//        var type_id:String?=null
-//        var type_icon:String?=null
-//        var type_img:String?=null
-//    }
 }

+ 10 - 0
app/src/main/java/com/quansu/heifengwuliu/model/InfoEditBean.kt

@@ -0,0 +1,10 @@
+package com.quansu.heifengwuliu.model
+
+import com.ysnows.base.inter.IModel
+
+/**
+ *Created by shihuiyun
+ *on 2020/9/15
+ */
+class InfoEditBean(var info_id:String) : IModel {
+}

+ 37 - 0
app/src/main/java/com/quansu/heifengwuliu/utils/net/ApiService.kt

@@ -193,4 +193,41 @@ interface ApiService {
     fun infoGet(@Query("info_id") info_id: String?): Observable<Response<DataInfoBean>>
 
 
+    /**
+     * 添加编辑信息-货源管理
+     * @return
+     */
+    @POST("api/info/infoEdit")
+    @FormUrlEncoded
+    fun infoEdit(@Field("info_id") info_id: String?,
+                 @Field("total") total: String?,
+                 @Field("driver") driver: String?,
+                 @Field("nums") nums: String?,
+                 @Field("is_public") is_public: String?,
+                 @Field("is_insurance") is_insurance: String?,
+                 @Field("type") type: String?,
+                 @Field("data") data: String?,
+                 @Field("send") send: String?,
+                 @Field("receive") receive: String?
+    ): Observable<Response<InfoEditBean>>
+
+
+
+    /**
+     * 货源支付
+     * @return
+     */
+    @POST("api/info/infoPay")
+    @FormUrlEncoded
+    fun infoGetPay(@Field("info_id") info_id: String?,@Field("pay_pwd") pay_pwd: String?): Observable<Response<Any>>
+
+
+    /**
+     * 货源取消
+     * @return
+     */
+    @GET("api/info/infoCancel")
+    fun infoCancel(@Query("info_id") info_id: String?): Observable<Response<Any>>
+
+
 }

+ 265 - 0
app/src/main/java/com/quansu/heifengwuliu/view/PayPwdEditText.java

@@ -0,0 +1,265 @@
+package com.quansu.heifengwuliu.view;
+
+import android.content.Context;
+import android.text.Editable;
+import android.text.InputFilter;
+import android.text.InputType;
+import android.text.Selection;
+import android.text.TextWatcher;
+import android.text.method.HideReturnsTransformationMethod;
+import android.text.method.PasswordTransformationMethod;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+/**
+ * Created by ywl on 2016/7/10.
+ */
+public class PayPwdEditText extends RelativeLayout{
+
+    private EditText editText; //文本编辑框
+    private Context context;
+
+    private LinearLayout linearLayout; //文本密码的文本
+    private TextView[] textViews; //文本数组
+
+    private int pwdlength = 6; //密码长度, 默认6
+
+    private OnTextFinishListener onTextFinishListener;
+
+
+    public PayPwdEditText(Context context) {
+        this(context, null);
+    }
+
+    public PayPwdEditText(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public PayPwdEditText(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        this.context = context;
+    }
+
+    /**
+     * @param bgdrawable 背景drawable
+     * @param pwdlength 密码长度
+     * @param splilinewidth 分割线宽度
+     * @param splilinecolor 分割线颜色
+     * @param pwdcolor 密码字体颜色
+     * @param pwdsize 密码字体大小
+     */
+    public void initStyle(int bgdrawable, int pwdlength, float splilinewidth, int splilinecolor, int pwdcolor, int pwdsize)
+    {
+        this.pwdlength = pwdlength;
+        initEdit(bgdrawable);
+        initShowInput(bgdrawable, pwdlength, splilinewidth, splilinecolor, pwdcolor, pwdsize);
+    }
+
+    /**
+     * 初始化编辑框
+     * @param bgcolor
+     */
+    private void initEdit(int bgcolor)
+    {
+        editText = new EditText(context);
+        editText.setBackgroundResource(bgcolor);
+        editText.setCursorVisible(false);
+        editText.setTextSize(0);
+        editText.setInputType(InputType.TYPE_NUMBER_VARIATION_PASSWORD | InputType.TYPE_CLASS_NUMBER);
+        editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(pwdlength)});
+        editText.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+                Editable etext = editText.getText();
+                Selection.setSelection(etext, etext.length());
+            }
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                initDatas(s);
+                if(s.length() == pwdlength)
+                {
+                    if(onTextFinishListener != null)
+                    {
+                        onTextFinishListener.onFinish(s.toString().trim());
+                    }
+                }
+            }
+        });
+        LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
+        lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
+        addView(editText, lp);
+
+    }
+
+    /**
+     * @param bgcolor 背景drawable
+     * @param pwdlength 密码长度
+     * @param slpilinewidth 分割线宽度
+     * @param splilinecolor 分割线颜色
+     * @param pwdcolor 密码字体颜色
+     * @param pwdsize 密码字体大小
+     */
+    public void initShowInput(int bgcolor, int pwdlength, float slpilinewidth, int splilinecolor, int pwdcolor, int pwdsize)
+    {
+        //添加密码框父布局
+        linearLayout = new LinearLayout(context);
+        linearLayout.setBackgroundResource(bgcolor);
+        LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
+        linearLayout.setLayoutParams(layoutParams);
+        linearLayout.setOrientation(LinearLayout.HORIZONTAL);
+        addView(linearLayout);
+
+        //添加密码框
+        textViews = new TextView[pwdlength];
+        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0,LayoutParams.MATCH_PARENT);
+        params.weight = 1;
+        params.gravity = Gravity.CENTER;
+
+        LinearLayout.LayoutParams params2 = new LinearLayout.LayoutParams(dip2px(context, slpilinewidth),LayoutParams.MATCH_PARENT);
+        for(int i = 0; i < textViews.length; i++)
+        {
+            final int index = i;
+            TextView textView = new TextView(context);
+            textView.setGravity(Gravity.CENTER);
+            textViews[i] = textView;
+            textViews[i].setTextSize(pwdsize);
+            textViews[i].setTextColor(context.getResources().getColor(pwdcolor));
+            textViews[i].setInputType(InputType.TYPE_NUMBER_VARIATION_PASSWORD | InputType.TYPE_CLASS_NUMBER);
+            linearLayout.addView(textView, params);
+
+
+            if(i < textViews.length - 1)
+            {
+                View view = new View(context);
+                view.setBackgroundColor(context.getResources().getColor(splilinecolor));
+                linearLayout.addView(view, params2);
+            }
+        }
+    }
+
+    /**
+     * 是否显示明文
+     * @param showPwd
+     */
+    public void setShowPwd(boolean showPwd) {
+        int length = textViews.length;
+        for(int i = 0; i < length; i++) {
+            if (showPwd) {
+                textViews[i].setTransformationMethod(PasswordTransformationMethod.getInstance());
+            } else {
+                textViews[i].setTransformationMethod(HideReturnsTransformationMethod.getInstance());
+            }
+        }
+    }
+
+    /**
+     * 设置显示类型
+     * @param type
+     */
+    public void setInputType(int type)
+    {
+        int length = textViews.length;
+        for(int i = 0; i < length; i++) {
+            textViews[i].setInputType(type);
+        }
+    }
+
+    /**
+     * 清除文本框
+     */
+    public void clearText()
+    {
+        editText.setText("");
+        for(int i = 0; i < pwdlength; i++)
+        {
+            textViews[i].setText("");
+        }
+    }
+
+    public void setOnTextFinishListener(OnTextFinishListener onTextFinishListener) {
+        this.onTextFinishListener = onTextFinishListener;
+    }
+
+    /**
+     * 根据输入字符,显示密码个数
+     * @param s
+     */
+    public void initDatas(Editable s)
+    {
+        if(s.length() > 0)
+        {
+            int length = s.length();
+            for(int i = 0; i < pwdlength; i++)
+            {
+                if(i < length)
+                {
+                    for(int j = 0; j < length; j++)
+                    {
+                        char ch = s.charAt(j);
+                        textViews[j].setText(String.valueOf(ch));
+                    }
+                }
+                else
+                {
+                    textViews[i].setText("");
+                }
+            }
+        }
+        else
+        {
+            for(int i = 0; i < pwdlength; i++)
+            {
+                textViews[i].setText("");
+            }
+        }
+    }
+
+    public String getPwdText()
+    {
+        if(editText != null)
+            return editText.getText().toString().trim();
+        return "";
+    }
+
+    public static int dip2px(Context context, float dipValue) {
+        final float scale = context.getResources().getDisplayMetrics().density;
+        return (int) (dipValue * scale + 0.5f);
+    }
+
+    public interface OnTextFinishListener
+    {
+        void onFinish(String str);
+    }
+
+    public void setFocus()
+    {
+        editText.requestFocus();
+        editText.setFocusable(true);
+        showKeyBord(editText);
+    }
+
+    /**
+     * 显示键盘
+     * @param view
+     */
+    public void showKeyBord(View view)
+    {
+        InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
+        imm.showSoftInput(view,InputMethodManager.SHOW_FORCED);
+
+    }
+
+}

+ 17 - 0
app/src/main/java/com/quansu/heifengwuliu/vmodel/OwnerSingleVModel.kt

@@ -1,10 +1,14 @@
 package com.quansu.heifengwuliu.vmodel
 
+import android.os.Bundle
 import androidx.lifecycle.MutableLiveData
+import com.quansu.heifengwuliu.activity.SourceDetailsActivity
 import com.quansu.heifengwuliu.model.DataInfoBean
+import com.quansu.heifengwuliu.model.InfoEditBean
 import com.quansu.heifengwuliu.utils.net.NetEngine
 import com.ysnows.base.base.BRepository
 import com.ysnows.base.base.BViewModel
+import com.ysnows.base.utils.UiSwitch
 
 
 open class OwnerSingleVModel : BViewModel<BRepository>() {
@@ -73,6 +77,19 @@ open class OwnerSingleVModel : BViewModel<BRepository>() {
     ){
         //todo:发布货源
 
+        repository().lreq(NetEngine.service.infoEdit(info_id,total,driver,nums,is_public,is_insurance,type,
+        data,send,receive))
+                .doOnNext() {
+                    if (it.ok()) {
+                        var  bean=it.data() as InfoEditBean
+                        UiSwitch.bundle(repository().context, SourceDetailsActivity::class.java, Bundle().apply {
+                            putString("info_id", bean.info_id)
+                            putString("type","1")
+                        })
+
+                    }
+                }
+                .subscribe()
 
     }
 

+ 141 - 0
app/src/main/java/com/quansu/heifengwuliu/vmodel/SourceDetailsVModel.kt

@@ -0,0 +1,141 @@
+package com.quansu.heifengwuliu.vmodel
+
+import android.app.Activity
+import android.content.Context
+import android.os.Handler
+import android.text.TextUtils
+import android.util.Log
+import android.view.LayoutInflater
+import android.widget.FrameLayout
+import android.widget.LinearLayout
+import android.widget.Toast
+import androidx.lifecycle.MutableLiveData
+import com.google.gson.Gson
+import com.qmuiteam.qmui.layout.QMUIFrameLayout
+import com.qmuiteam.qmui.skin.QMUISkinHelper
+import com.qmuiteam.qmui.skin.QMUISkinValueBuilder
+import com.qmuiteam.qmui.util.QMUIDisplayHelper
+import com.qmuiteam.qmui.util.QMUIResHelper
+import com.qmuiteam.qmui.widget.popup.QMUIPopup
+import com.qmuiteam.qmui.widget.popup.QMUIPopups
+import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+import com.quansu.heifengwuliu.R
+import com.quansu.heifengwuliu.model.DataInfoBean
+import com.quansu.heifengwuliu.utils.net.NetEngine
+import com.quansu.heifengwuliu.view.PayPwdEditText
+import com.ysnows.base.base.BRepository
+import com.ysnows.base.base.BViewModel
+
+
+open class SourceDetailsVModel : BViewModel<BRepository>() {
+
+    val info: MutableLiveData<DataInfoBean> = MutableLiveData<DataInfoBean>()
+
+    fun getInfo(info_id: String) {
+        repository().lreq(NetEngine.service.infoGet(info_id))
+                .doOnNext() {
+                    if (it.ok()) {
+
+                        info.value = it.data() as DataInfoBean
+
+                    }
+                }
+                .subscribe()
+    }
+
+
+    fun getInfoPay(info_id: String,pay_pwd:String) {
+        repository().lreq(NetEngine.service.infoGetPay(info_id,pay_pwd))
+                .doOnNext() {
+                    if (it.ok()) {
+                        toast(it.msg())
+                    }
+                }
+                .subscribe()
+    }
+
+    fun showPayDialog(info_id: String,view:LinearLayout){
+        var mNormalPopup = QMUIPopups.fullScreenPopup(repository().context)
+        val builder: QMUISkinValueBuilder = QMUISkinValueBuilder.acquire()
+        val frameLayout = QMUIFrameLayout(repository().context)
+        frameLayout.background = QMUIResHelper.getAttrDrawable(repository().context, R.attr.qmui_skin_support_popup_bg)
+        builder.background(R.attr.qmui_skin_support_popup_bg)
+        QMUISkinHelper.setSkinValue(frameLayout, builder)
+        frameLayout.radius = QMUIDisplayHelper.dp2px(repository().context, 12)
+        val padding = QMUIDisplayHelper.dp2px(repository().context, 10)
+        frameLayout.setPadding(padding, padding, padding, padding)
+
+        //自定义布局
+        val layoutInflater = repository().context?.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
+        var layout = layoutInflater.inflate(R.layout.item_apy, null)
+        val butCancel: QMUIRoundButton = layout.findViewById(R.id.but_cancel)
+        val butSure: QMUIRoundButton = layout.findViewById(R.id.tv_sure)
+        val payPwdEditText: PayPwdEditText = layout.findViewById(R.id.ppet)
+
+        var password=""
+        payPwdEditText.initStyle(R.drawable.edit_num_bg_red, 6, 0.33f, R.color.colorAccent, R.color.colorAccent, 20)
+        payPwdEditText.setOnTextFinishListener { str -> //密码输入完后的回调
+            password=str
+            //todo:
+            Log.e("-shy-", "--str-")
+            getInfoPay(info_id,password)
+
+            mNormalPopup.dismiss()
+        }
+
+        Handler().postDelayed(Runnable { payPwdEditText.setFocus() }, 100)
+
+
+        butSure.setOnClickListener {
+
+            if(TextUtils.isEmpty(password)){
+                toast("请输入支付密码!")
+                return@setOnClickListener
+            }
+            mNormalPopup.dismiss()
+        }
+
+        butCancel.setOnClickListener {
+            mNormalPopup.dismiss()
+        }
+        builder.release();
+
+        val size = QMUIDisplayHelper.dp2px(repository().context, 220)
+
+        val lp: FrameLayout.LayoutParams = FrameLayout.LayoutParams(size, size)
+        frameLayout.addView(layout, lp)
+
+        mNormalPopup.addView(frameLayout)
+        mNormalPopup.onDismiss() {
+            toast("onDismiss")
+        }
+
+        mNormalPopup.dismissIfOutsideTouch(false)
+        mNormalPopup.animStyle(QMUIPopup.ANIM_GROW_FROM_CENTER)
+        mNormalPopup.show(view)
+
+    }
+
+    fun setCancelOrder(info_id: String){
+        //取消发布
+
+        repository().lreq(NetEngine.service.infoCancel(info_id))
+                .doOnNext() {
+                    if (it.ok()) {
+
+                        var con = repository().context as Activity
+                        con.finish()
+
+                    }
+                }
+                .subscribe()
+    }
+
+    fun anotherOne(){
+        //再来一单
+        var con = repository().context as Activity
+        con.finish()
+    }
+
+
+}

+ 0 - 83
app/src/main/java/com/quansu/heifengwuliu/widget/AddressItemEnterView.java

@@ -1,83 +0,0 @@
-package com.quansu.heifengwuliu.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import androidx.databinding.DataBindingUtil;
-
-import com.quansu.heifengwuliu.R;
-import com.quansu.heifengwuliu.databinding.WidgetAddressitemBinding;
-import com.quansu.heifengwuliu.databinding.WidgetEnteritemBinding;
-import com.ysnows.base.view.BView;
-import com.ysnows.base.view.BaseView;
-
-/**
- * Created by shihuiyun
- * on 2020/9/11
- */
-public class AddressItemEnterView extends BaseLinearLayout {
-    private BView view;
-
-
-    private WidgetEnteritemBinding binding;
-
-
-
-    public AddressItemEnterView(Context context) {
-        super(context);
-    }
-
-    public AddressItemEnterView(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-
-    }
-
-    public AddressItemEnterView(Context context, AttributeSet attrs, int defStyleAttr) {
-        super(context, attrs, defStyleAttr);
-        init(context, attrs, defStyleAttr);
-
-    }
-    private void init(Context context, AttributeSet attrs, int defStyleAttr) {
-        if (context instanceof BaseView) {
-            this.view = (BView) context;
-        }
-        binding= DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_enteritem, this,true);
-
-
-
-    }
-
-
-
-
-
-    public TextView getTvCity(){
-        return binding.tvCity;
-    }
-    public TextView getTvChoseTime(){
-        return binding.tvChoseTime;
-    }
-    public LinearLayout getLlChoseAddress(){
-        return binding.llChoseAddress;
-    }
-    public LinearLayout getLlChoseMap(){
-        return binding.llChoseMap;
-    }
-    public EditText getEtName(){
-        return binding.etName;
-    }
-
-    public EditText getEtPhone(){
-        return binding.etPhone;
-    }
-    public EditText getEtDetailedAddress(){
-        return binding.etDetailedAddress;
-    }
-
-
-
-}

+ 66 - 0
app/src/main/java/com/quansu/heifengwuliu/widget/AddressItemEnterView.kt

@@ -0,0 +1,66 @@
+package com.quansu.heifengwuliu.widget
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.EditText
+import android.widget.LinearLayout
+import android.widget.TextView
+import androidx.databinding.DataBindingUtil
+import com.quansu.heifengwuliu.R
+import com.quansu.heifengwuliu.databinding.WidgetEnteritemBinding
+import com.ysnows.base.view.BView
+import com.ysnows.base.view.BaseView
+
+/**
+ * 一装多卸
+ *Created by shihuiyun
+ *on 2020/9/15
+ */
+class AddressItemEnterView(context: Context, attrs: AttributeSet) :BaseLinearLayout(context,attrs){
+    private var view: BView? = null
+
+    private var binding: WidgetEnteritemBinding? = null
+
+    init {
+        init(context)
+
+    }
+
+    private fun init(context: Context) {
+        if (context is BaseView) {
+            view = context as BView
+        }
+        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_enteritem, this, true)
+
+    }
+    fun getTvCity(): TextView? {
+        return binding!!.tvCity
+    }
+
+    fun getTvChoseTime(): TextView? {
+        return binding!!.tvChoseTime
+    }
+
+    fun getLlChoseAddress(): LinearLayout? {
+        return binding!!.llChoseAddress
+    }
+
+    fun getLlChoseMap(): LinearLayout? {
+        return binding!!.llChoseMap
+    }
+
+    fun getEtName(): EditText? {
+        return binding!!.etName
+    }
+
+    fun getEtPhone(): EditText? {
+        return binding!!.etPhone
+    }
+
+    fun getEtDetailedAddress(): EditText? {
+        return binding!!.etDetailedAddress
+    }
+
+
+}

+ 0 - 90
app/src/main/java/com/quansu/heifengwuliu/widget/AddressItemView.java

@@ -1,90 +0,0 @@
-package com.quansu.heifengwuliu.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import androidx.databinding.DataBindingUtil;
-
-import com.quansu.heifengwuliu.R;
-import com.quansu.heifengwuliu.activity.AddressActivity;
-import com.quansu.heifengwuliu.activity.OneLoginActivity;
-import com.quansu.heifengwuliu.config.MIntentAction;
-import com.quansu.heifengwuliu.databinding.WidgetAddressitemBinding;
-import com.quansu.heifengwuliu.fragment.OwnerSingleFragment;
-import com.quansu.heifengwuliu.model.AddressBean;
-import com.ysnows.base.utils.B;
-import com.ysnows.base.utils.UiSwitch;
-import com.ysnows.base.view.BView;
-import com.ysnows.base.view.BaseView;
-
-/**
- * Created by shihuiyun
- * on 2020/9/11
- */
-public class AddressItemView extends BaseLinearLayout {
-    private BView view;
-
-
-    private WidgetAddressitemBinding binding;
-
-
-
-    public AddressItemView(Context context) {
-        super(context);
-    }
-
-    public AddressItemView(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-
-    }
-
-    public AddressItemView(Context context, AttributeSet attrs, int defStyleAttr) {
-        super(context, attrs, defStyleAttr);
-        init(context, attrs, defStyleAttr);
-
-    }
-    private void init(Context context, AttributeSet attrs, int defStyleAttr) {
-        if (context instanceof BaseView) {
-            this.view = (BView) context;
-        }
-        binding= DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_addressitem, this,true);
-
-
-
-    }
-
-
-
-
-
-    public TextView getTvCity(){
-        return binding.tvCity;
-    }
-    public TextView getTvChoseTime(){
-        return binding.tvChoseTime;
-    }
-    public LinearLayout getLlChoseAddress(){
-        return binding.llChoseAddress;
-    }
-    public LinearLayout getLlChoseMap(){
-        return binding.llChoseMap;
-    }
-    public EditText getEtName(){
-        return binding.etName;
-    }
-
-    public EditText getEtPhone(){
-        return binding.etPhone;
-    }
-    public EditText getEtDetailedAddress(){
-        return binding.etDetailedAddress;
-    }
-
-
-
-}

+ 65 - 0
app/src/main/java/com/quansu/heifengwuliu/widget/EnterInfoView.kt

@@ -0,0 +1,65 @@
+package com.quansu.heifengwuliu.widget
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.EditText
+import android.widget.LinearLayout
+import android.widget.TextView
+import androidx.databinding.DataBindingUtil
+import com.quansu.heifengwuliu.R
+import com.quansu.heifengwuliu.databinding.WidgetAddressitemBinding
+import com.ysnows.base.view.BView
+import com.ysnows.base.view.BaseView
+
+/**
+ * 一装一卸
+ *Created by shihuiyun
+ *on 2020/9/15
+ */
+class EnterInfoView (context: Context, attrs: AttributeSet) :BaseLinearLayout(context,attrs){
+    private var view: BView? = null
+
+    private var binding: WidgetAddressitemBinding? = null
+
+    init {
+        init(context)
+
+    }
+
+    private fun init(context: Context) {
+        if (context is BaseView) {
+            view = context as BView
+        }
+        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_addressitem, this, true)
+    }
+
+    fun getTvCity(): TextView? {
+        return binding!!.tvCity
+    }
+
+    fun getTvChoseTime(): TextView? {
+        return binding!!.tvChoseTime
+    }
+
+    fun getLlChoseAddress(): LinearLayout? {
+        return binding!!.llChoseAddress
+    }
+
+    fun getLlChoseMap(): LinearLayout? {
+        return binding!!.llChoseMap
+    }
+
+    fun getEtName(): EditText? {
+        return binding!!.etName
+    }
+
+    fun getEtPhone(): EditText? {
+        return binding!!.etPhone
+    }
+
+    fun getEtDetailedAddress(): EditText? {
+        return binding!!.etDetailedAddress
+    }
+
+}

+ 161 - 0
app/src/main/java/com/quansu/heifengwuliu/widget/ShipmentHeadView.kt

@@ -0,0 +1,161 @@
+package com.quansu.heifengwuliu.widget
+
+import android.content.Context
+import android.graphics.Color
+import android.graphics.Typeface
+import android.util.AttributeSet
+import android.view.LayoutInflater
+import android.widget.EditText
+import android.widget.ImageView
+import android.widget.LinearLayout
+import android.widget.TextView
+import androidx.databinding.DataBindingUtil
+import androidx.fragment.app.Fragment
+import androidx.fragment.app.FragmentManager
+import com.qmuiteam.qmui.util.QMUIDisplayHelper
+import com.qmuiteam.qmui.widget.QMUIViewPager
+import com.qmuiteam.qmui.widget.tab.QMUITab
+import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
+import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import com.quansu.heifengwuliu.R
+import com.quansu.heifengwuliu.adapter.BaseFragmentPagerAdapter
+import com.quansu.heifengwuliu.databinding.WidgetShipmentheadBinding
+import com.quansu.heifengwuliu.fragment.OwnerImgFragment
+import com.quansu.heifengwuliu.model.DataInfoBean
+import com.ysnows.base.utils.B
+import com.ysnows.base.view.BView
+import com.ysnows.base.view.BaseView
+
+/**
+ * 发货 --头部
+ *Created by shihuiyun
+ *on 2020/9/15
+ */
+class ShipmentHeadView(context: Context, attrs: AttributeSet) :BaseLinearLayout(context,attrs) {
+
+    private var binding: WidgetShipmentheadBinding? = null
+    private var view: BView? = null
+    var cats = ArrayList<String>()
+
+
+    init {
+        init(context)
+
+    }
+
+    private fun init(context: Context) {
+        if (context is BaseView) {
+            view = context as BView
+        }
+        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_shipmenthead, this, true)
+
+
+    }
+
+    fun getCats(): MutableList<String> {
+
+        return cats.toMutableList()
+    }
+
+    fun  setHeadData(info: DataInfoBean, fm: FragmentManager){
+
+        if (null != info.car_type) {
+            for (item in info.car_type) {
+                cats.add(item.type_name)
+            }
+        }
+        //设置viewpager
+        val fragments = ArrayList<Fragment>()
+        var index = 0
+        for (cat in cats) {
+            var ownerImgFragment = OwnerImgFragment()
+            ownerImgFragment.arguments = B().putString("img", info.car_type[index].type_img).ok()
+            fragments.add(ownerImgFragment)
+            index++
+        }
+        val adapter = BaseFragmentPagerAdapter(fm, fragments)//childFragmentManager
+        binding!!.qmViewPager.adapter = adapter
+
+        //设置tab
+        binding!!.tabs.setIndicator(QMUITabIndicator(QMUIDisplayHelper.dp2px(context, 2), false, true))
+        val space: Int = QMUIDisplayHelper.dp2px(context, 20)
+        binding!!.tabs.setPadding(space, 0, space, 0)
+        binding!!.tabs.mode = QMUITabSegment.MODE_SCROLLABLE
+//        val space: Int = QMUIDisplayHelper.dp2px(context, 16)
+//        binding.tabs.mode = QMUITabSegment.MODE_SCROLLABLE //MODE_SCROLLABLE 自适应宽度+滚动   MODE_FIXED  均分
+//        binding.tabs.setItemSpaceInScrollMode(space)
+//        binding.tabs.setupWithViewPager(binding.qmViewPager, false)
+//        binding.tabs.setPadding(space, 0, space, 0)
+//
+
+        val builder = binding!!.tabs.tabBuilder()
+        builder
+                .skinChangeWithTintColor(false)
+                .setSelectColor(Color.parseColor("#2E4E71"))
+                .setNormalColor(Color.parseColor("#666666"))
+                .setTypeface(Typeface.DEFAULT_BOLD, Typeface.DEFAULT)
+                .setDynamicChangeIconColor(false)
+
+        val tabs = ArrayList<QMUITab>()
+        for (cat in cats) {
+            val item = builder
+                    .setText(cat)
+                    .build(context)
+
+            tabs.add(item)
+        }
+        tabs.forEach {
+            binding!!.tabs.addTab(it)
+        }
+        binding!!.tabs.setupWithViewPager(binding!!.qmViewPager, false)
+
+    }
+
+
+    fun getTvCity(): TextView? {
+        return binding!!.tvCity
+    }
+
+    fun getTvChoseTime(): TextView? {
+        return binding!!.tvChoseTime
+    }
+
+    fun getLlChoseAddress(): LinearLayout? {
+        return binding!!.llChoseAddress
+    }
+
+    fun getLlChoseMap(): LinearLayout? {
+        return binding!!.llChoseMap
+    }
+
+    fun getEtName(): EditText? {
+        return binding!!.etName
+    }
+
+    fun getEtPhone(): EditText? {
+        return binding!!.etPhone
+    }
+
+    fun getEtDetailedAddress(): EditText? {
+        return binding!!.etDetailedAddress
+    }
+
+    fun getTabs(): QMUITabSegment?{
+        return binding!!.tabs
+    }
+
+    fun getImgNext(): ImageView?{
+        return binding!!.imgNext
+    }
+    fun getImgUp(): ImageView?{
+        return binding!!.imgUp
+    }
+    fun getImgDown(): ImageView?{
+        return binding!!.imgDown
+    }
+    fun getQmViewPager(): QMUIViewPager?{
+        return binding!!.qmViewPager
+    }
+
+
+}

二进制
app/src/main/res/drawable-xxhdpi/ic_arrow.png


+ 10 - 0
app/src/main/res/drawable/edit_num_bg_red.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:state_pressed="false">
+        <shape>
+            <corners android:radius="3dp"/>
+            <solid android:color="#ffffff"/>
+            <stroke android:color="@color/colorAccent" android:width="0.3dp"/>
+        </shape>
+    </item>
+</selector>

+ 339 - 0
app/src/main/res/layout/activity_sourcedetails.xml

@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout 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">
+
+    <data>
+        <import type="android.view.View" />
+        <variable
+            name="vm"
+            type="com.quansu.heifengwuliu.vmodel.SourceDetailsVModel" />
+
+    </data>
+
+    <LinearLayout
+        android:id="@+id/ll"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/color_page_bg"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"
+            android:orientation="vertical">
+
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:orientation="vertical"
+                android:padding="@dimen/dp_10"
+                app:qmui_backgroundColor="@color/white"
+                app:qmui_radius="@dimen/dp_10">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/dp_10"
+                        android:layout_weight="1"
+                        android:gravity="center"
+                        android:text="@{vm.info.order.send[0].province.name+vm.info.order.send[0].city.name+vm.info.order.send[0].area.name}"
+                        android:textColor="#4D9EEB"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="山东 临沂"></TextView>
+
+                    <ImageView
+                        android:layout_width="40dp"
+                        android:layout_height="20dp"
+                        android:src="@drawable/ic_arrow"></ImageView>
+
+                    <TextView
+                        android:id="@+id/tv_city_in"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="@dimen/dp_10"
+                        android:layout_weight="1"
+                        android:gravity="center"
+                        android:text="@{vm.info.order.receive[0].province.name+vm.info.order.receive[0].city.name+vm.info.order.receive[0].area.name}"
+                        android:textColor="#BC5B55"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="河北 唐山"></TextView>
+
+
+                </LinearLayout>
+
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/recycler_view_out"
+                    android:layout_width="match_parent"
+                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+                    tools:listitem="@layout/item_peopleinfo"
+                    android:layout_height="wrap_content">
+                </androidx.recyclerview.widget.RecyclerView>
+
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/recycler_view_in"
+                    android:layout_width="match_parent"
+                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+                    tools:listitem="@layout/item_enterinfo"
+                    android:layout_height="wrap_content">
+                </androidx.recyclerview.widget.RecyclerView>
+
+
+
+
+
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:orientation="vertical"
+                android:padding="@dimen/dp_10"
+                app:layout_goneMarginTop="@dimen/dp_10"
+                app:qmui_backgroundColor="@color/white"
+                app:qmui_radius="@dimen/dp_10">
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="@dimen/dp_80"
+                        android:layout_height="wrap_content"
+                        android:textColor="@color/text_title1"
+                        android:textSize="@dimen/sp_15"
+                        android:text="运单号:"></TextView>
+
+                    <TextView
+
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:text="@{vm.info.order.info_sn}"
+                        android:textColor="@color/text_title"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="电话:1835399999"></TextView>
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="@dimen/dp_80"
+
+                        android:layout_height="wrap_content"
+                        android:textColor="@color/text_title1"
+                        android:textSize="@dimen/sp_15"
+                        android:text="货物信息:"></TextView>
+
+                    <TextView
+
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:text="@{vm.info.order.receive[0].goods+@string/spot+vm.info.order.receive[0].nums+vm.info.order.receive[0].nums_type.name}"
+                        android:textColor="@color/text_title"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="电话:1835399999"></TextView>
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="@dimen/dp_80"
+
+                        android:layout_height="wrap_content"
+                        android:textColor="@color/text_title1"
+                        android:textSize="@dimen/sp_15"
+                        android:text="车型车长:"></TextView>
+
+                    <TextView
+
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:textColor="@color/text_title"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="电话:1835399999"></TextView>
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="@dimen/dp_80"
+
+                        android:layout_height="wrap_content"
+                        android:textColor="@color/text_title1"
+                        android:textSize="@dimen/sp_15"
+                        android:text="备注:"></TextView>
+
+                    <TextView
+
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:text="@{vm.info.order.data}"
+                        android:textColor="@color/text_title"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="电话:1835399999"></TextView>
+
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:layout_marginBottom="@dimen/dp_5"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="@dimen/dp_80"
+                        android:layout_height="wrap_content"
+                        android:textColor="@color/text_title1"
+                        android:textSize="@dimen/sp_15"
+                        android:text="纸质回单:"></TextView>
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:textColor="@color/text_title"
+                        android:textSize="@dimen/sp_15"
+                        tools:text="电话:1835399999"></TextView>
+
+
+                </LinearLayout>
+
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:orientation="vertical"
+                android:padding="@dimen/dp_10"
+                app:layout_goneMarginTop="@dimen/dp_10"
+                app:qmui_backgroundColor="@color/white"
+                app:qmui_radius="@dimen/dp_10">
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="@dimen/dp_80"
+                        android:layout_height="wrap_content"
+                        android:textColor="@color/text_title1"
+                        android:textSize="@dimen/sp_15"
+                        android:text="总运费:"></TextView>
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:gravity="right"
+                        android:textColor="@color/text_title"
+                        android:textSize="@dimen/sp_15"
+                        android:text="@{@string/total_img+vm.info.order.total}"
+                        tools:text="¥30000"></TextView>
+
+
+                </LinearLayout>
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/dp_10"
+            android:orientation="horizontal">
+
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                android:id="@+id/but_cancel"
+                android:layout_width="120dp"
+                android:layout_height="@dimen/dp_40"
+                android:layout_marginStart="@dimen/dp_10"
+                android:onClick="@{v->vm.setCancelOrder(vm.info.order.info_id)}"
+                android:text="取消发布"
+                android:visibility="@{vm.info.order.info_state==10||vm.info.order.info_state==20? View.VISIBLE :View.GONE}"
+                android:textColor="@color/text_title"
+                app:qmui_borderColor="@color/color_line"
+                app:qmui_radius="@dimen/dp_4">
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton>
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                android:layout_width="120dp"
+                android:layout_height="@dimen/dp_40"
+                android:layout_marginStart="@dimen/dp_15"
+                android:text="再来一单"
+                android:onClick="@{v->vm.anotherOne()}"
+                android:textColor="@color/text_title"
+                app:qmui_borderColor="@color/color_line"
+                app:qmui_radius="@dimen/dp_4">
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton>
+
+
+        </LinearLayout>
+
+
+    </LinearLayout>
+</layout>

+ 4 - 64
app/src/main/res/layout/fragment_ownermore.xml

@@ -22,71 +22,11 @@
             android:layout_height="match_parent"
             android:orientation="vertical">
 
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="center_vertical"
-                android:orientation="horizontal">
-
-                <com.qmuiteam.qmui.widget.tab.QMUITabSegment
-                    android:id="@+id/tabs"
-                    android:layout_width="0dp"
-                    android:layout_height="@dimen/title_bar_height"
-                    android:layout_weight="1"
-                    android:background="@color/white"
-                    android:textSize="12sp" />
-
-                <ImageView
-                    android:id="@+id/img_next"
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:src="@drawable/mine_right" />
-            </LinearLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="8dp"
-                android:background="@color/color_page" />
-
-
-            <LinearLayout
+            <com.quansu.heifengwuliu.widget.ShipmentHeadView
+                android:id="@+id/view_head"
                 android:layout_width="match_parent"
-                android:layout_height="100dp"
-                android:layout_marginTop="10dp"
-                android:gravity="center_vertical"
-                android:orientation="horizontal">
-
-                <ImageView
-                    android:id="@+id/img_up"
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:layout_marginStart="12dp"
-                    android:layout_marginEnd="10dp"
-                    android:src="@drawable/img_left" />
-
-                <com.qmuiteam.qmui.widget.QMUIViewPager
-                    android:id="@+id/qm_view_pager"
-                    android:layout_width="0dp"
-                    android:layout_height="100dp"
-                    android:layout_weight="1" />
-
-                <ImageView
-                    android:id="@+id/img_down"
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:layout_marginStart="10dp"
-                    android:layout_marginEnd="12dp"
-                    android:src="@drawable/img_right" />
-
-            </LinearLayout>
-
-
-            <com.quansu.heifengwuliu.widget.AddressItemView
-                android:id="@+id/view_out"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"></com.quansu.heifengwuliu.widget.AddressItemView>
-
+                android:layout_height="wrap_content">
+            </com.quansu.heifengwuliu.widget.ShipmentHeadView>
 
             <TextView
                 android:layout_width="wrap_content"

+ 8 - 68
app/src/main/res/layout/fragment_ownersingle.xml

@@ -22,71 +22,11 @@
                 android:layout_height="match_parent"
                 android:orientation="vertical">
 
-
-                <LinearLayout
+                <com.quansu.heifengwuliu.widget.ShipmentHeadView
+                    android:id="@+id/view_head"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
-                    <com.qmuiteam.qmui.widget.tab.QMUITabSegment
-                        android:id="@+id/tabs"
-                        android:layout_width="0dp"
-                        android:layout_height="@dimen/title_bar_height"
-                        android:layout_weight="1"
-                        android:background="@color/white"
-                        android:textSize="12sp" />
-
-                    <ImageView
-                        android:id="@+id/img_next"
-                        android:layout_width="20dp"
-                        android:layout_height="20dp"
-                        android:src="@drawable/mine_right" />
-                </LinearLayout>
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="8dp"
-                    android:background="@color/color_page" />
-
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="100dp"
-                    android:layout_marginTop="10dp"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
-                    <ImageView
-                        android:id="@+id/img_up"
-                        android:layout_width="20dp"
-                        android:layout_height="20dp"
-                        android:layout_marginStart="12dp"
-                        android:layout_marginEnd="10dp"
-                        android:src="@drawable/img_left" />
-
-                    <com.qmuiteam.qmui.widget.QMUIViewPager
-                        android:id="@+id/qm_view_pager"
-                        android:layout_width="0dp"
-                        android:layout_height="100dp"
-                        android:layout_weight="1" />
-
-                    <ImageView
-                        android:id="@+id/img_down"
-                        android:layout_width="20dp"
-                        android:layout_height="20dp"
-                        android:layout_marginStart="10dp"
-                        android:layout_marginEnd="12dp"
-                        android:src="@drawable/img_right" />
-
-                </LinearLayout>
-
-
-                <com.quansu.heifengwuliu.widget.AddressItemView
-                    android:id="@+id/view_out"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"></com.quansu.heifengwuliu.widget.AddressItemView>
-
+                    android:layout_height="wrap_content">
+                </com.quansu.heifengwuliu.widget.ShipmentHeadView>
 
                 <TextView
                     android:layout_width="wrap_content"
@@ -98,12 +38,11 @@
                     android:textSize="@dimen/sp_16"></TextView>
 
 
-
-                <com.quansu.heifengwuliu.widget.AddressItemView
+                <com.quansu.heifengwuliu.widget.EnterInfoView
                     android:id="@+id/view_enter"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content">
-                </com.quansu.heifengwuliu.widget.AddressItemView>
+                </com.quansu.heifengwuliu.widget.EnterInfoView>
 
 
                 <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
@@ -137,6 +76,7 @@
                         </TextView>
 
                         <EditText
+                            android:id="@+id/et_goods_name"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
                             android:layout_marginStart="@dimen/dp_10"
@@ -341,10 +281,10 @@
                             android:text="是否购买保险"
                             android:textColor="#101010"
                             android:textSize="@dimen/sp_16">
-
                         </TextView>
 
                         <TextView
+                            android:id="@+id/tv_is_insurance"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
                             android:layout_marginStart="@dimen/dp_10"

+ 83 - 0
app/src/main/res/layout/item_apy.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="wrap_content">
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:padding="@dimen/dp_10"
+        android:orientation="vertical"
+        android:gravity="center"
+        android:layout_height="wrap_content">
+
+
+        <TextView
+            android:id="@+id/tv_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerHorizontal="true"
+            android:textColor="#333333"
+            android:text="输入支付密码"/>
+        <com.quansu.heifengwuliu.view.PayPwdEditText
+            android:id="@+id/ppet"
+            android:layout_below="@+id/tv_title"
+            android:layout_width="match_parent"
+            android:layout_marginTop="30dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_height="45dp"/>
+
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:layout_height="0dp"></View>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_marginBottom="@dimen/dp_10"
+            android:orientation="horizontal"
+            android:paddingStart="@dimen/dp_20"
+            android:paddingEnd="@dimen/dp_20"
+            android:layout_height="wrap_content">
+
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                android:id="@+id/but_cancel"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:layout_marginEnd="@dimen/dp_20"
+                app:qmui_radius="@dimen/dp_4"
+                android:text="取消"
+                app:qmui_borderColor="@color/blue_1"
+                android:textColor="@color/blue_1"
+                android:layout_height="40dp">
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton>
+
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                android:id="@+id/tv_sure"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:text="确定"
+                android:textColor="@color/white"
+                app:qmui_radius="@dimen/dp_4"
+                app:qmui_backgroundColor="@color/blue_1"
+                app:qmui_borderColor="@color/blue_1"
+                android:layout_height="40dp">
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton>
+
+
+
+        </LinearLayout>
+
+
+    </LinearLayout>
+
+
+
+
+</LinearLayout>

+ 145 - 0
app/src/main/res/layout/item_enterinfo.xml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <data >
+
+        <variable
+            name="timeOn"
+            type="String" />
+        <variable
+            name="item"
+            type="com.quansu.heifengwuliu.model.DataInfoBean.OrderBean.ReceiveBean" />
+
+    </data >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            android:layout_marginTop="@dimen/dp_10"
+            android:gravity="center_vertical"
+            android:layout_height="wrap_content">
+
+            <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:src="@drawable/ic_math"
+                android:layout_marginEnd="@dimen/dp_10"
+                app:qmui_is_circle="true" />
+
+
+            <TextView
+                android:layout_width="match_parent"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="@{item.province.name+item.city.name+item.area.name}"
+                android:layout_height="wrap_content">
+            </TextView>
+
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            android:gravity="center_vertical"
+            android:paddingStart="35dp"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="联系人:"
+                android:layout_height="wrap_content">
+            </TextView>
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="@{item.name}"
+                android:layout_height="wrap_content">
+            </TextView>
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:gravity="right"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="电话:"
+                android:layout_height="wrap_content">
+            </TextView>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                 android:text="@{item.mobile}"
+                android:layout_height="wrap_content">
+            </TextView>
+
+
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_marginBottom="@dimen/dp_5"
+            android:gravity="center_vertical"
+            android:orientation="horizontal">
+
+            <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:src="@drawable/ic_math"
+                app:qmui_is_circle="true" />
+
+
+            <TextView
+
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/text_title"
+                android:textSize="@dimen/sp_15"
+                android:text="@{timeOn}"
+                tools:text="08-03 17:05"></TextView>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:text="至"
+                android:textColor="@color/text_title"
+                android:textSize="@dimen/sp_15"></TextView>
+
+
+            <TextView
+
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@{item.time}"
+                android:textColor="@color/text_title"
+                android:textSize="@dimen/sp_15"
+                tools:text="08-03 17:05"></TextView>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+</layout >
+
+
+

+ 100 - 0
app/src/main/res/layout/item_peopleinfo.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <data >
+
+
+
+        <variable
+            name="item"
+            type="com.quansu.heifengwuliu.model.DataInfoBean.OrderBean.SendBean" />
+
+
+
+    </data >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            android:layout_marginTop="@dimen/dp_10"
+            android:gravity="center_vertical"
+            android:layout_height="wrap_content">
+
+            <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                android:layout_width="25dp"
+                android:layout_height="25dp"
+                android:src="@drawable/ic_math"
+                android:layout_marginEnd="@dimen/dp_10"
+                app:qmui_is_circle="true" />
+
+
+            <TextView
+                android:layout_width="match_parent"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="@{item.province.name+item.city.name+item.area.name}"
+                tools:text="山东省临沂市 河东区 香港路999号"
+                android:layout_height="wrap_content">
+            </TextView>
+
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:orientation="horizontal"
+            android:gravity="center_vertical"
+            android:paddingStart="35dp"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="联系人:"
+                android:layout_height="wrap_content">
+            </TextView>
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="@{item.name}"
+                android:layout_height="wrap_content">
+            </TextView>
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:gravity="right"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="电话:"
+                android:layout_height="wrap_content">
+            </TextView>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:textSize="@dimen/sp_15"
+                android:textColor="@color/text_title"
+                android:text="@{item.mobile}"
+                android:layout_height="wrap_content">
+            </TextView>
+
+        </LinearLayout>
+
+
+
+    </LinearLayout>
+
+
+</layout >
+
+
+

+ 272 - 0
app/src/main/res/layout/widget_shipmenthead.xml

@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <data >
+
+    </data >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:focusable="true"
+        android:focusableInTouchMode="true"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:orientation="horizontal">
+
+            <com.qmuiteam.qmui.widget.tab.QMUITabSegment
+                android:id="@+id/tabs"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/title_bar_height"
+                android:layout_weight="1"
+                android:background="@color/white"
+                android:textSize="12sp" />
+
+            <ImageView
+                android:id="@+id/img_next"
+                android:layout_width="20dp"
+                android:layout_height="20dp"
+                android:src="@drawable/mine_right" />
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="8dp"
+            android:background="@color/color_page" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="100dp"
+            android:layout_marginTop="10dp"
+            android:gravity="center_vertical"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:id="@+id/img_up"
+                android:layout_width="20dp"
+                android:layout_height="20dp"
+                android:layout_marginStart="12dp"
+                android:layout_marginEnd="10dp"
+                android:src="@drawable/img_left" />
+
+            <com.qmuiteam.qmui.widget.QMUIViewPager
+                android:id="@+id/qm_view_pager"
+                android:layout_width="0dp"
+                android:layout_height="100dp"
+                android:layout_weight="1" />
+
+            <ImageView
+                android:id="@+id/img_down"
+                android:layout_width="20dp"
+                android:layout_height="20dp"
+                android:layout_marginStart="10dp"
+                android:layout_marginEnd="12dp"
+                android:src="@drawable/img_right" />
+
+        </LinearLayout>
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/dp_12"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_marginEnd="@dimen/dp_12"
+            android:orientation="vertical"
+            android:paddingStart="@dimen/dp_10"
+            android:paddingTop="@dimen/dp_10"
+            android:paddingEnd="@dimen/dp_12"
+            android:paddingBottom="@dimen/dp_10"
+            app:qmui_borderColor="#BFBFBF"
+            app:qmui_borderWidth="@dimen/dp_1"
+            app:qmui_radius="@dimen/dp_2">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+
+                <com.qmuiteam.qmui.widget.QMUIRadiusImageView
+                    android:id="@+id/img"
+                    android:layout_width="25dp"
+                    android:layout_height="25dp"
+                    android:src="@drawable/ic_math"
+                    app:qmui_is_circle="true" />
+
+
+                <TextView
+                    android:id="@+id/tv_city"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_weight="1"
+                    android:hint="请选择省市区"
+                    android:textColor="#101010"
+                    android:textSize="@dimen/sp_16"></TextView>
+
+                <LinearLayout
+                    android:id="@+id/ll_chose_address"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_vertical">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/dp_10"
+                        android:layout_marginEnd="@dimen/dp_10"
+                        android:text="地址薄"
+                        android:textColor="#5E5C5C"
+                        android:textSize="@dimen/sp_15"></TextView>
+
+                    <ImageView
+                        style="@style/mine_arrow_right"
+                        android:src="@drawable/mine_right" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+
+                <EditText
+                    android:id="@+id/et_detailed_address"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="35dp"
+                    android:layout_weight="1"
+                    android:background="@null"
+                    android:hint="请输入详细地址"
+                    android:textColor="#101010"
+                    android:textColorHint="#BBBBBB"
+                    android:textSize="@dimen/sp_15"></EditText>
+
+                <LinearLayout
+                    android:id="@+id/ll_chose_map"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center_vertical">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_marginStart="@dimen/dp_10"
+                        android:layout_marginEnd="@dimen/dp_10"
+                        android:text="地图选点"
+                        android:textColor="#5E5C5C"
+                        android:textSize="@dimen/sp_15"></TextView>
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:src="@drawable/map_address" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+            <TextView
+                android:id="@+id/tv_chose_time"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="35dp"
+                android:layout_marginTop="@dimen/dp_10"
+                android:hint="点击选择装货时间"
+                android:textColor="#5E5C5C"
+                android:textSize="@dimen/sp_15"></TextView>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_marginBottom="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+
+                <ImageView
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginStart="35dp"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:src="@drawable/ic_math" />
+
+                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="35dp"
+                    android:layout_weight="1"
+                    android:padding="@dimen/dp_2"
+                    app:qmui_borderColor="#BFBFBF"
+                    app:qmui_borderWidth="@dimen/dp_1"
+                    app:qmui_radius="@dimen/dp_2">
+
+                    <EditText
+                        android:id="@+id/et_name"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:background="@null"
+                        android:hint="姓名"
+                        android:textColor="#101010"
+                        android:textColorHint="#BBBBBB"
+                        android:textSize="@dimen/sp_15">
+
+                    </EditText>
+
+                </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+                <ImageView
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginStart="@dimen/dp_15"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:src="@drawable/ic_math" />
+
+                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="35dp"
+                    android:layout_weight="1"
+                    android:padding="@dimen/dp_2"
+                    app:qmui_borderColor="#BFBFBF"
+                    app:qmui_borderWidth="@dimen/dp_1"
+                    app:qmui_radius="@dimen/dp_2">
+
+                    <EditText
+                        android:id="@+id/et_phone"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:background="@null"
+                        android:hint="电话"
+                        android:textColor="#101010"
+                        android:textColorHint="#BBBBBB"
+                        android:textSize="@dimen/sp_15">
+
+                    </EditText>
+
+                </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+            </LinearLayout>
+
+
+        </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
+
+
+    </LinearLayout>
+
+
+</layout >
+
+
+

+ 4 - 0
app/src/main/res/values/strings.xml

@@ -446,6 +446,10 @@ Api 已达到使用限制
     <string name="filter" >筛选</string >
 
     <string name="chose_city" >选择省份</string >
+    <string name="total_img" >¥</string >
+    <string name="spot" >.</string >
+
+
 
 
 </resources >

+ 5 - 2
base/build.gradle

@@ -43,8 +43,11 @@ dependencies {
     api fileTree(include: ['*.jar'], dir: 'libs')
     implementation 'com.billy.android:cc:2.1.5'
 
-    debugImplementation 'com.github.ChuckerTeam.Chucker:library:3.2.0'
-    releaseImplementation 'com.github.ChuckerTeam.Chucker:library-no-op:3.2.0'
+//    debugImplementation 'com.github.ChuckerTeam.Chucker:library:3.2.0'
+//    releaseImplementation 'com.github.ChuckerTeam.Chucker:library-no-op:3.2.0'
+
+    debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
+    releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
 
 
 }

+ 5 - 3
base/src/main/java/com/ysnows/base/net/NetEngine.java

@@ -1,8 +1,8 @@
 package com.ysnows.base.net;
 
 
-import com.chuckerteam.chucker.api.ChuckerCollector;
-import com.chuckerteam.chucker.api.ChuckerInterceptor;
+
+import com.readystatesoftware.chuck.ChuckInterceptor;
 import com.ysnows.base.base.BApp;
 
 import java.util.WeakHashMap;
@@ -49,7 +49,9 @@ public class NetEngine {
                     .writeTimeout(156760, TimeUnit.MILLISECONDS)
                     .connectTimeout(15676, TimeUnit.MILLISECONDS)
                     .retryOnConnectionFailure(true)
-                    .addInterceptor(new ChuckerInterceptor(BApp.instance().getApplicationContext()))
+//                    .addInterceptor(new ChuckerInterceptor(BApp.instance().getApplicationContext()))
+
+                    .addInterceptor(new ChuckInterceptor( BApp.instance().getApplicationContext()))
 
                     // .addInterceptor(new ChuckInterceptor( BApp.instance()))
                     .cookieJar(new BCookieJar())