Bladeren bron

风险管理7月23日提交代码-liu.bolan-千海金

Liu.bolan 4 jaren geleden
bovenliggende
commit
fa452abfb9
27 gewijzigde bestanden met toevoegingen van 2026 en 17 verwijderingen
  1. 2 0
      RMA/app/src/main/AndroidManifest.xml
  2. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/OrderQuoteDetailData.kt
  3. 39 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/MainActivity.kt
  4. 47 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/CustomHorizontalScrollView.java
  5. 5 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  6. 466 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstcdys/HnstcdysFragment.kt
  7. 18 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstcdys/HnstcdysViewModel.kt
  8. 19 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/adapter/PlatnumTreasureAdapter.java
  9. 6 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/adapter/QhjRightScrollAdapter.java
  10. 99 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessBuyHallViewHolder.kt
  11. 996 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt
  12. 18 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallViewModel.kt
  13. 105 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessSellHallViewHolder.kt
  14. 148 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/WarehouseReceiptFragment.kt
  15. 7 0
      RMA/app/src/main/res/drawable/hall_buy_bg.xml
  16. 7 0
      RMA/app/src/main/res/drawable/hall_sell_bg.xml
  17. 7 0
      RMA/app/src/main/res/drawable/hall_with_bg.xml
  18. 7 0
      RMA/app/src/main/res/drawable/hnxt_cancel_bg.xml
  19. 18 0
      RMA/app/src/main/res/drawable/seekbar_bg.xml
  20. 1 0
      RMA/app/src/main/res/layout/layout_item_platinum_content.xml
  21. 1 0
      RMA/app/src/main/res/layout/layout_qhj_item_scroll.xml
  22. BIN
      RMA/app/src/main/res/mipmap-xhdpi/business_two.png
  23. BIN
      RMA/app/src/main/res/mipmap-xhdpi/bussiness_one.png
  24. BIN
      RMA/app/src/main/res/mipmap-xhdpi/hnxt_seekbar.png
  25. BIN
      RMA/app/src/main/res/mipmap-xhdpi/warehous_recepit_celect.png
  26. BIN
      RMA/app/src/main/res/mipmap-xhdpi/warehous_recepit_normal.png
  27. 6 0
      RMA/app/src/main/res/values/colors.xml

+ 2 - 0
RMA/app/src/main/AndroidManifest.xml

@@ -368,6 +368,8 @@
 
         <activity android:name=".view.base.main.promotioncode.ShowImageByUrlActivity"/>
 
+        <activity android:name=".view.base.warehousereceipt.BusinessHallActivity"/>
+
     </application>
 
 </manifest>

+ 4 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/data/OrderQuoteDetailData.kt

@@ -20,6 +20,8 @@ data class OrderQuoteDetailData(
     val userid : String? = "",//购买方(销售方)用户ID
     @SerializedName("username")
     val username : String? = "",//购买方(销售方)
+    @SerializedName("isClick")
+    var isClick: Int = 0,//是否点击展开
     @SerializedName("wrtradeorderid")
     val wrtradeorderid : String? = ""//仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
 ) : Parcelable{
@@ -30,6 +32,7 @@ data class OrderQuoteDetailData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString()
     ) {
     }
@@ -41,6 +44,7 @@ data class OrderQuoteDetailData(
         parcel.writeString(pricemove)
         parcel.writeString(userid)
         parcel.writeString(username)
+        parcel.writeInt(isClick)
         parcel.writeString(wrtradeorderid)
     }
 

+ 39 - 6
RMA/app/src/main/java/cn/muchinfo/rma/view/MainActivity.kt

@@ -14,6 +14,7 @@ import cn.muchinfo.rma.view.base.app.Constant
 
 import cn.muchinfo.rma.view.base.exposure.ExposureFragment
 import cn.muchinfo.rma.view.base.future.FutureFragment
+import cn.muchinfo.rma.view.base.hnstcdys.HnstcdysFragment
 import cn.muchinfo.rma.view.base.home.HomeFragment
 import cn.muchinfo.rma.view.base.home.NewHomeFragment
 import cn.muchinfo.rma.view.base.main.SeaKingMainFragment
@@ -86,11 +87,16 @@ class MainActivity : BaseActivity<MainViewModel>() {
         RecyclingFragment()
     }
 
-    /** 仓单贸易 **/
+    /** 华南顺通 仓单贸易 **/
     val warehouseReceiptFragment by lazy {
         WarehouseReceiptFragment()
     }
 
+    /** 华南顺通 仓单预售 ***/
+    val hnstcdysFragment by lazy {
+        HnstcdysFragment()
+    }
+
     /** 状态控制页 **/
     private lateinit var statusLayout: StatusLayout
 
@@ -174,11 +180,38 @@ class MainActivity : BaseActivity<MainViewModel>() {
             newSelectIcon.add(R.mipmap.qhj_main_tab_select)
         }
 
-        //仓单贸易
-        newFragments.add(warehouseReceiptFragment)
-        newTabText.add("仓单贸易")
-        newNormalIcon.add(R.mipmap.qhj_sphg_tab_normal)
-        newSelectIcon.add(R.mipmap.qhj_sphg_tab_select)
+        if(GlobalDataCollection.instance?.getFirstLevelMenu("client_hnstcdmy") == true){
+            //华南顺通 仓单贸易
+            newFragments.add(warehouseReceiptFragment)
+            newTabText.add("仓单贸易")
+            newNormalIcon.add(R.mipmap.warehous_recepit_normal)
+            newSelectIcon.add(R.mipmap.warehous_recepit_celect)
+        }
+
+        if(GlobalDataCollection.instance?.getFirstLevelMenu("client_hnstcdys") == true){
+            //华南顺通 仓单预售
+            newFragments.add(warehouseReceiptFragment)
+            newTabText.add("仓单预售")
+            newNormalIcon.add(R.mipmap.warehous_recepit_normal)
+            newSelectIcon.add(R.mipmap.warehous_recepit_celect)
+        }
+
+        if(GlobalDataCollection.instance?.getFirstLevelMenu("client_hnsthyjy") == true){
+            //华南顺通 仓单预售
+            newFragments.add(warehouseReceiptFragment)
+            newTabText.add("合约交易")
+            newNormalIcon.add(R.mipmap.warehous_recepit_normal)
+            newSelectIcon.add(R.mipmap.warehous_recepit_celect)
+        }
+
+        if(GlobalDataCollection.instance?.getFirstLevelMenu("client_hnstmine") == true){
+            //华南顺通 我的
+            newFragments.add(hnstcdysFragment)
+            newTabText.add("我的")
+            newNormalIcon.add(R.mipmap.warehous_recepit_normal)
+            newSelectIcon.add(R.mipmap.warehous_recepit_celect)
+        }
+
 
     }
 

+ 47 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/CustomHorizontalScrollView.java

@@ -6,6 +6,8 @@ import android.view.MotionEvent;
 import android.view.ViewConfiguration;
 import android.widget.HorizontalScrollView;
 
+import com.blankj.utilcode.util.LogUtils;
+
 /**
  * @author:JianFeng
  * @date:2019/3/26 16:08
@@ -41,6 +43,7 @@ public class CustomHorizontalScrollView extends HorizontalScrollView {
         if (null != listener)
             listener.onCustomScrollChange(CustomHorizontalScrollView.this, l, t, oldl, oldt);
     }
+
     public void setEventListener(EventListener listener) {
         eventListener = listener;
     }
@@ -53,19 +56,29 @@ public class CustomHorizontalScrollView extends HorizontalScrollView {
 
     @Override
     public boolean onInterceptTouchEvent(MotionEvent ev) {
-        if (eventListener!=null){
+        if (eventListener != null) {
             return true;
         }
         return super.onInterceptTouchEvent(ev);
     }
+
     private float startY;
     private float startX;
-    private  int mTouchSlop;
+    private float moveX = 0f;
+    private float moveY = 0f;
+    private int mTouchSlop;
+
+    float start, end;
+    float distance = 0;
+    boolean isclick = true;
+    boolean isFirst = false;
+
     @Override
     public boolean onTouchEvent(MotionEvent ev) {
         int action = ev.getAction();
         switch (action) {
             case MotionEvent.ACTION_DOWN:
+                start = ev.getX();
                 startY = ev.getY();
                 startX = ev.getX();
                 break;
@@ -74,16 +87,45 @@ public class CustomHorizontalScrollView extends HorizontalScrollView {
                 float endX = ev.getX();
                 float distanceX = Math.abs(endX - startX);
                 float distanceY = Math.abs(endY - startY);
-                if(distanceX > mTouchSlop && distanceX > distanceY) {
+                moveX = Math.abs(endX - startX);
+                moveY = Math.abs(endY - startY);
+                if (distanceX > mTouchSlop && distanceX > distanceY) {
                     getParent().requestDisallowInterceptTouchEvent(true);
-                }else {
+                } else {
                     getParent().requestDisallowInterceptTouchEvent(false);
                 }
+
+                end = ev.getX();
+                distance = end - start;
+                LogUtils.eTag("dasdasadasdasda",distance);
+                if (isFirst==false&&Math.abs(distance) > 10) {//如果滑动距离大于指定数,并判断是否第一次(解决滑出指定距离又滑入当作是点击事件bug)
+                    isFirst = true;
+                    isclick = true;
+                }
+                if (Math.abs(distance) == 0.0){
+                    isclick = false;
+                }
+                break;
+            case MotionEvent.ACTION_UP:
+                if (isFirst) {//是滑动状态
+                    isclick = true;
+                } else {//点击状态
+                    isclick = false;
+                }
+                isFirst = false;//滑动状态清空
+//                isclick = true;
                 break;
         }
+
         if (eventListener != null) {
             eventListener.onEvent(ev);
-            return true;
+            return isclick;
+//            if (moveX == 0f) {
+//                return false;
+//            } else {
+//                return true;
+//            }
+
         } else {
             return super.onTouchEvent(ev);
         }

+ 5 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt

@@ -6,12 +6,13 @@ object Constant {
     /**
      * 获取基础url的接口
      */
-    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
+//    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
 //    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
 //        const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"//李倩千海金 18611112222
 //    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩千海金 18611112222
+     const val baseurl = "http://192.168.31.101:8080/cfg?key=test_101"//李倩千海金 18611112222
 
 //      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
 //          const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"// 瑶姐 千海金 13760119855
@@ -24,6 +25,9 @@ object Constant {
 //    const val baseurl = "http://192.168.31.171:8080/cfg?key=test_171" // 邓工 签约解约环境
 //    const val baseurl = "http://192.168.21.71:8280/cfg?key=mtp_20"
 
+//    const val baseurl = "http://192.168.31.118:8080/cfg?key=test_118"//黄老板 华南顺通
+
+
     /**
      * 用sp存储基础url的key
      */

+ 466 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstcdys/HnstcdysFragment.kt

@@ -0,0 +1,466 @@
+package cn.muchinfo.rma.view.base.hnstcdys
+
+import android.os.Bundle
+import android.view.*
+import androidx.fragment.app.Fragment
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import androidx.viewpager.widget.PagerAdapter
+import androidx.viewpager.widget.ViewPager
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseFragment
+import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
+import cn.muchinfo.rma.view.base.warehousereceipt.floata.FloatPriceAdapter
+import cn.muchinfo.rma.view.base.warehousereceipt.one.OnePriceAdapter
+import com.blankj.utilcode.util.ConvertUtils
+import com.blankj.utilcode.util.SizeUtils
+import com.qmuiteam.qmui.util.QMUIDisplayHelper
+import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
+import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import org.jetbrains.anko.*
+import org.jetbrains.anko.support.v4.UI
+import org.jetbrains.anko.support.v4.viewPager
+
+/**
+ * 华南顺通 仓单预售页面
+ */
+class HnstcdysFragment : BaseFragment<HnstcdysViewModel>(){
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    //一口价报价牌
+    private val onePriceUI by lazy { YSOnePriceUI(this,viewModel) }
+
+    //浮动价报价牌
+    private val floatingPriceUI by lazy { YSFloatingPriceUI(this,viewModel) }
+
+    //viewpager的适配器
+    private var newPagerAdapter : PagerAdapter? = null
+
+    //tabSegment标题
+    private val newTabsArray : ArrayList<String> = arrayListOf()
+
+    //暂存的页面组
+    private val uiList : ArrayList<_FrameLayout> = arrayListOf()
+
+    fun initMenuData(){
+
+        newTabsArray.add("一口价")
+        uiList.add(onePriceUI.root)
+
+        newTabsArray.add("浮动价")
+        uiList.add(floatingPriceUI.root)
+
+        newPagerAdapter = object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = newTabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                return uiList.get(position).apply {
+                    container.addView(
+                        this,
+                        ViewGroup.LayoutParams(matchParent, matchParent)
+                    )
+                }
+            }
+
+            override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
+                (`object` as? View)?.let { container.removeView(it) }
+            }
+
+            override fun isViewFromObject(view: View, `object`: Any): Boolean = view == `object`
+
+            override fun getCount(): Int = newTabsArray.size
+
+        }
+
+    }
+
+
+    override fun onCreateView(
+        inflater: LayoutInflater,
+        container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+
+        return UI {
+            verticalLayout {
+                linearLayout {
+                    background = resources.getDrawable(R.color.main_title_bg_color)
+
+                    view {
+
+                    }.lparams(autoSize(200), autoSize(100))
+
+                    tabSegment {
+                        segment = this
+                        background = resources.getDrawable(R.color.segtabment_bg_color)
+                        addOnTabSelectedListener(object :
+                            QMUITabSegment.OnTabSelectedListener {
+                            override fun onDoubleTap(index: Int) {}
+                            override fun onTabReselected(index: Int) {}
+                            override fun onTabUnselected(index: Int) {}
+                            override fun onTabSelected(index: Int) {
+                                selectedTabIndex = index
+                            }
+                        })
+                        setIndicator(
+                            QMUITabIndicator(
+                                QMUIDisplayHelper.dp2px(context, 2),
+                                false,
+                                true
+                            )
+                        )
+                        setDefaultTextSize(ConvertUtils.sp2px(16f), ConvertUtils.sp2px(16f))
+                    }.lparams(matchParent, autoSize(100))
+
+                    view {
+
+                    }.lparams(autoSize(200), autoSize(100))
+                }.lparams(matchParent, autoSize(100))
+
+                view {
+                    background = resources.getDrawable(R.color.main_hit_bg_color)
+                }.lparams(matchParent, autoSize(1)) {
+                    marginStart = autoSize(32)
+                    marginEnd = autoSize(32)
+                }
+                viewPager {
+                    background = resources.getDrawable(R.color.white)
+                    viewPager = this
+                    adapter = newPagerAdapter
+                }.lparams(matchParent, matchParent)
+
+                segment.setupWithViewPager(viewPager)
+                segment.selectTab(1)
+            }
+        }.view
+
+    }
+
+
+}
+
+
+/**
+ * 一口价报价牌
+ * @property fragment Fragment
+ * @property viewModel WarehouseReceiptViewModel
+ * @constructor
+ */
+class YSOnePriceUI(private val fragment : Fragment, private val viewModel: HnstcdysViewModel) : OnePriceAdapter.OnContentScrollListener{
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    lateinit var dataRecyclerview : RecyclerView
+
+    //标题头部
+    val topAdapter by lazy {
+        TopTabAdpater(fragment.context)
+    }
+
+    val onePriceAdapter by lazy {
+        OnePriceAdapter(fragment.context)
+    }
+
+    val root = _FrameLayout(fragment.context!!).apply {
+        verticalLayout {
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//待点价头部左侧数据
+//                            viewModel.titleList.bindOptional(context) {
+//                                text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+//                            }
+                        text = "商品"
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(100f)), autoSize(100))
+                onePriceAdapter.setOnContentScrollListener(this@YSOnePriceUI)
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY -> //代码重复,可以抽取/////
+                        onePriceAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<OnePriceAdapter.ItemViewHolder> =
+                            onePriceAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].horItemScrollview.scrollTo(
+                                    scrollX,
+                                    0
+                                )
+                            }
+                        }
+                    }
+                    relativeLayout {
+                        recyclerView {//待点价头部右侧数据
+                            val linearLayoutManager = LinearLayoutManager(context)
+                            linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL
+                            layoutManager = linearLayoutManager
+                            background = resources.getDrawable(R.color.white)
+                            adapter = topAdapter
+                        }
+//                            viewModel.titleList.bindOptional(context) {
+//                                val titleStringList = arrayListOf<String>()
+//                                it?.subList(1, it.size)?.forEach { data ->
+//                                    titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+//                                }
+//                                topAdapter.setDatas(titleStringList)
+//                            }
+                        topAdapter.setDatas(arrayListOf("卖价","卖量","买价","买量","仓库"))
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+                setRetryAction {
+
+                }
+
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {//待点价列表
+                        dataRecyclerview = this
+                        background = resources.getDrawable(R.color.white)
+                        adapter = onePriceAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<OnePriceAdapter.ItemViewHolder> =
+                                    onePriceAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].horItemScrollview.scrollTo(
+                                            onePriceAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
+                                super.onScrollStateChanged(recyclerView, newState)
+                                // DES: 找出当前可视Item位置
+                                val linearLayoutManager = dataRecyclerview!!.layoutManager as LinearLayoutManager
+                                if (newState == RecyclerView.SCROLL_STATE_IDLE) {// 这个判断是当recyclerview不滚动时
+
+                                }
+                            }
+                        })
+                    }
+
+
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.floatProceDataList.bindOptional(context) {
+//                if (it?.size ?: 0 > 10){
+//                    lastShow = 10
+//                }else{
+//                    lastShow = it?.size ?: 0
+//                }
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+//                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
+                    }
+                    statusLayout.showSuccess()
+                    onePriceAdapter.setDatas(it)
+                }
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+
+}
+
+/**
+ * 浮动价报价牌
+ * @property fragment Fragment
+ * @property viewModel WarehouseReceiptViewModel
+ * @property root _FrameLayout
+ * @constructor
+ */
+class YSFloatingPriceUI(private val fragment : Fragment, private val viewModel: HnstcdysViewModel) : FloatPriceAdapter.OnContentScrollListener{
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    lateinit var dataRecyclerview : RecyclerView
+
+
+    //标题头部
+    val topAdapter by lazy {
+        TopTabAdpater(fragment.context)
+    }
+
+    val floatPriceAdapter by lazy {
+        FloatPriceAdapter(fragment.context)
+    }
+
+    val root = _FrameLayout(fragment.context!!).apply {
+        verticalLayout {
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//待点价头部左侧数据
+//                            viewModel.titleList.bindOptional(context) {
+//                                text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+//                            }
+                        text = "商品"
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(100f)), autoSize(100))
+                floatPriceAdapter.setOnContentScrollListener(this@YSFloatingPriceUI)
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY -> //代码重复,可以抽取/////
+                        floatPriceAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<FloatPriceAdapter.ItemViewHolder> =
+                            floatPriceAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].horItemScrollview.scrollTo(
+                                    scrollX,
+                                    0
+                                )
+                            }
+                        }
+                    }
+                    relativeLayout {
+                        recyclerView {//待点价头部右侧数据
+                            val linearLayoutManager = LinearLayoutManager(context)
+                            linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL
+                            layoutManager = linearLayoutManager
+                            background = resources.getDrawable(R.color.white)
+                            adapter = topAdapter
+                        }
+//                            viewModel.titleList.bindOptional(context) {
+//                                val titleStringList = arrayListOf<String>()
+//                                it?.subList(1, it.size)?.forEach { data ->
+//                                    titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+//                                }
+//                                topAdapter.setDatas(titleStringList)
+//                            }
+                        topAdapter.setDatas(arrayListOf("卖价","卖量","买价","买量","仓库"))
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+                setRetryAction {
+
+                }
+
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {//待点价列表
+                        dataRecyclerview = this
+                        background = resources.getDrawable(R.color.white)
+                        adapter = floatPriceAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<FloatPriceAdapter.ItemViewHolder> =
+                                    floatPriceAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].horItemScrollview.scrollTo(
+                                            floatPriceAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
+                                super.onScrollStateChanged(recyclerView, newState)
+                                // DES: 找出当前可视Item位置
+                                val linearLayoutManager = dataRecyclerview!!.layoutManager as LinearLayoutManager
+                                if (newState == RecyclerView.SCROLL_STATE_IDLE) {// 这个判断是当recyclerview不滚动时
+
+                                }
+                            }
+                        })
+                    }
+
+
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.floatProceDataList.bindOptional(context) {
+//                if (it?.size ?: 0 > 10){
+//                    lastShow = 10
+//                }else{
+//                    lastShow = it?.size ?: 0
+//                }
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+//                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
+                    }
+                    statusLayout.showSuccess()
+                    floatPriceAdapter.setDatas(it)
+                }
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+
+}

+ 18 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstcdys/HnstcdysViewModel.kt

@@ -0,0 +1,18 @@
+package cn.muchinfo.rma.view.base.hnstcdys
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.data.OrderQuoteData
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 华南顺通 仓单预售viewmodel
+ */
+class HnstcdysViewModel : BaseViewModel(){
+
+    //一口价报价牌数据
+    val onePrcieDataList : MutableLiveData<List<OrderQuoteData>> = MutableLiveData()
+
+    //浮动价报价牌数据
+    val floatProceDataList : MutableLiveData<List<OrderQuoteData>> = MutableLiveData()
+
+}

+ 19 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/adapter/PlatnumTreasureAdapter.java

@@ -10,6 +10,7 @@ import android.view.ViewGroup;
 import android.view.ViewTreeObserver;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import androidx.annotation.NonNull;
@@ -308,11 +309,20 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
                 ActivityUtils.startActivity(intent);
             }
         });
+        itemViewHolder.rvItemRight.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                ToastUtils.showLong("ahhahahha");
+            }
+        });
+
 
         itemViewHolder.horItemScrollview.setEventListener(new CustomHorizontalScrollView.EventListener() {
             @Override
-            public void onEvent(MotionEvent event) {
-                if (null != onContentScrollListener) onContentScrollListener.onScroll(event);
+            public void onEvent(MotionEvent ev) {
+
+                if (null != onContentScrollListener) onContentScrollListener.onScroll(ev);
+
             }
         });
         //由于viewHolder的缓存,在1级缓存取出来是2个viewholder,并且不会被重新赋值,所以这里需要处理缓存的viewholder的位移
@@ -327,6 +337,11 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
         });
     }
 
+    float start, end;
+    float distance = 0;
+    boolean isclick = false;
+    boolean isFirst = false;
+
     @Override
     public int getItemCount() {
         return null == datas ? 0 : datas.size();
@@ -348,6 +363,7 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
         TextView platnum_details;//详情
         LinearLayout allView;//隐藏的底部操作空间
         LinearLayout all_click_View;//item左侧点击控件
+        RelativeLayout item_onclick;
         TextView tvLeftTitle;//左边销售方字段
         RecyclerView rvItemRight;//右方的列表
         ImageView click_icon;//图标
@@ -364,6 +380,7 @@ public class PlatnumTreasureAdapter extends RecyclerView.Adapter<PlatnumTreasure
 
         public ItemViewHolder(@NonNull View itemView) {
             super(itemView);
+            item_onclick = itemView.findViewById(R.id.item_onclick);
             click_icon = itemView.findViewById(R.id.click_icon);
             platnum_buy = itemView.findViewById(R.id.platnum_buy);
             platnum_sell = itemView.findViewById(R.id.platnum_sell);

+ 6 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/adapter/QhjRightScrollAdapter.java

@@ -4,11 +4,14 @@ import android.content.Context;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.blankj.utilcode.util.ToastUtils;
+
 import java.util.List;
 
 import cn.muchinfo.rma.R;
@@ -50,6 +53,7 @@ public class QhjRightScrollAdapter extends RecyclerView.Adapter<QhjRightScrollAd
             scrollViewHolder.mTvScrollItem.setTextColor(context.getResources().getColor(R.color.rma_red_color));
         }
         scrollViewHolder.mTvScrollItem.setText(data.getValue());
+
     }
 
     @Override
@@ -58,11 +62,12 @@ public class QhjRightScrollAdapter extends RecyclerView.Adapter<QhjRightScrollAd
     }
 
     class ScrollViewHolder extends RecyclerView.ViewHolder {
-
+        LinearLayout item_click;
         TextView mTvScrollItem;
 
         public ScrollViewHolder(@NonNull View itemView) {
             super(itemView);
+            item_click = itemView.findViewById(R.id.item_click);
             mTvScrollItem = itemView.findViewById(R.id.tv_right_scroll);
 
         }

+ 99 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessBuyHallViewHolder.kt

@@ -0,0 +1,99 @@
+package cn.muchinfo.rma.view.base.warehousereceipt
+
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.OrderQuoteDetailData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 买大厅viewholer
+ * @property activity AppCompatActivity
+ * @property viewModel BusinessHallViewModel
+ * @property itemSize IntArray
+ * @constructor
+ */
+class BusinessBuyHallViewHolder(private val activity : AppCompatActivity, private val viewModel: BusinessHallViewModel) : BaseViewHolder<OrderQuoteDetailData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        data.bindOptional(context){
+                            text = NumberUtils.roundNum(it?.fixedprice,2)
+                        }
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.orderqty
+                        }
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.username
+                        }
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(90),1f)
+            }.lparams(matchParent, autoSize(90))
+
+            // 控制区
+            linearLayout {
+                data.bindOptional(context) {
+                    if (it?.isClick == 0) {
+                        visibility = View.GONE
+                    } else if (it?.isClick == 1) {
+                        visibility = View.VISIBLE
+                    }
+                }
+                gravity = Gravity.CENTER_VERTICAL
+
+                emptyView()
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "摘牌"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(120), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+            }.lparams(matchParent, autoSize(72))
+        }.lparams(matchParent, wrapContent)
+    }
+
+}

+ 996 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt

@@ -0,0 +1,996 @@
+package cn.muchinfo.rma.view.base.warehousereceipt
+
+import android.graphics.Color
+import android.os.Build
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import android.view.ViewGroup
+import android.widget.SeekBar
+import android.widget.TextView
+import androidx.annotation.RequiresApi
+import androidx.appcompat.app.AppCompatActivity
+import androidx.lifecycle.MutableLiveData
+import androidx.viewpager.widget.PagerAdapter
+import androidx.viewpager.widget.ViewPager
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.OrderQuoteData
+import cn.muchinfo.rma.global.data.OrderQuoteDetailData
+import cn.muchinfo.rma.global.data.SpotGoodsPriceData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.autoWidget.view.MangeNumberEditText2
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.app.FutureConstent
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.home.contract.verticalEmptyView
+import cn.muchinfo.rma.view.base.home.spotmarket.SpotMarketPriceViewHolder
+import com.blankj.utilcode.util.ConvertUtils
+import com.qmuiteam.qmui.util.QMUIDisplayHelper
+import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
+import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.dialog.createCustomDialog
+import mtp.polymer.com.autowidget.dialog.createLoadingDialog
+import org.jetbrains.anko.*
+import org.jetbrains.anko.support.v4.viewPager
+
+/**
+ * 华南顺通  买卖大厅
+ */
+class BusinessHallActivity : BaseActivity<BusinessHallViewModel>(){
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    val data by lazy { intent.getParcelableExtra<OrderQuoteData>("data") as OrderQuoteData }
+
+    //卖大厅
+    private val sellHallUI by lazy { SellHallUI(this,viewModel) }
+
+    //买大厅
+    private val buyHallUI by lazy { BuyHallUI(this,viewModel) }
+
+    /** 一口价摘牌输入框 **/
+    lateinit var priceInputEdittext: MangeNumberEditText2
+
+    /*** 一口价摘牌金额 **/
+    lateinit var one_delisting_amount : TextView
+
+    //viewpager的适配器
+    private var newPagerAdapter : PagerAdapter? = null
+
+    //tabSegment标题
+    private val newTabsArray : ArrayList<String> = arrayListOf()
+
+    //暂存的页面组
+    private val uiList : ArrayList<_FrameLayout> = arrayListOf()
+
+    val selectIndex : MutableLiveData<Int> = MutableLiveData()
+
+    fun initMenuData(){
+
+        newTabsArray.add("卖大厅")
+        uiList.add(sellHallUI.root)
+
+        newTabsArray.add("买大厅")
+        uiList.add(buyHallUI.root)
+
+        newPagerAdapter = object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = newTabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                return uiList.get(position).apply {
+                    container.addView(
+                        this,
+                        ViewGroup.LayoutParams(matchParent, matchParent)
+                    )
+                }
+            }
+
+            override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
+                (`object` as? View)?.let { container.removeView(it) }
+            }
+
+            override fun isViewFromObject(view: View, `object`: Any): Boolean = view == `object`
+
+            override fun getCount(): Int = newTabsArray.size
+
+        }
+
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.white)
+            //头部标题
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                imageView {
+                    onThrottleFirstClick {
+                        finish()
+                    }
+                    imageResource = R.mipmap.back
+                }.lparams(autoSize(45), autoSize(45)){
+                    marginStart = autoSize(36)
+                }
+
+                view {
+
+                }.lparams(autoSize(45), autoSize(45)){
+                    marginStart = autoSize(36)
+                }
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = data.deliverygoodsname
+                        textSizeAuto = 41
+                        textColorInt = R.color.white
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(10)
+                    }
+
+                    textView {
+                        text = data.warehousename
+                        textSizeAuto = 27
+                        textColorStr = "#AED6F0"
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(10)
+                    }
+                }.lparams(wrapContent, autoSize(120))
+
+
+                imageView {
+                    imageResource = R.mipmap.bussiness_one
+                }.lparams(autoSize(45), autoSize(45)){
+                    marginEnd = autoSize(36)
+                }
+
+                imageView {
+                    imageResource = R.mipmap.business_two
+                }.lparams(autoSize(45), autoSize(45)){
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(120))
+
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = data.warehousecode
+                        textSizeAuto = 42
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(144),1f)
+
+                verticalLayout {
+                    linearLayout {
+                        textView {
+                            text = "卖价"
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_gray_color
+                        }.lparams(wrapContent, wrapContent)
+
+                        emptyView()
+
+                        textView {
+                            text = NumberUtils.roundNum(data.sellprice,2)
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_black_33
+                        }.lparams(wrapContent, wrapContent){
+                            marginEnd = autoSize(18)
+                        }
+                    }.lparams(matchParent, autoSize(72))
+
+                    linearLayout {
+                        textView {
+                            text = "买价"
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_gray_color
+                        }.lparams(wrapContent, wrapContent)
+
+                        emptyView()
+
+                        textView {
+                            text = NumberUtils.roundNum(data.buyprice,2)
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_black_33
+                        }.lparams(wrapContent, wrapContent){
+                            marginEnd = autoSize(18)
+                        }
+                    }.lparams(matchParent, autoSize(72))
+                }.lparams(0, autoSize(144),1f)
+
+
+                verticalLayout {
+                    linearLayout {
+                        textView {
+                            text = "卖量"
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_gray_color
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(18)
+                        }
+
+                        emptyView()
+
+                        textView {
+                            text = data.sellqty
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_black_33
+                        }.lparams(wrapContent, wrapContent){
+                            marginEnd = autoSize(36)
+                        }
+                    }.lparams(matchParent, autoSize(72))
+
+                    linearLayout {
+                        textView {
+                            text = "买量"
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_gray_color
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(18)
+                        }
+
+                        emptyView()
+
+                        textView {
+                            text = data.buyqty
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_black_33
+                        }.lparams(wrapContent, wrapContent){
+                            marginEnd = autoSize(36)
+                        }
+                    }.lparams(matchParent, autoSize(72))
+                }.lparams(0, autoSize(144),1f)
+            }.lparams(matchParent, autoSize(144))
+
+            relativeLayout {
+                linearLayout {
+                    linearLayout {
+
+                    }.lparams(0, autoSize(100),1f)
+
+                    linearLayout {
+
+                    }.lparams(0, autoSize(100),1f)
+                }.lparams(matchParent, autoSize(100))
+
+                tabSegment {
+                    segment = this
+                    background = resources.getDrawable(R.color.segtabment_bg_color)
+                    addOnTabSelectedListener(object :
+                        QMUITabSegment.OnTabSelectedListener {
+                        override fun onDoubleTap(index: Int) {}
+                        override fun onTabReselected(index: Int) {}
+                        override fun onTabUnselected(index: Int) {}
+                        override fun onTabSelected(index: Int) {
+                            selectedTabIndex = index
+                            selectIndex.postValue(index)
+                        }
+                    })
+                    setIndicator(
+                        QMUITabIndicator(
+                            QMUIDisplayHelper.dp2px(context, 2),
+                            false,
+                            true
+                        )
+                    )
+                    setDefaultTextSize(ConvertUtils.sp2px(16f), ConvertUtils.sp2px(16f))
+                }.lparams(matchParent, autoSize(100))
+            }.lparams(matchParent, autoSize(100))
+
+            view {
+                background = resources.getDrawable(R.color.main_hit_bg_color)
+            }.lparams(matchParent, autoSize(1)) {
+                marginStart = autoSize(32)
+                marginEnd = autoSize(32)
+            }
+            viewPager {
+                background = resources.getDrawable(R.color.white)
+                viewPager = this
+                adapter = newPagerAdapter
+            }.lparams(matchParent, matchParent)
+
+            segment.setupWithViewPager(viewPager)
+            segment.selectTab(selectedTabIndex)
+            selectIndex.postValue(selectedTabIndex)
+        }
+
+    }
+
+    //一口价 摘牌
+    @RequiresApi(Build.VERSION_CODES.O)
+    fun creatOneSellOrBuyDialog(data : OrderQuoteDetailData){
+
+        createCustomDialog(cancelable = false) { dialog ->
+
+            backgroundColor = Color.parseColor("#5f000000")
+
+            verticalLayout {
+                backgroundDrawable = createRoundRectDrawable("#ffffff", 24)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+
+                    linearLayout {
+                        textView {
+                            text = "交易账户"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = "2131242341 周星星"
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_more
+                    }.lparams(autoSize(36), autoSize(36))
+
+                }.lparams(matchParent, autoSize(172))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    linearLayout {
+                        textView {
+                            text = "挂牌方"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = data.username
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    linearLayout {
+                        textView {
+                            text = "挂牌价格"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = data.fixedprice
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    linearLayout {
+                        textView {
+                            text = "挂牌数量"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = data.orderqty
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                itemView()
+
+                linearLayout {
+                    verticalLayout {
+                        textView {
+                            text = "摘牌数量"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                            topMargin = autoSize(36)
+                        }
+
+                        textView {
+                            text = "(10吨起)"
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                            topMargin = autoSize(20)
+                        }
+                    }.lparams(autoSize(250), autoSize(290))
+
+                    verticalLayout {
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            numberEditText {
+                                priceInputEdittext = this
+                                setOnTextChangeListener { view, value ->
+
+                                }
+
+                            }.lparams(0, autoSize(72),1f)
+
+                            textView {
+                                text = "吨"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent){
+                                marginEnd = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(143))
+
+                        seekBar {
+                            min = 10
+                            max = 100
+                            thumb = resources.getDrawable(R.mipmap.hnxt_seekbar)
+                            progressDrawable = resources.getDrawable(R.drawable.seekbar_bg)
+                            setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener{
+                                override fun onProgressChanged(p0: SeekBar?, p1: Int, p2: Boolean) {
+
+                                }
+
+                                override fun onStartTrackingTouch(p0: SeekBar?) {
+
+                                }
+
+                                override fun onStopTrackingTouch(p0: SeekBar?) {
+
+                                }
+                            })
+                        }.lparams(matchParent, autoSize(46)){
+                            marginEnd = autoSize(110)
+                            topMargin = autoSize(20)
+                        }
+
+                        linearLayout {
+                            textView {
+                                text = "0"
+                                textSizeAuto = 29
+                                textColorInt = R.color.rma_gray_color
+                            }.lparams(wrapContent, wrapContent)
+
+                            emptyView()
+
+                            textView {
+                                text = "80吨"
+                                textSizeAuto = 29
+                                textColorInt = R.color.rma_gray_color
+                            }.lparams(wrapContent, wrapContent)
+                        }.lparams(matchParent, wrapContent){
+                            marginEnd = autoSize(110)
+                            topMargin = autoSize(10)
+                        }
+
+                    }.lparams(matchParent, autoSize(290))
+                }.lparams(matchParent, autoSize(290))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "摘牌金额"
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(autoSize(214), wrapContent){
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        one_delisting_amount = this
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                verticalEmptyView()
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        onThrottleFirstClick {
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.drawable.qhj_main_blue_bg
+                        text = "卖出"
+                        textSizeAuto = 38
+                        textColorInt = R.color.white
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(24)
+                    }
+
+                    textView {
+                        onThrottleFirstClick {
+                            dialog.dismiss()
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.drawable.hnxt_cancel_bg
+                        text = "取消"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(13)
+                    }
+                }.lparams(matchParent, autoSize(144)) {
+                    gravity = Gravity.BOTTOM
+                }
+
+            }.lparams(matchParent, matchParent)
+        }.show()
+    }
+
+    //浮动价 摘牌
+    @RequiresApi(Build.VERSION_CODES.O)
+    fun creatFloatSellOrBuyDialog(data : OrderQuoteDetailData){
+
+        createCustomDialog(cancelable = false) { dialog ->
+
+            backgroundColor = Color.parseColor("#5f000000")
+
+            verticalLayout {
+                backgroundDrawable = createRoundRectDrawable("#ffffff", 24)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+
+                    linearLayout {
+                        textView {
+                            text = "交易账户"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = "2131242341 周星星"
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_more
+                    }.lparams(autoSize(36), autoSize(36))
+
+                }.lparams(matchParent, autoSize(172))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    linearLayout {
+                        textView {
+                            text = "挂牌方"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = data.username
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    linearLayout {
+                        textView {
+                            text = "挂牌价格"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = data.fixedprice
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    linearLayout {
+                        textView {
+                            text = "挂牌数量"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                        }
+                    }.lparams(autoSize(250), wrapContent)
+
+                    textView {
+                        text = data.orderqty
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                itemView()
+
+                linearLayout {
+                    verticalLayout {
+                        textView {
+                            text = "摘牌数量"
+                            textSizeAuto = 34
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                            topMargin = autoSize(36)
+                        }
+
+                        textView {
+                            text = "(10吨起)"
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_hint_text_color_ccc
+                        }.lparams(wrapContent, wrapContent){
+                            marginStart = autoSize(36)
+                            topMargin = autoSize(20)
+                        }
+                    }.lparams(autoSize(250), autoSize(290))
+
+                    verticalLayout {
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            numberEditText {
+                                priceInputEdittext = this
+                                setOnTextChangeListener { view, value ->
+
+                                }
+
+                            }.lparams(0, autoSize(72),1f)
+
+                            textView {
+                                text = "吨"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent){
+                                marginEnd = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(143))
+
+                        seekBar {
+                            min = 10
+                            max = 100
+                            thumb = resources.getDrawable(R.mipmap.hnxt_seekbar)
+                            progressDrawable = resources.getDrawable(R.drawable.seekbar_bg)
+                            setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener{
+                                override fun onProgressChanged(p0: SeekBar?, p1: Int, p2: Boolean) {
+
+                                }
+
+                                override fun onStartTrackingTouch(p0: SeekBar?) {
+
+                                }
+
+                                override fun onStopTrackingTouch(p0: SeekBar?) {
+
+                                }
+                            })
+                        }.lparams(matchParent, autoSize(46)){
+                            marginEnd = autoSize(110)
+                            topMargin = autoSize(20)
+                        }
+
+                        linearLayout {
+                            textView {
+                                text = "0"
+                                textSizeAuto = 29
+                                textColorInt = R.color.rma_gray_color
+                            }.lparams(wrapContent, wrapContent)
+
+                            emptyView()
+
+                            textView {
+                                text = "80吨"
+                                textSizeAuto = 29
+                                textColorInt = R.color.rma_gray_color
+                            }.lparams(wrapContent, wrapContent)
+                        }.lparams(matchParent, wrapContent){
+                            marginEnd = autoSize(110)
+                            topMargin = autoSize(10)
+                        }
+
+                    }.lparams(matchParent, autoSize(290))
+                }.lparams(matchParent, autoSize(290))
+
+                itemView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "摘牌金额"
+                        textSizeAuto = 34
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(autoSize(214), wrapContent){
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        one_delisting_amount = this
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(143))
+
+                verticalEmptyView()
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        onThrottleFirstClick {
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.drawable.qhj_main_blue_bg
+                        text = "卖出"
+                        textSizeAuto = 38
+                        textColorInt = R.color.white
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(24)
+                    }
+
+                    textView {
+                        onThrottleFirstClick {
+                            dialog.dismiss()
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.drawable.hnxt_cancel_bg
+                        text = "取消"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(13)
+                    }
+                }.lparams(matchParent, autoSize(144)) {
+                    gravity = Gravity.BOTTOM
+                }
+
+            }.lparams(matchParent, matchParent)
+        }.show()
+    }
+
+}
+
+/**
+ * 卖大厅
+ * @property activity AppCompatActivity
+ * @property viewModel BusinessHallViewModel
+ * @constructor
+ */
+class SellHallUI(private val activity : AppCompatActivity,private val viewModel: BusinessHallViewModel){
+
+    // 下拉刷新
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    private val businessSellHallAdapter: BaseAdapter<OrderQuoteDetailData, BusinessSellHallViewHolder> =
+        BaseAdapter { _, _ ->
+            BusinessSellHallViewHolder(
+                activity,
+                viewModel
+            )
+        }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            linearLayout {
+                background = resources.getDrawable(R.color.hnst_sell_hall_top_bg_color)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        text = "价格"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(74),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "数量"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(74),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "挂牌方"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(74),1f)
+            }.lparams(matchParent, autoSize(74))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                setRetryAction {
+
+                }
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    // 未提交列表
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = businessSellHallAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.businessSellHallDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    businessSellHallAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+
+}
+
+
+/**
+ * 买大厅
+ * @property activity AppCompatActivity
+ * @property viewModel BusinessHallViewModel
+ * @constructor
+ */
+class BuyHallUI(private val activity : AppCompatActivity,private val viewModel: BusinessHallViewModel){
+
+    // 下拉刷新
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    private val businessBuyHallAdapter: BaseAdapter<OrderQuoteDetailData, BusinessBuyHallViewHolder> =
+        BaseAdapter { _, _ ->
+            BusinessBuyHallViewHolder(
+                activity,
+                viewModel
+            )
+        }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            linearLayout {
+                background = resources.getDrawable(R.color.hnst_buy_hall_top_bg_color)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        text = "价格"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(74),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "数量"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(74),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "摘牌方"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(74),1f)
+            }.lparams(matchParent, autoSize(74))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                setRetryAction {
+
+                }
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    // 未提交列表
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = businessBuyHallAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.businessBuyHallDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    businessBuyHallAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+
+}

+ 18 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallViewModel.kt

@@ -0,0 +1,18 @@
+package cn.muchinfo.rma.view.base.warehousereceipt
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.data.OrderQuoteDetailData
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 买卖大厅viewmodel
+ */
+class BusinessHallViewModel : BaseViewModel(){
+
+    //卖大厅数据
+    val businessSellHallDataList : MutableLiveData<List<OrderQuoteDetailData>> = MutableLiveData()
+
+    //买大厅数据
+    val businessBuyHallDataList : MutableLiveData<List<OrderQuoteDetailData>> = MutableLiveData()
+
+}

+ 105 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessSellHallViewHolder.kt

@@ -0,0 +1,105 @@
+package cn.muchinfo.rma.view.base.warehousereceipt
+
+import android.content.Intent
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.OrderQuoteDetailData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.home.spotmarket.AddSpotMarketPriceActivity
+import cn.muchinfo.rma.view.base.home.spotmarket.SpotMarketDetailsActivity
+import com.blankj.utilcode.util.ActivityUtils
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import mtp.polymer.com.autowidget.dialog.createWarningDialog
+import org.jetbrains.anko.*
+
+/**
+ * 卖大厅viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel BusinessHallViewModel
+ * @property itemSize IntArray
+ * @constructor
+ */
+class BusinessSellHallViewHolder(private val activity : AppCompatActivity,private val viewModel: BusinessHallViewModel) : BaseViewHolder<OrderQuoteDetailData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+         verticalLayout {
+             linearLayout {
+                 linearLayout {
+                     gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                     textView {
+                         data.bindOptional(context){
+                             text = NumberUtils.roundNum(it?.fixedprice,2)
+                         }
+                         textSizeAuto = 34
+                         textColorInt = R.color.rma_black_33
+                     }.lparams(wrapContent, wrapContent){
+                         marginStart = autoSize(36)
+                     }
+                 }.lparams(0, autoSize(90),1f)
+
+                 linearLayout {
+                    gravity = Gravity.CENTER
+                     textView {
+                         data.bindOptional(context){
+                             text = it?.orderqty
+                         }
+                         textSizeAuto = 34
+                         textColorInt = R.color.rma_black_33
+                     }.lparams(wrapContent, wrapContent)
+                 }.lparams(0, autoSize(90),1f)
+
+                 linearLayout {
+                     gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                     textView {
+                         data.bindOptional(context){
+                             text = it?.username
+                         }
+                         textSizeAuto = 34
+                         textColorInt = R.color.rma_black_33
+                     }.lparams(wrapContent, wrapContent){
+                         marginEnd = autoSize(36)
+                     }
+                 }.lparams(0, autoSize(90),1f)
+             }.lparams(matchParent, autoSize(90))
+
+             // 控制区
+             linearLayout {
+                 data.bindOptional(context) {
+                     if (it?.isClick == 0) {
+                         visibility = View.GONE
+                     } else if (it?.isClick == 1) {
+                         visibility = View.VISIBLE
+                     }
+                 }
+                 gravity = Gravity.CENTER_VERTICAL
+
+                 emptyView()
+
+                 textView {
+                     onThrottleFirstClick {
+
+                     }
+                     backgroundResource = R.drawable.rma_item_click_bg
+                     gravity = Gravity.CENTER
+                     text = "摘牌"
+                     textColorInt = R.color.rma_item_click_color
+                     textSizeAuto = 26
+                 }.lparams(autoSize(120), autoSize(48)) {
+                     marginEnd = autoSize(24)
+                 }
+
+             }.lparams(matchParent, autoSize(72))
+         }.lparams(matchParent, wrapContent)
+    }
+
+}

+ 148 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/WarehouseReceiptFragment.kt

@@ -14,6 +14,7 @@ import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseFragment
 import cn.muchinfo.rma.view.base.platinumtreasure.adapter.PlatnumTreasureAdapter
 import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
+import cn.muchinfo.rma.view.base.warehousereceipt.floata.FloatPriceAdapter
 import cn.muchinfo.rma.view.base.warehousereceipt.one.OnePriceAdapter
 import com.blankj.utilcode.util.ConvertUtils
 import com.blankj.utilcode.util.SizeUtils
@@ -89,6 +90,7 @@ class WarehouseReceiptFragment : BaseFragment<WarehouseReceiptViewModel>(){
     ): View? {
 
         return UI {
+            initMenuData()
             verticalLayout {
                 linearLayout {
                     background = resources.getDrawable(R.color.main_title_bg_color)
@@ -278,7 +280,7 @@ class OnePriceUI(private val fragment : Fragment,private val viewModel: Warehous
                 emptyView(hint = resources.getString(R.string.now_no_data))
             }).lparams(matchParent, matchParent)
 
-            viewModel.floatProceDataList.bindOptional(context) {
+            viewModel.onePrcieDataList.bindOptional(context) {
 //                if (it?.size ?: 0 > 10){
 //                    lastShow = 10
 //                }else{
@@ -312,11 +314,155 @@ class OnePriceUI(private val fragment : Fragment,private val viewModel: Warehous
  * @property root _FrameLayout
  * @constructor
  */
-class FloatingPriceUI(private val fragment : Fragment,private val viewModel: WarehouseReceiptViewModel){
+class FloatingPriceUI(private val fragment : Fragment,private val viewModel: WarehouseReceiptViewModel)  : FloatPriceAdapter.OnContentScrollListener{
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    lateinit var dataRecyclerview : RecyclerView
+
+
+    //标题头部
+    val topAdapter by lazy {
+        TopTabAdpater(fragment.context)
+    }
+
+    val floatPriceAdapter by lazy {
+        FloatPriceAdapter(fragment.context)
+    }
+
     val root = _FrameLayout(fragment.context!!).apply {
         verticalLayout {
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//待点价头部左侧数据
+//                            viewModel.titleList.bindOptional(context) {
+//                                text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+//                            }
+                        text = "商品"
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(100f)), autoSize(100))
+                floatPriceAdapter.setOnContentScrollListener(this@FloatingPriceUI)
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY -> //代码重复,可以抽取/////
+                        floatPriceAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<FloatPriceAdapter.ItemViewHolder> =
+                            floatPriceAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].horItemScrollview.scrollTo(
+                                    scrollX,
+                                    0
+                                )
+                            }
+                        }
+                    }
+                    relativeLayout {
+                        recyclerView {//待点价头部右侧数据
+                            val linearLayoutManager = LinearLayoutManager(context)
+                            linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL
+                            layoutManager = linearLayoutManager
+                            background = resources.getDrawable(R.color.white)
+                            adapter = topAdapter
+                        }
+//                            viewModel.titleList.bindOptional(context) {
+//                                val titleStringList = arrayListOf<String>()
+//                                it?.subList(1, it.size)?.forEach { data ->
+//                                    titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+//                                }
+//                                topAdapter.setDatas(titleStringList)
+//                            }
+                        topAdapter.setDatas(arrayListOf("卖价","卖量","买价","买量","仓库"))
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+                setRetryAction {
+
+                }
+
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {//待点价列表
+                        dataRecyclerview = this
+                        background = resources.getDrawable(R.color.white)
+                        adapter = floatPriceAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<FloatPriceAdapter.ItemViewHolder> =
+                                    floatPriceAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].horItemScrollview.scrollTo(
+                                            floatPriceAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
 
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
+                                super.onScrollStateChanged(recyclerView, newState)
+                                // DES: 找出当前可视Item位置
+                                val linearLayoutManager = dataRecyclerview!!.layoutManager as LinearLayoutManager
+                                if (newState == RecyclerView.SCROLL_STATE_IDLE) {// 这个判断是当recyclerview不滚动时
+
+                                }
+                            }
+                        })
+                    }
+
+
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.floatProceDataList.bindOptional(context) {
+//                if (it?.size ?: 0 > 10){
+//                    lastShow = 10
+//                }else{
+//                    lastShow = it?.size ?: 0
+//                }
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+//                        mHeadHeaderHSView.scrollTo(scrollXView,scrollYView)
+                    }
+                    statusLayout.showSuccess()
+                    floatPriceAdapter.setDatas(it)
+                }
+            }
         }
     }
 
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+
 }

+ 7 - 0
RMA/app/src/main/res/drawable/hall_buy_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/buy_hall_color"/>
+    <corners android:topRightRadius="10dp"
+        android:topLeftRadius="10dp"/>
+</shape>

+ 7 - 0
RMA/app/src/main/res/drawable/hall_sell_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/sell_hall_color"/>
+    <corners android:topRightRadius="10dp"
+        android:topLeftRadius="10dp"/>
+</shape>

+ 7 - 0
RMA/app/src/main/res/drawable/hall_with_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/white"/>
+    <corners android:topRightRadius="10dp"
+        android:topLeftRadius="10dp"/>
+</shape>

+ 7 - 0
RMA/app/src/main/res/drawable/hnxt_cancel_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#637078"/>
+    <corners android:radius="25dp"
+       />
+</shape>

+ 18 - 0
RMA/app/src/main/res/drawable/seekbar_bg.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@android:id/background">
+        <shape>
+            <corners android:radius="5dp" />
+            <solid android:color="#D7ECFF" />
+        </shape>
+    </item>
+
+    <item android:id="@android:id/progress">
+        <clip>
+            <shape>
+                <corners android:radius="5dp" />
+                <solid android:color="#FC9618" />
+            </shape>
+        </clip>
+    </item>
+</layer-list>

+ 1 - 0
RMA/app/src/main/res/layout/layout_item_platinum_content.xml

@@ -49,6 +49,7 @@
             android:layout_height="match_parent">
 
             <RelativeLayout
+                android:id="@+id/item_onclick"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent">
 

+ 1 - 0
RMA/app/src/main/res/layout/layout_qhj_item_scroll.xml

@@ -3,6 +3,7 @@
     android:layout_width="100dp"
     android:layout_height="45dp"
     android:gravity="center"
+    android:id="@+id/item_click"
     android:orientation="vertical">
 
     <LinearLayout

BIN
RMA/app/src/main/res/mipmap-xhdpi/business_two.png


BIN
RMA/app/src/main/res/mipmap-xhdpi/bussiness_one.png


BIN
RMA/app/src/main/res/mipmap-xhdpi/hnxt_seekbar.png


BIN
RMA/app/src/main/res/mipmap-xhdpi/warehous_recepit_celect.png


BIN
RMA/app/src/main/res/mipmap-xhdpi/warehous_recepit_normal.png


+ 6 - 0
RMA/app/src/main/res/values/colors.xml

@@ -100,4 +100,10 @@
     <color name="qhj_pay_success_color">#3CC56D</color>
     <color name="qhj_rule_bg_color">#E7F7FF</color>
     <color name="qhj_rule_line_color">#DAEDFF</color>
+
+    <!--  华南顺通  -->
+    <color name="sell_hall_color">#1DC089</color>
+    <color name="buy_hall_color">#FC9618</color>
+    <color name="hnst_sell_hall_top_bg_color">#E0F7EF</color>
+    <color name="hnst_buy_hall_top_bg_color">#FAF1E6</color>
 </resources>