浏览代码

风险管理4月7日提交代码-liu.bolan

Liu.bolan 4 年之前
父节点
当前提交
b23a344230
共有 28 个文件被更改,包括 4908 次插入30 次删除
  1. 15 0
      RMA/app/src/main/AndroidManifest.xml
  2. 55 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt
  3. 25 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/ViewEnumUtils.kt
  4. 5 2
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockApplyData.kt
  5. 76 2
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockData.kt
  6. 6 2
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockReportDetailData.kt
  7. 15 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/BaseContentData.kt
  8. 16 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  9. 12 12
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/AddContractActivity.kt
  10. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractDetailsActivity.kt
  11. 699 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/BuySellInventoryActivity.kt
  12. 648 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryAuditActivity.kt
  13. 119 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryAuditViewModel.kt
  14. 215 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryContentAdapter.java
  15. 575 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/ProductionInventoryActivity.kt
  16. 315 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/AddInventoryActivity.kt
  17. 204 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryDetailsActivity.kt
  18. 442 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerActivity.kt
  19. 210 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerViewModel.kt
  20. 186 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/ApplyRecordAdapter.java
  21. 191 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/InventoryCurrentAdapter.java
  22. 194 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/InventoryDetailsAdapter.java
  23. 5 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/PaymentRegistrationActivity.kt
  24. 482 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/WarehouseRegistrationActivity.kt
  25. 3 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/warehouse/AddWareHouseInformationActivity.kt
  26. 1 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/warehouse/WarehouseInformationActivity.kt
  27. 102 0
      RMA/app/src/main/res/layout/layout_item_inventory_content.xml
  28. 92 0
      RMA/app/src/main/res/layout/layout_item_inventory_current.xml

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

@@ -198,6 +198,21 @@
         <activity android:name=".view.base.login.AgreeMentActivity"/>
 
         <activity android:name=".view.base.home.warehouse.WarehouseInformationActivity"/>
+
+        <activity android:name=".view.base.home.warehouse.AddWareHouseInformationActivity"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan"/>
+
+        <activity android:name=".view.base.home.inventory.inventoryaudit.InventoryAuditActivity"/>
+
+        <activity android:name=".view.base.home.inventory.inventoryaudit.BuySellInventoryActivity"/>
+
+        <activity android:name=".view.base.home.inventory.inventoryaudit.ProductionInventoryActivity"/>
+
+        <activity android:name=".view.base.home.inventory.inventorymanager.InventoryManagerActivity"/>
+
+        <activity android:name=".view.base.home.inventory.inventorymanager.AddInventoryActivity"/>
+
     </application>
 
 </manifest>

+ 55 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt

@@ -116,4 +116,59 @@ fun String.channelinnerorderstatus() : String{
     return str
 }
 
+/**
+ * 出入库类型
+ * @receiver String
+ * @return String
+ */
+fun String.inouttype() : String{
+    if (this.isNullOrEmpty()){
+        return "--"
+    }
+    var str = ""
+    when {
+        this == "1" -> {
+            str = "采购入库"
+        }
+        this == "2" -> {
+            str = "销售出库"
+        }
+        this == "3" -> {
+            str = "生产入库"
+        }
+        this == "4" -> {
+            str = "生产出库"
+        }
+    }
+    return str
+}
+
+/**
+ * 出入库状态
+ */
+fun String.inventoryapplystatus() : String{
+    if (this.isNullOrEmpty()){
+        return "--"
+    }
+    var str = ""
+    when {
+        this == "1" -> {
+            str = "待审核"
+        }
+        this == "2" -> {
+            str = "审核通过"
+        }
+        this == "3" -> {
+            str = "审核拒绝"
+        }
+        this == "4" -> {
+            str = "处理失败"
+        }
+        this == "5" -> {
+            str = "已撤回"
+        }
+    }
+    return str
+}
+
 

+ 25 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/ViewEnumUtils.kt

@@ -1,6 +1,8 @@
 package cn.muchinfo.rma.global
 
 import com.blankj.utilcode.util.TimeUtils
+import java.text.SimpleDateFormat
+import java.util.*
 
 object ViewEnumUtils {
 
@@ -230,4 +232,27 @@ object ViewEnumUtils {
 
         return str
     }
+
+    fun toShowTime(time : String,format : String = "yyyy-MM-dd HH:mm:ss") : String{
+        if (time.isNullOrEmpty()){
+            return "--"
+        }
+        val sdf = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss+08:00", Locale.CHINA)
+        val sdf1 = SimpleDateFormat(format, Locale.CHINA)
+        var timeString = sdf1.format(sdf.parse(time)!!)
+        if (TimeUtils.getNowString(TimeUtils.getSafeDateFormat("yyyy-MM-dd")) == timeString.split(" ").get(0)){
+//    if (TimeUtils.isToday(timeString)){
+            timeString = timeString.split(" ").get(1)
+        }
+        return timeString
+    }
+
+    fun isShowTimeString(time : String,format : String) : String{
+        if (time.isNullOrEmpty()){
+            return "--"
+        }
+        val mill = TimeUtils.string2Millis(time)
+        val time = TimeUtils.millis2String(mill,TimeUtils.getSafeDateFormat(format))
+        return time
+    }
 }

+ 5 - 2
RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockApplyData.kt

@@ -85,7 +85,8 @@ data class AreaStockApplyData(
     val warehousetype : String? = "",//仓库类型 - 1 厂库 2 自有库 3 合作库
     val wrstandardcode : String? = "",//现货商品代码
     val wrstandardid : String? = "",//现货商品ID
-    val wrstandardname : String? = ""//现货商品名称
+    val wrstandardname : String? = "",//现货商品名称
+    var rightData : List<String>? = arrayListOf()//组装的右侧数据
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
@@ -126,7 +127,8 @@ data class AreaStockApplyData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
-        parcel.readString()
+        parcel.readString(),
+        parcel.createStringArrayList()
     ) {
     }
 
@@ -170,6 +172,7 @@ data class AreaStockApplyData(
         parcel.writeString(wrstandardcode)
         parcel.writeString(wrstandardid)
         parcel.writeString(wrstandardname)
+        parcel.writeStringList(rightData)
     }
 
     override fun describeContents(): Int {

+ 76 - 2
RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockData.kt

@@ -1,5 +1,8 @@
 package cn.muchinfo.rma.global.data
 
+import android.os.Parcel
+import android.os.Parcelable
+
 /**
  * 当前库存
  */
@@ -26,5 +29,76 @@ data class AreaStockData(
     val warehousetype : String? = "",//仓库类型 - 1 厂库 2 自有库 3 合作库
     val wrstandardcode : String? = "",//现货商品代码
     val wrstandardid : String? = "",//现货商品ID
-    val wrstandardname : String? = ""//现货商品名称
-)
+    val wrstandardname : String? = "",//现货商品名称
+    var rightData : List<String>? = arrayListOf()//组装的右侧数据
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.createStringArrayList()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(brandname)
+        parcel.writeString(curstock)
+        parcel.writeString(deliverygoodsid)
+        parcel.writeString(enumdicname)
+        parcel.writeString(modelname)
+        parcel.writeString(oristock)
+        parcel.writeString(spotgoodsbrandid)
+        parcel.writeString(spotgoodsmodelid)
+        parcel.writeString(todaybuyinqty)
+        parcel.writeString(todayproduceinqty)
+        parcel.writeString(todayproduceoutqty)
+        parcel.writeString(todayselloutqty)
+        parcel.writeString(unitid)
+        parcel.writeString(updatetime)
+        parcel.writeString(userid)
+        parcel.writeString(username)
+        parcel.writeString(warehousecode)
+        parcel.writeString(warehouseinfoid)
+        parcel.writeString(warehousename)
+        parcel.writeString(warehousetype)
+        parcel.writeString(wrstandardcode)
+        parcel.writeString(wrstandardid)
+        parcel.writeString(wrstandardname)
+        parcel.writeStringList(rightData)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<AreaStockData> {
+        override fun createFromParcel(parcel: Parcel): AreaStockData {
+            return AreaStockData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<AreaStockData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

+ 6 - 2
RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaStockReportDetailData.kt

@@ -45,7 +45,8 @@ data class AreaStockReportDetailData(
     val warehousetype : String? = "",//仓库类型 - 1 厂库 2 自有库 3 合作库
     val wrstandardcode : String? = "",//现货商品代码
     val wrstandardid : String? = "",//现货商品ID
-    val wrstandardname : String? = ""//现货商品名称
+    val wrstandardname : String? = "",//现货商品名称
+    var rightData : List<String>? = arrayListOf()//组装的右侧数据
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
@@ -86,7 +87,8 @@ data class AreaStockReportDetailData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
-        parcel.readString()
+        parcel.readString(),
+        parcel.createStringArrayList()
     ) {
     }
 
@@ -130,6 +132,7 @@ data class AreaStockReportDetailData(
         parcel.writeString(wrstandardcode)
         parcel.writeString(wrstandardid)
         parcel.writeString(wrstandardname)
+        parcel.writeStringList(rightData)
     }
 
     override fun describeContents(): Int {
@@ -146,4 +149,5 @@ data class AreaStockReportDetailData(
         }
     }
 
+
 }

+ 15 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/BaseContentData.kt

@@ -0,0 +1,15 @@
+package cn.muchinfo.rma.view.base.app
+
+/**
+ * 用于通用列表的数据组装
+ * @param T
+ * @property liftData String 左边固定内容
+ * @property rightData List<String>? 右边列表内容
+ * @property data T 原数据实体
+ * @constructor
+ */
+data class BaseContentData<T>(
+    var liftData : String = "",//组装的zuo侧数据
+    var rightData : List<String>? = arrayListOf(),//组装的右侧数据
+    var data : T
+)

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

@@ -97,6 +97,22 @@ object Constant {
     /** 库存报表 **/
     const val table_mobile_stock_report = "table_mobile_stock_report"
 
+    /** 库存管理-当前库存 */
+    const val table_mobile_stock_manage_current = "table_mobile_stock_manage_current"
+
+    /** 库存管理-申请记录 **/
+    const val table_mobile_stock_manage_applylog = "table_mobile_stock_manage_applylog"
+
+    /** 库存审核 **/
+    const val table_mobile_stock_aduit = "table_mobile_stock_aduit"
+
+    /** 库存报表-入库明细 **/
+    const val table_mobile_stock_report_in_detail = "table_mobile_stock_report_in_detail"
+
+    /** 库存报表-出库明细 **/
+    const val table_mobile_stock_report_out_detail = "table_mobile_stock_report_out_detail"
+    /**--------------------------------------------------------------------------------------**/
+
     const val FISTOPENAPP = "first_open_app"
 
     /** 当前选择的资金账号id **/

+ 12 - 12
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/AddContractActivity.kt

@@ -1381,21 +1381,21 @@ class AddContractActivity : BaseActivity<ContractViewModel>() {
                 }
 
                 linearLayout {
-                    onThrottleFirstClick {
-                        if (checkUpdate().not()) {
-                            return@onThrottleFirstClick
-                        }
-                        viewModel.orderContract(
-                            contractInfo = getContractInfo(),
-                            OperateType = "1",
-                            Remark = remask_edittext.text.toString()
-                        ) {
-                            finish()
-                        }
-                    }
                     background = resources.getDrawable(R.color.white)
                     gravity = Gravity.CENTER_VERTICAL
                     textView {
+                        onThrottleFirstClick {
+                            if (checkUpdate().not()) {
+                                return@onThrottleFirstClick
+                            }
+                            viewModel.orderContract(
+                                contractInfo = getContractInfo(),
+                                OperateType = "1",
+                                Remark = remask_edittext.text.toString()
+                            ) {
+                                finish()
+                            }
+                        }
                         gravity = Gravity.CENTER
                         backgroundResource = R.mipmap.rma_save_info_bg
                         text = "保存草稿"

+ 0 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractDetailsActivity.kt

@@ -41,7 +41,6 @@ class ContractDetailsActivity : BaseActivity<ContractViewModel>(){
                     }else{
                         "销售合同详情"
                     }
-
                 }
             }
 

+ 699 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/BuySellInventoryActivity.kt

@@ -0,0 +1,699 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventoryaudit
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import android.view.inputmethod.EditorInfo
+import android.widget.EditText
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.ViewEnumUtils
+import cn.muchinfo.rma.global.data.AreaStockApplyData
+import cn.muchinfo.rma.global.data.ContractData
+import cn.muchinfo.rma.global.inouttype
+import cn.muchinfo.rma.global.inventoryapplystatus
+import cn.muchinfo.rma.global.isBlankString
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import org.jetbrains.anko.*
+
+/**
+ * 采购/销售出入库审核
+ */
+class BuySellInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
+
+    /**
+     * status 1 :入库   2:出库
+     */
+    private val status by lazy { intent.getStringExtra("status") }
+
+    /**
+     * type 1 :审核  2 :撤回 3 : 详情
+     */
+    private val type by lazy { intent.getStringExtra("type") }
+
+    //传进来的数据
+    private val data by lazy {
+        intent.getParcelableExtra<AreaStockApplyData>("data") as AreaStockApplyData
+    }
+
+    /**
+     * 审核意见
+     */
+    lateinit var ramask_edittext : EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            val margingPadding = autoSize(47)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    if (type == "1"){
+                        text = "审核"
+                    }else if (type == "2"){
+                        text = "撤回"
+                    }else if (type == "3"){
+                        text = "详情"
+                    }
+                }
+            }
+
+            frameLayout {
+                scrollView {
+                    verticalLayout {
+                        background = resources.getDrawable(R.color.white)
+                         linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (data.applystatus == "2"){
+                                background = resources.getDrawable(R.color.rma_pass_status)//rma_pass_status已通过背景色
+                            }else{
+                                background = resources.getDrawable(R.color.rma_details_status)//rma_pass_status已通过背景色
+                            }
+
+                            imageView {
+                                if (data.applystatus == "2"){
+                                    imageResource = R.mipmap.rma_pass_status
+                                }else{
+                                    imageResource = R.mipmap.rma_wait_status
+                                }
+
+                            }.lparams(autoSize(38), autoSize(38)) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = data.applystatus?.inventoryapplystatus()
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_yellow_text_color
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(20)
+                            }
+                        }.lparams(matchParent, autoSize(60))
+                        textView {
+                            text = "合同基本信息:"
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "合同编号"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = ViewEnumUtils.getContractType(
+                                            data.contracttype ?: ""
+                                        ) + "/"
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                    textView {
+                                        text = data.contractno
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "现货品种"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.warehousename
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = margingPadding
+                                    }
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+                            topMargin = autoSize(30)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "点价类型"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = ViewEnumUtils.getPriceType(data.pricetype ?: "")
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "合同签署量"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.qty
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                    textView {
+                                        text = data.enumdicname
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = if (type == "1") {
+                                        "销售方"
+                                    } else {
+                                        "采购方"
+                                    }
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = if (type == "1") {
+                                            data.sellusername
+                                        } else {
+                                            data.buyusername
+                                        }
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+
+                        }.lparams(matchParent, autoSize(60))
+
+                        view {
+                            background = resources.getDrawable(R.color.rma_hint_line_color_eee)
+                        }.lparams(matchParent, autoSize(1)) {
+                            marginStart = autoSize(36)
+                            marginEnd = autoSize(36)
+                            topMargin = autoSize(30)
+                        }
+
+
+                        textView {
+                            text = "待审核登记信息:"
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "类型"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.inouttype?.inouttype()
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "品类"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.modelname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "登记时间"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.applytime?.split(" ")?.get(0)
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.applytime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "品牌"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.brandname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "登记人"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.applyname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    if (status == "1"){
+                                        text = "入库仓库"
+                                    }else{
+                                        text = "出库仓库"
+                                    }
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.warehousename
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    if (status == "1"){
+                                        text = "入库数量"
+                                    }else{
+                                        text = "出库数量"
+                                    }
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.qty
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.enumdicname
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = margingPadding
+                                    }
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                         view {
+                             if (type == "3"){
+                                 visibility = View.VISIBLE
+                             }else{
+                                 visibility = View.GONE
+                             }
+                            background = resources.getDrawable(R.color.rma_hint_line_color_eee)
+                        }.lparams(matchParent, autoSize(1)) {
+                            marginStart = autoSize(36)
+                            marginEnd = autoSize(36)
+                            topMargin = autoSize(30)
+                        }
+
+                        textView {
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            text = "待审核登记信息:"
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            linearLayout {
+                                textView {
+                                    text = "审核人"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.auditname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+
+
+                             linearLayout {
+                                textView {
+                                    text = "审核时间"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(0)
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            linearLayout {
+                                textView {
+                                    text = "审核结果"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.applystatus?.inventoryapplystatus() ?: "--"
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+
+
+                             linearLayout {
+                                textView {
+                                    text = "审核意见"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(0)
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                             linearLayout {
+                                textView {
+                                    text = "审核意见"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                 textView {
+                                     text = data.auditremark?.isBlankString()
+                                     textSizeAuto = 29
+                                     textColorInt = R.color.rma_black_33
+                                 }.lparams(wrapContent, wrapContent){
+                                     marginStart = autoSize(100)
+                                     marginEnd = autoSize(47)
+                                 }
+
+                            }.lparams(matchParent, wrapContent)
+                        }.lparams(matchParent, wrapContent) {
+                            topMargin = autoSize(25)
+                        }
+
+
+                        linearLayout {
+                            visibility = if (type == "1"){
+                                View.VISIBLE
+                            }else{
+                                View.GONE
+                            }
+                            textView {
+                                text = "审核意见"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            linearLayout {
+                                background = resources.getDrawable(R.drawable.rma_item_click_bg)
+                                editText {
+                                    ramask_edittext = this
+                                    setPadding(0, 10, 0, 0)
+                                    hint = "请输入审核意见"
+                                    gravity = Gravity.LEFT or Gravity.TOP
+                                    background = null
+                                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                                    hintColorStr = "#CCCCCC"
+                                    textSizeAuto = 31
+                                    textColorStr = "#333333"
+                                }.lparams(matchParent, matchParent) {
+
+                                }
+                            }.lparams(autoSize(432), autoSize(220)) {
+                                marginStart = autoSize(138)
+                            }
+                        }.lparams(matchParent, autoSize(220)){
+                            topMargin = autoSize(50)
+                            bottomMargin = autoSize(40)
+                        }
+                    }
+                }
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    visibility = if (type == "1"){
+                        View.VISIBLE
+                    }else{
+                        View.GONE
+                    }
+                    textView {
+                        onThrottleFirstClick {
+
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_save_info_bg
+                        text = "审核拒绝"
+                        textSizeAuto = 38
+                        textColorInt = R.color.rma_star_color
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(24)
+                    }
+
+                    textView {
+                        onThrottleFirstClick {
+
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = "审核通过"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(13)
+                    }
+
+                    textView {
+                        onThrottleFirstClick {
+
+                        }
+                        visibility = if (type == "2"){
+                            View.VISIBLE
+                        }else{
+                            View.GONE
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = "撤回"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(780), autoSize(119)){
+                        marginStart = autoSize(59)
+                    }
+                }.lparams(matchParent, autoSize(144)) {
+                    gravity = Gravity.BOTTOM
+                }
+            }
+        }
+    }
+
+}

+ 648 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryAuditActivity.kt

@@ -0,0 +1,648 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventoryaudit
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.MotionEvent
+import android.view.View
+import android.view.ViewGroup
+import androidx.appcompat.app.AppCompatActivity
+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.global.toShowTime
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
+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.viewPager
+
+/**
+ * 库存审核页面
+ */
+class InventoryAuditActivity : BaseActivity<InventoryAuditViewModel>(){
+
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    private val tabsArray: List<String> by lazy {
+        arrayListOf(
+            "入库","出库"
+        )
+    }
+
+    private val inStorage by lazy { InStorage(this,viewModel) }//入库UI
+    private val outStorage by lazy { OutStorage(this,viewModel) }//出库UI
+
+    private val pagerAdapter: PagerAdapter by lazy {
+        object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = tabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                when (position) {
+                    0 -> {
+                        return inStorage.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    1 -> {
+                        return outStorage.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    else -> return super.instantiateItem(container, position)
+                }
+            }
+
+            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 = tabsArray.size
+
+        }
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "库存审核"
+                }
+                commonMenuButton(R.mipmap.add_new) {
+
+                }
+            }
+
+            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(80))
+
+            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 = pagerAdapter
+            }.lparams(matchParent, matchParent)
+
+            segment.setupWithViewPager(viewPager)
+            segment.selectTab(selectedTabIndex)
+        }
+    }
+
+}
+
+/**
+ * 入库
+ */
+class InStorage(private val activity : AppCompatActivity,private val viewModel: InventoryAuditViewModel){
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    private val tabsArray: List<String> by lazy {
+        arrayListOf(
+            "待审核","已审核"
+        )
+    }
+
+    private val inventoryToAuditUI by lazy { InventoryToAuditUI(activity,viewModel,"1") }
+    private val inventoryAuditedUI by lazy { InventoryAuditedUI(activity,viewModel,"1") }
+
+    private val pagerAdapter: PagerAdapter by lazy {
+        object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = tabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                when (position) {
+                    0 -> {
+                        return inventoryToAuditUI.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    1 -> {
+                        return inventoryAuditedUI.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    else -> return super.instantiateItem(container, position)
+                }
+            }
+
+            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 = tabsArray.size
+
+        }
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            tabSegment {
+                segment = this
+                background = resources.getDrawable(R.color.white)
+                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(80))
+
+            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 = pagerAdapter
+            }.lparams(matchParent, matchParent)
+
+            segment.setupWithViewPager(viewPager)
+            segment.selectTab(selectedTabIndex)
+        }
+    }
+}
+
+
+/**
+ * 出库
+ */
+class OutStorage(private val activity : AppCompatActivity,private val viewModel: InventoryAuditViewModel){
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    private val tabsArray: List<String> by lazy {
+        arrayListOf(
+            "待审核","已审核"
+        )
+    }
+
+    private val inventoryToAuditUI by lazy { InventoryToAuditUI(activity,viewModel,"2") }
+
+    private val inventoryAuditedUI by lazy { InventoryAuditedUI(activity,viewModel,"2") }
+
+    private val pagerAdapter: PagerAdapter by lazy {
+        object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = tabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                when (position) {
+                    0 -> {
+                        return inventoryToAuditUI.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    1 -> {
+                        return inventoryAuditedUI.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    else -> return super.instantiateItem(container, position)
+                }
+            }
+
+            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 = tabsArray.size
+
+        }
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            tabSegment {
+                segment = this
+                background = resources.getDrawable(R.color.white)
+                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(80))
+
+            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 = pagerAdapter
+            }.lparams(matchParent, matchParent)
+
+            segment.setupWithViewPager(viewPager)
+            segment.selectTab(selectedTabIndex)
+        }
+    }
+}
+
+
+/**
+ * 待审核
+ */
+class InventoryToAuditUI(private val activity : AppCompatActivity,private val viewModel: InventoryAuditViewModel,private val type : String)
+    : InventoryContentAdapter.OnContentScrollListener{
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    val topAdapter by lazy {
+        TopTabAdpater(activity)
+    }
+
+    val exposureContentAdapter by lazy {
+        InventoryContentAdapter(activity,type,"1")
+    }
+
+    fun reFresh(){
+        viewModel.queryAreaStockApply(type = type,applystatus = "1".toShowTime())
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            viewModel.queryTitle(type = type,applystatus = "1")
+            exposureContentAdapter.setOnContentScrollListener(this@InventoryToAuditUI)
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//头部右侧数据
+                        viewModel.inventoryToAuditTitle.bindOptional(context) {
+                            text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+                        }
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 24
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(90f)), autoSize(100))
+
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    /**
+                     * 用来同步内容列表的item左右滑动
+                     */
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY ->
+                        exposureContentAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<InventoryContentAdapter.ItemViewHolder> =
+                            exposureContentAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].exposure_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.inventoryToAuditTitle.bindOptional(context) {
+                            val titleStringList = arrayListOf<String>()
+                            it?.subList(1, it.size)?.forEach { data ->
+                                titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+                            }
+                            topAdapter.setDatas(titleStringList)
+                        }
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        /**
+                         * 下拉刷新
+                         */
+                        viewModel.queryAreaStockApply(type = type,applystatus = "1")
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = exposureContentAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<InventoryContentAdapter.ItemViewHolder> =
+                                    exposureContentAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                            exposureContentAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+                    }
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            //入库待审核
+            viewModel.inInventoryToAuditDataList.bindOptional(context) {
+                if (type == "1"){
+                    if (it?.isEmpty() == true || it?.size == 0) {
+                        statusLayout.showEmpty()
+                    } else {
+                        if (swipeToLayout.getIsRefreshing()) {
+                            swipeToLayout.finishRefresh()
+                        }
+                        statusLayout.showSuccess()
+                        exposureContentAdapter.setDatas(it)
+                    }
+                }
+            }
+            //出库待审核
+            viewModel.outInventoryToAuditDataList.bindOptional(context) {
+                if (type == "2"){
+                    if (it?.isEmpty() == true || it?.size == 0) {
+                        statusLayout.showEmpty()
+                    } else {
+                        if (swipeToLayout.getIsRefreshing()) {
+                            swipeToLayout.finishRefresh()
+                        }
+                        statusLayout.showSuccess()
+                        exposureContentAdapter.setDatas(it)
+                    }
+                }
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+}
+
+/**
+ * 已审核
+ */
+class InventoryAuditedUI(private val activity : AppCompatActivity,private val viewModel: InventoryAuditViewModel,private val type : String) : InventoryContentAdapter.OnContentScrollListener{
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    val topAdapter by lazy {
+        TopTabAdpater(activity)
+    }
+
+    val exposureContentAdapter by lazy {
+        InventoryContentAdapter(activity,type,"2")
+    }
+
+    fun reFresh(){
+        viewModel.queryAreaStockApply(type = type,applystatus = "2,3,4,5")
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            viewModel.queryTitle(type = type,applystatus = "2,3,4,5")
+            exposureContentAdapter.setOnContentScrollListener(this@InventoryAuditedUI)
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//头部右侧数据
+                        viewModel.inventoryToAuditTitle.bindOptional(context) {
+                            text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+                        }
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 24
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(90f)), autoSize(100))
+
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    /**
+                     * 用来同步内容列表的item左右滑动
+                     */
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY ->
+                        exposureContentAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<InventoryContentAdapter.ItemViewHolder> =
+                            exposureContentAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].exposure_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.inventoryToAuditTitle.bindOptional(context) {
+                            val titleStringList = arrayListOf<String>()
+                            it?.subList(1, it.size)?.forEach { data ->
+                                titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+                            }
+                            topAdapter.setDatas(titleStringList)
+                        }
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        /**
+                         * 下拉刷新
+                         */
+                        viewModel.queryAreaStockApply(type = type,applystatus = "2,3,4,5")
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = exposureContentAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<InventoryContentAdapter.ItemViewHolder> =
+                                    exposureContentAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                            exposureContentAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+                    }
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            //入库已审核
+            viewModel.inInventoryAuditedDataList.bindOptional(context) {
+                if (type == "1"){
+                    if (it?.isEmpty() == true || it?.size == 0) {
+                        statusLayout.showEmpty()
+                    } else {
+                        if (swipeToLayout.getIsRefreshing()) {
+                            swipeToLayout.finishRefresh()
+                        }
+                        statusLayout.showSuccess()
+                        exposureContentAdapter.setDatas(it)
+                    }
+                }
+            }
+            //出库已审核
+            viewModel.outInventoryAuditedDataList.bindOptional(context) {
+                if (type == "2"){
+                    if (it?.isEmpty() == true || it?.size == 0) {
+                        statusLayout.showEmpty()
+                    } else {
+                        if (swipeToLayout.getIsRefreshing()) {
+                            swipeToLayout.finishRefresh()
+                        }
+                        statusLayout.showSuccess()
+                        exposureContentAdapter.setDatas(it)
+                    }
+                }
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+}

+ 119 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryAuditViewModel.kt

@@ -0,0 +1,119 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventoryaudit
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.*
+import cn.muchinfo.rma.global.data.AreaStockApplyData
+import cn.muchinfo.rma.global.data.ColumnsData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.toArrayList
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.BaseViewModel
+import cn.muchinfo.rma.view.base.app.Constant
+
+class InventoryAuditViewModel : BaseViewModel(){
+
+    /**
+     * 库存审核部数据
+     */
+    val inventoryToAuditTitle: MutableLiveData<List<ColumnsData>> = MutableLiveData()
+
+    /**
+     * 入库待审核列表数据
+     */
+    val inInventoryToAuditDataList : MutableLiveData<List<AreaStockApplyData>> = MutableLiveData()
+
+    /**
+     * 入库已审核列表数据
+     */
+    val inInventoryAuditedDataList : MutableLiveData<List<AreaStockApplyData>> = MutableLiveData()
+
+    /**
+     * 出库待审核列表数据
+     */
+    val outInventoryToAuditDataList : MutableLiveData<List<AreaStockApplyData>> = MutableLiveData()
+
+    /**
+     * 出库已审核列表数据
+     */
+    val outInventoryAuditedDataList : MutableLiveData<List<AreaStockApplyData>> = MutableLiveData()
+
+
+    /**
+     * 查询实时敞口列表头部数据 type 1 入库 2 出库
+     * @param tableKey String
+     */
+    fun queryTitle(type: String,applystatus : String) {
+        val params = mutableMapOf<String, String>().apply {
+            put("tableKey", Constant.table_mobile_stock_aduit)
+            put("tableType", "3")
+        }
+        MyApplication.getInstance()?.commonManager?.queryTableDefine(params = params) { isSuccess, respData, error ->
+            if (isSuccess) {
+                val newlist = respData?.get(0)?.columns?.toArrayList()
+                newlist?.sortWith(Comparator { t1, t2 ->
+                    t1.orderindex?.toInt()?.minus(t2.orderindex?.toInt() ?: 0) ?: 0
+                })
+                inventoryToAuditTitle.postValue(newlist)
+                queryAreaStockApply(type, applystatus)
+            }
+        }
+    }
+
+    /**
+     * 查询库存申请(出入库记录|库存审核)
+     * type 1 入库 2 出库
+     * 申请状态(可多项,逗号隔开)1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+     */
+    fun queryAreaStockApply(type: String,applystatus : String){
+        val params = mutableMapOf<String, String>()
+        params.put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+        if (type == "1"){
+            params.put("inouttype","1,3")
+        }else{
+            params.put("inouttype","2,4")
+        }
+        params.put("applystatus",applystatus)
+
+        MyApplication.getInstance()?.warehouseManager?.queryAreaStockApply(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                if (type == "1") {
+                    if (applystatus == "1") {//入库待审核
+                        inInventoryToAuditDataList.postValue(getInventoryAuditRightData(respData ?: arrayListOf()))
+                    } else {//入库已审核
+                        inInventoryAuditedDataList.postValue(getInventoryAuditRightData(respData ?: arrayListOf()))
+                    }
+                } else {
+                    if (applystatus == "1") {//出库待审核
+                        outInventoryToAuditDataList.postValue(getInventoryAuditRightData(respData ?: arrayListOf()))
+                    } else {//出库已审核
+                        outInventoryAuditedDataList.postValue(getInventoryAuditRightData(respData ?: arrayListOf()))
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 右部数据
+     * @param respData List<RealExposureData>
+     * @return List<RealExposureData>
+     */
+    private fun getInventoryAuditRightData(respData: List<AreaStockApplyData>) : List<AreaStockApplyData>{
+        val newList = arrayListOf<AreaStockApplyData>()
+        respData.forEach {
+            val newRightData = arrayListOf<String>()
+            newRightData.add(it.wrstandardname ?: "--")
+            newRightData.add(it.inouttype?.inouttype() + "\n" + NumberUtils.roundNum(it.qty,2) + it.enumdicname)
+            newRightData.add(it.applystatus?.inventoryapplystatus() ?: "--")
+            newRightData.add(it.modelname +"\n" +it.brandname)
+            newRightData.add(it.warehousename ?: "--")
+            newRightData.add(it.contractno ?: "--")
+            newRightData.add(it.applyname + "\n" + it.auditname)
+            val newData = it.copy(rightData = newRightData)
+            newList.add(newData)
+        }
+        return newList
+    }
+
+
+}

+ 215 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryContentAdapter.java

@@ -0,0 +1,215 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventoryaudit;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import com.blankj.utilcode.util.ActivityUtils;
+import java.util.ArrayList;
+import java.util.List;
+import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.ViewEnumUtils;
+import cn.muchinfo.rma.global.data.AreaStockApplyData;
+import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
+
+/**
+ * 用于库存审核的列表adapter
+ */
+public class InventoryContentAdapter extends RecyclerView.Adapter<InventoryContentAdapter.ItemViewHolder> {
+
+    private Context context;
+    private List<AreaStockApplyData> datas;
+    private int index = -1;
+    private int position = -1;
+    private List<ItemViewHolder> mViewHolderList = new ArrayList<>();
+    public int offestX = 0;
+    private OnContentScrollListener onContentScrollListener;
+    private String status;//1:入库 2 出库
+    private String type;// 1daishenhe  2已审核
+
+    public interface OnContentScrollListener {
+        void onScroll(MotionEvent event);
+    }
+
+    public void setOnContentScrollListener(OnContentScrollListener onContentScrollListener) {
+        this.onContentScrollListener = onContentScrollListener;
+    }
+
+    public InventoryContentAdapter(Context context,String status,String type) {
+        this.context = context;
+        this.status = status;
+        this.type = type;
+    }
+
+    public void setDatas(List<AreaStockApplyData> datas) {
+        this.datas = datas;
+        notifyDataSetChanged();
+    }
+
+    private void setPosition(int position){
+        if (this.position == position) {
+            this.position = -1;
+            notifyItemChanged(index);
+        } else {
+            this.position = position;
+            notifyItemChanged(position);
+        }
+    }
+
+    @NonNull
+    @Override
+    public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
+        View view = LayoutInflater.from(context).inflate(R.layout.layout_item_inventory_content, viewGroup, false);
+        return new ItemViewHolder(view);
+    }
+
+    @SuppressLint("SetTextI18n")
+    @Override
+    public void onBindViewHolder(@NonNull final ItemViewHolder itemViewHolder, int i) {
+        this.index = i;
+        itemViewHolder.exposure_tvLeftTitle.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getApplytime(),"MM/dd HH:mm"));
+        itemViewHolder.exposure_tv_left_bottom_title.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getAudittime(),"MM/dd HH:mm"));
+        //右边滑动部分
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
+        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        itemViewHolder.exposure_rvItemRight.setLayoutManager(linearLayoutManager);
+        itemViewHolder.exposure_rvItemRight.setHasFixedSize(true);
+        RightScrollAdapter rightScrollAdapter = new RightScrollAdapter(context);
+        rightScrollAdapter.setDatas(datas.get(i).getRightData());
+        itemViewHolder.exposure_rvItemRight.setAdapter(rightScrollAdapter);
+        //缓存当前holder
+        if (!mViewHolderList.contains(itemViewHolder)) {
+            mViewHolderList.add(itemViewHolder);
+        }
+        if (i == this.position){
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
+            itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
+        }else {
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.white));
+            itemViewHolder.exposure_allView.setVisibility(View.GONE);
+        }
+
+        itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setPosition(i);
+            }
+        });
+        if (type.equals("1")){
+            itemViewHolder.spot_subsidiary.setVisibility(View.VISIBLE);
+            itemViewHolder.futures_subsidiary.setVisibility(View.VISIBLE);
+        }else {
+            itemViewHolder.spot_subsidiary.setVisibility(View.GONE);
+            itemViewHolder.futures_subsidiary.setVisibility(View.GONE);
+        }
+        //撤回
+        itemViewHolder.spot_subsidiary.setOnClickListener(view -> {
+            Intent intent = new Intent();
+            intent.putExtra("type","2");
+            intent.putExtra("status",this.status);
+            if (datas.get(i).getInouttype().equals("1") || datas.get(i).getInouttype().equals("2")){
+                intent.setClass(context,BuySellInventoryActivity.class);
+            }else {
+                intent.setClass(context,ProductionInventoryActivity.class);
+            }
+            ActivityUtils.startActivity(intent);
+        });
+        //入库审核
+        itemViewHolder.futures_subsidiary.setOnClickListener(view -> {
+            Intent intent = new Intent();
+            intent.putExtra("type","1");
+            intent.putExtra("status",this.status);
+            if (datas.get(i).getInouttype().equals("1") || datas.get(i).getInouttype().equals("2")){
+                intent.setClass(context,BuySellInventoryActivity.class);
+            }else {
+                intent.setClass(context,ProductionInventoryActivity.class);
+            }
+            ActivityUtils.startActivity(intent);
+        });
+        //详情
+        itemViewHolder.place_the_order.setOnClickListener(view -> {
+            Intent intent = new Intent();
+            intent.putExtra("type","3");
+            intent.putExtra("status",this.status);
+            if (datas.get(i).getInouttype().equals("1") || datas.get(i).getInouttype().equals("2")){
+                intent.setClass(context,BuySellInventoryActivity.class);
+            }else {
+                intent.setClass(context,ProductionInventoryActivity.class);
+            }
+            ActivityUtils.startActivity(intent);
+        });
+
+        itemViewHolder.exposure_horItemScrollview.setEventListener(event -> {
+            if (null != onContentScrollListener) onContentScrollListener.onScroll(event);
+        });
+        //由于viewHolder的缓存,在1级缓存取出来是2个viewholder,并且不会被重新赋值,所以这里需要处理缓存的viewholder的位移
+        itemViewHolder.exposure_horItemScrollview.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            @Override
+            public void onGlobalLayout() {
+                if (!itemViewHolder.isLayoutFinish()) {
+                    itemViewHolder.exposure_horItemScrollview.scrollTo(offestX, 0);
+                    itemViewHolder.setLayoutFinish(true);
+                }
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return null == datas ? 0 : datas.size();
+    }
+
+    public List<ItemViewHolder> getViewHolderCacheList() {
+        return mViewHolderList;
+    }
+
+    public int getOffestX() {
+        return offestX;
+    }
+
+    public static class ItemViewHolder extends RecyclerView.ViewHolder {
+        LinearLayout exposure_roots_view;//根部布局
+        TextView spot_subsidiary;//现货明细
+        TextView futures_subsidiary;//期货明细
+        TextView place_the_order;//下单
+        LinearLayout exposure_allView;//隐藏的底部操作空间
+        LinearLayout exposure_all_click_View;//item左侧点击控件
+        TextView exposure_tvLeftTitle;//左边
+        TextView exposure_tv_left_bottom_title;//合同编号
+        RecyclerView exposure_rvItemRight;//右方的列表
+        public CustomHorizontalScrollView exposure_horItemScrollview;//右方的滑动控件
+        private boolean isLayoutFinish;//自定义字段,用于标记layout
+
+        public boolean isLayoutFinish() {
+            return isLayoutFinish;
+        }
+
+        public void setLayoutFinish(boolean layoutFinish) {
+            isLayoutFinish = layoutFinish;
+        }
+
+        public ItemViewHolder(@NonNull View itemView) {
+            super(itemView);
+            spot_subsidiary = itemView.findViewById(R.id.spot_subsidiary);
+            futures_subsidiary = itemView.findViewById(R.id.futures_subsidiary);
+            place_the_order = itemView.findViewById(R.id.place_the_order);
+            exposure_tvLeftTitle = itemView.findViewById(R.id.exposure_tv_left_title);
+            exposure_rvItemRight = itemView.findViewById(R.id.exposure_rv_item_right);
+            exposure_horItemScrollview = itemView.findViewById(R.id.exposure_hor_item_scrollview);
+            exposure_allView = itemView.findViewById(R.id.exposure_all_view);
+            exposure_tv_left_bottom_title = itemView.findViewById(R.id.exposure_tv_left_bottom_title);
+            exposure_all_click_View = itemView.findViewById(R.id.exposure_all_click_View);
+            exposure_roots_view = itemView.findViewById(R.id.exposure_roots_view);
+        }
+    }
+}

+ 575 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/ProductionInventoryActivity.kt

@@ -0,0 +1,575 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventoryaudit
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import android.view.inputmethod.EditorInfo
+import android.widget.EditText
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.AreaStockApplyData
+import cn.muchinfo.rma.global.inouttype
+import cn.muchinfo.rma.global.inventoryapplystatus
+import cn.muchinfo.rma.global.isBlankString
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import org.jetbrains.anko.*
+
+/**
+ * 生产入库/出库审核
+ */
+class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
+
+    /**
+     * status 1 :入库   2:出库
+     */
+    private val status by lazy { intent.getStringExtra("status") }
+
+    /**
+     * type 1 :审核  2 :撤回  3 : 详情
+     */
+    private val type by lazy { intent.getStringExtra("type") }
+
+    //传进来的数据
+    private val data by lazy {
+        intent.getParcelableExtra<AreaStockApplyData>("data") as AreaStockApplyData
+    }
+
+    /**
+     * 审核意见
+     */
+    lateinit var ramask_edittext : EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            val margingPadding = autoSize(47)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    if (type == "1"){
+                        text = "审核"
+                    }else if (type == "2"){
+                        text = "撤回"
+                    }else if (type == "3"){
+                        text = "详情"
+                    }
+                }
+            }
+
+            frameLayout {
+                scrollView {
+                    verticalLayout {
+                        background = resources.getDrawable(R.color.white)
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (data.applystatus == "2"){
+                                background = resources.getDrawable(R.color.rma_pass_status)//rma_pass_status已通过背景色
+                            }else{
+                                background = resources.getDrawable(R.color.rma_details_status)//rma_pass_status已通过背景色
+                            }
+
+                            imageView {
+                                if (data.applystatus == "2"){
+                                    imageResource = R.mipmap.rma_pass_status
+                                }else{
+                                    imageResource = R.mipmap.rma_wait_status
+                                }
+
+                            }.lparams(autoSize(38), autoSize(38)) {
+                                marginStart = autoSize(37)
+                            }
+                            textView {
+                                text = data.applystatus?.inventoryapplystatus()
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_yellow_text_color
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(20)
+                            }
+                        }.lparams(matchParent, autoSize(60))
+
+
+                        textView {
+                            text = "待审核登记信息:"
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "类型"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.inouttype?.inouttype()
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "现货品种 "
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.warehousename
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "品类"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.modelname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.applytime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "品牌"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.brandname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    if (status == "1"){
+                                        text = "入库仓库"
+                                    }else{
+                                        text = "出库仓库"
+                                    }
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.warehousename
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.applytime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    if (status == "1"){
+                                        text = "入库数量"
+                                    }else{
+                                        text = "出库数量"
+                                    }
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.qty
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.enumdicname
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = margingPadding
+                                    }
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "登记时间"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.applytime?.split(" ")?.get(0)
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.applytime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "登记人"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.applyname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                         view {
+                             if (type == "3"){
+                                 visibility = View.VISIBLE
+                             }else{
+                                 visibility = View.GONE
+                             }
+                            background = resources.getDrawable(R.color.rma_hint_line_color_eee)
+                        }.lparams(matchParent, autoSize(1)) {
+                            marginStart = autoSize(36)
+                            marginEnd = autoSize(36)
+                            topMargin = autoSize(30)
+                        }
+
+                        textView {
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            text = "待审核登记信息:"
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            linearLayout {
+                                textView {
+                                    text = "审核人"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.auditname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+
+
+                             linearLayout {
+                                textView {
+                                    text = "审核时间"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(0)
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                            linearLayout {
+                                textView {
+                                    text = "审核结果"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.applystatus?.inventoryapplystatus() ?: "--"
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+
+
+                             linearLayout {
+                                textView {
+                                    text = "审核意见"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(0)
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    textView {
+                                        text = data.audittime?.split(" ")?.get(1)
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            if (type == "3"){
+                                visibility = View.VISIBLE
+                            }else{
+                                visibility = View.GONE
+                            }
+                             linearLayout {
+                                textView {
+                                    text = "审核意见"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                 textView {
+                                     text = data.auditremark?.isBlankString()
+                                     textSizeAuto = 29
+                                     textColorInt = R.color.rma_black_33
+                                 }.lparams(wrapContent, wrapContent){
+                                     marginStart = autoSize(100)
+                                     marginEnd = autoSize(47)
+                                 }
+
+                            }.lparams(matchParent, wrapContent)
+                        }.lparams(matchParent, wrapContent) {
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            visibility = if (type == "1"){
+                                View.VISIBLE
+                            }else{
+                                View.GONE
+                            }
+                            textView {
+                                text = "审核意见"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            linearLayout {
+                                background = resources.getDrawable(R.drawable.rma_item_click_bg)
+                                editText {
+                                    ramask_edittext = this
+                                    setPadding(0, 10, 0, 0)
+                                    hint = "请输入审核意见"
+                                    gravity = Gravity.LEFT or Gravity.TOP
+                                    background = null
+                                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                                    hintColorStr = "#CCCCCC"
+                                    textSizeAuto = 31
+                                    textColorStr = "#333333"
+                                }.lparams(matchParent, matchParent) {
+
+                                }
+                            }.lparams(autoSize(432), autoSize(220)) {
+                                marginStart = autoSize(138)
+                            }
+                        }.lparams(matchParent, autoSize(220)){
+                            topMargin = autoSize(50)
+                            bottomMargin = autoSize(40)
+                        }
+                    }
+                }
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    visibility = if (type == "1"){
+                        View.VISIBLE
+                    }else{
+                        View.GONE
+                    }
+                    textView {
+                        onThrottleFirstClick {
+
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_save_info_bg
+                        text = "审核拒绝"
+                        textSizeAuto = 38
+                        textColorInt = R.color.rma_star_color
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(24)
+                    }
+
+                    textView {
+                        onThrottleFirstClick {
+
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = "审核通过"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(419), autoSize(119)) {
+                        marginStart = autoSize(13)
+                    }
+
+                    textView {
+                        onThrottleFirstClick {
+
+                        }
+                        visibility = if (type == "2"){
+                            View.VISIBLE
+                        }else{
+                            View.GONE
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = "撤回"
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(780), autoSize(119)){
+                        marginStart = autoSize(59)
+                    }
+                }.lparams(matchParent, autoSize(144)) {
+                    gravity = Gravity.BOTTOM
+                }
+            }
+
+        }
+    }
+
+}

+ 315 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/AddInventoryActivity.kt

@@ -0,0 +1,315 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import android.view.inputmethod.EditorInfo
+import android.widget.EditText
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.contract.baseInformationView
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import org.jetbrains.anko.*
+
+/**
+ *  入库登记/出库登记
+ */
+class AddInventoryActivity : BaseActivity<InventoryManagerViewModel>(){
+
+    /**
+     * 输入的数量
+     */
+    lateinit var contact_edittext : EditText
+
+
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "入库登记"
+                }
+            }
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                onThrottleFirstClick {
+
+                }
+                textView {
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+
+                textView {
+                    text = "入库类型"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                textView {
+                    text = "请选择入库类型"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(80)
+                }
+
+                emptyView()
+
+                imageView {
+                    imageResource = R.mipmap.rma_more
+                }.lparams(autoSize(36), autoSize(36)) {
+                    marginEnd = autoSize(25)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            baseInformationView("基本信息")
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                onThrottleFirstClick {
+
+                }
+                textView {
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+
+                textView {
+                    text = "现货品种"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                textView {
+                    text = "请选择入库现货品种"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(80)
+                }
+
+                emptyView()
+
+                imageView {
+                    imageResource = R.mipmap.rma_more
+                }.lparams(autoSize(36), autoSize(36)) {
+                    marginEnd = autoSize(25)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                onThrottleFirstClick {
+
+                }
+                textView {
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+
+                textView {
+                    text = "品        类"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                textView {
+                    text = "请选择品类"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(80)
+                }
+
+                emptyView()
+
+                imageView {
+                    imageResource = R.mipmap.rma_more
+                }.lparams(autoSize(36), autoSize(36)) {
+                    marginEnd = autoSize(25)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                onThrottleFirstClick {
+
+                }
+                textView {
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+
+                textView {
+                    text = "品        牌"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                textView {
+                    text = "请选择品牌"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(80)
+                }
+
+                emptyView()
+
+                imageView {
+                    imageResource = R.mipmap.rma_more
+                }.lparams(autoSize(36), autoSize(36)) {
+                    marginEnd = autoSize(25)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                onThrottleFirstClick {
+
+                }
+                textView {
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+
+                textView {
+                    text = "入库仓库"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                textView {
+                    text = "请选择入库仓库"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(80)
+                }
+
+                emptyView()
+
+                imageView {
+                    imageResource = R.mipmap.rma_more
+                }.lparams(autoSize(36), autoSize(36)) {
+                    marginEnd = autoSize(25)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                textView {
+                    visibility = View.INVISIBLE
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+                textView {
+                    text = "联  系  人"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                editText {
+                    contact_edittext = this
+                    hint = "请输入联系人"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(autoSize(400), autoSize(132)) {
+                    marginStart = autoSize(80)
+                }
+
+                emptyView()
+
+                textView {
+                    text = "吨"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginEnd = autoSize(47)
+                }
+
+
+            }.lparams(matchParent, autoSize(132))
+
+
+            view { }.lparams(autoSize(1),0 , 1f)
+
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+
+                onThrottleFirstClick {
+
+                }
+
+                textView {
+                    text = "入库登记"
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_save_info_bg
+                    textSizeAuto = 38
+                    textColorInt = R.color.rma_star_color
+                }.lparams(autoSize(780), autoSize(119)) {
+                    marginStart = autoSize(24)
+                }
+            }.lparams(matchParent, autoSize(144))
+        }
+    }
+
+}

+ 204 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryDetailsActivity.kt

@@ -0,0 +1,204 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.MotionEvent
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.AreaStockReportDetailData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter.ApplyRecordAdapter
+import cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter.InventoryDetailsAdapter
+import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
+import com.blankj.utilcode.util.SizeUtils
+import org.jetbrains.anko.*
+
+class InventoryDetailsActivity : BaseActivity<InventoryManagerViewModel>(),InventoryDetailsAdapter.OnContentScrollListener {
+
+    /**
+     * type 1 入库明细 2 出库明细
+     */
+    private val type by lazy { intent.getStringExtra("type") }
+
+    private val data by lazy { intent.getParcelableExtra<AreaStockReportDetailData>("data") as AreaStockReportDetailData }
+
+
+    /**
+     *
+      库存报表-入库明细
+      const val table_mobile_stock_report_in_detail = "table_mobile_stock_report_in_detail"
+
+      库存报表-出库明细
+      const val table_mobile_stock_report_out_detail = "table_mobile_stock_report_out_detail"
+     */
+    private val titleType by lazy { intent.getStringExtra("titleType") }
+
+    /**
+     * 是日报表明细还是月报表明细 1 日报表 2月报表
+     */
+    private val querytype by lazy { intent.getStringExtra("querytype") }
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    val topAdapter by lazy {
+        TopTabAdpater(this)
+    }
+
+    val exposureContentAdapter by lazy {
+        InventoryDetailsAdapter(this,type)
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+
+            viewModel.queryDetailsTitle(title = titleType ?: "")
+            exposureContentAdapter.setOnContentScrollListener(this@InventoryDetailsActivity)
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    if (type == "1"){
+                        text = "库存报表-入库明细"
+                    }else{
+                        text = "库存报表-出库明细"
+                    }
+                }
+            }
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                background = resources.getDrawable(R.color.rma_blue_color)
+                textView {
+                    text = "现货品种:" + data.wrstandardname
+                    textSizeAuto = 31
+                    textColorInt = R.color.white
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(47)
+                }
+            }.lparams(matchParent, autoSize(60))
+
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//头部右侧数据
+                        viewModel.inventoryDetailsTitle.bindOptional(context) {
+                            text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+                        }
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 24
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(90f)), autoSize(100))
+
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    /**
+                     * 用来同步内容列表的item左右滑动
+                     */
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY ->
+                        exposureContentAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<InventoryDetailsAdapter.ItemViewHolder> =
+                            exposureContentAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].exposure_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.inventoryDetailsTitle.bindOptional(context) {
+                            val titleStringList = arrayListOf<String>()
+                            it?.subList(1, it.size)?.forEach { data ->
+                                titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+                            }
+                            topAdapter.setDatas(titleStringList)
+                        }
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        /**
+                         * 下拉刷新
+                         */
+                        viewModel.queryAreaStockApply()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = exposureContentAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<InventoryDetailsAdapter.ItemViewHolder> =
+                                    exposureContentAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                            exposureContentAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+                    }
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.inventoryDetailsDataList.bindOptional(context) {
+
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    exposureContentAdapter.setDatas(it)
+                }
+            }
+
+
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+
+    }
+
+}

+ 442 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerActivity.kt

@@ -0,0 +1,442 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager
+
+import android.os.Bundle
+import android.view.Gravity
+import android.view.MotionEvent
+import android.view.View
+import android.view.ViewGroup
+import androidx.appcompat.app.AppCompatActivity
+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.global.toShowTime
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.home.inventory.inventoryaudit.InventoryContentAdapter
+import cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter.ApplyRecordAdapter
+import cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter.InventoryCurrentAdapter
+import cn.muchinfo.rma.view.base.procurement.TopTabAdpater
+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.viewPager
+
+/**
+ * 库存管理
+ */
+class InventoryManagerActivity : BaseActivity<InventoryManagerViewModel>() {
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    private val tabsArray: List<String> by lazy {
+        arrayListOf(
+            "当前库存", "申请记录"
+        )
+    }
+
+    private val currentInventoryUI by lazy { CurrentInventoryUI(this, viewModel) }//当前库存ui
+    private val applyRecordUI by lazy { ApplyRecordUI(this, viewModel) }//申请记录ui
+
+    private val pagerAdapter: PagerAdapter by lazy {
+        object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = tabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                when (position) {
+                    0 -> {
+                        return currentInventoryUI.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    1 -> {
+                        return applyRecordUI.root.apply {
+                            container.addView(
+                                this,
+                                ViewGroup.LayoutParams(matchParent, matchParent)
+                            )
+                        }
+                    }
+                    else -> return super.instantiateItem(container, position)
+                }
+            }
+
+            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 = tabsArray.size
+
+        }
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                // 返回
+                commonLeftButton()
+                commonTitle {
+                    text = "库存管理"
+                }
+                // 新增客户申请
+                commonMenuButton(R.mipmap.add_new) {
+
+                }
+            }
+
+            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(80))
+
+            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 = pagerAdapter
+            }.lparams(matchParent, matchParent)
+
+            segment.setupWithViewPager(viewPager)
+            segment.selectTab(selectedTabIndex)
+
+        }
+    }
+
+}
+
+/**
+ * 当前库存
+ * @property activity AppCompatActivity
+ * @property viewModel InventoryManagerViewModel
+ * @property root _FrameLayout
+ * @constructor
+ */
+
+class CurrentInventoryUI(
+    private val activity: AppCompatActivity,
+    private val viewModel: InventoryManagerViewModel
+) : InventoryCurrentAdapter.OnContentScrollListener {
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    val topAdapter by lazy {
+        TopTabAdpater(activity)
+    }
+
+    val exposureContentAdapter by lazy {
+        InventoryCurrentAdapter(activity)
+    }
+
+    fun reFresh(){
+        viewModel.queryAreaStock()
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            viewModel.queryTitle(title = Constant.table_mobile_stock_manage_current,type = "1")
+            exposureContentAdapter.setOnContentScrollListener(this@CurrentInventoryUI)
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//头部右侧数据
+                        viewModel.inventoryCurrentTitle.bindOptional(context) {
+                            text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+                        }
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 24
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(90f)), autoSize(100))
+
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    /**
+                     * 用来同步内容列表的item左右滑动
+                     */
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY ->
+                        exposureContentAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<InventoryCurrentAdapter.ItemViewHolder> =
+                            exposureContentAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].exposure_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.inventoryCurrentTitle.bindOptional(context) {
+                            val titleStringList = arrayListOf<String>()
+                            it?.subList(1, it.size)?.forEach { data ->
+                                titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+                            }
+                            topAdapter.setDatas(titleStringList)
+                        }
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        /**
+                         * 下拉刷新
+                         */
+                        viewModel.queryAreaStock()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = exposureContentAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<InventoryCurrentAdapter.ItemViewHolder> =
+                                    exposureContentAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                            exposureContentAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+                    }
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.inventoryCurrenttDataList.bindOptional(context) {
+
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    exposureContentAdapter.setDatas(it)
+                }
+
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+    }
+
+}
+
+/**
+ * 申请记录
+ * @property activity AppCompatActivity
+ * @property viewModel InventoryManagerViewModel
+ * @property root _FrameLayout
+ * @constructor
+ */
+
+class ApplyRecordUI(
+    private val activity: AppCompatActivity,
+    private val viewModel: InventoryManagerViewModel
+): ApplyRecordAdapter.OnContentScrollListener {
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+    lateinit var horScrollview: CustomHorizontalScrollView
+    lateinit var recyclerView: RecyclerView
+
+    val topAdapter by lazy {
+        TopTabAdpater(activity)
+    }
+
+    val exposureContentAdapter by lazy {
+        ApplyRecordAdapter(activity)
+    }
+
+    fun refresh() {
+        viewModel.queryAreaStockApply()
+    }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            viewModel.queryTitle(title = Constant.table_mobile_stock_manage_applylog, type = "1")
+            exposureContentAdapter.setOnContentScrollListener(this@ApplyRecordUI)
+
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {//头部右侧数据
+                        viewModel.applyRecordTitle.bindOptional(context) {
+                            text = it?.get(0)?.columntitle?.replace("\\n", "\n") ?: ""
+                        }
+                        textColorStr = "#AAAAAA"
+                        textSizeAuto = 24
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                }.lparams(autoSize(SizeUtils.dp2px(90f)), autoSize(100))
+
+                inflateLayout<CustomHorizontalScrollView>(R.layout.scrollview) {
+                    horScrollview = this
+                    /**
+                     * 用来同步内容列表的item左右滑动
+                     */
+                    setOnCustomScrollChangeListener { listener, scrollX, scrollY, oldScrollX, oldScrollY ->
+                        exposureContentAdapter.offestX = scrollX
+                        val viewHolderCacheList: List<ApplyRecordAdapter.ItemViewHolder> =
+                            exposureContentAdapter.viewHolderCacheList
+                        if (null != viewHolderCacheList) {
+                            val size = viewHolderCacheList.size
+                            for (i in 0 until size) {
+                                viewHolderCacheList[i].exposure_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.applyRecordTitle.bindOptional(context) {
+                            val titleStringList = arrayListOf<String>()
+                            it?.subList(1, it.size)?.forEach { data ->
+                                titleStringList.add(data.columntitle?.replace("\\n", "\n") ?: "")
+                            }
+                            topAdapter.setDatas(titleStringList)
+                        }
+                    }
+                }.lparams(matchParent, matchParent)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        /**
+                         * 下拉刷新
+                         */
+                        viewModel.queryAreaStockApply()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = exposureContentAdapter
+                        addOnScrollListener(object : RecyclerView.OnScrollListener() {
+                            override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+                                super.onScrolled(recyclerView, dx, dy)
+                                val viewHolderCacheList: List<ApplyRecordAdapter.ItemViewHolder> =
+                                    exposureContentAdapter.viewHolderCacheList
+                                if (null != viewHolderCacheList) {
+                                    val size = viewHolderCacheList.size
+                                    for (i in 0 until size) {
+                                        viewHolderCacheList[i].exposure_horItemScrollview.scrollTo(
+                                            exposureContentAdapter.getOffestX(),
+                                            0
+                                        )
+                                    }
+                                }
+                            }
+                        })
+                    }
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.applyRecordDataList.bindOptional(context) {
+
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    exposureContentAdapter.setDatas(it)
+                }
+            }
+        }
+    }
+
+    override fun onScroll(event: MotionEvent?) {
+        //处理单个item滚动时,顶部tab需要联动
+        if (null != horScrollview) horScrollview.onTouchEvent(event)
+
+    }
+}

+ 210 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerViewModel.kt

@@ -0,0 +1,210 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.AreaStockApplyData
+import cn.muchinfo.rma.global.data.AreaStockData
+import cn.muchinfo.rma.global.data.AreaStockReportDetailData
+import cn.muchinfo.rma.global.data.ColumnsData
+import cn.muchinfo.rma.global.inouttype
+import cn.muchinfo.rma.global.inventoryapplystatus
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.toArrayList
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.BaseViewModel
+import cn.muchinfo.rma.view.base.app.Constant
+
+class InventoryManagerViewModel : BaseViewModel(){
+
+    /**
+     * 库存管理当前库存头部数据
+     */
+    val inventoryCurrentTitle: MutableLiveData<List<ColumnsData>> = MutableLiveData()
+
+    /**
+     * 库存管理当前库存头部数据
+     */
+    val applyRecordTitle: MutableLiveData<List<ColumnsData>> = MutableLiveData()
+
+    /**
+     * 库存管理当前库存列表数据
+     */
+    val inventoryCurrenttDataList : MutableLiveData<List<AreaStockData>> = MutableLiveData()
+
+    /**
+     * 库存管理当前库存列表数据
+     */
+    val applyRecordDataList : MutableLiveData<List<AreaStockApplyData>> = MutableLiveData()
+
+    /**
+     * 报表明细头部列表
+     */
+    val inventoryDetailsTitle: MutableLiveData<List<ColumnsData>> = MutableLiveData()
+
+    /**
+     *报表明细列表数据
+     */
+    val inventoryDetailsDataList: MutableLiveData<List<AreaStockReportDetailData>> = MutableLiveData()
+
+
+    /**
+     * 查询实时敞口列表头部数据 type 1 当前库存 2 申请记录
+     * @param tableKey String
+     */
+    fun queryTitle(title : String,type: String) {
+        val params = mutableMapOf<String, String>().apply {
+            put("tableKey", title)
+            put("tableType", "3")
+        }
+        MyApplication.getInstance()?.commonManager?.queryTableDefine(params = params) { isSuccess, respData, error ->
+            if (isSuccess) {
+                val newlist = respData?.get(0)?.columns?.toArrayList()
+                newlist?.sortWith(Comparator { t1, t2 ->
+                    t1.orderindex?.toInt()?.minus(t2.orderindex?.toInt() ?: 0) ?: 0
+                })
+                if (type == "1") {
+                    inventoryCurrentTitle.postValue(newlist)
+                    queryAreaStock()
+                }else{
+                    applyRecordTitle.postValue(newlist)
+                    queryAreaStockApply()
+                }
+
+            }
+        }
+    }
+
+    /**
+     * 列表头部数据 type 1 入库明细 2 出库明细
+     * @param tableKey String
+     */
+    // TODO 这里的参数不知道传不传
+    fun queryDetailsTitle(title : String,querytype : String = "",detailtype : String = "",querydate : String = "") {
+        val params = mutableMapOf<String, String>().apply {
+            put("tableKey", title)
+            put("tableType", "3")
+        }
+        MyApplication.getInstance()?.commonManager?.queryTableDefine(params = params) { isSuccess, respData, error ->
+            if (isSuccess) {
+                val newlist = respData?.get(0)?.columns?.toArrayList()
+                newlist?.sortWith(Comparator { t1, t2 ->
+                    t1.orderindex?.toInt()?.minus(t2.orderindex?.toInt() ?: 0) ?: 0
+                })
+                inventoryDetailsTitle.postValue(newlist)
+                queryAreaStockReportDetail(querytype  ,detailtype ,querydate)
+            }
+        }
+    }
+
+    /**
+     * 出入库报表明细
+     */
+    fun queryAreaStockReportDetail(querytype : String,detailtype : String,querydate : String){
+        val params = mutableMapOf<String, String>().apply {
+            put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("querytype", querytype)
+            put("detailtype",detailtype)
+            put("querydate",querydate)
+        }
+        MyApplication.getInstance()?.warehouseManager?.queryAreaStockReportDetail(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                /**
+                 * 对数据进行组装
+                 */
+                inventoryDetailsDataList.postValue(getinventoryDetailsRightData(respData ?: arrayListOf()))
+            }
+        }
+    }
+
+
+    /**
+     * 查询库存申请(出入库记录|库存审核)
+     */
+    fun queryAreaStockApply(){
+        val params = mutableMapOf<String, String>()
+        params.put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+
+        MyApplication.getInstance()?.warehouseManager?.queryAreaStockApply(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                applyRecordDataList.postValue(getapplyRecordRightData(respData ?: arrayListOf()))
+            }
+        }
+    }
+
+    /**
+     * 查询机构库存(库存管理/当前库存)
+     */
+    fun queryAreaStock(){
+        val params = mutableMapOf<String, String>()
+        params.put("userid", GlobalDataCollection.instance?.loginRsp?.userID.toString())
+
+        MyApplication.getInstance()?.warehouseManager?.queryAreaStock(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                inventoryCurrenttDataList.postValue(getInventoryAuditRightData(respData ?: arrayListOf()))
+            }
+        }
+    }
+
+    /**
+     * 当前库组装右部数据
+     * @param respData List<RealExposureData>
+     * @return List<RealExposureData>
+     */
+    private fun getInventoryAuditRightData(respData: List<AreaStockData>) : List<AreaStockData>{
+        val newList = arrayListOf<AreaStockData>()
+        respData.forEach {
+            val newRightData = arrayListOf<String>()
+            newRightData.add(it.modelname +"\n" +it.brandname)
+            newRightData.add(it.warehousename ?: "--")
+            newRightData.add(it.oristock + it.enumdicname + "\n" + it.curstock + it.enumdicname)
+            newRightData.add(it.todayproduceinqty + it.enumdicname + "\n" + it.todayproduceoutqty + it.enumdicname)
+            val newData = it.copy(rightData = newRightData)
+            newList.add(newData)
+        }
+        return newList
+    }
+
+    /**
+     * 申请记录
+     * @param respData List<RealExposureData>
+     * @return List<RealExposureData>
+     */
+    private fun getapplyRecordRightData(respData: List<AreaStockApplyData>) : List<AreaStockApplyData>{
+        val newList = arrayListOf<AreaStockApplyData>()
+        respData.forEach {
+            val newRightData = arrayListOf<String>()
+            newRightData.add(it.wrstandardname ?: "--")
+            newRightData.add(it.inouttype?.inouttype() + "\n" + NumberUtils.roundNum(it.qty,2) + it.enumdicname)
+            newRightData.add(it.applystatus?.inventoryapplystatus() ?: "--")
+            newRightData.add(it.contractno ?: "--")
+            newRightData.add(it.modelname +"\n" +it.brandname)
+            newRightData.add(it.warehousename ?: "--")
+            newRightData.add(it.applyname + "\n" + it.auditname)
+            val newData = it.copy(rightData = newRightData)
+            newList.add(newData)
+        }
+        return newList
+    }
+
+    /**
+     * 报表明细
+     * @param respData List<RealExposureData>
+     *     type 1 入库明细 2出库明细
+     * @return List<RealExposureData>
+     */
+    private fun getinventoryDetailsRightData(respData: List<AreaStockReportDetailData>) : List<AreaStockReportDetailData>{
+        val newList = arrayListOf<AreaStockReportDetailData>()
+        respData.forEach {
+            val newRightData = arrayListOf<String>()
+            newRightData.add(it.modelname +"\n" +it.brandname)
+            newRightData.add(it.warehousename ?: "--")
+            newRightData.add(it.inouttype?.inouttype() + "\n" + NumberUtils.roundNum(it.qty,2) + it.enumdicname)
+            newRightData.add(it.contractno ?: "--")
+            newRightData.add(it.applyname + "\n" + it.auditname)
+            val newData = it.copy(rightData = newRightData)
+            newList.add(newData)
+        }
+        return newList
+    }
+
+}

+ 186 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/ApplyRecordAdapter.java

@@ -0,0 +1,186 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.ViewEnumUtils;
+import cn.muchinfo.rma.global.data.AreaStockApplyData;
+import cn.muchinfo.rma.global.data.AreaStockData;
+import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
+
+/**
+ * 用于库存管理当前库存的列表adapter
+ */
+public class ApplyRecordAdapter extends RecyclerView.Adapter<ApplyRecordAdapter.ItemViewHolder> {
+
+    private Context context;
+    private List<AreaStockApplyData> datas;
+    private int index = -1;
+    private int position = -1;
+    private List<ItemViewHolder> mViewHolderList = new ArrayList<>();
+    public int offestX = 0;
+    private OnContentScrollListener onContentScrollListener;
+
+
+    public interface OnContentScrollListener {
+        void onScroll(MotionEvent event);
+    }
+
+    public void setOnContentScrollListener(OnContentScrollListener onContentScrollListener) {
+        this.onContentScrollListener = onContentScrollListener;
+    }
+
+    public ApplyRecordAdapter(Context context) {
+        this.context = context;
+    }
+
+    public void setDatas(List<AreaStockApplyData> datas) {
+        this.datas = datas;
+        notifyDataSetChanged();
+    }
+
+    private void setPosition(int position){
+        if (this.position == position) {
+            this.position = -1;
+            notifyItemChanged(index);
+        } else {
+            this.position = position;
+            notifyItemChanged(position);
+        }
+    }
+
+    @NonNull
+    @Override
+    public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
+        View view = LayoutInflater.from(context).inflate(R.layout.layout_item_inventory_current, viewGroup, false);
+        return new ItemViewHolder(view);
+    }
+
+    @SuppressLint("SetTextI18n")
+    @Override
+    public void onBindViewHolder(@NonNull final ItemViewHolder itemViewHolder, int i) {
+        this.index = i;
+        itemViewHolder.exposure_tvLeftTitle.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getApplytime(),"MM/dd HH:mm"));
+        itemViewHolder.exposure_tv_left_bottom_title.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getAudittime(),"MM/dd HH:mm"));
+        //右边滑动部分
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
+        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        itemViewHolder.exposure_rvItemRight.setLayoutManager(linearLayoutManager);
+        itemViewHolder.exposure_rvItemRight.setHasFixedSize(true);
+        RightScrollAdapter rightScrollAdapter = new RightScrollAdapter(context);
+        rightScrollAdapter.setDatas(datas.get(i).getRightData());
+        itemViewHolder.exposure_rvItemRight.setAdapter(rightScrollAdapter);
+        //缓存当前holder
+        if (!mViewHolderList.contains(itemViewHolder)) {
+            mViewHolderList.add(itemViewHolder);
+        }
+        if (i == this.position){
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
+            itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
+        }else {
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.white));
+            itemViewHolder.exposure_allView.setVisibility(View.GONE);
+        }
+
+        itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setPosition(i);
+            }
+        });
+
+        //入库明细
+        itemViewHolder.futures_subsidiary.setOnClickListener(view -> {
+
+        });
+        //出库明细
+        itemViewHolder.place_the_order.setOnClickListener(view -> {
+//            Intent intent = new Intent();
+//            intent.putExtra("type","3");
+//            intent.putExtra("status",this.status);
+//            if (datas.get(i).getInouttype().equals("1") || datas.get(i).getInouttype().equals("2")){
+//                intent.setClass(context,BuySellInventoryActivity.class);
+//            }else {
+//                intent.setClass(context,ProductionInventoryActivity.class);
+//            }
+//            ActivityUtils.startActivity(intent);
+        });
+
+        itemViewHolder.exposure_horItemScrollview.setEventListener(event -> {
+            if (null != onContentScrollListener) onContentScrollListener.onScroll(event);
+        });
+        //由于viewHolder的缓存,在1级缓存取出来是2个viewholder,并且不会被重新赋值,所以这里需要处理缓存的viewholder的位移
+        itemViewHolder.exposure_horItemScrollview.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            @Override
+            public void onGlobalLayout() {
+                if (!itemViewHolder.isLayoutFinish()) {
+                    itemViewHolder.exposure_horItemScrollview.scrollTo(offestX, 0);
+                    itemViewHolder.setLayoutFinish(true);
+                }
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return null == datas ? 0 : datas.size();
+    }
+
+    public List<ItemViewHolder> getViewHolderCacheList() {
+        return mViewHolderList;
+    }
+
+    public int getOffestX() {
+        return offestX;
+    }
+
+    public static class ItemViewHolder extends RecyclerView.ViewHolder {
+        LinearLayout exposure_roots_view;//根部布局
+        TextView futures_subsidiary;//
+        TextView place_the_order;//
+        LinearLayout exposure_allView;//隐藏的底部操作空间
+        LinearLayout exposure_all_click_View;//item左侧点击控件
+        TextView exposure_tvLeftTitle;//左边
+        TextView exposure_tv_left_bottom_title;//合同编号
+        RecyclerView exposure_rvItemRight;//右方的列表
+        public CustomHorizontalScrollView exposure_horItemScrollview;//右方的滑动控件
+        private boolean isLayoutFinish;//自定义字段,用于标记layout
+
+        public boolean isLayoutFinish() {
+            return isLayoutFinish;
+        }
+
+        public void setLayoutFinish(boolean layoutFinish) {
+            isLayoutFinish = layoutFinish;
+        }
+
+        public ItemViewHolder(@NonNull View itemView) {
+            super(itemView);
+            futures_subsidiary = itemView.findViewById(R.id.futures_subsidiary);
+            place_the_order = itemView.findViewById(R.id.place_the_order);
+            exposure_tvLeftTitle = itemView.findViewById(R.id.exposure_tv_left_title);
+            exposure_rvItemRight = itemView.findViewById(R.id.exposure_rv_item_right);
+            exposure_horItemScrollview = itemView.findViewById(R.id.exposure_hor_item_scrollview);
+            exposure_allView = itemView.findViewById(R.id.exposure_all_view);
+            exposure_tv_left_bottom_title = itemView.findViewById(R.id.exposure_tv_left_bottom_title);
+            exposure_all_click_View = itemView.findViewById(R.id.exposure_all_click_View);
+            exposure_roots_view = itemView.findViewById(R.id.exposure_roots_view);
+        }
+    }
+}

+ 191 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/InventoryCurrentAdapter.java

@@ -0,0 +1,191 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.blankj.utilcode.util.ActivityUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.ViewEnumUtils;
+import cn.muchinfo.rma.global.data.AreaStockApplyData;
+import cn.muchinfo.rma.global.data.AreaStockData;
+import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.home.inventory.inventoryaudit.BuySellInventoryActivity;
+import cn.muchinfo.rma.view.base.home.inventory.inventoryaudit.ProductionInventoryActivity;
+import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
+
+/**
+ * 用于库存管理当前库存的列表adapter
+ */
+public class InventoryCurrentAdapter extends RecyclerView.Adapter<InventoryCurrentAdapter.ItemViewHolder> {
+
+    private Context context;
+    private List<AreaStockData> datas;
+    private int index = -1;
+    private int position = -1;
+    private List<ItemViewHolder> mViewHolderList = new ArrayList<>();
+    public int offestX = 0;
+    private OnContentScrollListener onContentScrollListener;
+
+
+    public interface OnContentScrollListener {
+        void onScroll(MotionEvent event);
+    }
+
+    public void setOnContentScrollListener(OnContentScrollListener onContentScrollListener) {
+        this.onContentScrollListener = onContentScrollListener;
+    }
+
+    public InventoryCurrentAdapter(Context context) {
+        this.context = context;
+    }
+
+    public void setDatas(List<AreaStockData> datas) {
+        this.datas = datas;
+        notifyDataSetChanged();
+    }
+
+    private void setPosition(int position){
+        if (this.position == position) {
+            this.position = -1;
+            notifyItemChanged(index);
+        } else {
+            this.position = position;
+            notifyItemChanged(position);
+        }
+    }
+
+    @NonNull
+    @Override
+    public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
+        View view = LayoutInflater.from(context).inflate(R.layout.layout_item_inventory_current, viewGroup, false);
+        return new ItemViewHolder(view);
+    }
+
+    @SuppressLint("SetTextI18n")
+    @Override
+    public void onBindViewHolder(@NonNull final ItemViewHolder itemViewHolder, int i) {
+        this.index = i;
+        itemViewHolder.exposure_tvLeftTitle.setText(datas.get(i).getWrstandardname());
+//        itemViewHolder.exposure_tv_left_bottom_title.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getAudittime(),"MM/dd HH:mm"));
+        //右边滑动部分
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
+        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        itemViewHolder.exposure_rvItemRight.setLayoutManager(linearLayoutManager);
+        itemViewHolder.exposure_rvItemRight.setHasFixedSize(true);
+        RightScrollAdapter rightScrollAdapter = new RightScrollAdapter(context);
+        rightScrollAdapter.setDatas(datas.get(i).getRightData());
+        itemViewHolder.exposure_rvItemRight.setAdapter(rightScrollAdapter);
+        //缓存当前holder
+        if (!mViewHolderList.contains(itemViewHolder)) {
+            mViewHolderList.add(itemViewHolder);
+        }
+        if (i == this.position){
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
+            itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
+        }else {
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.white));
+            itemViewHolder.exposure_allView.setVisibility(View.GONE);
+        }
+
+        itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setPosition(i);
+            }
+        });
+
+        //入库明细
+        itemViewHolder.futures_subsidiary.setOnClickListener(view -> {
+
+        });
+        //出库明细
+        itemViewHolder.place_the_order.setOnClickListener(view -> {
+//            Intent intent = new Intent();
+//            intent.putExtra("type","3");
+//            intent.putExtra("status",this.status);
+//            if (datas.get(i).getInouttype().equals("1") || datas.get(i).getInouttype().equals("2")){
+//                intent.setClass(context,BuySellInventoryActivity.class);
+//            }else {
+//                intent.setClass(context,ProductionInventoryActivity.class);
+//            }
+//            ActivityUtils.startActivity(intent);
+        });
+
+        itemViewHolder.exposure_horItemScrollview.setEventListener(event -> {
+            if (null != onContentScrollListener) onContentScrollListener.onScroll(event);
+        });
+        //由于viewHolder的缓存,在1级缓存取出来是2个viewholder,并且不会被重新赋值,所以这里需要处理缓存的viewholder的位移
+        itemViewHolder.exposure_horItemScrollview.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            @Override
+            public void onGlobalLayout() {
+                if (!itemViewHolder.isLayoutFinish()) {
+                    itemViewHolder.exposure_horItemScrollview.scrollTo(offestX, 0);
+                    itemViewHolder.setLayoutFinish(true);
+                }
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return null == datas ? 0 : datas.size();
+    }
+
+    public List<ItemViewHolder> getViewHolderCacheList() {
+        return mViewHolderList;
+    }
+
+    public int getOffestX() {
+        return offestX;
+    }
+
+    public static class ItemViewHolder extends RecyclerView.ViewHolder {
+        LinearLayout exposure_roots_view;//根部布局
+        TextView futures_subsidiary;//
+        TextView place_the_order;//
+        LinearLayout exposure_allView;//隐藏的底部操作空间
+        LinearLayout exposure_all_click_View;//item左侧点击控件
+        TextView exposure_tvLeftTitle;//左边
+        TextView exposure_tv_left_bottom_title;//合同编号
+        RecyclerView exposure_rvItemRight;//右方的列表
+        public CustomHorizontalScrollView exposure_horItemScrollview;//右方的滑动控件
+        private boolean isLayoutFinish;//自定义字段,用于标记layout
+
+        public boolean isLayoutFinish() {
+            return isLayoutFinish;
+        }
+
+        public void setLayoutFinish(boolean layoutFinish) {
+            isLayoutFinish = layoutFinish;
+        }
+
+        public ItemViewHolder(@NonNull View itemView) {
+            super(itemView);
+            futures_subsidiary = itemView.findViewById(R.id.futures_subsidiary);
+            place_the_order = itemView.findViewById(R.id.place_the_order);
+            exposure_tvLeftTitle = itemView.findViewById(R.id.exposure_tv_left_title);
+            exposure_rvItemRight = itemView.findViewById(R.id.exposure_rv_item_right);
+            exposure_horItemScrollview = itemView.findViewById(R.id.exposure_hor_item_scrollview);
+            exposure_allView = itemView.findViewById(R.id.exposure_all_view);
+            exposure_tv_left_bottom_title = itemView.findViewById(R.id.exposure_tv_left_bottom_title);
+            exposure_all_click_View = itemView.findViewById(R.id.exposure_all_click_View);
+            exposure_roots_view = itemView.findViewById(R.id.exposure_roots_view);
+        }
+    }
+}

+ 194 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/adapter/InventoryDetailsAdapter.java

@@ -0,0 +1,194 @@
+package cn.muchinfo.rma.view.base.home.inventory.inventorymanager.adapter;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.ViewEnumUtils;
+import cn.muchinfo.rma.global.data.AreaStockApplyData;
+import cn.muchinfo.rma.global.data.AreaStockReportDetailData;
+import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
+import cn.muchinfo.rma.view.base.procurement.RightScrollAdapter;
+
+/**
+ * 用于库存管理当前库存的列表adapter
+ */
+public class InventoryDetailsAdapter extends RecyclerView.Adapter<InventoryDetailsAdapter.ItemViewHolder> {
+
+    private Context context;
+    private List<AreaStockReportDetailData> datas;
+    private int index = -1;
+    private int position = -1;
+    private List<ItemViewHolder> mViewHolderList = new ArrayList<>();
+    public int offestX = 0;
+    private OnContentScrollListener onContentScrollListener;
+    private String type;//1是入库明细 2是出库明细
+
+
+    public interface OnContentScrollListener {
+        void onScroll(MotionEvent event);
+    }
+
+    public void setOnContentScrollListener(OnContentScrollListener onContentScrollListener) {
+        this.onContentScrollListener = onContentScrollListener;
+    }
+
+    public InventoryDetailsAdapter(Context context,String type) {
+        this.type = type;
+        this.context = context;
+    }
+
+    public void setDatas(List<AreaStockReportDetailData> datas) {
+        this.datas = datas;
+        notifyDataSetChanged();
+    }
+
+    private void setPosition(int position){
+        if (this.position == position) {
+            this.position = -1;
+            notifyItemChanged(index);
+        } else {
+            this.position = position;
+            notifyItemChanged(position);
+        }
+    }
+
+    @NonNull
+    @Override
+    public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
+        View view = LayoutInflater.from(context).inflate(R.layout.layout_item_inventory_current, viewGroup, false);
+        return new ItemViewHolder(view);
+    }
+
+    @SuppressLint("SetTextI18n")
+    @Override
+    public void onBindViewHolder(@NonNull final ItemViewHolder itemViewHolder, int i) {
+        this.index = i;
+        if (this.type.equals("1")){
+            itemViewHolder.exposure_tvLeftTitle.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getApplytime(),"MM/dd HH:mm"));
+            itemViewHolder.exposure_tv_left_bottom_title.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getAudittime(),"MM/dd HH:mm"));
+        }else {
+            itemViewHolder.exposure_tvLeftTitle.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getApplytime(),"MM/dd HH:mm"));
+            itemViewHolder.exposure_tv_left_bottom_title.setText(ViewEnumUtils.INSTANCE.isShowTimeString(datas.get(i).getAudittime(),"MM/dd HH:mm"));
+        }
+
+        //右边滑动部分
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
+        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
+        itemViewHolder.exposure_rvItemRight.setLayoutManager(linearLayoutManager);
+        itemViewHolder.exposure_rvItemRight.setHasFixedSize(true);
+        RightScrollAdapter rightScrollAdapter = new RightScrollAdapter(context);
+        rightScrollAdapter.setDatas(datas.get(i).getRightData());
+        itemViewHolder.exposure_rvItemRight.setAdapter(rightScrollAdapter);
+        //缓存当前holder
+        if (!mViewHolderList.contains(itemViewHolder)) {
+            mViewHolderList.add(itemViewHolder);
+        }
+        if (i == this.position){
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
+            itemViewHolder.exposure_allView.setVisibility(View.VISIBLE);
+        }else {
+            itemViewHolder.exposure_roots_view.setBackgroundColor(context.getResources().getColor(R.color.white));
+            itemViewHolder.exposure_allView.setVisibility(View.GONE);
+        }
+
+        itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                setPosition(i);
+            }
+        });
+
+        //入库明细
+        itemViewHolder.futures_subsidiary.setOnClickListener(view -> {
+
+        });
+        //出库明细
+        itemViewHolder.place_the_order.setOnClickListener(view -> {
+//            Intent intent = new Intent();
+//            intent.putExtra("type","3");
+//            intent.putExtra("status",this.status);
+//            if (datas.get(i).getInouttype().equals("1") || datas.get(i).getInouttype().equals("2")){
+//                intent.setClass(context,BuySellInventoryActivity.class);
+//            }else {
+//                intent.setClass(context,ProductionInventoryActivity.class);
+//            }
+//            ActivityUtils.startActivity(intent);
+        });
+
+        itemViewHolder.exposure_horItemScrollview.setEventListener(event -> {
+            if (null != onContentScrollListener) onContentScrollListener.onScroll(event);
+        });
+        //由于viewHolder的缓存,在1级缓存取出来是2个viewholder,并且不会被重新赋值,所以这里需要处理缓存的viewholder的位移
+        itemViewHolder.exposure_horItemScrollview.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            @Override
+            public void onGlobalLayout() {
+                if (!itemViewHolder.isLayoutFinish()) {
+                    itemViewHolder.exposure_horItemScrollview.scrollTo(offestX, 0);
+                    itemViewHolder.setLayoutFinish(true);
+                }
+            }
+        });
+    }
+
+    @Override
+    public int getItemCount() {
+        return null == datas ? 0 : datas.size();
+    }
+
+    public List<ItemViewHolder> getViewHolderCacheList() {
+        return mViewHolderList;
+    }
+
+    public int getOffestX() {
+        return offestX;
+    }
+
+    public static class ItemViewHolder extends RecyclerView.ViewHolder {
+        LinearLayout exposure_roots_view;//根部布局
+        TextView futures_subsidiary;//
+        TextView place_the_order;//
+        LinearLayout exposure_allView;//隐藏的底部操作空间
+        LinearLayout exposure_all_click_View;//item左侧点击控件
+        TextView exposure_tvLeftTitle;//左边
+        TextView exposure_tv_left_bottom_title;//合同编号
+        RecyclerView exposure_rvItemRight;//右方的列表
+        public CustomHorizontalScrollView exposure_horItemScrollview;//右方的滑动控件
+        private boolean isLayoutFinish;//自定义字段,用于标记layout
+
+        public boolean isLayoutFinish() {
+            return isLayoutFinish;
+        }
+
+        public void setLayoutFinish(boolean layoutFinish) {
+            isLayoutFinish = layoutFinish;
+        }
+
+        public ItemViewHolder(@NonNull View itemView) {
+            super(itemView);
+            futures_subsidiary = itemView.findViewById(R.id.futures_subsidiary);
+            place_the_order = itemView.findViewById(R.id.place_the_order);
+            exposure_tvLeftTitle = itemView.findViewById(R.id.exposure_tv_left_title);
+            exposure_rvItemRight = itemView.findViewById(R.id.exposure_rv_item_right);
+            exposure_horItemScrollview = itemView.findViewById(R.id.exposure_hor_item_scrollview);
+            exposure_allView = itemView.findViewById(R.id.exposure_all_view);
+            exposure_tv_left_bottom_title = itemView.findViewById(R.id.exposure_tv_left_bottom_title);
+            exposure_all_click_View = itemView.findViewById(R.id.exposure_all_click_View);
+            exposure_roots_view = itemView.findViewById(R.id.exposure_roots_view);
+        }
+    }
+}

+ 5 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/PaymentRegistrationActivity.kt

@@ -589,6 +589,11 @@ class PaymentRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                             }
 
                             linearLayout {
+                                if (type == "2"){
+                                    visibility = View.GONE
+                                }else{
+                                    visibility = View.VISIBLE
+                                }
                                 textView {
                                     text = "备注"
                                     textSizeAuto = 31

+ 482 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/WarehouseRegistrationActivity.kt

@@ -0,0 +1,482 @@
+package cn.muchinfo.rma.view.base.home.registration
+
+import android.annotation.SuppressLint
+import android.os.Bundle
+import android.view.Gravity
+import android.view.inputmethod.EditorInfo
+import android.widget.EditText
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.ViewEnumUtils
+import cn.muchinfo.rma.global.data.AreaStockApplySumData
+import cn.muchinfo.rma.global.data.ContractData
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.dialog.createLoadingDialog
+import mtp.polymer.com.autowidget.utils.bindTaskStatus
+import org.jetbrains.anko.*
+
+/**
+ * 采购入库登记页面/销售出库页面
+ */
+class WarehouseRegistrationActivity : BaseActivity<RegistrationViewModel>() {
+
+    /**
+     * type 1 : 采购 2 : 销售
+     */
+    private val type by lazy {
+        intent.getStringExtra("type")
+    }
+
+    //传进来的数据
+    private val data by lazy {
+        intent.getParcelableExtra<ContractData>("data") as ContractData
+    }
+
+    private val dialog by lazy { createLoadingDialog(hintStr = "请求中...") }
+
+    lateinit var inventory_quantity: EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            dialog.bindTaskStatus(context, viewModel.loadingDialogStatus)
+            val margingPadding = autoSize(47)
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = if (type == "1") {
+                        "采购入库登记"
+                    } else {
+                        "销售出库登记"
+                    }
+                }
+            }
+
+            frameLayout {
+                scrollView {
+                    verticalLayout {
+                        background = resources.getDrawable(R.color.white)
+                        textView {
+                            text = "合同基本信息"
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "合同编号"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = ViewEnumUtils.getContractType(
+                                            data.contracttype ?: ""
+                                        ) + "/"
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                    textView {
+                                        text = data.contractno
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "现货品种"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.deliverygoodsname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = margingPadding
+                                    }
+                                }.lparams(matchParent, wrapContent)
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60)) {
+                            topMargin = autoSize(30)
+                        }
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = if (type == "1") {
+                                        "销售方"
+                                    } else {
+                                        "采购方"
+                                    }
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.accountname
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                            linearLayout {
+                                textView {
+                                    text = "合同签署量"
+                                    textColorInt = R.color.p_normal_summary_txt_color
+                                    textSizeAuto = 29
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = margingPadding
+                                }
+
+                                linearLayout {
+                                    emptyView()
+                                    textView {
+                                        text = data.qty
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                    textView {
+                                        text = data.enumdicname
+                                        textSizeAuto = 17
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent)
+
+                            }.lparams(autoSize(450), wrapContent)
+                        }.lparams(matchParent, autoSize(60))
+
+                        view {
+                            background = resources.getDrawable(R.color.rma_hint_line_color_eee)
+                        }.lparams(matchParent, autoSize(1)) {
+                            marginStart = autoSize(36)
+                            marginEnd = autoSize(36)
+                            topMargin = autoSize(30)
+                        }
+
+
+                        textView {
+                            text = if (type == "1") {
+                                "已登记入库信息"
+                            } else {
+                                "已登记出库信息"
+                            }
+
+                            textColorInt = R.color.rma_blue_color
+                            textSizeAuto = 34
+                        }.lparams(wrapContent, wrapContent) {
+                            marginStart = margingPadding
+                            topMargin = autoSize(25)
+                        }
+
+                        verticalLayout {
+
+                        }.lparams(matchParent, wrapContent)
+
+                        verticalLayout {
+                            backgroundDrawable = createRoundRectDrawable("#ffffff", 14)
+                            textView {
+                                text = if (type == "1") {
+                                    "本次入库信息"
+                                } else {
+                                    "本次出库信息"
+                                }
+                                textColorInt = R.color.rma_blue_color
+                                textSizeAuto = 34
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = margingPadding
+                                topMargin = autoSize(25)
+                            }
+
+                            linearLayout {
+                                background = resources.getDrawable(R.color.white)
+                                gravity = Gravity.CENTER_VERTICAL
+                                onThrottleFirstClick {
+
+                                }
+
+                                textView {
+                                    text = if (type == "1") {
+                                        "入库类型"
+                                    } else {
+                                        "出库类型"
+                                    }
+
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(59)
+                                }
+
+                                textView {
+                                     text = if (type == "1") {
+                                        "请选择入库类型"
+                                    } else {
+                                        "请选择出库类型"
+                                    }
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(80)
+                                }
+
+                                emptyView()
+
+                                imageView {
+                                    imageResource = R.mipmap.rma_more
+                                }.lparams(autoSize(36), autoSize(36)) {
+                                    marginEnd = autoSize(25)
+                                }
+                            }.lparams(matchParent, autoSize(122))
+
+                            linearLayout {
+                                background = resources.getDrawable(R.color.white)
+                                gravity = Gravity.CENTER_VERTICAL
+                                onThrottleFirstClick {
+
+                                }
+
+                                textView {
+                                    text = "品        类"
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(59)
+                                }
+
+                                textView {
+                                    text = "请选择品类"
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(80)
+                                }
+
+                                emptyView()
+
+                                imageView {
+                                    imageResource = R.mipmap.rma_more
+                                }.lparams(autoSize(36), autoSize(36)) {
+                                    marginEnd = autoSize(25)
+                                }
+                            }.lparams(matchParent, autoSize(122))
+
+                            linearLayout {
+                                background = resources.getDrawable(R.color.white)
+                                gravity = Gravity.CENTER_VERTICAL
+                                onThrottleFirstClick {
+
+                                }
+
+                                textView {
+                                    text = "品        牌"
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(59)
+                                }
+
+                                textView {
+                                    text = "请选择品牌"
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(80)
+                                }
+
+                                emptyView()
+
+                                imageView {
+                                    imageResource = R.mipmap.rma_more
+                                }.lparams(autoSize(36), autoSize(36)) {
+                                    marginEnd = autoSize(25)
+                                }
+                            }.lparams(matchParent, autoSize(122))
+
+                            linearLayout {
+                                background = resources.getDrawable(R.color.white)
+                                gravity = Gravity.CENTER_VERTICAL
+                                onThrottleFirstClick {
+
+                                }
+
+                                textView {
+                                     text = if (type == "1") {
+                                        "入库仓库"
+                                    } else {
+                                        "出库仓库"
+                                    }
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(59)
+                                }
+
+                                textView {
+                                    text = if (type == "1") {
+                                        "请选择入库仓库"
+                                    } else {
+                                        "请选择出库仓库"
+                                    }
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(80)
+                                }
+
+                                emptyView()
+
+                                imageView {
+                                    imageResource = R.mipmap.rma_more
+                                }.lparams(autoSize(36), autoSize(36)) {
+                                    marginEnd = autoSize(25)
+                                }
+                            }.lparams(matchParent, autoSize(122))
+
+
+                            linearLayout {
+                                gravity = Gravity.CENTER_VERTICAL
+                                textView {
+                                    text = if (type == "1") {
+                                        "入库数量"
+                                    } else {
+                                        "出库数量"
+                                    }
+                                    textSizeAuto = 31
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+
+                                linearLayout {
+                                    background = resources.getDrawable(R.drawable.rma_item_click_bg)
+
+                                    editText {
+                                        inventory_quantity = this
+                                        setPadding(0, 10, 0, 0)
+                                        setSingleLine(true)
+                                        gravity = Gravity.CENTER
+                                        hint = "0.00"
+                                        background = null
+                                        inputType = EditorInfo.TYPE_CLASS_NUMBER
+                                        setDecimalInputType()
+                                        hintColorStr = "#CCCCCC"
+                                        textSizeAuto = 31
+                                        textColorStr = "#333333"
+                                    }.lparams(matchParent, matchParent) {
+
+                                    }
+                                }.lparams(autoSize(432), autoSize(72)) {
+                                    marginStart = autoSize(80)
+                                }
+
+                                textView {
+                                    text = data.enumdicname
+                                    textSizeAuto = 29
+                                    textColorInt = R.color.rma_black_33
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(28)
+                                }
+                            }.lparams(matchParent, autoSize(80)) {
+                                topMargin = autoSize(20)
+                            }
+                        }.lparams(matchParent, wrapContent) {
+                            marginStart = autoSize(24)
+                            marginEnd = autoSize(24)
+                            topMargin = autoSize(24)
+                            bottomMargin = autoSize(200)
+                        }
+                    }.lparams(autoSize(900), matchParent)
+                }
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+
+                    textView {
+                        onThrottleFirstClick {
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = if (type == "1"){
+                            "入库登记"
+                        }else{
+                            "出库登记"
+                        }
+                        textColorInt = R.color.white
+                        textSizeAuto = 38
+                    }.lparams(autoSize(780), autoSize(119)) {
+                        marginStart = autoSize(59)
+                    }
+
+                }.lparams(matchParent, autoSize(144)) {
+                    gravity = Gravity.BOTTOM
+                }
+            }.lparams(matchParent, matchParent)
+
+        }
+    }
+
+    @SuppressLint("SetTextI18n")
+    fun _LinearLayout.AreaStockApplySumUI(
+        type: String,
+        index: Int,
+        data: AreaStockApplySumData,
+        enumdicname: String
+    ) {
+        linearLayout {
+            gravity = Gravity.CENTER_VERTICAL
+            textView {
+                text = if (type == "1"){
+                    "已入库量$index"
+                }else{
+                    "已出库量$index"
+                }
+                textSizeAuto = 29
+                textColorInt = R.color.rma_hint_title_text_color
+            }.lparams(wrapContent, wrapContent) {
+                marginStart = autoSize(47)
+            }
+
+            emptyView()
+
+            textView {
+                textColorInt = R.color.rma_black_33
+                textSizeAuto = 29
+                text =
+                    data.modelname + "+" + data.brandname + "(" + data.totalqty + enumdicname + ")"
+            }.lparams(wrapContent, wrapContent) {
+                marginEnd = autoSize(47)
+            }
+        }.lparams(matchParent, autoSize(60))
+    }
+
+
+}

+ 3 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/warehouse/AddWareHouseInformationActivity.kt

@@ -268,7 +268,7 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                             }
 
                             editText {
-                                warehouse_referred = this
+                                contact_phone = this
                                 hint = "请输入联系电话"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_TEXT
@@ -344,7 +344,7 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                             }
 
                             editText {
-                                warehouse_referred = this
+                                detailed_address = this
                                 hint = "请输入详细地址"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_TEXT
@@ -389,15 +389,13 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                         backgroundResource = R.mipmap.rma_save_info_bg
                         textSizeAuto = 38
                         textColorInt = R.color.rma_star_color
-                    }.lparams(autoSize(419), autoSize(119)) {
+                    }.lparams(autoSize(780), autoSize(119)) {
                         marginStart = autoSize(24)
                     }
                 }.lparams(matchParent, autoSize(144)) {
                     gravity = Gravity.BOTTOM
                 }
             }
-
-
         }
     }
 

+ 1 - 6
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/warehouse/WarehouseInformationActivity.kt

@@ -1,6 +1,5 @@
 package cn.muchinfo.rma.view.base.home.warehouse
 
-import android.content.Intent
 import android.os.Bundle
 import android.view.Gravity
 import android.view.View
@@ -9,11 +8,9 @@ import androidx.appcompat.app.AppCompatActivity
 import androidx.viewpager.widget.PagerAdapter
 import androidx.viewpager.widget.ViewPager
 import cn.muchinfo.rma.R
-import cn.muchinfo.rma.global.data.UserInfoData
 import cn.muchinfo.rma.global.data.WarehouseInfoData
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
-import cn.muchinfo.rma.view.base.home.customerdata.CustomerDataViewHolder
 import com.blankj.utilcode.util.ConvertUtils
 import com.qmuiteam.qmui.util.QMUIDisplayHelper
 import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
@@ -40,8 +37,6 @@ class WarehouseInformationActivity : BaseActivity<WarehouseInformationViewModel>
     private val warehouseNormalUI by lazy { WarehouseNormalUI(this,viewModel) }//正常
     private val warehouseDisableUI by lazy { WarehouseDisableUI(this,viewModel) }//停用
 
-
-
     private val pagerAdapter: PagerAdapter by lazy {
         object : PagerAdapter() {
 
@@ -89,7 +84,7 @@ class WarehouseInformationActivity : BaseActivity<WarehouseInformationViewModel>
                 // 返回
                 commonLeftButton()
                 commonTitle {
-                    textResource = R.string.customer_data
+                    text = "仓库信息"
                 }
                 // 新增客户申请
                 commonMenuButton(R.mipmap.add_new) {

+ 102 - 0
RMA/app/src/main/res/layout/layout_item_inventory_content.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:id="@+id/exposure_roots_view"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:id="@+id/exposure_all_click_View"
+        android:layout_width="match_parent"
+        android:orientation="horizontal"
+        android:layout_height="55dp">
+
+        <LinearLayout
+            android:gravity="center_vertical"
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:layout_marginStart="10dp"
+                android:id="@+id/exposure_tv_left_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="13sp"
+                android:textColor="#333333" />
+            <TextView
+                android:layout_marginStart="10dp"
+                android:id="@+id/exposure_tv_left_bottom_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="10sp"
+                android:textColor="#333333" />
+
+        </LinearLayout>
+        <cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView
+            android:id="@+id/exposure_hor_item_scrollview"
+            android:overScrollMode="never"
+            android:scrollbars="none"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent">
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/exposure_rv_item_right"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:overScrollMode="never"
+                    android:scrollbars="none">
+
+                </androidx.recyclerview.widget.RecyclerView>
+            </RelativeLayout>
+        </cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView>
+    </LinearLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:id="@+id/exposure_all_view"
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:gravity="end|center_vertical"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/spot_subsidiary"
+            android:layout_marginEnd="10dp"
+            android:gravity="center"
+            android:textSize="12sp"
+            android:layout_width="70dp"
+            android:layout_height="25dp"
+            android:text="撤回"
+            android:textColor="@color/rma_blue_color"
+            android:background="@drawable/rma_item_click_bg"/>
+
+        <TextView
+            android:id="@+id/futures_subsidiary"
+            android:layout_marginEnd="10dp"
+            android:gravity="center"
+            android:textSize="12sp"
+            android:layout_width="70dp"
+            android:layout_height="25dp"
+            android:text="入库审核"
+            android:textColor="@color/rma_blue_color"
+            android:background="@drawable/rma_item_click_bg"/>
+
+        <TextView
+            android:id="@+id/place_the_order"
+            android:layout_marginEnd="10dp"
+            android:gravity="center"
+            android:textSize="12sp"
+            android:layout_width="40dp"
+            android:layout_height="25dp"
+            android:text="详情"
+            android:textColor="@color/rma_blue_color"
+            android:background="@drawable/rma_item_click_bg"/>
+
+    </LinearLayout>
+
+</LinearLayout>

+ 92 - 0
RMA/app/src/main/res/layout/layout_item_inventory_current.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:id="@+id/exposure_roots_view"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:id="@+id/exposure_all_click_View"
+        android:layout_width="match_parent"
+        android:orientation="horizontal"
+        android:layout_height="55dp">
+
+        <LinearLayout
+            android:gravity="center_vertical"
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:layout_marginStart="10dp"
+                android:id="@+id/exposure_tv_left_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="13sp"
+                android:textColor="#333333" />
+            <TextView
+                android:layout_marginStart="10dp"
+                android:id="@+id/exposure_tv_left_bottom_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="10sp"
+                android:textColor="#333333" />
+
+        </LinearLayout>
+        <cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView
+            android:id="@+id/exposure_hor_item_scrollview"
+            android:overScrollMode="never"
+            android:scrollbars="none"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent">
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/exposure_rv_item_right"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:overScrollMode="never"
+                    android:scrollbars="none">
+
+                </androidx.recyclerview.widget.RecyclerView>
+            </RelativeLayout>
+        </cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView>
+    </LinearLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:id="@+id/exposure_all_view"
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:gravity="end|center_vertical"
+        android:orientation="horizontal">
+
+
+        <TextView
+            android:id="@+id/futures_subsidiary"
+            android:layout_marginEnd="10dp"
+            android:gravity="center"
+            android:textSize="12sp"
+            android:layout_width="70dp"
+            android:layout_height="25dp"
+            android:text="入库明细"
+            android:textColor="@color/rma_blue_color"
+            android:background="@drawable/rma_item_click_bg"/>
+
+        <TextView
+            android:id="@+id/place_the_order"
+            android:layout_marginEnd="10dp"
+            android:gravity="center"
+            android:textSize="12sp"
+            android:layout_width="40dp"
+            android:layout_height="25dp"
+            android:text="出库明细"
+            android:textColor="@color/rma_blue_color"
+            android:background="@drawable/rma_item_click_bg"/>
+
+    </LinearLayout>
+
+</LinearLayout>