瀏覽代碼

风险管理5月31日提交代码-liu.bolan--报表

Liu.bolan 4 年之前
父節點
當前提交
310586a191
共有 30 個文件被更改,包括 1239 次插入162 次删除
  1. 8 0
      RMA/app/src/main/AndroidManifest.xml
  2. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaSumPLData.kt
  3. 15 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  4. 8 8
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureViewModel.kt
  5. 13 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/accountmanager/AccountManagerActivity.kt
  6. 3 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractActivity.kt
  7. 6 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/adapter/ContractAdapter.java
  8. 16 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/InventoryRecordAdapter.java
  9. 71 74
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryActivity.kt
  10. 20 20
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryViewModel.kt
  11. 43 26
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/ExposureReportContentAdapter.java
  12. 14 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/FanacelReportContentAdapter.java
  13. 6 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SpotReportContentAdapter.java
  14. 6 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SummaryReportContentAdapter.java
  15. 80 11
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsViewModel.kt
  16. 17 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/SeaKingMainFragment.kt
  17. 155 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/AddAddressManagementActivity.kt
  18. 88 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/MyAddressManagementViewHolder.kt
  19. 79 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/MyAddressMnangerActivity.kt
  20. 11 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/MyAddressViewModel.kt
  21. 233 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsActivity.kt
  22. 46 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsViewHolder.kt
  23. 54 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyActivity.kt
  24. 72 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyHistoryActivity.kt
  25. 155 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyViewHolder.kt
  26. 8 0
      RMA/app/src/main/res/drawable/qhj_transparent_bg.xml
  27. 二進制
      RMA/app/src/main/res/mipmap-xhdpi/qhj_address_manegement.png
  28. 二進制
      RMA/app/src/main/res/mipmap-xhdpi/qhj_dian_dian.png
  29. 二進制
      RMA/app/src/main/res/mipmap-xhdpi/qhj_withdraw.png
  30. 6 0
      RMA/app/src/main/res/values/colors.xml

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

@@ -271,6 +271,14 @@
         <activity android:name=".view.base.home.reportquery.reportdetail.ReportCommonDetailsActivity"/>
 
         <activity android:name=".view.base.main.promotioncode.MyPromotionCodeActivity"/>
+
+        <activity android:name=".view.base.main.castsurely.MyCastSurelyActivity"/>
+
+        <activity android:name=".view.base.main.castsurely.MyCastSurelyHistoryActivity"/>
+
+        <activity android:name=".view.base.main.castsurely.CastSurelyDetailsActivity"/>
+
+        <activity android:name=".view.base.main.addressmanagement.MyAddressManagementActivity"/>
     </application>
 
 </manifest>

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

@@ -21,6 +21,8 @@ data class AreaSumPLData(
     val updatetime : String? = "",//更新时间
     val begindate : String? = "",//开始交易日
     val enddate : String? = "",//结束交易日
+    val middlegoodscode : String? = "",//套保品种代码
+    val middlegoodsname : String? = "",//套保品种名称
     var rightData : List<String>? = arrayListOf()//组装的右侧数据
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
@@ -40,6 +42,8 @@ data class AreaSumPLData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
         parcel.createStringArrayList()
     ) {
     }
@@ -61,6 +65,8 @@ data class AreaSumPLData(
         parcel.writeString(updatetime)
         parcel.writeString(begindate)
         parcel.writeString(enddate)
+        parcel.writeString(middlegoodscode)
+        parcel.writeString(middlegoodsname)
         parcel.writeStringList(rightData)
     }
 

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

@@ -9,8 +9,8 @@ object Constant {
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
 //    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
-//    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩
-      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
+    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩
+//      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
 //    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"
 //    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工
@@ -105,9 +105,22 @@ object Constant {
     /** 报表-敞口报表-现货合同变动量明细 **/
     const val table_mobile_report_expose_spotcontract = "table_mobile_report_expose_spotcontract"
 
+    /** 报表-敞口报表-现货合同变动量明细-日报表 **/
+    const val table_mobile_report_expose_spotcontract_day = "table_mobile_report_expose_spotcontract_day"
+
+    /** 报表-敞口报表-现货合同变动量明细-周月报表 **/
+    const val table_mobile_report_expose_spotcontract_weekmonth = "table_mobile_report_expose_spotcontract_weekmonth"
+
     /** 报表-敞口报表-套保计划变动量明细 **/
     const val table_mobile_report_expose_hedgeplan = "table_mobile_report_expose_hedgeplan"
 
+    /** 报表-敞口报表-套保计划变动量明细-日报表**/
+    const val table_mobile_report_expose_hedgeplan_day = "table_mobile_report_expose_hedgeplan_day"
+
+
+    /** 报表-敞口报表-套保计划变动量明细-周月报表**/
+    const val table_mobile_report_expose_hedgeplan_weekmonth = "table_mobile_report_expose_hedgeplan_weekmonth"
+
     /** 现货报表明细 **/
     const val table_mobile_report_spot_detail = "table_mobile_report_spot_detail"
 

+ 8 - 8
RMA/app/src/main/java/cn/muchinfo/rma/view/base/exposure/ExposureViewModel.kt

@@ -195,15 +195,15 @@ class ExposureViewModel : BaseViewModel(){
         val newList = arrayListOf<RealExposureData>()
         respData.forEach {
             val newRightData = arrayListOf<String>()
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.hedgeqty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.arbitrageqty),2) + it.ENUMDICNAME)//'套保量/\n 套利量
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.TotalSpotQty),2) + it.ENUMDICNAME + "\n" +  NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.DiffSpotQty),2) + it.ENUMDICNAME)//'现货总量/\n 变动量 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.DiffHedgeQty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(it.DiffArbitrageQty,2) + it.ENUMDICNAME)//'套保变动量/\n 套利变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.hedgeqty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.arbitrageqty),2) + it.ENUMDICNAME)//'套保量/\n 套利量
+            newRightData.add(NumberUtils.roundNum(it.TotalSpotQty,2) + it.ENUMDICNAME + "\n" +  NumberUtils.roundNum(NumberUtils.doubleDistortion(it.DiffSpotQty),2) + it.ENUMDICNAME)//'现货总量/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.DiffHedgeQty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(it.DiffArbitrageQty,2) + it.ENUMDICNAME)//'套保变动量/\n 套利变动量 '
             newRightData.add(it.MiddleGoodsHedgeRatio?.toPercentage() + "\n" + it.needarbitrageratio?.toPercentage())//'套保比例/\n 套利比例 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.needhedgeqty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.needarbitrageqty),2) + it.ENUMDICNAME)//'应套保量/\n 应套利量 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.TotalNeedHedgeQty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.DiffSpotHedgeQty),2) + it.ENUMDICNAME)//'现货应套保总量/\n 变动量 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.TotalFutureQty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.DiffFutuQty),2) + it.ENUMDICNAME)//'期货总量/\n 变动量 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.NeedHedgeExposoure),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.DiffExposoureQty),2) + it.ENUMDICNAME)//'套保敞口/\n 变动量 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.TotalExposure),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.checkDecimalPlace(it.DiffQty),2) + it.ENUMDICNAME)//'总敞口/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.needhedgeqty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.needarbitrageqty),2) + it.ENUMDICNAME)//'应套保量/\n 应套利量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.TotalNeedHedgeQty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.DiffSpotHedgeQty),2) + it.ENUMDICNAME)//'现货应套保总量/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.TotalFutureQty),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.DiffFutuQty),2) + it.ENUMDICNAME)//'期货总量/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.NeedHedgeExposoure),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.DiffExposoureQty),2) + it.ENUMDICNAME)//'套保敞口/\n 变动量 '
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.TotalExposure),2) + it.ENUMDICNAME + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.DiffQty),2) + it.ENUMDICNAME)//'总敞口/\n 变动量 '
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
         }

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

@@ -22,6 +22,7 @@ import cn.muchinfo.rma.view.base.home.accountmanager.accountviewholder.AccountMa
 import cn.muchinfo.rma.view.base.home.accountmanager.accountviewholder.FutureManagerViewHolder
 import cn.muchinfo.rma.view.base.home.accountmanager.bussinessaccount.TradingManagerViewHolder
 import cn.muchinfo.rma.view.base.home.accountmanager.futureaccount.AddFutureAccountActivity
+import cn.muchinfo.rma.view.base.home.accountmanager.futureaccount.AddTransactionUserActivity
 import cn.muchinfo.rma.view.base.home.accountmanager.futureset.FutureSetActivity
 import cn.muchinfo.rma.view.base.home.accountmanager.manageaccount.ManagerAccountViewHolder
 import cn.muchinfo.rma.view.base.home.contract.emptyView
@@ -379,6 +380,18 @@ class TradingAccountManager(
 
                 emptyView()
 
+                imageView {
+                    onThrottleFirstClick {
+                        val intent = Intent()
+                        intent.putExtra("type","1")
+                        intent.setClass(context, AddTransactionUserActivity::class.java)
+                        ActivityUtils.startActivity(intent)
+                    }
+                    imageResource = R.mipmap.rma_account_add
+                }.lparams(autoSize(43), autoSize(43)) {
+                    marginEnd = autoSize(36)
+                }
+
             }.lparams(matchParent, autoSize(96))
 
             statusLayout(contentBlock = {

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

@@ -420,7 +420,7 @@ class ToAuditUI(
     }
 
     val contractAdapter by lazy {
-        ContractAdapter(activity,"1",viewModel)
+        ContractAdapter(activity,"2",viewModel)
     }
 
     @SuppressLint("RtlHardcoded")
@@ -564,7 +564,7 @@ class PerformanceUI(
     }
 
     val contractAdapter by lazy {
-        ContractAdapter(activity,"1",viewModel)
+        ContractAdapter(activity,"3",viewModel)
     }
 
     @SuppressLint("RtlHardcoded")
@@ -708,7 +708,7 @@ class FinishUI(
     }
 
     val contractAdapter by lazy {
-        ContractAdapter(activity,"1",viewModel)
+        ContractAdapter(activity,"4",viewModel)
     }
 
     @SuppressLint("RtlHardcoded")

+ 6 - 6
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/adapter/ContractAdapter.java

@@ -173,7 +173,7 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
             ActivityUtils.startActivity(intent);
         });
         if (type.equals("1")){
-            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unaduit","client_spotcontract_update")){
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unsubmit","client_spotcontract_update")){
                 if (contractData.getContracctstatus().equals("1") || contractData.getContracctstatus().equals("0")){
                     itemViewHolder.contract_modify.setVisibility(View.VISIBLE);
                 }else {
@@ -194,7 +194,7 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
             ActivityUtils.startActivity(intent);
         });
         if (type.equals("3")){
-            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unaduit","client_spotcontract_finish")){
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_agreement","client_spotcontract_finish")){
                 itemViewHolder.contract_completion.setVisibility(View.VISIBLE);
             }else {
                 itemViewHolder.contract_completion.setVisibility(View.GONE);
@@ -211,7 +211,7 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
             ActivityUtils.startActivity(intent);
         });
         if (type.equals("1")){
-            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unaduit","client_spotcontract_recommit")){
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unsubmit","client_spotcontract_recommit")){
                 if (contractData.getContracctstatus().equals("4") || contractData.getContracctstatus().equals("6")){
                     itemViewHolder.contract_resubmit.setVisibility(View.VISIBLE);
                 }else {
@@ -233,12 +233,12 @@ public class ContractAdapter extends RecyclerView.Adapter<ContractAdapter.ItemVi
         });
         if (type.equals("1")){
             if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_spotcontract","client_spotcontract_unaduit","client_spotcontract_delete")){
-                itemViewHolder.contract_completion.setVisibility(View.VISIBLE);
+                itemViewHolder.contract_delete.setVisibility(View.VISIBLE);
             }else {
-                itemViewHolder.contract_completion.setVisibility(View.GONE);
+                itemViewHolder.contract_delete.setVisibility(View.GONE);
             }
         }else {
-            itemViewHolder.contract_completion.setVisibility(View.GONE);
+            itemViewHolder.contract_delete.setVisibility(View.GONE);
         }
         //删除
         itemViewHolder.contract_delete.setOnClickListener(view -> {

+ 16 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/InventoryRecordAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+import cn.muchinfo.rma.global.GlobalDataCollection;
 import cn.muchinfo.rma.global.ViewEnumUtils;
 import cn.muchinfo.rma.global.data.AreaSpotplReportData;
 import cn.muchinfo.rma.global.data.AreaStockApplyData;
@@ -147,10 +148,24 @@ public class InventoryRecordAdapter extends RecyclerView.Adapter<InventoryRecord
         }
 
         if (pageType == 1) {
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_wrstandstock","client_report_wrstandstock_warehouse")){//仓库明细
+                itemViewHolder.futures_subsidiary.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.futures_subsidiary.setVisibility(View.GONE);
+            }
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_wrstandstock","client_report_wrstandstock_brand")){//品牌明细
+                itemViewHolder.place_the_order.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.place_the_order.setVisibility(View.GONE);
+            }
             itemViewHolder.futures_subsidiary.setVisibility(View.VISIBLE);
             itemViewHolder.place_the_order.setVisibility(View.VISIBLE);
         } else {
-            itemViewHolder.inventory_details.setVisibility(View.VISIBLE);
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_warehousestock","client_report_warehousestock_stock")){//库存明细
+                itemViewHolder.inventory_details.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.inventory_details.setVisibility(View.GONE);
+            }
         }
 
         itemViewHolder.exposure_all_click_View.setOnClickListener(new View.OnClickListener() {

+ 71 - 74
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryActivity.kt

@@ -52,11 +52,6 @@ class ReportQueryActivity : BaseActivity<ReportQueryViewModel>() {
     var selectedTabIndex: Int = 0
     private lateinit var viewPager: ViewPager
 
-    /** tab标题 **/
-    private val tabsArray: List<String> by lazy {
-        arrayListOf("财务报表", "敞口报表", "现货报表", "库存(品类)报表","库存(仓库)报表","汇总损益表")
-    }
-
     /** 财务报表 **/
     private val financialReportUI by lazy { FinancialReportUI(this, viewModel) }
 
@@ -75,62 +70,56 @@ class ReportQueryActivity : BaseActivity<ReportQueryViewModel>() {
     /** 库存(仓库)报表 **/
     private val invertoryWarehouseReportUI by lazy { InvertoryWarehouseReportUI(this, viewModel) }
 
-    private val pagerAdapter: PagerAdapter by lazy {
-        object : PagerAdapter() {
+    private val dialog by lazy { createLoadingDialog(hintStr = "请求中...") }
+
+    //viewpager的适配器
+    private var newPagerAdapter : PagerAdapter? = null
+
+    //tabSegment标题
+    private val newTabsArray : ArrayList<String> = arrayListOf()
 
-            override fun getPageTitle(position: Int): CharSequence? = tabsArray[position]
+    //暂存的页面组
+    private val uiList : ArrayList<_FrameLayout> = arrayListOf()
+
+    //计算页面有多少个显示页签
+    private val showIndex : MutableLiveData<Int> = MutableLiveData()
+
+    fun initMenuData(){
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_exposure") == true){
+            newTabsArray.add("敞口报表")
+            uiList.add(exposureReportUI.root)
+        }
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_spot") == true){
+            newTabsArray.add("现货报表")
+            uiList.add(spotReportUI.root)
+        }
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_finance") == true){
+            newTabsArray.add("财务报表")
+            uiList.add(financialReportUI.root)
+        }
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_wrstandstock") == true){
+            newTabsArray.add("库存(品类)报表")
+            uiList.add(invertoryReportUI.root)
+        }
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_warehousestock") == true){
+            newTabsArray.add("库存(仓库)报表")
+            uiList.add(invertoryWarehouseReportUI.root)
+        }
+        if (GlobalDataCollection.instance?.getSecondLevelMenu(firstCode = "client_report",secondCode = "client_report_sumprofit") == true){
+            newTabsArray.add("汇总损益报表")
+            uiList.add(spotEarningReportUI.root)
+        }
+        showIndex.postValue(uiList.size)
+        newPagerAdapter = object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = newTabsArray[position]
 
             override fun instantiateItem(container: ViewGroup, position: Int): Any {
-                when (position) {
-                    0 -> {
-                        return financialReportUI.root.apply {//财务报表
-                            container.addView(
-                                this,
-                                ViewGroup.LayoutParams(matchParent, matchParent)
-                            )
-                        }
-                    }
-                    1 -> {
-                        return exposureReportUI.root.apply {//敞口报表
-                            container.addView(
-                                this,
-                                ViewGroup.LayoutParams(matchParent, matchParent)
-                            )
-                        }
-                    }
-                    2 -> {
-                        return spotReportUI.root.apply {//现货报表
-                            container.addView(
-                                this,
-                                ViewGroup.LayoutParams(matchParent, matchParent)
-                            )
-                        }
-                    }
-                    3 -> {
-                        return invertoryReportUI.root.apply {//库存报表 (品类)
-                            container.addView(
-                                this,
-                                ViewGroup.LayoutParams(matchParent, matchParent)
-                            )
-                        }
-                    }
-                    4 -> {
-                        return invertoryWarehouseReportUI.root.apply {//库存报表 (仓库)
-                            container.addView(
-                                this,
-                                ViewGroup.LayoutParams(matchParent, matchParent)
-                            )
-                        }
-                    }
-                    5 -> {
-                        return spotEarningReportUI.root.apply {//现货损益报表
-                            container.addView(
-                                this,
-                                ViewGroup.LayoutParams(matchParent, matchParent)
-                            )
-                        }
-                    }
-                    else -> return super.instantiateItem(container, position)
+                return uiList.get(position).apply {
+                    container.addView(
+                        this,
+                        ViewGroup.LayoutParams(matchParent, matchParent)
+                    )
                 }
             }
 
@@ -140,27 +129,27 @@ class ReportQueryActivity : BaseActivity<ReportQueryViewModel>() {
 
             override fun isViewFromObject(view: View, `object`: Any): Boolean = view == `object`
 
-            override fun getCount(): Int = tabsArray.size
+            override fun getCount(): Int = newTabsArray.size
 
         }
-    }
 
-    private val dialog by lazy { createLoadingDialog(hintStr = "请求中...") }
+    }
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
             dialog.bindTaskStatus(context, viewModel.loadingDialogStatus)
+            initMenuData()
             topBar {
                 commonLeftButton()
                 commonTitle {
                     text = "报表查询"
                 }
-                commonMenuButton(R.mipmap.rma_search) {
-                    val intent = Intent()
-                    intent.setClass(context, InvoiceRegisterActivity::class.java)
-                    ActivityUtils.startActivity(intent)
-                }
+//                commonMenuButton(R.mipmap.rma_search) {
+//                    val intent = Intent()
+//                    intent.setClass(context, InvoiceRegisterActivity::class.java)
+//                    ActivityUtils.startActivity(intent)
+//                }
             }
 
 
@@ -176,6 +165,14 @@ class ReportQueryActivity : BaseActivity<ReportQueryViewModel>() {
                         selectedTabIndex = index
                     }
                 })
+
+//                showIndex.bindOptional(context){
+//                    if (it ?: 0 > 5){
+//                        mode = QMUITabSegment.MODE_SCROLLABLE
+//                    }else{
+//                        mode = QMUITabSegment.MODE_FIXED
+//                    }
+//                }
                 mode = QMUITabSegment.MODE_SCROLLABLE
                 setIndicator(QMUITabIndicator(QMUIDisplayHelper.dp2px(context, 2), false, true))
                 setDefaultTextSize(ConvertUtils.sp2px(16f), ConvertUtils.sp2px(16f))
@@ -191,7 +188,7 @@ class ReportQueryActivity : BaseActivity<ReportQueryViewModel>() {
             viewPager {
                 background = resources.getDrawable(R.color.white)
                 viewPager = this
-                adapter = pagerAdapter
+                adapter = newPagerAdapter
             }.lparams(matchParent, matchParent)
 
             segment.setupWithViewPager(viewPager)
@@ -923,7 +920,7 @@ class SpotReportUI(
             }.lparams(matchParent, autoSize(100))
 
 //            viewModel.queryTitle(tableKey = Constant.table_mobile_report_expose, cycletime = tradedate.replace("-", ""),cycletype = "",userid = selectTransactionUser.value?.id ?: "",querytype = "1")
-
+            contentAdapter.setOnContentScrollListener(this@SpotReportUI)
             linearLayout {
                 linearLayout {
                     gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
@@ -1204,7 +1201,7 @@ class SpotEarningReportUI(
             }.lparams(matchParent, autoSize(100))
 
 //            viewModel.queryTitle(tableKey = Constant.table_mobile_report_expose, cycletime = tradedate.replace("-", ""),cycletype = "",userid = selectTransactionUser.value?.id ?: "",querytype = "1")
-
+            contentAdapter.setOnContentScrollListener(this@SpotEarningReportUI)
             linearLayout {
                 linearLayout {
                     gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
@@ -1348,10 +1345,10 @@ class InvertoryReportUI(
     }
 
     /** 选择的现货品种 */
-    private val selectdeliverygoodsData: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "") }
+    private val selectdeliverygoodsData: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "全部现货品种") }
 
     /** 选择的型号类型/品类 **/
-    private val selectWrStandModel: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "") }
+    private val selectWrStandModel: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "全部品类") }
 
     /**
      * 选择的报表周期类型
@@ -1721,13 +1718,13 @@ class InvertoryWarehouseReportUI(
     }
 
     /** 选择的现货品种 */
-    private val selectdeliverygoodsData: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "") }
+    private val selectdeliverygoodsData: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "全部现货品种") }
 
     /** 选择的型号类型/品类 **/
-    private val selectWrStandModel: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "") }
+    private val selectWrStandModel: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "全部品类") }
 
     /** 选择的仓库 **/
-    private val selectWareHouse: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "") }
+    private val selectWareHouse: MutableLiveData<SelectData> = MutableLiveData<SelectData>().apply { value = SelectData(id = "",value = "全部仓库") }
 
     /**
      * 选择的报表周期类型

+ 20 - 20
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/ReportQueryViewModel.kt

@@ -82,7 +82,7 @@ class ReportQueryViewModel : BaseViewModel(){
     val summaryReportDataList : MutableLiveData<List<AreaSumPLData>> = MutableLiveData()
 
     /**
-     * 汇总损益报表数据新
+     * 现货报表
      */
     val spotReportDataList : MutableLiveData<List<AreaSpotplReportData>> = MutableLiveData()
 
@@ -624,23 +624,23 @@ class ReportQueryViewModel : BaseViewModel(){
             //'现货品类 '
             newRightData.add(it.wrstandardname ?: "")
             //'期初量/\n 期末量 '
-            newRightData.add(NumberUtils.doubleDistortion(it.oriqty) + it.enumdicname + "\n" + NumberUtils.doubleDistortion(it.oriqty) + it.curqty)
+            newRightData.add(NumberUtils.doubleDistortion(it.oriqty) + it.enumdicname + "\n" + NumberUtils.doubleDistortion(it.oriqty) + it.enumdicname)
             //'今采购量/\n 今销售量 '
-            newRightData.add(NumberUtils.doubleDistortion(it.todaybuyqty) + it.enumdicname + "\n" + NumberUtils.doubleDistortion(it.todaysellqty) + it.curqty)
+            newRightData.add(NumberUtils.doubleDistortion(it.todaybuyqty) + it.enumdicname + "\n" + NumberUtils.doubleDistortion(it.todaysellqty) + it.enumdicname)
             //'今入库量/\n 今出库量 '
-            newRightData.add(NumberUtils.doubleDistortion(it.todayinqty) + it.enumdicname + "\n" + NumberUtils.doubleDistortion(it.todayoutqty) + it.curqty)
+            newRightData.add(NumberUtils.doubleDistortion(it.todayinqty) + it.enumdicname + "\n" + NumberUtils.doubleDistortion(it.todayoutqty) + it.enumdicname)
             //'期初额/\n 期末额 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.oriamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.oriamount),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curamount),2) )
             // '期初均价/\n 期末均价 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.oriaverageprice),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curaverageprice),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.oriaverageprice),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curaverageprice),2) )
             // '今采购额/\n 今销售额 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaybuyamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaysellamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaybuyamount),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaysellamount),2) )
             // '采购均价/\n 销售均价 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaybuyaverageprice),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaysellaverageprice),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaybuyaverageprice),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaysellaverageprice),2) )
             // '现货损益/\n 浮动损益 '
             newRightData.add(it.actualpl + "\n" + it.floatpl)
             // '最新价/\n 期末市值 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curspotprice),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curmarketvalue),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curspotprice),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.curmarketvalue),2) )
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
         }
@@ -655,11 +655,11 @@ class ReportQueryViewModel : BaseViewModel(){
         respData.forEach {
             val newRightData = arrayListOf<String>()
             //'现货损益/\n 现货浮动损益 '
-            newRightData.add(it.spotactualpl + "\n" + it.spotfloatpl)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.spotactualpl),2) + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.spotfloatpl),2))
             //'期货损益/\n 期货浮动损益 '
-            newRightData.add(it.futureactualpl + "\n" + it.futurefloatpl)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.futureactualpl),2) + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.futurefloatpl),2))
             //'实际损益/\n 汇总损益 '
-            newRightData.add(it.sumactualpl + "\n" + it.sumpl)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sumactualpl),2) + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sumpl),2))
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
         }
@@ -674,21 +674,21 @@ class ReportQueryViewModel : BaseViewModel(){
         respData.forEach {
             val newRightData = arrayListOf<String>()
             //今付贷款额/\n 今收退款额
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buytodaysettleamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buytodayrefundamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buytodaysettleamount),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buytodayrefundamount),2) )
             //'今收货款额/\n 今付退款额 '
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.selltodaysettleamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(it.selltodayrefundamount,2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.selltodaysettleamount),2)   + "\n" + NumberUtils.roundNum(it.selltodayrefundamount,2) )
             //'今收票额/\n 今开票额'
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buytodayinvoiceamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(it.selltodayinvoiceamount,2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buytodayinvoiceamount),2)  + "\n" + NumberUtils.roundNum(it.selltodayinvoiceamount,2) )
             //预付贷款额/\n 应付贷款额'
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buyprepaidamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buyunpaidamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buyprepaidamount),2)   + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buyunpaidamount),2) )
             //'预收票额/\n 应收票额'
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buypreinvoicedamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buyuninvoicedamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buypreinvoicedamount),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.buyuninvoicedamount),2) )
             //''预收贷款额/\n 应收贷款额'
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sellprepaidamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sellunpaidamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sellprepaidamount),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sellunpaidamount),2) )
             //'预开票额/\n 应开票额
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sellpreinvoicedamount),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.selluninvoicedamount),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.sellpreinvoicedamount),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.selluninvoicedamount),2) )
             //'今收款合计/\n 今付款合计'
-            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todayreceivesum),2) + it.currencyname + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaypaysum),2) + it.currencyname)
+            newRightData.add(NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todayreceivesum),2)  + "\n" + NumberUtils.roundNum(NumberUtils.doubleDistortion(it.todaypaysum),2) )
             val newData = it.copy(rightData = newRightData)
             newList.add(newData)
         }

+ 43 - 26
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/ExposureReportContentAdapter.java

@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+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;
@@ -148,10 +149,26 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
             }
         });
         if (type.equals("2")){
-            itemViewHolder.invoice_register.setVisibility(View.VISIBLE);
-            itemViewHolder.midpoints_registration.setVisibility(View.VISIBLE);
-            itemViewHolder.settlement_of_registration.setVisibility(View.VISIBLE);
-            itemViewHolder.payment_registration.setVisibility(View.VISIBLE);
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_exposure","client_report_exposure_parmateradjust")){//参数调整明细
+                itemViewHolder.midpoints_registration.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.midpoints_registration.setVisibility(View.GONE);
+            }
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_exposure","client_report_exposure_futures")){//期货明细
+                itemViewHolder.settlement_of_registration.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.settlement_of_registration.setVisibility(View.GONE);
+            }
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_exposure","client_report_exposure_hedgeplan")){//套保计划明细
+                itemViewHolder.payment_registration.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.payment_registration.setVisibility(View.GONE);
+            }
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_exposure","client_report_exposure_spotcontract")){//现货合同明细
+                itemViewHolder.invoice_register.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.invoice_register.setVisibility(View.GONE);
+            }
         }else if (type.equals("1")){
             itemViewHolder.warehouse_register.setVisibility(View.VISIBLE);
         }
@@ -165,10 +182,10 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
             intent.putExtra("title","现货合同变动量明细");
             intent.putExtra("transaction",this.transaction);
             if (data.getCycletype().equals("0")){
-                intent.putExtra("tabtitle", Constant.table_mobile_report_expose_spotcontract);
+                intent.putExtra("tabtitle", Constant.table_mobile_report_expose_spotcontract_day);
                 intent.putExtra("time",data.getReckondate());
             }else {
-                intent.putExtra("tabtitle",Constant.table_mobile_report_expose_spotcontract);
+                intent.putExtra("tabtitle",Constant.table_mobile_report_expose_spotcontract_weekmonth);
                 intent.putExtra("time",data.getBegindate() + "~" + data.getEnddate());
             }
             intent.putExtra("AreaStockReportData",new AreaStockReportData());
@@ -182,27 +199,27 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
         });
         //参数调整明细
         itemViewHolder.midpoints_registration.setOnClickListener(view -> {
-            Intent intent = new Intent();
-            intent.putExtra("title","参数调整明细");
-            intent.putExtra("time",this.time);
-            intent.putExtra("transaction",this.transaction);
-            intent.putExtra("tabtitle",this.tabtitle);
-            intent.putExtra("timeType",this.timeType);
-            intent.putExtra("transactionUserid",this.transactionUserid);
-            intent.setClass(context, ReportCommonDetailsActivity.class);
-            ActivityUtils.startActivity(intent);
+//            Intent intent = new Intent();
+//            intent.putExtra("title","参数调整明细");
+//            intent.putExtra("time",this.time);
+//            intent.putExtra("transaction",this.transaction);
+//            intent.putExtra("tabtitle",this.tabtitle);
+//            intent.putExtra("timeType",this.timeType);
+//            intent.putExtra("transactionUserid",this.transactionUserid);
+//            intent.setClass(context, ReportCommonDetailsActivity.class);
+//            ActivityUtils.startActivity(intent);
         });
         //期货明细
         itemViewHolder.settlement_of_registration.setOnClickListener(view -> {
-            Intent intent = new Intent();
-            intent.putExtra("title","期货明细");
-            intent.putExtra("time",this.time);
-            intent.putExtra("transaction",this.transaction);
-            intent.putExtra("tabtitle",this.tabtitle);
-            intent.putExtra("timeType",this.timeType);
-            intent.putExtra("transactionUserid",this.transactionUserid);
-            intent.setClass(context, ReportCommonDetailsActivity.class);
-            ActivityUtils.startActivity(intent);
+//            Intent intent = new Intent();
+//            intent.putExtra("title","期货明细");
+//            intent.putExtra("time",this.time);
+//            intent.putExtra("transaction",this.transaction);
+//            intent.putExtra("tabtitle",this.tabtitle);
+//            intent.putExtra("timeType",this.timeType);
+//            intent.putExtra("transactionUserid",this.transactionUserid);
+//            intent.setClass(context, ReportCommonDetailsActivity.class);
+//            ActivityUtils.startActivity(intent);
         });
         //套保计划明细
         itemViewHolder.payment_registration.setOnClickListener(view -> {
@@ -210,10 +227,10 @@ public class ExposureReportContentAdapter extends RecyclerView.Adapter<ExposureR
             intent.putExtra("title","套保计划明细");
             intent.putExtra("transaction",this.transaction);
             if (data.getCycletype().equals("0")){
-                intent.putExtra("tabtitle", Constant.table_mobile_report_expose_hedgeplan);
+                intent.putExtra("tabtitle", Constant.table_mobile_report_expose_hedgeplan_day);
                 intent.putExtra("time",data.getReckondate());
             }else {
-                intent.putExtra("tabtitle",Constant.table_mobile_report_expose_hedgeplan);
+                intent.putExtra("tabtitle",Constant.table_mobile_report_expose_hedgeplan_weekmonth);
                 intent.putExtra("time",data.getBegindate() + "~" + data.getEnddate());
             }
             intent.putExtra("AreaStockReportData",new AreaStockReportData());

+ 14 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/FanacelReportContentAdapter.java

@@ -22,6 +22,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+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.ExposureReportData;
@@ -158,8 +160,16 @@ public class FanacelReportContentAdapter extends RecyclerView.Adapter<FanacelRep
             itemViewHolder.settlement_of_registration.setVisibility(View.VISIBLE);
             itemViewHolder.payment_registration.setVisibility(View.VISIBLE);
         }else if (type.equals("1")){
-            itemViewHolder.warehouse_register.setVisibility(View.VISIBLE);
-            itemViewHolder.fanacel_register.setVisibility(View.VISIBLE);
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_finance","client_report_finance_brand")){//品牌明细
+                itemViewHolder.warehouse_register.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.warehouse_register.setVisibility(View.GONE);
+            }
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_finance","client_report_finance_wrstand")){//品类明细
+                itemViewHolder.fanacel_register.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.fanacel_register.setVisibility(View.GONE);
+            }
         }
         //财务明细 品牌明细
         itemViewHolder.warehouse_register.setOnClickListener(view -> {
@@ -173,6 +183,7 @@ public class FanacelReportContentAdapter extends RecyclerView.Adapter<FanacelRep
                 intent.putExtra("tabtitle",Constant.table_mobile_report_fincial_brand_weekmonthdetail);
                 intent.putExtra("time",data.getBegindate() + "~" + data.getEnddate());
             }
+            intent.putExtra("AreaSpotplReportData",new AreaSpotplReportData());
             intent.putExtra("AreaStockReportData",new AreaStockReportData());
             intent.putExtra("AreaSumPLData",new AreaSumPLData());
             intent.putExtra("ExposureReportData",new ExposureReportData());
@@ -194,6 +205,7 @@ public class FanacelReportContentAdapter extends RecyclerView.Adapter<FanacelRep
                 intent.putExtra("tabtitle",Constant.table_mobile_report_fincial_wrstandard_weekmonthdetail);
                 intent.putExtra("time",data.getBegindate() + "~" + data.getEnddate());
             }
+            intent.putExtra("AreaSpotplReportData",new AreaSpotplReportData());
             intent.putExtra("AreaStockReportData",new AreaStockReportData());
             intent.putExtra("AreaSumPLData",new AreaSumPLData());
             intent.putExtra("ExposureReportData",new ExposureReportData());

+ 6 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SpotReportContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+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;
@@ -158,7 +159,11 @@ public class SpotReportContentAdapter extends RecyclerView.Adapter<SpotReportCon
         }else if (type.equals("5")){
             itemViewHolder.summary_details.setVisibility(View.VISIBLE);
         }else if (type.equals("3")){
-            itemViewHolder.spot_details.setVisibility(View.VISIBLE);
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_spot","client_report_spot_detail")){
+                itemViewHolder.spot_details.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.spot_details.setVisibility(View.GONE);
+            }
         }
         //现货明细
         itemViewHolder.spot_details.setOnClickListener(view -> {

+ 6 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/adapter/SummaryReportContentAdapter.java

@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import cn.muchinfo.rma.R;
+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;
@@ -155,7 +156,11 @@ public class SummaryReportContentAdapter extends RecyclerView.Adapter<SummaryRep
         }else if (type.equals("1")){
             itemViewHolder.warehouse_register.setVisibility(View.VISIBLE);
         }else if (type.equals("5")){
-            itemViewHolder.summary_details.setVisibility(View.VISIBLE);
+            if (GlobalDataCollection.Companion.getInstance().getThreeLevelMenu("client_report","client_report_sumprofit","client_report_sumprofit_detail")){
+                itemViewHolder.summary_details.setVisibility(View.VISIBLE);
+            }else {
+                itemViewHolder.summary_details.setVisibility(View.GONE);
+            }
         }
         //财务明细
         itemViewHolder.summary_details.setOnClickListener(view -> {

+ 80 - 11
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reportquery/reportdetail/ReportCommonDetailsViewModel.kt

@@ -101,7 +101,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
                     exposureReportDataList.postValue(resetfincial_wrstandard_weekmonthdetail(respData ?: arrayListOf()))
                 }
             }
-        }else if (tabName == Constant.table_mobile_report_expose_spotcontract){//查询敞口合同明细(敞口报表/现货合同明细) QryAreaExpourseContractDetail
+        }else if (tabName == Constant.table_mobile_report_expose_spotcontract_day){//报表-敞口报表-现货合同变动量明细-日报表 QryAreaExpourseContractDetail
             val params = mutableMapOf<String, String>().apply {
                 put("userid", userid)
                 put("middlegoodsid", exposureReportData.middlegoodsid ?: "")
@@ -114,10 +114,26 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             }
             MyApplication.getInstance()?.reportManager?.qryAreaExpourseContractDetail(params = params) { isSuccess, respData, error ->
                 if (isSuccess) {
-                    exposureReportDataList.postValue(resetAreaExpourseContractDetail(respData ?: arrayListOf()))
+                    exposureReportDataList.postValue(resetAreaExpourseContractDayDetail(respData ?: arrayListOf()))
                 }
             }
-        }else if (tabName == Constant.table_mobile_report_expose_hedgeplan){//查询敞口套保计划明细(敞口报表/套保计划明细)
+        }else if (tabName == Constant.table_mobile_report_expose_spotcontract_weekmonth){//报表-敞口报表-现货合同变动量明细-周月报表 QryAreaExpourseContractDetail
+            val params = mutableMapOf<String, String>().apply {
+                put("userid", userid)
+                put("middlegoodsid", exposureReportData.middlegoodsid ?: "")
+                put("cycletype",exposureReportData.cycletype ?: "")
+                if (exposureReportData.cycletype == "0"){
+                    put("cycletime",exposureReportData.reckondate ?: "")
+                }else{
+                    put("cycletime",exposureReportData.cycletime ?: "")
+                }
+            }
+            MyApplication.getInstance()?.reportManager?.qryAreaExpourseContractDetail(params = params) { isSuccess, respData, error ->
+                if (isSuccess) {
+                    exposureReportDataList.postValue(resetAreaExpourseContractMonthDetail(respData ?: arrayListOf()))
+                }
+            }
+        }else if (tabName == Constant.table_mobile_report_expose_hedgeplan_day){//查询敞口套保计划明细(敞口报表/套保计划明细)
             val params = mutableMapOf<String, String>().apply {
                 put("userid", userid)
                 put("middlegoodsid", exposureReportData.middlegoodsid ?: "")
@@ -130,7 +146,23 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             }
             MyApplication.getInstance()?.reportManager?.qryAreaExpourseHedgeplanDetail(params = params) { isSuccess, respData, error ->
                 if (isSuccess) {
-                    exposureReportDataList.postValue(resetAreaExpourseHedgeplanDetail(respData ?: arrayListOf()))
+                    exposureReportDataList.postValue(resetAreaExpourseHedgeplanDayDetail(respData ?: arrayListOf()))
+                }
+            }
+        }else if (tabName == Constant.table_mobile_report_expose_hedgeplan_weekmonth){//查询敞口套保计划明细(敞口报表/套保计划明细)
+            val params = mutableMapOf<String, String>().apply {
+                put("userid", userid)
+                put("middlegoodsid", exposureReportData.middlegoodsid ?: "")
+                put("cycletype",exposureReportData.cycletype ?: "")
+                if (exposureReportData.cycletype == "0"){
+                    put("cycletime",exposureReportData.reckondate ?: "")
+                }else{
+                    put("cycletime",exposureReportData.cycletime ?: "")
+                }
+            }
+            MyApplication.getInstance()?.reportManager?.qryAreaExpourseHedgeplanDetail(params = params) { isSuccess, respData, error ->
+                if (isSuccess) {
+                    exposureReportDataList.postValue(resetAreaExpourseHedgeplanMonthDetail(respData ?: arrayListOf()))
                 }
             }
         }else if (tabName == Constant.table_mobile_report_spot_daydetail){//报表-现货报表-日报表明细
@@ -420,7 +452,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             val data = ReportCommonDetailData()
             val newRightData = arrayListOf<String>()
             data.leftContent = it.reckondate ?: ""//日期
-            newRightData.add(it.currencyname  + "\n" + it.middlegoodsid)//'结算币种/\n 套保品种 ' TODO 缺少套保品种
+            newRightData.add(it.currencyname  + "\n" + it.middlegoodsname)//'结算币种/\n 套保品种 '
             newRightData.add(NumberUtils.roundNum(it.spotactualpl,2) + "\n" + NumberUtils.roundNum(it.spotfloatpl,2))//'现货损益/\n 现货浮动损益 '
             newRightData.add(NumberUtils.roundNum(it.futureactualpl,2) + "\n" + NumberUtils.roundNum(it.futurefloatpl,2))//'期货损益/\n 期货浮动损益 '
             newRightData.add(NumberUtils.roundNum(it.sumactualpl,2) + "\n" + NumberUtils.roundNum(it.sumpl,2))//'实际损益/\n 汇总损益 '
@@ -437,7 +469,7 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
         dataList.forEach {
             val data = ReportCommonDetailData()
             val newRightData = arrayListOf<String>()
-            data.leftContent = it.currencyname  + "\n" + it.middlegoodsid//'结算币种/\n 套保品种 ' TODO 缺少套保品种
+            data.leftContent = it.currencyname  + "\n" + it.middlegoodsname//'结算币种/\n 套保品种 '
             newRightData.add(NumberUtils.roundNum(it.spotactualpl,2) + "\n" + NumberUtils.roundNum(it.spotfloatpl,2))//'现货损益/\n 现货浮动损益 '
             newRightData.add(NumberUtils.roundNum(it.futureactualpl,2) + "\n" + NumberUtils.roundNum(it.futurefloatpl,2))//'期货损益/\n 期货浮动损益 '
             newRightData.add(NumberUtils.roundNum(it.sumactualpl,2) + "\n" + NumberUtils.roundNum(it.sumpl,2))//'实际损益/\n 汇总损益 '
@@ -583,8 +615,26 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
         return newList
     }
 
-    //查询敞口套保计划明细(敞口报表/套保计划明细)
-    fun resetAreaExpourseHedgeplanDetail(dataList : List<AreaExpourseContractDetailData>) : List<ReportCommonDetailData>{
+    //查询敞口套保计划明细(敞口报表/套保计划明细)周月
+    fun resetAreaExpourseHedgeplanMonthDetail(dataList : List<AreaExpourseContractDetailData>) : List<ReportCommonDetailData>{
+        val newList = arrayListOf<ReportCommonDetailData>()
+        dataList.forEach {
+            val data = ReportCommonDetailData()
+            val newRightData = arrayListOf<String>()
+            data.leftContent = it.tradedate
+            newRightData.add(if (it.contracttype == "1"){ "采购" }else{ "销售" } + "\n" + ViewEnumUtils.getHedgeplanstatus(it.hedgeplanstatus))//'计划类型/\n 计划状态 '
+            newRightData.add(it.deliverygoodsname + "\n" + it.middlegoodsname)//'现货品种/\n 套保品种 '
+            newRightData.add(it.wrstandardname + "\n" + it.qty + it.enumdicname)//'现货品类/\n 计划量 '
+            newRightData.add(it.diffqty + it.enumdicname + "\n" + it.changqty + it.enumdicname)//'套保品种今变动量/\n 应套保总量变动量 '
+            newRightData.add(if (it.contracttype == "1"){ "套保" }else{ "套利" } + "\n" + it.tradedate)//'期现用途/\n 登记日 '
+            data.rightData = newRightData
+            newList.add(data)
+        }
+        return newList
+    }
+
+    //查询敞口套保计划明细(敞口报表/套保计划明细)日
+    fun resetAreaExpourseHedgeplanDayDetail(dataList : List<AreaExpourseContractDetailData>) : List<ReportCommonDetailData>{
         val newList = arrayListOf<ReportCommonDetailData>()
         dataList.forEach {
             val data = ReportCommonDetailData()
@@ -593,15 +643,34 @@ class ReportCommonDetailsViewModel : BaseViewModel(){
             newRightData.add(it.deliverygoodsname + "\n" + it.middlegoodsname)//'现货品种/\n 套保品种 '
             newRightData.add(it.wrstandardname + "\n" + it.qty + it.enumdicname)//'现货品类/\n 计划量 '
             newRightData.add(it.diffqty + it.enumdicname + "\n" + it.changqty + it.enumdicname)//'套保品种今变动量/\n 应套保总量变动量 '
-            newRightData.add(it.tradedate + "\n" + it.tradedate)//'期现用途/\n 登记日 ' // TODO 缺少期限用途
+            newRightData.add(if (it.contracttype == "1"){ "套保" }else{ "套利" } + "\n" + it.tradedate)//'期现用途/\n 登记日 '
+            data.rightData = newRightData
+            newList.add(data)
+        }
+        return newList
+    }
+
+    //报表-敞口报表-现货合同变动量明细-周月报表
+    fun resetAreaExpourseContractMonthDetail(dataList : List<AreaExpourseContractDetailData>) : List<ReportCommonDetailData>{
+        val newList = arrayListOf<ReportCommonDetailData>()
+        dataList.forEach {
+            val data = ReportCommonDetailData()
+            val newRightData = arrayListOf<String>()
+            data.leftContent = it.tradedate//日期//
+            newRightData.add(it.deliverygoodsname + "\n" + it.middlegoodsname)//'现货品种/\n 套保品种 '
+            newRightData.add(it.brandname + "\n" + if (it.contracttype == "1"){ "套保" }else{ "套利" })//'现货品类/\n 业务类型 '
+            newRightData.add(it.qty + it.mgunitidname + "\n" + it.qty + it.mgunitidname)//采购量/\n 销售量 '// TODO 缺少 采购量  销售量
+            newRightData.add(it.qty + it.mgunitidname + "\n" + it.qty + it.mgunitidname)//'采购计划套保量/\n 销售计划套保量 '// TODO 缺少 采购计划套保量  销售计划套保量
+            newRightData.add(it.qty + it.mgunitidname + "\n" + it.diffqty + it.mgunitidname)//'合计变动量/\n 套保品种变动量 ' // TODO 缺少合计变动量
+            newRightData.add(it.convertratio.toPercentage())//'数量折算系数 '
             data.rightData = newRightData
             newList.add(data)
         }
         return newList
     }
 
-    //查询敞口合同明细(敞口报表/现货合同明细)的数据组装
-    fun resetAreaExpourseContractDetail(dataList : List<AreaExpourseContractDetailData>) : List<ReportCommonDetailData>{
+    //报表-敞口报表-现货合同变动量明细-日报表
+    fun resetAreaExpourseContractDayDetail(dataList : List<AreaExpourseContractDetailData>) : List<ReportCommonDetailData>{
         val newList = arrayListOf<ReportCommonDetailData>()
         dataList.forEach {
             val data = ReportCommonDetailData()

+ 17 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/SeaKingMainFragment.kt

@@ -12,6 +12,8 @@ import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseFragment
 import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.main.addressmanagement.MyAddressManagementActivity
+import cn.muchinfo.rma.view.base.main.castsurely.MyCastSurelyActivity
 import cn.muchinfo.rma.view.base.main.promotioncode.MyPromotionCodeActivity
 import com.blankj.utilcode.util.ActivityUtils
 
@@ -190,30 +192,31 @@ class SeaKingMainFragment : BaseFragment<SeaKingMainViewModel>(){
 
                             linearLayout {
                                 linearLayout {
-                                    backgroundResource = R.drawable.qhj_withdraw_bg
+                                    backgroundResource = R.mipmap.qhj_withdraw
                                     gravity = Gravity.CENTER
                                     textView {
                                         text = "提现"
                                         textColorInt = R.color.qhj_withdraw_color
                                         textSizeAuto = 36
                                     }.lparams(wrapContent, wrapContent)
-                                }.lparams(0, autoSize(100),1f){
+                                }.lparams(0, autoSize(122),1f){
                                     marginStart = autoSize(78)
                                     marginEnd = autoSize(36)
                                 }
 
-
                                 linearLayout {
                                     backgroundResource = R.drawable.qhj_main_blue_bg
                                     gravity = Gravity.CENTER
                                     textView {
+                                        gravity = Gravity.CENTER_HORIZONTAL
                                         text = "充值"
                                         textColorInt = R.color.white
                                         textSizeAuto = 36
                                     }.lparams(wrapContent, wrapContent)
-                                }.lparams(0, autoSize(100),1f){
+                                }.lparams(0, autoSize(84),1f){
                                     marginStart = autoSize(36)
                                     marginEnd = autoSize(78)
+                                    topMargin = autoSize(15)
                                 }
                             }.lparams(matchParent, autoSize(100)){
                                 topMargin = autoSize(25)
@@ -307,6 +310,11 @@ class SeaKingMainFragment : BaseFragment<SeaKingMainViewModel>(){
 
                         linearLayout {
                             gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context,MyCastSurelyActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
                             imageView {
                                 imageResource = R.mipmap.qhj_cast_surely_management
                             }.lparams(autoSize(50), autoSize(50)){
@@ -395,6 +403,11 @@ class SeaKingMainFragment : BaseFragment<SeaKingMainViewModel>(){
 
                         linearLayout {
                             gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context,MyAddressManagementActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
                             imageView {
                                 imageResource = R.mipmap.qhj_good_address
                             }.lparams(autoSize(50), autoSize(50)){

+ 155 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/AddAddressManagementActivity.kt

@@ -0,0 +1,155 @@
+package cn.muchinfo.rma.view.base.main.addressmanagement
+
+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.database.DataBase
+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.future.trade.itemView
+import org.jetbrains.anko.*
+
+/**
+ *新增收货地址
+ */
+class AddAddressManagementActivity : BaseActivity<MyAddressViewModel>(){
+
+    //收货人姓名
+    lateinit var consignee_name : EditText
+
+    //联系电话
+    lateinit var consignee_phone : EditText
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            //页面标题
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "新增收货地址"
+                }
+            }
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "收货人"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_gray_color
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(36)
+                }
+
+                editText {
+                    isEnabled = false
+                    consignee_name = this
+                    hint = "请填写收货人姓名"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_TEXT
+                    setDecimalInputType()
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(148)) {
+                    marginStart = autoSize(80)
+                }
+            }.lparams(matchParent, autoSize(148))
+
+            itemView()
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "联系电话"
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_gray_color
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(36)
+                }
+
+                editText {
+                    isEnabled = false
+                    consignee_phone = this
+                    hint = "请填写收货人联系电话"
+                    background = null
+                    inputType = EditorInfo.TYPE_CLASS_NUMBER
+                    setDecimalInputType()
+                    hintColorStr = "#CCCCCC"
+                    textSizeAuto = 31
+                    textColorStr = "#333333"
+                }.lparams(matchParent, autoSize(148)) {
+                    marginStart = autoSize(80)
+                }
+            }.lparams(matchParent, autoSize(148))
+
+            itemView()
+
+            // 通讯地址
+//            linearLayout {
+//                onThrottleFirstClick {
+//                    if (status != "1" && status != "2") {
+//                        return@onThrottleFirstClick
+//                    }
+//
+//                    showAddress()
+////                                val pvTime =
+////                                    TimePickerBuilder(context,
+////                                        OnTimeSelectListener { date, v ->
+////                                            ToastUtils.showLong(TimeUtils.date2String(date))
+////
+////                                        }).build()
+////                                pvTime.show()
+//                }
+//                gravity = Gravity.CENTER_VERTICAL
+//
+//                textView {
+//                    textResource = R.string.correspondence_address
+//                    textSizeAuto = 31
+//                    textColorInt = R.color.rma_black_33
+//                }.lparams(wrapContent, wrapContent) {
+//                    marginStart = autoSize(59)
+//                }
+//
+//                textView {
+//                    mData.bindOptional(context) {
+//                        if (it?.get(0)?.addressName.isNullOrEmpty()) {
+//                            val builder = StringBuilder()
+//                            it?.forEach { data ->
+//                                builder.append(
+//                                    DataBase.getInstance().addressDao()
+//                                        .getAddressData(data.autoid).divisionname
+//                                )
+//                                builder.append(" ")
+//                            }
+//                            text = builder
+//                            textColorInt = R.color.rma_black_33
+//                        } else {
+//                            val builder = StringBuilder()
+//                            it?.forEach { data ->
+//                                builder.append(data.addressName)
+//                                builder.append(" ")
+//                            }
+//                            text = builder
+//                            textColorInt = R.color.rma_black_33
+//                        }
+//                    }
+//                    textResource = R.string.please_select_address
+//                    textSizeAuto = 31
+//                    textColorInt = R.color.rma_hint_text_color_ccc
+//                }.lparams(autoSize(500), wrapContent) {
+//                    marginStart = autoSize(86)
+//                }
+//
+//            }.lparams(matchParent, autoSize(136))
+
+        }
+    }
+
+}

+ 88 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/MyAddressManagementViewHolder.kt

@@ -0,0 +1,88 @@
+package cn.muchinfo.rma.view.base.main.addressmanagement
+
+import android.graphics.Typeface
+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.createRoundRectDrawable
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 收货地址管理viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel MyAddressViewModel
+ * @property itemSize IntArray
+ * @constructor
+ */
+class MyAddressManagementViewHolder(private val activity : AppCompatActivity,private val viewModel: MyAddressViewModel) : BaseViewHolder<String>(activity){
+
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "周星星"
+                    textSizeAuto = 36
+                    textColorInt = R.color.rma_black_33
+                    typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(36)
+                }
+
+                textView {
+                    text = "1315789234"
+                    textSizeAuto = 36
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    marginStart = autoSize(72)
+                }
+
+                emptyView()
+
+                textView {
+                    backgroundResource = R.drawable.qhj_transparent_bg
+                    gravity = Gravity.CENTER
+                    text = "设为默认"
+                    textSizeAuto = 29
+                    textColorInt = R.color.rma_blue_color
+                }.lparams(autoSize(144), autoSize(43)){
+                    marginEnd = autoSize(36)
+                }
+
+                textView {
+                    background = createRoundRectDrawable("#FFE8D3", 5)
+                    text = "默认"
+                    textSizeAuto = 29
+                    textColorInt = R.color.qhj_yellow_text_color
+                }.lparams(autoSize(84), autoSize(43)){
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(60)){
+                topMargin = autoSize(20)
+            }
+
+            textView {
+                text = "广东省深圳市南山区粤海街道金融基地10楼"
+                textSizeAuto = 31
+                textColorInt = R.color.rma_gray_color
+            }.lparams(wrapContent, wrapContent){
+                marginStart = autoSize(36)
+                marginEnd = autoSize(36)
+                topMargin = autoSize(10)
+                bottomMargin = autoSize(30)
+            }
+
+            itemView()
+
+        }.lparams(matchParent, wrapContent)
+    }
+
+}

+ 79 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/MyAddressMnangerActivity.kt

@@ -0,0 +1,79 @@
+package cn.muchinfo.rma.view.base.main.addressmanagement
+
+import android.os.Bundle
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.main.castsurely.CastSurelyDetailsViewHolder
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.dialog.SelectData
+import mtp.polymer.com.autowidget.dialog.creatBottomSheetDialog
+import org.jetbrains.anko.matchParent
+import org.jetbrains.anko.verticalLayout
+
+/**
+ * 收货地址管理
+ */
+class MyAddressManagementActivity : BaseActivity<MyAddressViewModel>(){
+
+    // 下拉刷新
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    /**
+     * 定投列表适配器
+     */
+    private val addressManagementAdapter: BaseAdapter<String, MyAddressManagementViewHolder> =
+        BaseAdapter { _, _ ->
+            MyAddressManagementViewHolder(
+                this,
+                viewModel
+            )
+        }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            //页面标题
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "收货地址管理"
+                }
+                // 新增收货地址
+                commonMenuButton(R.mipmap.qhj_address_manegement) {
+
+                }
+            }
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                setRetryAction {
+
+                }
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    // 未提交列表
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = addressManagementAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            addressManagementAdapter.setNewData(arrayListOf("1","2","3","4"))
+        }
+    }
+
+}

+ 11 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/addressmanagement/MyAddressViewModel.kt

@@ -0,0 +1,11 @@
+package cn.muchinfo.rma.view.base.main.addressmanagement
+
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 我的地址管理viewmodel
+ */
+class MyAddressViewModel : BaseViewModel(){
+
+
+}

+ 233 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsActivity.kt

@@ -0,0 +1,233 @@
+package cn.muchinfo.rma.view.base.main.castsurely
+
+import android.content.Intent
+import android.graphics.Typeface
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.MTPEnums
+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.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.dialog.SelectData
+import mtp.polymer.com.autowidget.dialog.creatBottomSheetDialog
+import org.jetbrains.anko.*
+
+/**
+ * 我的定投详情页面
+ */
+class CastSurelyDetailsActivity : BaseActivity<MyCastSurelyViewModel>() {
+
+    // 下拉刷新
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    /**
+     * 定投列表适配器
+     */
+    private val myCastSurelyAdapter: BaseAdapter<String, CastSurelyDetailsViewHolder> =
+        BaseAdapter { _, _ ->
+            CastSurelyDetailsViewHolder(
+                this,
+                viewModel
+            )
+        }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_title_bg_color)
+            //页面标题
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "定投详情"
+                }
+                // 新增市价录入
+                commonMenuButton(R.mipmap.qhj_dian_dian) {
+                    val selectDataList = arrayListOf(
+                        SelectData(
+                            id = "1",
+                            value = "修改"
+                        ),
+                        SelectData(
+                            id = "2",
+                            value = "暂停"
+                        ),
+                        SelectData(
+                            id = "3",
+                            value = "终止"
+                        ),
+                        SelectData(
+                            id = "4",
+                            value = "取消"
+                        )
+                    )
+                    creatBottomSheetDialog("请选择操作类型", selectDataList) {
+
+                    }
+                }
+            }
+            verticalLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "黄金"
+                        textSizeAuto = 43
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_more
+                    }.lparams(autoSize(30), autoSize(30)){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(matchParent, autoSize(95))
+
+                itemView()
+
+                linearLayout {
+                    verticalLayout {
+                        gravity = Gravity.CENTER_HORIZONTAL
+                        textView {
+                            text = "累计定投(元)"
+                            textColorInt = R.color.qhj_hint_text_color
+                            textSizeAuto = 29
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(25)
+                        }
+
+                        textView {
+                            text = "2300.23"
+                            textColorInt = R.color.rma_black_33
+                            textSizeAuto = 36
+                            typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(15)
+                        }
+                    }.lparams(0, autoSize(160),1f)
+
+                    verticalLayout {
+                        gravity = Gravity.CENTER_HORIZONTAL
+                        textView {
+                            text = "累计定投(克)"
+                            textColorInt = R.color.qhj_hint_text_color
+                            textSizeAuto = 29
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(25)
+                        }
+
+                        textView {
+                            text = "19g"
+                            textColorInt = R.color.rma_black_33
+                            textSizeAuto = 36
+                            typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(15)
+                        }
+                    }.lparams(0, autoSize(160),1f)
+
+                    verticalLayout {
+                        gravity = Gravity.CENTER_HORIZONTAL
+                        textView {
+                            text = "已投期数"
+                            textColorInt = R.color.qhj_hint_text_color
+                            textSizeAuto = 29
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(25)
+                        }
+
+                        textView {
+                            text = "10期"
+                            textColorInt = R.color.rma_black_33
+                            textSizeAuto = 36
+                            typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(15)
+                        }
+                    }.lparams(0, autoSize(160),1f)
+                }.lparams(matchParent, autoSize(160))
+
+                linearLayout {
+                    background = createRoundRectDrawable("#E5EFF5", 3)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "定投计划:每月1日定投2g"
+                        textColorInt = R.color.rma_zhushi_text_color
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent){
+                        autoSize(13)
+                    }
+
+                    emptyView()
+
+                    textView {
+//                        backgroundResource = R.drawable.qhj_transparent_bg
+//                    background = createRoundRectDrawable("#2794FF", 5)
+                        gravity = Gravity.CENTER
+                        text = "进行中"
+                        textColorInt = R.color.rma_blue_color
+                        textSizeAuto = 29
+                    }.lparams(autoSize(120), autoSize(48)){
+                        marginEnd = autoSize(11)
+                    }
+                }.lparams(matchParent, autoSize(72)){
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(360))
+
+            view {
+                background = resources.getDrawable(R.color.rma_item_bg)
+            }.lparams(matchParent, autoSize(24))
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    text = "定投记录"
+                    textSizeAuto = 36
+                    textColorInt = R.color.rma_black_33
+                    typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                }.lparams(wrapContent, wrapContent)
+            }.lparams(matchParent, autoSize(95))
+
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                setRetryAction {
+
+                }
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    // 未提交列表
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = myCastSurelyAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            myCastSurelyAdapter.setNewData(arrayListOf("1","2","3","4","5"))
+
+        }
+    }
+
+}

+ 46 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/CastSurelyDetailsViewHolder.kt

@@ -0,0 +1,46 @@
+package cn.muchinfo.rma.view.base.main.castsurely
+
+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.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+class CastSurelyDetailsViewHolder(private val activity: AppCompatActivity,private val viewModel: MyCastSurelyViewModel) : BaseViewHolder<String>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+         linearLayout {
+             gravity = Gravity.CENTER_VERTICAL
+             textView {
+                 text = "2021-5-30  2g  (100元)"
+                 textSizeAuto = 31
+                 textColorInt = R.color.text_hint_color_two
+             }.lparams(wrapContent, wrapContent){
+                 marginStart = autoSize(36)
+             }
+
+             emptyView()
+
+             textView {
+                 text = "定投成功"
+                 textSizeAuto = 31
+                 textColorInt = R.color.rma_black_33
+             }.lparams(wrapContent, wrapContent){
+                 marginEnd = autoSize(25)
+             }
+
+             imageView {
+                imageResource = R.mipmap.rma_more
+             }.lparams(autoSize(35), autoSize(35)){
+                 marginEnd = autoSize(36)
+             }
+         }.lparams(matchParent, autoSize(95))
+    }
+
+
+}

+ 54 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyActivity.kt

@@ -1,14 +1,17 @@
 package cn.muchinfo.rma.view.base.main.castsurely
 
+import android.content.Intent
 import android.os.Bundle
 import android.view.Gravity
 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.global.data.SpotGoodsPriceData
+import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.home.spotmarket.SpotMarketPriceViewHolder
+import com.blankj.utilcode.util.ActivityUtils
 import com.qmuiteam.qmui.kotlin.matchParent
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
 import org.jetbrains.anko.*
 
 /**
@@ -16,10 +19,26 @@ import org.jetbrains.anko.*
  */
 class MyCastSurelyActivity : BaseActivity<MyCastSurelyViewModel>() {
 
+    // 下拉刷新
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    /**
+     * 定投列表适配器
+     */
+    private val myCastSurelyAdapter: BaseAdapter<String, MyCastSurelyViewHolder> =
+        BaseAdapter { _, _ ->
+            MyCastSurelyViewHolder(
+                this,
+                viewModel,"1"
+            )
+        }
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
             linearLayout {
+                background = resources.getDrawable(R.color.rma_blue_color)
                 gravity = Gravity.CENTER_VERTICAL
                 imageView {
                     imageResource = R.mipmap.back
@@ -43,6 +62,11 @@ class MyCastSurelyActivity : BaseActivity<MyCastSurelyViewModel>() {
                 emptyView()
 
                 imageView {
+                    onThrottleFirstClick {
+                        val intent = Intent()
+                        intent.setClass(context,MyCastSurelyHistoryActivity::class.java)
+                        ActivityUtils.startActivity(intent)
+                    }
                     imageResource = R.mipmap.qhj_history_icon
                 }.lparams(autoSize(48),autoSize(48)){
                     marginEnd = autoSize(36)
@@ -56,6 +80,33 @@ class MyCastSurelyActivity : BaseActivity<MyCastSurelyViewModel>() {
             }.lparams(matchParent, autoSize(120))
 
 
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                setRetryAction {
+
+                }
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    // 未提交列表
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = myCastSurelyAdapter
+                    }.lparams(org.jetbrains.anko.matchParent, org.jetbrains.anko.matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(org.jetbrains.anko.matchParent, org.jetbrains.anko.matchParent)
+
+            myCastSurelyAdapter.setNewData(arrayListOf("1","2","3","4","5"))
         }
     }
 

+ 72 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyHistoryActivity.kt

@@ -0,0 +1,72 @@
+package cn.muchinfo.rma.view.base.main.castsurely
+
+import android.os.Bundle
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko.verticalLayout
+
+/**
+ * 我的定投历史页面
+ */
+class MyCastSurelyHistoryActivity : BaseActivity<MyCastSurelyViewModel>(){
+
+    // 下拉刷新
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    /**
+     * 定投列表适配器
+     */
+    private val myCastSurelyAdapter: BaseAdapter<String, MyCastSurelyViewHolder> =
+        BaseAdapter { _, _ ->
+            MyCastSurelyViewHolder(
+                this,
+                viewModel,"2"
+            )
+        }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            topBar {
+                // 返回
+                commonLeftButton()
+                commonTitle {
+                    text = "历史定投"
+                }
+            }
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                setRetryAction {
+
+                }
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+
+                    // 未提交列表
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = myCastSurelyAdapter
+                    }.lparams(org.jetbrains.anko.matchParent, org.jetbrains.anko.matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(org.jetbrains.anko.matchParent, org.jetbrains.anko.matchParent)
+
+            myCastSurelyAdapter.setNewData(arrayListOf("1","2","3","4","5"))
+        }
+    }
+
+}

+ 155 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/castsurely/MyCastSurelyViewHolder.kt

@@ -1,2 +1,157 @@
 package cn.muchinfo.rma.view.base.main.castsurely
 
+import android.graphics.Typeface
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.createRoundRectDrawable
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 我的定投列表viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel MyCastSurelyViewModel
+ * @property itemSize IntArray
+ * @property type 1 : 我的定投 2 : 历史定投
+ * @constructor
+ */
+class MyCastSurelyViewHolder(private val activity : AppCompatActivity,private val viewModel : MyCastSurelyViewModel,private val type : String) : BaseViewHolder<String>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            verticalLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "黄金"
+                        textSizeAuto = 43
+                        textColorInt = R.color.rma_black_33
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_more
+                    }.lparams(autoSize(30), autoSize(30)){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(matchParent, autoSize(95))
+
+                itemView()
+
+                linearLayout {
+                    verticalLayout {
+                        gravity = Gravity.CENTER_HORIZONTAL
+                        textView {
+                            text = "累计定投(元)"
+                            textColorInt = R.color.qhj_hint_text_color
+                            textSizeAuto = 29
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(25)
+                        }
+
+                        textView {
+                            text = "2300.23"
+                            textColorInt = R.color.rma_black_33
+                            textSizeAuto = 36
+                            typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(15)
+                        }
+                    }.lparams(0, autoSize(160),1f)
+
+                    verticalLayout {
+                        gravity = Gravity.CENTER_HORIZONTAL
+                        textView {
+                            text = "累计定投(克)"
+                            textColorInt = R.color.qhj_hint_text_color
+                            textSizeAuto = 29
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(25)
+                        }
+
+                        textView {
+                            text = "19g"
+                            textColorInt = R.color.rma_black_33
+                            textSizeAuto = 36
+                            typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(15)
+                        }
+                    }.lparams(0, autoSize(160),1f)
+
+                    verticalLayout {
+                        gravity = Gravity.CENTER_HORIZONTAL
+                        textView {
+                            text = "已投期数"
+                            textColorInt = R.color.qhj_hint_text_color
+                            textSizeAuto = 29
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(25)
+                        }
+
+                        textView {
+                            text = "10期"
+                            textColorInt = R.color.rma_black_33
+                            textSizeAuto = 36
+                            typeface = Typeface.defaultFromStyle(Typeface.BOLD)
+                        }.lparams(wrapContent, wrapContent){
+                            topMargin = autoSize(15)
+                        }
+                    }.lparams(0, autoSize(160),1f)
+                }.lparams(matchParent, autoSize(160))
+
+                linearLayout {
+                    background = createRoundRectDrawable("#E5EFF5", 3)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        if (type == "1"){
+                            text = "2021-06-01(星期三)将从余额扣款定投0.1g"
+                        }else{
+                            text = "定投已终止"
+                        }
+                        textColorInt = R.color.rma_zhushi_text_color
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent){
+                       marginStart = autoSize(13)
+                    }
+
+                    emptyView()
+
+                    textView {
+                        if (type == "2"){
+                            visibility = View.GONE
+                        }
+                        backgroundResource = R.drawable.qhj_transparent_bg
+//                    background = createRoundRectDrawable("#2794FF", 5)
+                        gravity = Gravity.CENTER
+                        text = "暂停"
+                        textColorInt = R.color.qhj_blue_text_color
+                        textSizeAuto = 29
+                    }.lparams(autoSize(120), autoSize(48)){
+                        marginEnd = autoSize(11)
+                    }
+                }.lparams(matchParent, autoSize(72)){
+                    marginStart = autoSize(36)
+                    marginEnd = autoSize(36)
+                }
+            }.lparams(matchParent, autoSize(360))
+
+            view {
+                background = resources.getDrawable(R.color.rma_item_bg)
+            }.lparams(matchParent, autoSize(24))
+        }.lparams(matchParent, wrapContent)
+
+    }
+
+}

+ 8 - 0
RMA/app/src/main/res/drawable/qhj_transparent_bg.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke
+        android:color="#6CB6FF"
+        android:width="1dp" />
+    <solid android:color="@color/white" />
+    <corners android:radius="2dp" />
+</shape>

二進制
RMA/app/src/main/res/mipmap-xhdpi/qhj_address_manegement.png


二進制
RMA/app/src/main/res/mipmap-xhdpi/qhj_dian_dian.png


二進制
RMA/app/src/main/res/mipmap-xhdpi/qhj_withdraw.png


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

@@ -85,4 +85,10 @@
     <color name="p_price_red">#FF5C6F</color>
     <color name="p_select_bg_color">#334A97E1</color>
     <color name="p_list_item_select_color">#80378FDF</color>
+
+
+    <!--  千海金  -->
+    <color name="qhj_hint_text_color">#A1B1C5</color>
+    <color name="qhj_yellow_text_color">#FF881D</color>
+    <color name="qhj_blue_text_color">#2794FF</color>
 </resources>