Pārlūkot izejas kodu

风险管理10月22日提交代码-liu.bolan-天津麦顿/企业风管6期开发

Liu.bolan 4 gadi atpakaļ
vecāks
revīzija
64ee9a0354
58 mainītis faili ar 1704 papildinājumiem un 211 dzēšanām
  1. 10 0
      RMA/app/src/main/AndroidManifest.xml
  2. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt
  3. 49 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/StringUtils.kt
  4. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractTradeDetailData.kt
  5. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractTradeOrderDetailData.kt
  6. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractTradePositionData.kt
  7. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/HnstWrPositionData.kt
  8. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/HoldLBData.kt
  9. 3 4
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/OrderQuoteData.kt
  10. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/OrderQuoteMyqData.kt
  11. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/TjmdTransferApplyData.kt
  12. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrDeliveryDetailData.kt
  13. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrOrderDetailData.kt
  14. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrOutInApplyData.kt
  15. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrSpecialMatchOrderData.kt
  16. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrTradeBargainApplyData.kt
  17. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/account/loginQeruy/GoodsInfo.kt
  18. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  19. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/bookingwarehouse/adapter/BookingAreCancelContentAdapter.java
  20. 20 11
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/bookingwarehouse/adapter/BookingTradeBarginContentAdapter.java
  21. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractAgreementContentAdapter.java
  22. 20 10
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractDeliveryContentAdapter.java
  23. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractOrderContentAdapter.java
  24. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractPositionContentAdapter.java
  25. 18 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractTraderContentAdapter.java
  26. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/AreCancelContentAdapter.java
  27. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/DetailsWarehouseContentAdapter.java
  28. 20 10
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/PickUpContentAdapter.java
  29. 18 7
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/SpecifyDealContentAdapter.java
  30. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/SpotWarehouseContentAdapter.java
  31. 20 11
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/TradeBarginContentAdapter.java
  32. 117 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/MiddleGoodsDetailsActivity.kt
  33. 72 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/MiddleGoodsDetailsViewHolder.kt
  34. 13 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/MiddleGoodsDetailsViewModel.kt
  35. 28 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/flow/CommodityModificationFlowActivity.kt
  36. 12 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/flow/CommodityModificationFlowViewModel.kt
  37. 27 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/AddGoodsActivity.kt
  38. 188 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/ChangeHedgeRatioActivity.kt
  39. 124 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/ChangeSpotVarietyActivity.kt
  40. 12 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/ModifyViewModel.kt
  41. 29 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewAddSpotGoodsViewModel.kt
  42. 61 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewInsuredVarietyViewHolder.kt
  43. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewSpotInfoData.kt
  44. 294 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientAuditActivity.kt
  45. 11 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientAuditViewModel.kt
  46. 187 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioAuditActivity.kt
  47. 4 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/AddHedgePlanActivity.kt
  48. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgePlanViewModel.kt
  49. 14 8
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/LoginActivity.kt
  50. 27 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithDrawManagementActivity.kt
  51. 9 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithDrawManagementViewModel.kt
  52. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithdrawalActivity.kt
  53. 6 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt
  54. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/circle/TradeCircleContentAdapter.java
  55. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/floata/FloatPriceAdapter.java
  56. 20 9
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/one/OnePriceAdapter.java
  57. 20 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/adapter/TransferAdapter.java
  58. 26 15
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/swaps/TransferSwapsAdapter.java

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

@@ -485,6 +485,16 @@
         <activity android:name=".view.base.spot.associated.perioddocuments.FillSingleConnectionActivity"/>
 
         <activity android:name=".view.base.main.about.AboutActivity"/>
+
+        <activity android:name=".view.base.home.ductaudit.convertcoefficient.ConvertCoefficientAuditActivity"/>
+
+        <activity android:name=".view.base.home.ductaudit.hedgeratio.HedgeRatioAuditActivity"/>
+
+        <activity android:name=".view.base.home.commodity.MiddleGoodsDetailsActivity"/>
+
+        <activity android:name=".view.base.home.commodity.modify.ChangeSpotVarietyActivity"/>
+
+        <activity android:name=".view.base.home.commodity.modify.ChangeHedgeRatioActivity"/>
     </application>
 
 </manifest>

+ 0 - 1
RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt

@@ -459,7 +459,6 @@ class AccountManager {
                 it.code == "client_stock_aduit" ||
                 it.code == "client_stock" ||
                 it.code == "client_warehouse" ||
-                it.code == "client_report" ||
                 it.code == "client_traderflow" ||
                 it.code == "client_finance" ||
                 it.code == "client_business" ||

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

@@ -63,6 +63,55 @@ fun String.colorType() : Int{
 }
 
 /**
+ * 签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中 10:审核拒绝 11:换签待审核
+ * @receiver String
+ * @return String
+ */
+fun String.signstatus() : String{
+    if (this.isNullOrEmpty()){
+        return "--"
+    }
+    var str = ""
+    when {
+        this == "1" -> {
+            str = "未签约"
+        }
+        this == "2" -> {
+            str = "签约待审核"
+        }
+        this == "3" -> {
+            str = "签约中"
+        }
+        this == "4" -> {
+            str = "已签约"
+        }
+        this == "5" -> {
+            str = "解约待审核"
+        }
+        this == "6" -> {
+            str = "解约中"
+        }
+        this == "7" -> {
+            str = "已解约"
+        }
+        this == "8" -> {
+            str = "已解绑"
+        }
+        this == "9" -> {
+            str = "绑卡中"
+        }
+        this == "10" -> {
+            str = "审核拒绝"
+        }
+        this == "11" -> {
+            str = "换签待审核"
+        }
+    }
+
+    return str
+}
+
+/**
  * 议价单申请状态 申请状态 - 1:待确认 2:已确认 3:已拒绝 4:已撤销 5:系统撤销 6:处理失败 7:确认中
  * @receiver String
  * @return String

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class ContractTradeDetailData(
     @SerializedName("accountid")
     val accountid : String? = "",//账户ID[报价币种]
+    var isOnClick : Int = 0,
     @SerializedName("advanceratio")
     val advanceratio : String? = "",//首付比率
     @SerializedName("buildtype")
@@ -118,6 +119,7 @@ data class ContractTradeDetailData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -176,6 +178,7 @@ data class ContractTradeDetailData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(advanceratio)
         parcel.writeString(buildtype)
         parcel.writeString(buyorsell)
@@ -245,4 +248,5 @@ data class ContractTradeDetailData(
         }
     }
 
+
 }

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractTradeOrderDetailData.kt

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class ContractTradeOrderDetailData(
     @SerializedName("accountid")
     val accountid : String? = "",//账户ID[报价币种]
+    var isOnClick : Int = 0,
     @SerializedName("buildtype")
     val buildtype : String? = "",//委托单据类型 1:建仓 2:平仓 3:先平后建
     @SerializedName("buyorsell")
@@ -154,6 +155,7 @@ data class ContractTradeOrderDetailData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -230,6 +232,7 @@ data class ContractTradeOrderDetailData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(buildtype)
         parcel.writeString(buyorsell)
         parcel.writeString(cancelorderid)
@@ -317,5 +320,4 @@ data class ContractTradeOrderDetailData(
         }
     }
 
-
 }

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class ContractTradePositionData(
     @SerializedName("accountid")
     val accountid : String? = "",//资金账户
+    var isOnClick : Int = 0,
     @SerializedName("agreeunit")
     val agreeunit : String? = "",//合约单位
     @SerializedName("averageprice")
@@ -74,6 +75,7 @@ data class ContractTradePositionData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -111,6 +113,7 @@ data class ContractTradePositionData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(agreeunit)
         parcel.writeString(averageprice)
         parcel.writeString(buyorsell)

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class HnstWrPositionData(
     @SerializedName("accountid")
     val accountid : String? = "",//帐户ID
+    var isOnClick : Int = 0,
     @SerializedName("buyexcuteqty")
     val buyexcuteqty : String? = "",//采购履约中数量
     @SerializedName("creditcurqty")
@@ -74,6 +75,7 @@ data class HnstWrPositionData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -110,6 +112,7 @@ data class HnstWrPositionData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(buyexcuteqty)
         parcel.writeString(creditcurqty)
         parcel.writeString(creditenableqty)

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/HoldLBData.kt

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class HoldLBData(
     @SerializedName("accountid")
     val accountid : String? = "",//持有人帐户ID
+    var isOnClick : Int = 0,
     @SerializedName("createtime")
     val createtime : String? = "",//创建时间(过户时间)
     @SerializedName("deliverygoodscode")
@@ -64,6 +65,7 @@ data class HoldLBData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -95,6 +97,7 @@ data class HoldLBData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(createtime)
         parcel.writeString(deliverygoodscode)
         parcel.writeString(deliverygoodsid)
@@ -137,5 +140,4 @@ data class HoldLBData(
         }
     }
 
-
 }

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

@@ -73,13 +73,10 @@ data class OrderQuoteData(
     val wrstandardcode : String? = "",//商品代码
     @SerializedName("wrstandardid")
     val wrstandardid : String? = "",//商品id
+    var isOnClick : Int = 0,
     @SerializedName("wrstandardname")
     val wrstandardname : String? = ""//商品名称
 ) : Parcelable{
-
-
-
-
     constructor(parcel: Parcel) : this(
         parcel.readString(),
         parcel.readString(),
@@ -103,6 +100,7 @@ data class OrderQuoteData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString()
     ) {
     }
@@ -130,6 +128,7 @@ data class OrderQuoteData(
         parcel.writeString(wrgoodsname)
         parcel.writeString(wrstandardcode)
         parcel.writeString(wrstandardid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(wrstandardname)
     }
 

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class OrderQuoteMyqData(
     @SerializedName("buyorsell")
     val buyorsell : String? = "",//买卖 - 0:买 1:卖
+    var isOnClick : Int = 0,
     @SerializedName("canbargain")
     val canbargain : String? = "",//是否可议价 - 0:不可 1:可
     @SerializedName("canpart")
@@ -66,6 +67,7 @@ data class OrderQuoteMyqData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -98,6 +100,7 @@ data class OrderQuoteMyqData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(buyorsell)
+        parcel.writeInt(isOnClick)
         parcel.writeString(canbargain)
         parcel.writeString(canpart)
         parcel.writeString(delistminqty)

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class TjmdTransferApplyData(
     @SerializedName("applyid")
     val applyid : String? = "",//申请id
+    var isOnClick : Int = 0,
     @SerializedName("applystatus")
     val applystatus : String? = "",//状态 - 0:未提交 1:待审核 2:审核中 3:审核通过 4:审核拒绝 5:审核失败 6:已撤销
     @SerializedName("applytime")
@@ -38,6 +39,7 @@ data class TjmdTransferApplyData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -56,6 +58,7 @@ data class TjmdTransferApplyData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(applyid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(applystatus)
         parcel.writeString(applytime)
         parcel.writeString(auditremark)

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrDeliveryDetailData.kt

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class WrDeliveryDetailData(
     @SerializedName("accountid")
     val accountid : String? = "",//账号ID
+    var isOnClick : Int = 0,
     @SerializedName("buyorsell")
     val buyorsell : String? = "",//方向 - 0:买 1:卖
     @SerializedName("deliveryamount")
@@ -76,6 +77,7 @@ data class WrDeliveryDetailData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -113,6 +115,7 @@ data class WrDeliveryDetailData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(buyorsell)
         parcel.writeString(deliveryamount)
         parcel.writeString(deliveryorderid)
@@ -161,5 +164,4 @@ data class WrDeliveryDetailData(
         }
     }
 
-
 }

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrOrderDetailData.kt

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class WrOrderDetailData(
     @SerializedName("accountid")
     val accountid : String? = "",//交易账号(资金账号)
+    var isOnClick : Int = 0,
     @SerializedName("amount")
     val amount : String? = "",//挂牌金额 = 委托数量 * 固定价或升贴水
     @SerializedName("delistminqty")
@@ -112,6 +113,7 @@ data class WrOrderDetailData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -167,6 +169,7 @@ data class WrOrderDetailData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(amount)
         parcel.writeString(delistminqty)
         parcel.writeString(freezemargin)
@@ -233,5 +236,4 @@ data class WrOrderDetailData(
         }
     }
 
-
 }

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class WrOutInApplyData(
     @SerializedName("applyid")
     val applyid : String? = "",//申请单id
+    var isOnClick : Int = 0,
     @SerializedName("applystatus")
     val applystatus : String? = "",//申请状态 - 1:待初审 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销
     @SerializedName("applytime")
@@ -56,6 +57,7 @@ data class WrOutInApplyData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -83,6 +85,7 @@ data class WrOutInApplyData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(applyid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(applystatus)
         parcel.writeString(applytime)
         parcel.writeString(applytype)

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

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class WrSpecialMatchOrderData(
     @SerializedName("accountid")
     val accountid : String? = "",//资金账号
+    var isOnClick : Int = 0,
     @SerializedName("deliverymonth")
     val deliverymonth : String? = "",//交收月
     @SerializedName("chargevalue")
@@ -90,6 +91,7 @@ data class WrSpecialMatchOrderData(
 ): Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -134,6 +136,7 @@ data class WrSpecialMatchOrderData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(deliverymonth)
         parcel.writeString(chargevalue)
         parcel.writeString(matchaccountid)

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/WrTradeBargainApplyData.kt

@@ -10,6 +10,7 @@ import com.google.gson.annotations.SerializedName
 data class WrTradeBargainApplyData(
     @SerializedName("accountid")
     val accountid : String? = "",//摘牌资金账号
+    var isOnClick : Int = 0,
     @SerializedName("applyprice")
     val applyprice : String? = "",//申请价格
     @SerializedName("applyqty")
@@ -96,6 +97,7 @@ data class WrTradeBargainApplyData(
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
+        parcel.readInt(),
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
@@ -143,6 +145,7 @@ data class WrTradeBargainApplyData(
 
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(accountid)
+        parcel.writeInt(isOnClick)
         parcel.writeString(applyprice)
         parcel.writeString(applyqty)
         parcel.writeString(applyremark)
@@ -201,5 +204,4 @@ data class WrTradeBargainApplyData(
         }
     }
 
-
 }

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/account/loginQeruy/GoodsInfo.kt

@@ -53,7 +53,7 @@ data class GoodsInfo(
     var deliveryflag : Int = 0, // 交割标志 - 0:不可交割 1:可交割
     @SerializedName("hasquoter")
     @ColumnInfo(name = "has_quoter")
-    var hasquoter : Int = 0, // 是否有报价商 - 0:无报价商 1:有报价商
+    var hasquoter : Int = 0, // 是否有报价商 - 0:无报价商 1:有报价商(在云融和天津麦顿项目内,这个参数没用到暂时用作列表item的展开收起控制量)
     @SerializedName("hqprotecttime")
     @ColumnInfo(name = "hq_protect_time")
     var hqprotecttime : Int = 0, // 行情保护时间(秒)

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

@@ -15,9 +15,9 @@ object Constant {
 
 //    const val baseurl = "http://192.168.31.93:8080/cfg?key=test_93"//李倩企业风管 18611112222
 //    const val baseurl = "http://192.168.31.104:8080/cfg?key=test_104"//李倩云融 18611112222
-    const val baseurl = "http://192.168.31.137:8080/cfg?key=test_137"//李倩云融 18611112222
+//    const val baseurl = "http://192.168.31.137:8080/cfg?key=test_137"//李倩云融 18611112222
 //
-//    const val baseurl = "http://192.168.31.135:8080/cfg?key=test_135"// 瑶姐 云融 190000000001 123456
+    const val baseurl = "http://192.168.31.135:8080/cfg?key=test_135"// 瑶姐 云融 190000000001 123456
 
 //    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123
 //    const val baseurl = "http://192.168.31.223:8080/cfg?key=test_223"

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/bookingwarehouse/adapter/BookingAreCancelContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.WrOrderDetailData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.base.hnstmain.bookingwarehouse.BookingWarehouseViewModel;
@@ -65,14 +66,24 @@ public class BookingAreCancelContentAdapter extends RecyclerView.Adapter<Booking
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrOrderDetailData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrOrderDetailData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrOrderDetailData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -106,7 +117,7 @@ public class BookingAreCancelContentAdapter extends RecyclerView.Adapter<Booking
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -116,7 +127,7 @@ public class BookingAreCancelContentAdapter extends RecyclerView.Adapter<Booking
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                    setPosition(i);
+                setOnItemClick(i);
             }
         });
         if (data.getWrtradeorderstatus().equals("3") || data.getWrtradeorderstatus().equals("7")){

+ 20 - 11
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/bookingwarehouse/adapter/BookingTradeBarginContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.WrTradeBargainApplyData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
 import cn.muchinfo.rma.view.base.hnstmain.bookingwarehouse.BookingWarehouseViewModel;
@@ -64,14 +65,24 @@ public class BookingTradeBarginContentAdapter extends RecyclerView.Adapter<Booki
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrTradeBargainApplyData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrTradeBargainApplyData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrTradeBargainApplyData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -103,7 +114,7 @@ public class BookingTradeBarginContentAdapter extends RecyclerView.Adapter<Booki
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -113,9 +124,7 @@ public class BookingTradeBarginContentAdapter extends RecyclerView.Adapter<Booki
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-
-                    setPosition(i);
-
+                setOnItemClick(i);
             }
         });
 

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractAgreementContentAdapter.java

@@ -19,6 +19,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradeOrderDetailData;
 import cn.muchinfo.rma.global.data.TjmdTradeOrderDetailData;
 import cn.muchinfo.rma.global.data.TjmdTransferApplyData;
@@ -60,14 +61,24 @@ public class ContractAgreementContentAdapter extends RecyclerView.Adapter<Contra
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<TjmdTransferApplyData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                TjmdTransferApplyData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                TjmdTransferApplyData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -101,7 +112,7 @@ public class ContractAgreementContentAdapter extends RecyclerView.Adapter<Contra
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -112,7 +123,7 @@ public class ContractAgreementContentAdapter extends RecyclerView.Adapter<Contra
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
 

+ 20 - 10
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractDeliveryContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradeOrderDetailData;
 import cn.muchinfo.rma.global.data.WrDeliveryDetailData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -63,16 +64,25 @@ public class ContractDeliveryContentAdapter extends RecyclerView.Adapter<Contrac
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrDeliveryDetailData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrDeliveryDetailData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrDeliveryDetailData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
-
     @NonNull
     @Override
     public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
@@ -104,7 +114,7 @@ public class ContractDeliveryContentAdapter extends RecyclerView.Adapter<Contrac
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -115,7 +125,7 @@ public class ContractDeliveryContentAdapter extends RecyclerView.Adapter<Contrac
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
 

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractOrderContentAdapter.java

@@ -19,6 +19,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradeOrderDetailData;
 import cn.muchinfo.rma.global.data.ContractTradePositionData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -58,14 +59,24 @@ public class ContractOrderContentAdapter extends RecyclerView.Adapter<ContractOr
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractTradeOrderDetailData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractTradeOrderDetailData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractTradeOrderDetailData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -99,7 +110,7 @@ public class ContractOrderContentAdapter extends RecyclerView.Adapter<ContractOr
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -110,7 +121,7 @@ public class ContractOrderContentAdapter extends RecyclerView.Adapter<ContractOr
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
 

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractPositionContentAdapter.java

@@ -23,6 +23,7 @@ import java.util.List;
 
 import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.GlobalDataCollection;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradePositionData;
 import cn.muchinfo.rma.global.data.DeliveryRelationData;
 import cn.muchinfo.rma.global.data.GoodsInfoAndQuotes;
@@ -74,14 +75,24 @@ public class ContractPositionContentAdapter extends RecyclerView.Adapter<Contrac
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractTradePositionData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractTradePositionData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractTradePositionData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -195,7 +206,7 @@ public class ContractPositionContentAdapter extends RecyclerView.Adapter<Contrac
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -206,7 +217,7 @@ public class ContractPositionContentAdapter extends RecyclerView.Adapter<Contrac
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
 

+ 18 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/contractorders/adapter/ContractTraderContentAdapter.java

@@ -19,6 +19,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradeDetailData;
 import cn.muchinfo.rma.global.data.ContractTradeOrderDetailData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -58,14 +59,24 @@ public class ContractTraderContentAdapter extends RecyclerView.Adapter<ContractT
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<ContractTradeDetailData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                ContractTradeDetailData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                ContractTradeDetailData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/AreCancelContentAdapter.java

@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.HnstWrPositionData;
 import cn.muchinfo.rma.global.data.WrOrderDetailData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -66,14 +67,24 @@ public class AreCancelContentAdapter extends RecyclerView.Adapter<AreCancelConte
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrOrderDetailData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrOrderDetailData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrOrderDetailData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -105,7 +116,7 @@ public class AreCancelContentAdapter extends RecyclerView.Adapter<AreCancelConte
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -115,7 +126,7 @@ public class AreCancelContentAdapter extends RecyclerView.Adapter<AreCancelConte
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
         itemViewHolder.details.setVisibility(View.VISIBLE);

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/DetailsWarehouseContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.HnstWrPositionData;
 import cn.muchinfo.rma.global.data.HoldLBData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -62,14 +63,24 @@ public class DetailsWarehouseContentAdapter extends RecyclerView.Adapter<Details
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<HoldLBData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                HoldLBData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                HoldLBData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -102,7 +113,7 @@ public class DetailsWarehouseContentAdapter extends RecyclerView.Adapter<Details
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -114,7 +125,7 @@ public class DetailsWarehouseContentAdapter extends RecyclerView.Adapter<Details
             @Override
             public void onClick(View view) {
                 if (Double.valueOf(data.getEnableqty()) > 0){
-                    setPosition(i);
+                    setOnItemClick(i);
                 }
             }
         });

+ 20 - 10
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/PickUpContentAdapter.java

@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.WrOutInApplyData;
 import cn.muchinfo.rma.global.data.WrSpecialMatchOrderData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -63,15 +64,24 @@ public class PickUpContentAdapter extends RecyclerView.Adapter<PickUpContentAdap
         this.datas = datas;
         notifyDataSetChanged();
     }
-
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrOutInApplyData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrOutInApplyData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrOutInApplyData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -105,7 +115,7 @@ public class PickUpContentAdapter extends RecyclerView.Adapter<PickUpContentAdap
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -127,7 +137,7 @@ public class PickUpContentAdapter extends RecyclerView.Adapter<PickUpContentAdap
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
 

+ 18 - 7
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/SpecifyDealContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.WrOrderDetailData;
 import cn.muchinfo.rma.global.data.WrSpecialMatchOrderData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -62,14 +63,24 @@ public class SpecifyDealContentAdapter extends RecyclerView.Adapter<SpecifyDealC
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrSpecialMatchOrderData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrSpecialMatchOrderData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrSpecialMatchOrderData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/SpotWarehouseContentAdapter.java

@@ -26,6 +26,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockReportData;
 import cn.muchinfo.rma.global.data.AreaSumPLData;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ExposureReportData;
 import cn.muchinfo.rma.global.data.FinanceReportData;
 import cn.muchinfo.rma.global.data.FutureDataReportData;
@@ -71,14 +72,24 @@ public class SpotWarehouseContentAdapter extends RecyclerView.Adapter<SpotWareho
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<HnstWrPositionData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                HnstWrPositionData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                HnstWrPositionData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -111,7 +122,7 @@ public class SpotWarehouseContentAdapter extends RecyclerView.Adapter<SpotWareho
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -123,7 +134,7 @@ public class SpotWarehouseContentAdapter extends RecyclerView.Adapter<SpotWareho
             @Override
             public void onClick(View view) {
                 if (type.equals("3")){//仓库汇总和订单汇总可以点击展开
-                    setPosition(i);
+                    setOnItemClick(i);
                 }
             }
         });

+ 20 - 11
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/adapter/TradeBarginContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.WrOrderDetailData;
 import cn.muchinfo.rma.global.data.WrTradeBargainApplyData;
 import cn.muchinfo.rma.view.autoWidget.CustomHorizontalScrollView;
@@ -65,14 +66,24 @@ public class TradeBarginContentAdapter extends RecyclerView.Adapter<TradeBarginC
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<WrTradeBargainApplyData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                WrTradeBargainApplyData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                WrTradeBargainApplyData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -104,7 +115,7 @@ public class TradeBarginContentAdapter extends RecyclerView.Adapter<TradeBarginC
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -114,9 +125,7 @@ public class TradeBarginContentAdapter extends RecyclerView.Adapter<TradeBarginC
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-
-                    setPosition(i);
-
+                setOnItemClick(i);
             }
         });
 

+ 117 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/MiddleGoodsDetailsActivity.kt

@@ -0,0 +1,117 @@
+package cn.muchinfo.rma.view.base.home.commodity
+
+import android.os.Bundle
+import android.view.Gravity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+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.home.ductaudit.vatrate.VarRateViewHolder
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko.*
+
+/**
+ * 套保品种详情页面
+ * @property swipeToLayout SwipeToLoadLayout
+ * @property statusLayout StatusLayout
+ * @property varRateViewHolder BaseAdapter<String, MiddleGoodsDetailsViewHolder>
+ */
+class MiddleGoodsDetailsActivity : BaseActivity<MiddleGoodsDetailsViewModel>(){
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    private val varRateViewHolder: BaseAdapter<String, MiddleGoodsDetailsViewHolder> = BaseAdapter { _, _ -> MiddleGoodsDetailsViewHolder(this) }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "套保品种详情"
+                }
+            }
+
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "修改时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "修改前套保比例"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+
+                    textView {
+                        text = "修改后套保比例"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "备注"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "修改人"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+            }.lparams(matchParent, autoSize(90))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = varRateViewHolder
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.middleGoodsDetailsDataList.bindOptional(context){
+                if (it?.isEmpty() == true || it?.size == 0){
+                    statusLayout.showEmpty()
+                }else {
+                    if (swipeToLayout.getIsRefreshing()){
+                        swipeToLayout.finishRefresh()
+                    }
+                    varRateViewHolder.setNewData(it)
+                }
+            }
+        }
+    }
+
+}

+ 72 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/MiddleGoodsDetailsViewHolder.kt

@@ -0,0 +1,72 @@
+package cn.muchinfo.rma.view.base.home.commodity
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 套保品种详情viewholder
+ * @property activity AppCompatActivity
+ * @constructor
+ */
+class MiddleGoodsDetailsViewHolder(private val activity : AppCompatActivity) : BaseViewHolder<String>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "修改时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "修改前套保比例"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+
+                    textView {
+                        text = "修改后套保比例"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "备注"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "修改人"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(90),1f)
+            }.lparams(matchParent, autoSize(90))
+            itemView()
+        }.lparams(matchParent, wrapContent)
+    }
+
+}

+ 13 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/MiddleGoodsDetailsViewModel.kt

@@ -0,0 +1,13 @@
+package cn.muchinfo.rma.view.base.home.commodity
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 套保品种详情     viewmodel
+ */
+class MiddleGoodsDetailsViewModel : BaseViewModel(){
+
+    val middleGoodsDetailsDataList : MutableLiveData<List<String>> = MutableLiveData()
+
+}

+ 28 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/flow/CommodityModificationFlowActivity.kt

@@ -0,0 +1,28 @@
+package cn.muchinfo.rma.view.base.home.commodity.flow
+
+import android.os.Bundle
+import cn.muchinfo.rma.view.autoWidget.commonLeftButton
+import cn.muchinfo.rma.view.autoWidget.commonTitle
+import cn.muchinfo.rma.view.autoWidget.topBar
+import cn.muchinfo.rma.view.base.BaseActivity
+import org.jetbrains.anko.verticalLayout
+
+/**
+ * 商品修改流水页面
+ */
+class CommodityModificationFlowActivity : BaseActivity<CommodityModificationFlowViewModel>(){
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle{
+                    text = "修改流水"
+                }
+            }
+        }
+    }
+
+}
+

+ 12 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/flow/CommodityModificationFlowViewModel.kt

@@ -0,0 +1,12 @@
+package cn.muchinfo.rma.view.base.home.commodity.flow
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 商品修改流水viewmodel
+ */
+class CommodityModificationFlowViewModel : BaseViewModel(){
+
+
+
+}

+ 27 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/AddGoodsActivity.kt

@@ -0,0 +1,27 @@
+package cn.muchinfo.rma.view.base.home.commodity.modify
+
+import android.os.Bundle
+import cn.muchinfo.rma.view.autoWidget.commonLeftButton
+import cn.muchinfo.rma.view.autoWidget.commonTitle
+import cn.muchinfo.rma.view.autoWidget.topBar
+import cn.muchinfo.rma.view.base.BaseActivity
+import org.jetbrains.anko.verticalLayout
+
+/**
+ * 新增商品页面
+ */
+class AddGoodsActivity : BaseActivity<ModifyViewModel>(){
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "新增商品"
+                }
+            }
+        }
+    }
+
+}

+ 188 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/ChangeHedgeRatioActivity.kt

@@ -0,0 +1,188 @@
+package cn.muchinfo.rma.view.base.home.commodity.modify
+
+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.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.verticalEmptyView
+import org.jetbrains.anko.*
+
+/**
+ * 修改套保比例
+ * @property hedge_ratio EditText
+ * @property remask_edittext EditText
+ */
+class ChangeHedgeRatioActivity : BaseActivity<ModifyViewModel>(){
+
+    //输入的修改后套保比例
+    lateinit var hedge_ratio : EditText
+
+    //备注
+    lateinit var remask_edittext : EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.segtabment_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "修改套保比例"
+                }
+            }
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "套保品种名称"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = "默认选中的套保品种名称"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "单位"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = "默认选中的套保品种单位"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "当前套保比例"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = "100%"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "*"
+                        textColorInt = R.color.rma_star_color
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                    textView {
+                        text = "修改后套保比例"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(10)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                editText {
+                    hedge_ratio = this
+                    hint = "请输入修改后套保比例"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_NUMBER
+//                    setDecimalInputType()
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(132)) {
+                    marginStart = autoSize(80)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "备注"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(136))
+
+
+                editText {
+                    remask_edittext = this
+                    hint = "请输入备注"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(136))
+            }.lparams(matchParent, autoSize(136))
+
+            verticalEmptyView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_submit_bg
+                    text = "确定"
+                    textColorInt = R.color.white
+                    textSizeAuto = 38
+                }.lparams(0, autoSize(119),1f) {
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(144))
+        }
+    }
+
+}

+ 124 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/ChangeSpotVarietyActivity.kt

@@ -0,0 +1,124 @@
+package cn.muchinfo.rma.view.base.home.commodity.modify
+
+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.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.verticalEmptyView
+import org.jetbrains.anko.*
+
+/**
+ * 修改现货品种
+ * @property spot_varietty EditText
+ * @property remask_edittext EditText
+ */
+class ChangeSpotVarietyActivity : BaseActivity<ModifyViewModel>(){
+
+    //输入的品种
+    lateinit var spot_varietty : EditText
+
+    //备注
+    lateinit var remask_edittext : EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.segtabment_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "修改现货品种"
+                }
+            }
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "*"
+                        textColorInt = R.color.rma_star_color
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(30)
+                    }
+                    textView {
+                        text = "品种"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(10)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                editText {
+                    spot_varietty = this
+                    hint = "请输入品种名称"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+//                    setDecimalInputType()
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(132)) {
+                    marginStart = autoSize(80)
+                }
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "备注"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(136))
+
+
+                editText {
+                    remask_edittext = this
+                    hint = "请输入备注"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(136))
+            }.lparams(matchParent, autoSize(136))
+
+            verticalEmptyView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_submit_bg
+                    text = "确定"
+                    textColorInt = R.color.white
+                    textSizeAuto = 38
+                }.lparams(0, autoSize(119),1f) {
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(144))
+        }
+    }
+
+}

+ 12 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/modify/ModifyViewModel.kt

@@ -0,0 +1,12 @@
+package cn.muchinfo.rma.view.base.home.commodity.modify
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 用于商品信息内各种信息修改的viewmodel
+ */
+class ModifyViewModel : BaseViewModel(){
+
+
+
+}

+ 29 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewAddSpotGoodsViewModel.kt

@@ -204,6 +204,7 @@ class NewAddSpotGoodsViewModel : BaseViewModel(){
         ano: String = "",
         enumdicname: String = "",
         enumdicnameid: String = "",
+        costWeight : String = "",//成本权重
         middleGoodsName: String = ""
     ) {
         //暂储存的商品下的套保品种
@@ -253,6 +254,8 @@ class NewAddSpotGoodsViewModel : BaseViewModel(){
                 var newEnumdicname = ""
                 var newMiddleGoodsName = ""
                 var newEnumdicnameid = ""
+                var newAno = ""
+                var newCostWeight = ""
                 var newData: NewSpotInfoData
                 if (it.id == id) {
                     newMiddlegoodsId = if (middlegoodsId.isNullOrEmpty()) {
@@ -275,9 +278,20 @@ class NewAddSpotGoodsViewModel : BaseViewModel(){
                     } else {
                         enumdicnameid
                     }
+                    newAno = if (ano.isNullOrEmpty()){
+                        it.value
+                    }else{
+                        ano
+                    }
+                    newCostWeight = if (costWeight.isNullOrEmpty()){
+                        it.costWeight
+                    }else{
+                        costWeight
+                    }
                     newData = it.copy(
                         id = id,
-                        value = ano,
+                        value = newAno,
+                        costWeight = newCostWeight,
                         middleGoodsId = newMiddlegoodsId,
                         enumdicname = newEnumdicname,
                         enumdicnameid = newEnumdicnameid,
@@ -302,6 +316,8 @@ class NewAddSpotGoodsViewModel : BaseViewModel(){
                 var newMiddlegoodsId = ""
                 var newEnumdicname = ""
                 var newMiddleGoodsName = ""
+                var newAno = ""
+                var newCostWeight = ""
                 var newEnumdicnameid = ""
                 var newData: NewSpotInfoData
                 if (it.id == id) {
@@ -325,9 +341,20 @@ class NewAddSpotGoodsViewModel : BaseViewModel(){
                     } else {
                         enumdicname
                     }
+                    newAno = if (ano.isNullOrEmpty()){
+                        it.value
+                    }else{
+                        ano
+                    }
+                    newCostWeight = if (costWeight.isNullOrEmpty()){
+                        it.costWeight
+                    }else{
+                        costWeight
+                    }
                     newData = it.copy(
                         id = id,
-                        value = ano,
+                        value = newAno,
+                        costWeight = newCostWeight,
                         enumdicnameid = newEnumdicnameid,
                         middleGoodsId = newMiddlegoodsId,
                         enumdicname = newEnumdicname,

+ 61 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewInsuredVarietyViewHolder.kt

@@ -41,6 +41,9 @@ class NewInsuredVarietyViewHolder(
     //套保系数
     lateinit var hedge_coefficient : EditText
 
+    //成本权重
+    lateinit var cost_weight : EditText
+
     override fun _FrameLayout.createContentView() {
         verticalLayout {
             linearLayout {
@@ -204,6 +207,64 @@ class NewInsuredVarietyViewHolder(
                 }
 
                 emptyView()
+            }.lparams(matchParent, autoSize(132))
+
+            viewItemUI()
+
+            //成本权重
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "*"
+                    textColorInt = R.color.rma_star_color
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(37)
+                }
+
+                textView {
+                    data.bindOptional(context) {
+                        text = "成本权重"
+                    }
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(10)
+                }
+
+                editText {
+                    cost_weight = this
+                    isEnabled = !(operationType == "4" || operationType == "3" || operationType == "5")
+                    data.bindOptional(context){
+                        if (it?.value.isNullOrEmpty().not()){
+                            setText(it?.value)
+                            textColorInt = R.color.rma_black_33
+                        }
+                    }
+                    hint = "请输入成本权重"
+                    textChangedListener {
+                        afterTextChanged {
+                            if (it.toString().isNotEmpty()) {
+                                viewModel.changeMiddleGoodsList(
+                                    wrstandId = wrstandId,
+                                    type = "3",
+                                    id =  data.value?.id.toString(),
+                                    costWeight = it.toString()
+                                )
+                            }
+                        }
+                    }
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(autoSize(300), autoSize(132)) {
+                    marginStart = autoSize(60)
+                }
+
+                emptyView()
 
                 imageView {
                     if (operationType == "4"){//页面类型为详情时则需要屏蔽相关操作

+ 1 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newspot/NewSpotInfoData.kt

@@ -9,6 +9,7 @@ data class NewSpotInfoData(
     var coefficientwarehouse : String = "",//用于输入品类时的标仓系数
     var middleGoodsId : String = "",//存储套保品种时用来存储套保品种id,其他情况此字段不使用
     var enumdicname : String = "",//单位名称
+    var costWeight : String = "",//成本权重
     var enumdicnameid : String = "",//单位id
     var middleGoodsName : String = "",//套保品种名称
     var middleGoodsList : List<NewSpotInfoData> = arrayListOf()//商品下的套保品种

+ 294 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientAuditActivity.kt

@@ -0,0 +1,294 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.convertcoefficient
+
+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.data.ParamChangeAppData
+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.verticalEmptyView
+import org.jetbrains.anko.*
+
+/***
+ * 折算系数审核页面/增值税税率审核页面/成本权重审核
+ */
+class ConvertCoefficientAuditActivity : BaseActivity<ConvertCoefficientAuditViewModel>(){
+
+    // 1是折算系数审核 2是增值 3是成本权重审核
+    val type by lazy { intent.getStringExtra("type") }
+
+    val data by lazy { intent.getParcelableExtra<ParamChangeAppData>("data") as ParamChangeAppData }
+
+    lateinit var remask_edittext : EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.segtabment_bg_color)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    if (type == "1"){
+                        text = "折算系数审核"
+                    }else{
+                        text = "增值税税率审核"
+                    }
+                }
+            }
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+//                if (data.contracctstatus == "3") {
+//                    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.contracctstatus == "3") {
+//                        imageResource = R.mipmap.rma_pass_status
+//                    } else {
+//                        imageResource = R.mipmap.rma_wait_status
+//                    }
+//
+//                }.lparams(autoSize(38), autoSize(38)) {
+//                    marginStart = autoSize(37)
+//                }
+//                textView {
+//                    text = ViewEnumUtils.getContractStatus(data.contracctstatus ?: "")
+//                    textSizeAuto = 31
+//                    textColorInt = R.color.rma_yellow_text_color
+//                }.lparams(wrapContent, wrapContent) {
+//                    marginStart = autoSize(20)
+//                }
+            }.lparams(matchParent, autoSize(60))
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "现货品种"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.deliverygoodsname
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "商品"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.wrstandardname
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "套保品种"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.middlegoodsname
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "原值"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.beforevalue
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "新值"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.aftervalue
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "申请人"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.applyname
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "申请时间"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.applytime
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "审核意见"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(136))
+
+
+                editText {
+                    remask_edittext = this
+                    hint = "请输入审核意见"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(136))
+            }.lparams(matchParent, autoSize(136))
+
+            verticalEmptyView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_save_info_bg
+                    text = "审核拒绝"
+                    textSizeAuto = 38
+                    textColorInt = R.color.rma_star_color
+                }.lparams(0, autoSize(119),1f) {
+                    marginStart = autoSize(24)
+                    marginEnd = autoSize(12)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_submit_bg
+                    text = "审核通过"
+                    textColorInt = R.color.white
+                    textSizeAuto = 38
+                }.lparams(0, autoSize(119),1f) {
+                    marginStart = autoSize(12)
+                    marginEnd = autoSize(24)
+                }
+            }.lparams(matchParent, autoSize(144))
+        }
+    }
+
+}

+ 11 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientAuditViewModel.kt

@@ -0,0 +1,11 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.convertcoefficient
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 折算系数审核viewmodel
+ */
+class ConvertCoefficientAuditViewModel : BaseViewModel(){
+
+
+}

+ 187 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/hedgeratio/HedgeRatioAuditActivity.kt

@@ -2,21 +2,31 @@ package cn.muchinfo.rma.view.base.home.ductaudit.hedgeratio
 
 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.ParamChangeAppData
 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.verticalEmptyView
 import org.jetbrains.anko.*
 
 /**
  * 套保比例审核页面
  */
+@Suppress("DEPRECATION")
 class HedgeRatioAuditActivity : BaseActivity<HedgeRatioAuditViewModel>(){
 
+    val data by lazy { intent.getParcelableExtra<ParamChangeAppData>("data") as ParamChangeAppData }
+
+    lateinit var remask_edittext : EditText
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
-
+            background = resources.getDrawable(R.color.segtabment_bg_color)
             topBar {
                 commonLeftButton()
                 commonTitle {
@@ -50,6 +60,182 @@ class HedgeRatioAuditActivity : BaseActivity<HedgeRatioAuditViewModel>(){
 //                    marginStart = autoSize(20)
 //                }
             }.lparams(matchParent, autoSize(60))
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "套保品种"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.middlegoodsname
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "原套保比例"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.beforevalue
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                background = resources.getDrawable(R.color.white)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "新套保比例"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.aftervalue
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "申请人"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.applyname
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "申请时间"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(132))
+
+                textView {
+                    text = data.applytime
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(132))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "审核意见"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(autoSize(250), autoSize(136))
+
+
+                editText {
+                    remask_edittext = this
+                    hint = "请输入审核意见"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(136))
+            }.lparams(matchParent, autoSize(136))
+
+            verticalEmptyView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_save_info_bg
+                    text = "审核拒绝"
+                    textSizeAuto = 38
+                    textColorInt = R.color.rma_star_color
+                }.lparams(0, autoSize(119),1f) {
+                    marginStart = autoSize(24)
+                    marginEnd = autoSize(12)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundResource = R.mipmap.rma_submit_bg
+                    text = "审核通过"
+                    textColorInt = R.color.white
+                    textSizeAuto = 38
+                }.lparams(0, autoSize(119),1f) {
+                    marginStart = autoSize(12)
+                    marginEnd = autoSize(24)
+                }
+            }.lparams(matchParent, autoSize(144))
         }
     }
 

+ 4 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/AddHedgePlanActivity.kt

@@ -268,7 +268,7 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
                             onThrottleFirstClick {
                                 creatBottomSheetDialog(
-                                    "请选择品",
+                                    "请选择品",
                                     viewModel.selectWrStandardModel(
                                         viewModel.wrStandardDataDetail.value
                                             ?: DeliveryGoodsDetailData()
@@ -287,7 +287,7 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
                             }
 
                             textView {
-                                text = "品        类"
+                                text = "商        品"
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_black_33
                             }.lparams(wrapContent, wrapContent) {
@@ -299,7 +299,7 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
                                     text = it?.value
                                     textColorInt = R.color.rma_black_33
                                 }
-                                text = "请选择品"
+                                text = "请选择品"
                                 textSizeAuto = 31
                                 textColorInt = R.color.rma_hint_text_color_ccc
                             }.lparams(wrapContent, wrapContent) {
@@ -355,7 +355,7 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
                         viewItemUI()
 
                         linearLayout {
-
+                            visibility = View.GONE
                             gravity = Gravity.CENTER_VERTICAL
 //                            textView {
 //                                text = "*"

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgePlanViewModel.kt

@@ -249,7 +249,7 @@ class HedgePlanViewModel : BaseViewModel() {
     fun selectWrStandardModel(data: DeliveryGoodsDetailData): ArrayList<SelectData> {
         val wrstandardModel = arrayListOf<SelectData>()
         data.wdlst?.forEach {
-            wrstandardModel.add(SelectData(id = it.wrstandardid ?: "", value = it.wrstandardname ?: "",convertfactor = it.vatrate ?: "",enumdicname = it.enumdicname ?: ""))
+            wrstandardModel.add(SelectData(id = it.wrstandardid ?: "", value = it.wrstandardcode ?: "",convertfactor = it.vatrate ?: "",enumdicname = it.enumdicname ?: ""))
         }
         return wrstandardModel
     }

+ 14 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/LoginActivity.kt

@@ -27,6 +27,7 @@ import cn.muchinfo.rma.view.autoWidget.utils.EnUtil
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
 import cn.muchinfo.rma.view.base.AgreementActivity
 import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.WebActivity
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.home.contract.emptyView
 import cn.muchinfo.rma.view.base.home.set.ResetPasswordActivity
@@ -271,20 +272,25 @@ class LoginActivity : BaseActivity<LoginViewModel>(), UserPopupWindow.OnClearAcc
 
                 textView {
                     onThrottleFirstClick {
-                        if (Constant.IS_QHJ) {
+                        if (SPUtils.getInstance().getString(Constant.oem) == "qhj" || SPUtils.getInstance().getString(Constant.oem) == "qyfg") {
                             val intent = Intent()
                             intent.setClass(context, RegisterSelectActivity::class.java)
                             ActivityUtils.startActivity(intent)
+                        }else{
+                            if (SPUtils.getInstance().getString(Constant.openApiUrl).isNotEmpty()){
+                                val intent = Intent()
+                                intent.putExtra("url",SPUtils.getInstance().getString(Constant.openApiUrl))
+                                intent.putExtra("title","用户注册")
+                                intent.setClass(context,WebActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }else{
+                                ToastUtils.showLong("地址获取失败")
+                            }
+
                         }
 
                     }
-                    if (Constant.IS_QHJ) {
-                        text = "用户注册"
-                    } else {
-                        text = "记住密码"
-                    }
-
-//
+                    text = "用户注册"
                     textColorInt = R.color.white
                     textSizeAuto = 34
                 }.lparams(wrapContent, wrapContent) {

+ 27 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithDrawManagementActivity.kt

@@ -11,6 +11,8 @@ import cn.muchinfo.rma.global.data.CusBankSignBankData
 import cn.muchinfo.rma.global.data.RStrategyData
 import cn.muchinfo.rma.global.data.UserCollectConfigData
 import cn.muchinfo.rma.global.data.transit.SignReq
+import cn.muchinfo.rma.global.isBlankString
+import cn.muchinfo.rma.global.signstatus
 import cn.muchinfo.rma.lifecycle.bindOptional
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
@@ -87,10 +89,10 @@ class WithDrawManagementActivity : BaseActivity<WithDrawManagementViewModel>() {
 
                 imageView {
                     viewModel.userCollectConfigData.bindOptional(context){
-                        if (it?.bankid.isNullOrEmpty()){
-                            visibility = View.INVISIBLE
-                        }else{
+                        if (it?.signstatus == "4"){
                             visibility = View.VISIBLE
+                        }else{
+                            visibility = View.INVISIBLE
 
                         }
                     }
@@ -298,6 +300,28 @@ class WithDrawManagementActivity : BaseActivity<WithDrawManagementViewModel>() {
                     }.lparams(wrapContent, wrapContent)
                 }.lparams(matchParent, autoSize(148))
 
+                itemView()
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "状态"
+                        textSizeAuto = 36
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(autoSize(220), wrapContent){
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        viewModel.userCollectConfigData.bindOptional(context){
+                            text = it?.signstatus?.signstatus()
+                        }
+                        textSizeAuto = 36
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(matchParent, autoSize(148))
+
             }.lparams(matchParent, matchParent)
         }
 

+ 9 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithDrawManagementViewModel.kt

@@ -154,13 +154,21 @@ class WithDrawManagementViewModel : BaseViewModel(){
         MyApplication.getInstance()?.bankManager?.queryBankAccountSign(params = params){ isSuccess, respData, error ->
             if (isSuccess){
                 if (respData?.size ?: 0 > 0){
-                    userCollectConfigData.postValue(respData?.find { it?.signstatus == "4" })
+                    resetUserCollectConfig(respData ?: arrayListOf())
+//                    userCollectConfigData.postValue(respData?.find { it.signstatus == "4" })
                 }
             }
         }
     }
 
+    fun resetUserCollectConfig(list : List<BankAccountSignData>){
+        list.forEach {
+            if (it.signstatus == "2" || it.signstatus == "3" || it.signstatus == "4"){
+                userCollectConfigData.postValue(it)
+            }
+        }
 
+    }
 
 
 }

+ 3 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithdrawalActivity.kt

@@ -1,6 +1,7 @@
 package cn.muchinfo.rma.view.base.main.withdrawmanagement
 
 import android.Manifest
+import android.annotation.SuppressLint
 import android.app.Activity
 import android.content.Intent
 import android.net.Uri
@@ -324,6 +325,7 @@ class MoneyOutUI(
 
     var canUseBanlance: Double = 0.0
 
+    @SuppressLint("SetTextI18n")
     val root = _FrameLayout(activity).apply {
         verticalLayout {
             linearLayout {
@@ -754,6 +756,7 @@ class MoneyInOutlineUI(
      */
     val selectCardType: MutableLiveData<Int> = MutableLiveData()
 
+    @SuppressLint("SetTextI18n")
     val root = _FrameLayout(activity).apply {
         verticalLayout {
 

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

@@ -989,6 +989,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                             gravity = Gravity.CENTER_VERTICAL
                             numberEditText {
                                 text = buySelldata.delistminqty
+
                                 max = buySelldata.orderqty?.toDouble() ?: 1.0
                                 onePriceInputNumberEdittext = this
                                 setOnTextChangeListener { view, value ->
@@ -1031,6 +1032,9 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                             setPadding(autoSize(30), 0, autoSize(30), 0)
                             thumb = resources.getDrawable(R.mipmap.hnst_seekbar)
                             progressDrawable = resources.getDrawable(R.drawable.seekbar_bg)
+                            progress = buySelldata.delistminqty?.toDouble()
+                                ?.div(buySelldata.orderqty?.toDouble() ?: 0.0)?.times(100)
+                                ?.toInt() ?: 1
                             setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
                                 override fun onProgressChanged(p0: SeekBar?, p1: Int, p2: Boolean) {
                                     onePriceInputNumberEdittext.text = NumberUtils.roundNum(
@@ -1090,8 +1094,8 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
 
                     textView {
                         one_delisting_amount = this
-                        text = buySelldata.fixedprice + "(需履约保证金" + NumberUtils.roundNum(
-                            buySelldata.fixedprice?.toDouble()?.times(
+                        text = buySelldata.fixedprice?.toDouble()?.times(buySelldata.delistminqty?.toDouble() ?: 1.0).toString() + "(需履约保证金" + NumberUtils.roundNum(
+                            buySelldata.fixedprice?.toDouble()?.times(buySelldata.delistminqty?.toDouble() ?: 1.0)?.times(
                                 marginValue
                             ) ?: 0.0, 2
                         ) + ")"

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/circle/TradeCircleContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.OrderQuoteData;
 import cn.muchinfo.rma.global.data.OrderQuoteMyqData;
 import cn.muchinfo.rma.global.data.WrTradeBargainApplyData;
@@ -67,14 +68,24 @@ public class TradeCircleContentAdapter extends RecyclerView.Adapter<TradeCircleC
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<OrderQuoteMyqData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                OrderQuoteMyqData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                OrderQuoteMyqData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -106,7 +117,7 @@ public class TradeCircleContentAdapter extends RecyclerView.Adapter<TradeCircleC
         }
         itemViewHolder.allView.setVisibility(View.GONE);
 
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.rma_list_select_color));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -116,7 +127,7 @@ public class TradeCircleContentAdapter extends RecyclerView.Adapter<TradeCircleC
         itemViewHolder.all_click_View.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                setPosition(i);
+                setOnItemClick(i);
             }
         });
 

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/floata/FloatPriceAdapter.java

@@ -23,6 +23,7 @@ import java.util.List;
 
 import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.GlobalDataCollection;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradePositionData;
 import cn.muchinfo.rma.global.data.GoodsInfoAndQuotes;
 import cn.muchinfo.rma.global.data.OrderQuoteData;
@@ -73,14 +74,24 @@ public class FloatPriceAdapter extends RecyclerView.Adapter<FloatPriceAdapter.It
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<OrderQuoteData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                OrderQuoteData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                OrderQuoteData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -163,7 +174,7 @@ public class FloatPriceAdapter extends RecyclerView.Adapter<FloatPriceAdapter.It
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.qhj_click_bg));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -172,7 +183,7 @@ public class FloatPriceAdapter extends RecyclerView.Adapter<FloatPriceAdapter.It
         }
         itemViewHolder.platnum_buy.setVisibility(View.VISIBLE);
         itemViewHolder.platnum_details.setVisibility(View.VISIBLE);
-        itemViewHolder.all_click_View.setOnClickListener(view -> setPosition(i));
+        itemViewHolder.all_click_View.setOnClickListener(view -> setOnItemClick(i));
 //        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
 //            @Override
 //            public void onClick(View view) {

+ 20 - 9
RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/one/OnePriceAdapter.java

@@ -23,6 +23,7 @@ import java.util.List;
 
 import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.GlobalDataCollection;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradePositionData;
 import cn.muchinfo.rma.global.data.GoodsInfoAndQuotes;
 import cn.muchinfo.rma.global.data.OrderQuoteData;
@@ -74,14 +75,24 @@ public class OnePriceAdapter extends RecyclerView.Adapter<OnePriceAdapter.ItemVi
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<OrderQuoteData> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                OrderQuoteData data1 = datas.get(i);
+                if (data1.isOnClick() == 0){
+                    data1.setOnClick(1);
+                }else {
+                    data1.setOnClick(0);
+                }
+                newDataList.add(data1);
+            }else {
+                OrderQuoteData newData = datas.get(i);
+                newData.setOnClick(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -171,7 +182,7 @@ public class OnePriceAdapter extends RecyclerView.Adapter<OnePriceAdapter.ItemVi
         }
 
         itemViewHolder.platnum_buy.setVisibility(View.VISIBLE);
-        if (i == this.position) {
+        if (data.isOnClick() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.qhj_click_bg));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -180,7 +191,7 @@ public class OnePriceAdapter extends RecyclerView.Adapter<OnePriceAdapter.ItemVi
         }
 
         itemViewHolder.platnum_details.setVisibility(View.VISIBLE);
-        itemViewHolder.all_click_View.setOnClickListener(view -> setPosition(i));//没有点击展开
+        itemViewHolder.all_click_View.setOnClickListener(view -> setOnItemClick(i));//没有点击展开
 //        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
 //            @Override
 //            public void onClick(View view) {

+ 20 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/adapter/TransferAdapter.java

@@ -76,14 +76,24 @@ public class TransferAdapter extends RecyclerView.Adapter<TransferAdapter.ItemVi
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<GoodsInfo> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                GoodsInfo data1 = datas.get(i);
+                if (data1.getHasquoter() == 0){
+                    data1.setHasquoter(1);
+                }else {
+                    data1.setHasquoter(0);
+                }
+                newDataList.add(data1);
+            }else {
+                GoodsInfo newData = datas.get(i);
+                newData.setHasquoter(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -296,7 +306,7 @@ public class TransferAdapter extends RecyclerView.Adapter<TransferAdapter.ItemVi
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (data.getHasquoter() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.qhj_click_bg));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -304,13 +314,8 @@ public class TransferAdapter extends RecyclerView.Adapter<TransferAdapter.ItemVi
             itemViewHolder.allView.setVisibility(View.GONE);
         }
 
-        itemViewHolder.all_click_View.setOnClickListener(view -> setPosition(i));
-        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                setPosition(i);
-            }
-        });
+        itemViewHolder.all_click_View.setOnClickListener(view -> setOnItemClick(i));
+
         //买入点击
         itemViewHolder.transfer_buy.setOnClickListener(new View.OnClickListener() {
             @Override

+ 26 - 15
RMA/app/src/main/java/cn/muchinfo/rma/view/base/yrdzpurchase/swaps/TransferSwapsAdapter.java

@@ -25,6 +25,7 @@ import java.util.List;
 
 import cn.muchinfo.rma.R;
 import cn.muchinfo.rma.global.GlobalDataCollection;
+import cn.muchinfo.rma.global.data.ContractData;
 import cn.muchinfo.rma.global.data.ContractTradePositionData;
 import cn.muchinfo.rma.global.data.DeliveryRelationData;
 import cn.muchinfo.rma.global.data.GoodsInfoAndQuotes;
@@ -75,14 +76,24 @@ public class TransferSwapsAdapter extends RecyclerView.Adapter<TransferSwapsAdap
         notifyDataSetChanged();
     }
 
-    private void setPosition(int position) {
-        if (this.position == position) {
-            this.position = -1;
-            notifyItemChanged(index);
-        } else {
-            this.position = position;
-            notifyItemChanged(position);
+    private void setOnItemClick(int position){
+        List<GoodsInfo> newDataList = new ArrayList<>();
+        for (int i = 0;i < datas.size();i++){
+            if (position == i){
+                GoodsInfo data1 = datas.get(i);
+                if (data1.getHasquoter() == 0){
+                    data1.setHasquoter(1);
+                }else {
+                    data1.setHasquoter(0);
+                }
+                newDataList.add(data1);
+            }else {
+                GoodsInfo newData = datas.get(i);
+                newData.setHasquoter(0);
+                newDataList.add(newData);
+            }
         }
+        setDatas(newDataList);
     }
 
     @NonNull
@@ -281,7 +292,7 @@ public class TransferSwapsAdapter extends RecyclerView.Adapter<TransferSwapsAdap
         if (!mViewHolderList.contains(itemViewHolder)) {
             mViewHolderList.add(itemViewHolder);
         }
-        if (i == this.position) {
+        if (data.getHasquoter() == 1) {
             itemViewHolder.roots_view.setBackgroundColor(context.getResources().getColor(R.color.qhj_click_bg));
             itemViewHolder.allView.setVisibility(View.VISIBLE);
         } else {
@@ -289,13 +300,13 @@ public class TransferSwapsAdapter extends RecyclerView.Adapter<TransferSwapsAdap
             itemViewHolder.allView.setVisibility(View.GONE);
         }
 
-        itemViewHolder.all_click_View.setOnClickListener(view -> setPosition(i));
-        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                setPosition(i);
-            }
-        });
+        itemViewHolder.all_click_View.setOnClickListener(view -> setOnItemClick(i));
+//        itemViewHolder.horItemScrollview.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View view) {
+//                setPosition(i);
+//            }
+//        });
         //买入点击
         itemViewHolder.transfer_buy.setOnClickListener(new View.OnClickListener() {
             @Override