Explorar o código

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

Liu.bolan %!s(int64=4) %!d(string=hai) anos
pai
achega
95ae4ba983
Modificáronse 24 ficheiros con 186 adicións e 82 borrados
  1. 6 2
      RMA/app/src/main/AndroidManifest.xml
  2. 18 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/utils/SelectIUtils.kt
  3. 18 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/AddHedgeGoodsActivity.kt
  4. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/AddSpotGoodsActivity.kt
  5. 6 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/CommodityFutureViewHolder.kt
  6. 20 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/CommodityInformationViewModel.kt
  7. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/viewholder/InsuredVarietyViewHolder.kt
  8. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/AddContractActivity.kt
  9. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/AddSpotMarketPriceActivity.kt
  10. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/contract/ContractDataViewHolder.kt
  11. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/AddCustomerDataActivity.kt
  12. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/customerdata/CustomerDataViewHolder.kt
  13. 0 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/AddHedgePlanActivity.kt
  14. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgeDetailsActivity.kt
  15. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/hedge/HedgePlanViewHolder.kt
  16. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/BuySellInventoryActivity.kt
  17. 17 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/InventoryAuditActivity.kt
  18. 32 29
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventoryaudit/ProductionInventoryActivity.kt
  19. 3 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/MidpointsRegistrationActivity.kt
  20. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/PaymentRegistrationActivity.kt
  21. 5 5
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/SettlementRegistrationActivity.kt
  22. 22 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/SettingActivity.kt
  23. 20 10
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/warehouse/AddWareHouseInformationActivity.kt
  24. 1 1
      RMA/app/src/main/res/layout/layout_item_inventory_content.xml

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

@@ -205,9 +205,13 @@
 
         <activity android:name=".view.base.home.inventory.inventoryaudit.InventoryAuditActivity"/>
 
-        <activity android:name=".view.base.home.inventory.inventoryaudit.BuySellInventoryActivity"/>
+        <activity android:name=".view.base.home.inventory.inventoryaudit.BuySellInventoryActivity"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan"/>
 
-        <activity android:name=".view.base.home.inventory.inventoryaudit.ProductionInventoryActivity"/>
+        <activity android:name=".view.base.home.inventory.inventoryaudit.ProductionInventoryActivity"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan"/>
 
         <activity android:name=".view.base.home.inventory.inventorymanager.InventoryManagerActivity"/>
 

+ 18 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/utils/SelectIUtils.kt

@@ -7,7 +7,7 @@ object SelectIUtils {
 
 
     /**
-     * 新增客户资料的证件类型 过滤 certificatetype
+     * 枚举
      * @return List<SelectData>
      */
     fun getDocumentType(type : String) : List<SelectData>{
@@ -21,4 +21,21 @@ object SelectIUtils {
         return selectList
     }
 
+    /**
+     * 枚举
+     * @return List<SelectData>
+     */
+    fun getCustomerDocumentType(type : String) : List<SelectData>{
+        val selectList = arrayListOf<SelectData>()
+        val enumDicEntityList = GlobalDataCollection.instance?.enumDicEntityList
+        enumDicEntityList?.forEach {
+            if (it.enumdiccode == type){
+                if (it.autoid == 34 || it.autoid == 35 || it.autoid == 42 || it.autoid == 44){
+                    selectList.add(SelectData(id = it.enumitemname,value = it.enumdicname))
+                }
+            }
+        }
+        return selectList
+    }
+
 }

+ 18 - 5
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/AddHedgeGoodsActivity.kt

@@ -138,7 +138,12 @@ class AddHedgeGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
 
                             textView {
                                 selectAvalidGoodsData.bindOptional(context) {
-                                    text = it?.goodsgroupname
+                                    if (type == "2" || type == "3" || type == "5") {
+                                        text = data.middlegoodsname
+                                    }else{
+                                        text = it?.goodsgroupname
+                                    }
+
                                 }
                                 text = "请选择套保品种名称"
                                 textSizeAuto = 31
@@ -175,7 +180,12 @@ class AddHedgeGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
 
                             textView {
                                 selectAvalidGoodsData.bindOptional(context) {
-                                    text = it?.outergroupcode
+                                    if (type == "2" || type == "3" || type == "5") {
+                                        text = data.middlegoodscode
+                                    }else{
+                                        text = it?.outergroupcode
+                                    }
+
                                 }
                                 text = "请选择套保品种自动填入"
                                 textSizeAuto = 31
@@ -388,11 +398,14 @@ class AddHedgeGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
 
 
     private fun checkUpdate(): Boolean {
-        if (selectAvalidGoodsData.value?.goodsgroupname.isNullOrEmpty()) {
-            ToastUtils.showLong("请选择套保品种")
-            return false
+        if ((type == "2" || type == "3" || type == "5").not()){
+            if (selectAvalidGoodsData.value?.goodsgroupname.isNullOrEmpty()) {
+                ToastUtils.showLong("请选择套保品种")
+                return false
+            }
         }
 
+
         if (hedge_ratio_edtittext.text.toString().isNullOrEmpty()) {
             ToastUtils.showLong("请输入套保比例")
             return false

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

@@ -354,9 +354,9 @@ class AddSpotGoodsActivity : BaseActivity<CommodityInformationViewModel>() {
                                 if (type == "4" || type == "3" || type == "5"){
                                     return@onThrottleFirstClick
                                 }
-                                viewModel.changeSpotModelList(
+                                viewModel.changeBrandModelList(
                                     "1",
-                                    viewModel.spotModelList.value?.size?.plus(1).toString(),
+                                    viewModel.brandModelList.value?.size?.plus(1).toString(),
                                     value = ""
                                 )
                             }

+ 6 - 6
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/CommodityFutureViewHolder.kt

@@ -53,14 +53,14 @@ class CommodityFutureViewHolder(
                     }
                     textView {
                         data.bindOptional(context) {
-                            text = it?.srccode + "/" + it?.srcunitidname + "/"
+                            text = it?.srccode + "/" + it?.srcunitidname
                         }
                         textSizeAuto = 24
                         textColorInt = R.color.hint_text_color
                     }.lparams(wrapContent, wrapContent) {
                         marginStart = autoSize(36)
                     }
-                }.lparams(autoSize(300), autoSize(97))
+                }.lparams(autoSize(370), autoSize(97))
 
                 verticalLayout {
                     gravity = Gravity.CENTER
@@ -72,7 +72,7 @@ class CommodityFutureViewHolder(
                         textSizeAuto = 24
                         textColorInt = R.color.hint_text_color
                     }.lparams(wrapContent, wrapContent)
-                }.lparams(autoSize(300), autoSize(97))
+                }.lparams(autoSize(160), autoSize(97))
 
                 verticalLayout {
                     gravity = Gravity.RIGHT
@@ -84,18 +84,18 @@ class CommodityFutureViewHolder(
                         textColorInt = R.color.hint_text_color
                     }.lparams(wrapContent, wrapContent) {
                         topMargin = autoSize(20)
-                        marginStart = autoSize(36)
+                        marginEnd = autoSize(36)
                     }
                     textView {
                         data.bindOptional(context) {
-                            text = it?.dstcode + "/" + it?.dstname + "/"
+                            text = it?.dstcode + "/" + it?.dstunitidname
                         }
                         textSizeAuto = 24
                         textColorInt = R.color.hint_text_color
                     }.lparams(wrapContent, wrapContent) {
                         marginEnd = autoSize(36)
                     }
-                }.lparams(autoSize(300), autoSize(97))
+                }.lparams(autoSize(370), autoSize(97))
             }.lparams(matchParent, autoSize(97))
         }
     }

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

@@ -6,6 +6,7 @@ import cn.muchinfo.rma.global.data.*
 import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.protobuf.protoclasses.ManageServiceMI2
 import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.remove
 import cn.muchinfo.rma.view.autoWidget.toArrayList
 import cn.muchinfo.rma.view.base.BaseViewModel
 import cn.muchinfo.rma.view.base.home.commodity.viewholder.SpotInfoData
@@ -196,6 +197,24 @@ class CommodityInformationViewModel : BaseViewModel() {
     }
 
     /**
+     * 获取剩下可选择的套保品种
+     * @return List<MiddleGoodsData>
+     */
+    fun getRemainingMiddleGoodsList() : List<MiddleGoodsData>{
+        val allSelectDataList = middleGoodsNormalList.value//所有可选择套保品种
+        val middlegoodList = middlegoodList.value//列表数据已显示的套保品种
+        val newSelectDataList = arrayListOf<MiddleGoodsData>()//剩下的可选择套保品种
+        allSelectDataList?.forEach { data ->
+
+        }
+        middlegoodList?.forEach {data ->
+            allSelectDataList?.remove { it.middlegoodsid == data.middleGoodsId }
+        }
+
+        return allSelectDataList ?: arrayListOf()
+    }
+
+    /**
      * 现货套保品种列表
      * type 1为添加,2为删除 ,3为更换资料
      */
@@ -293,6 +312,7 @@ class CommodityInformationViewModel : BaseViewModel() {
                 }
             }
             middlegoodList.postValue(newDataList)
+            middlegoodCacheList.postValue(newDataList)
         }
 
     }

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/viewholder/InsuredVarietyViewHolder.kt

@@ -44,7 +44,7 @@ class InsuredVarietyViewHolder(
                         return@onThrottleFirstClick
                     }
 
-                    activity.creatGoodsHedgeBottomSheetDialog("请选择套保品种", viewModel.middleGoodsNormalList.value ?: arrayListOf()) {
+                    activity.creatGoodsHedgeBottomSheetDialog("请选择套保品种", viewModel.getRemainingMiddleGoodsList()) {
                         viewModel.changeMiddleGoodsList(type = "4",id = dataIndex.plus(1).toString(),ano = "",middlegoodsId = this.middlegoodsid ?: "",enumdicname = this.enumdicname ?: "",middleGoodsName = this.middlegoodsname ?: "")
                     }
                 }

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

@@ -261,7 +261,7 @@ class AddContractActivity : BaseActivity<ContractViewModel>() {
                                         value = "销售合同"
                                     )
                                 )
-                                creatBottomSheetDialog("请选择客户类型", selectDataList) {
+                                creatBottomSheetDialog("请选择合同类型", selectDataList) {
                                     contractType.postValue(this)
                                 }
                             }
@@ -506,7 +506,7 @@ class AddContractActivity : BaseActivity<ContractViewModel>() {
                                                         /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
                                                         try {
                                                             viewModel.loadingDialogStatus.value =
-                                                                TaskUiModel.success()
+                                                                TaskUiModel.success("上传成功")
                                                             val jsonArray = JSONArray(response)
                                                             LogUtils.eTag(
                                                                 "图片",

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

@@ -10,6 +10,9 @@ import cn.muchinfo.rma.view.base.BaseActivity
 
 import org.jetbrains.anko.verticalLayout
 
+/**
+ * 市价
+ */
 class AddSpotMarketPriceActivity : BaseActivity<SpotMarketPriceViewModel>(){
 
     override fun onCreate(savedInstanceState: Bundle?) {

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

@@ -219,7 +219,7 @@ class ContractDataViewHolder(
                     }
                     backgroundResource = R.drawable.rma_item_click_bg
                     gravity = Gravity.CENTER
-                    text = "撤"
+                    text = "撤"
                     textColorInt = R.color.rma_item_click_color
                     textSizeAuto = 26
                 }.lparams(autoSize(120), autoSize(48)) {

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

@@ -320,7 +320,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                                 if (status != "1" && status != "2") {
                                     return@onThrottleFirstClick
                                 }
-                                val selectDataList = SelectIUtils.getDocumentType("certificatetype")
+                                val selectDataList = SelectIUtils.getCustomerDocumentType("certificatetype")
                                 creatBottomSheetDialog("请选择证件类型", selectDataList) {
                                     cardType.postValue(this)
                                 }
@@ -806,7 +806,7 @@ class AddCustomerDataActivity : BaseActivity<CustomerDataViewModel>() {
                         }
                         gravity = Gravity.CENTER
                         backgroundResource = R.mipmap.rma_submit_bg
-                        text = "撤"
+                        text = "撤"
                         textColorInt = R.color.white
                         textSizeAuto = 38
                     }.lparams(autoSize(780), autoSize(119)) {

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

@@ -149,7 +149,7 @@ class CustomerDataViewHolder(
                     }
                     backgroundResource = R.drawable.rma_item_click_bg
                     gravity = Gravity.CENTER
-                    text = "撤"
+                    text = "撤"
                     textColorInt = R.color.rma_item_click_color
                     textSizeAuto = 26
                 }.lparams(autoSize(120), autoSize(48)) {

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

@@ -181,7 +181,6 @@ class AddHedgePlanActivity : BaseActivity<HedgePlanViewModel>() {
 
                             editText {
                                 planNameEdittext = this
-
                                 hint = "请输入计划名称"
                                 background = null
                                 inputType = EditorInfo.TYPE_CLASS_TEXT

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

@@ -55,7 +55,7 @@ class HedgeDetailsActivity : BaseActivity<HedgePlanViewModel>() {
                     }else if (type == "2"){
                         text = "审核"
                     }else if (type == "3"){
-                        text = "撤"
+                        text = "撤"
                     }
 
                 }
@@ -273,7 +273,7 @@ class HedgeDetailsActivity : BaseActivity<HedgePlanViewModel>() {
                         }
                         gravity = Gravity.CENTER
                         backgroundResource = R.mipmap.rma_submit_bg
-                        text = "撤"
+                        text = "撤"
                         textColorInt = R.color.white
                         textSizeAuto = 38
                     }.lparams(autoSize(780), autoSize(119)) {

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

@@ -213,7 +213,7 @@ class HedgePlanViewHolder(private val activity: AppCompatActivity,private val vi
                     }
                     backgroundResource = R.drawable.rma_item_click_bg
                     gravity = Gravity.CENTER
-                    text = "撤"
+                    text = "撤"
                     textColorInt = R.color.rma_item_click_color
                     textSizeAuto = 26
                 }.lparams(autoSize(168), autoSize(48)) {

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

@@ -64,7 +64,7 @@ class BuySellInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                             text = "审核"
                         }
                         "2" -> {
-                            text = "撤"
+                            text = "撤"
                         }
                         "3" -> {
                             text = "详情"
@@ -729,7 +729,7 @@ class BuySellInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                         }
                         gravity = Gravity.CENTER
                         backgroundResource = R.mipmap.rma_submit_bg
-                        text = "撤"
+                        text = "撤"
                         textColorInt = R.color.white
                         textSizeAuto = 38
                     }.lparams(autoSize(780), autoSize(119)){

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

@@ -133,6 +133,12 @@ class InventoryAuditActivity : BaseActivity<InventoryAuditViewModel>(){
         }
     }
 
+    override fun onResume() {
+        super.onResume()
+        inStorage.reFresh()
+        outStorage.reFresh()
+    }
+
 }
 
 /**
@@ -153,6 +159,11 @@ class InStorage(private val activity : AppCompatActivity,private val viewModel:
     private val inventoryToAuditUI by lazy { InventoryToAuditUI(activity,viewModel,"1") }
     private val inventoryAuditedUI by lazy { InventoryAuditedUI(activity,viewModel,"1") }
 
+    fun reFresh(){
+        inventoryAuditedUI.reFresh()
+        inventoryToAuditUI.reFresh()
+    }
+
     private val pagerAdapter: PagerAdapter by lazy {
         object : PagerAdapter() {
 
@@ -253,6 +264,11 @@ class OutStorage(private val activity : AppCompatActivity,private val viewModel:
 
     private val inventoryAuditedUI by lazy { InventoryAuditedUI(activity,viewModel,"2") }
 
+    fun reFresh(){
+        inventoryAuditedUI.reFresh()
+        inventoryToAuditUI.reFresh()
+    }
+
     private val pagerAdapter: PagerAdapter by lazy {
         object : PagerAdapter() {
 
@@ -354,7 +370,7 @@ class InventoryToAuditUI(private val activity : AppCompatActivity,private val vi
     }
 
     fun reFresh(){
-        viewModel.queryAreaStockApply(type = type,applystatus = "1".toShowTime())
+        viewModel.queryAreaStockApply(type = type,applystatus = "1")
     }
 
     val root = _FrameLayout(activity).apply {

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

@@ -58,7 +58,7 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                     if (type == "1"){
                         text = "审核"
                     }else if (type == "2"){
-                        text = "撤"
+                        text = "撤"
                     }else if (type == "3"){
                         text = "详情"
                     }
@@ -88,9 +88,13 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                 marginStart = autoSize(37)
                             }
                             textView {
+                                if (data.applystatus == "2"){
+                                    textColorInt = R.color.rma_green_color
+                                }else{
+                                    textColorInt = R.color.rma_yellow_text_color
+                                }
                                 text = data.applystatus?.inventoryapplystatus()
                                 textSizeAuto = 31
-                                textColorInt = R.color.rma_yellow_text_color
                             }.lparams(wrapContent, wrapContent) {
                                 marginStart = autoSize(20)
                             }
@@ -98,7 +102,7 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
 
 
                         textView {
-                            text = "待审核登记信息:"
+                            text = "合同基本信息:"
                             textColorInt = R.color.rma_blue_color
                             textSizeAuto = 34
                         }.lparams(wrapContent, wrapContent) {
@@ -143,7 +147,9 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                         text = data.warehousename
                                         textSizeAuto = 29
                                         textColorInt = R.color.rma_black_33
-                                    }.lparams(wrapContent, wrapContent)
+                                    }.lparams(wrapContent, wrapContent){
+                                        marginEnd = margingPadding
+                                    }
                                 }.lparams(matchParent, wrapContent)
                             }.lparams(autoSize(450), wrapContent)
                         }.lparams(matchParent, autoSize(60)) {
@@ -169,12 +175,6 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                         textColorInt = R.color.rma_black_33
                                     }.lparams(wrapContent, wrapContent)
 
-                                    textView {
-                                        text = data.applytime?.split(" ")?.get(1)
-                                        textSizeAuto = 17
-                                        textColorInt = R.color.rma_black_33
-                                    }.lparams(wrapContent, wrapContent)
-
                                 }.lparams(matchParent, wrapContent)
 
                             }.lparams(autoSize(450), wrapContent)
@@ -193,7 +193,9 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                         text = data.brandname
                                         textSizeAuto = 29
                                         textColorInt = R.color.rma_black_33
-                                    }.lparams(wrapContent, wrapContent)
+                                    }.lparams(wrapContent, wrapContent){
+                                        marginEnd = margingPadding
+                                    }
                                 }.lparams(matchParent, wrapContent)
                             }.lparams(autoSize(450), wrapContent)
                         }.lparams(matchParent, autoSize(60))
@@ -221,12 +223,6 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                         textColorInt = R.color.rma_black_33
                                     }.lparams(wrapContent, wrapContent)
 
-                                    textView {
-                                        text = data.applytime?.split(" ")?.get(1)
-                                        textSizeAuto = 17
-                                        textColorInt = R.color.rma_black_33
-                                    }.lparams(wrapContent, wrapContent)
-
                                 }.lparams(matchParent, wrapContent)
 
                             }.lparams(autoSize(450), wrapContent)
@@ -304,7 +300,9 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                         text = data.applyname
                                         textSizeAuto = 29
                                         textColorInt = R.color.rma_black_33
-                                    }.lparams(wrapContent, wrapContent)
+                                    }.lparams(wrapContent, wrapContent){
+                                        marginEnd = margingPadding
+                                    }
                                 }.lparams(matchParent, wrapContent)
                             }.lparams(autoSize(450), wrapContent)
                         }.lparams(matchParent, autoSize(60))
@@ -328,7 +326,12 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                             }else{
                                 visibility = View.GONE
                             }
-                            text = "待审核登记信息:"
+                            if (data.applystatus == "1"){
+                                text = "待审核登记信息:"
+                            }else{
+                                text = "已审核登记信息:"
+                            }
+
                             textColorInt = R.color.rma_blue_color
                             textSizeAuto = 34
                         }.lparams(wrapContent, wrapContent) {
@@ -376,16 +379,16 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                                 linearLayout {
                                     emptyView()
                                     textView {
-                                        text = data.audittime?.split(" ")?.get(0)
-                                        textSizeAuto = 29
+                                        text = data.audittime
+                                        textSizeAuto = 24
                                         textColorInt = R.color.rma_black_33
                                     }.lparams(wrapContent, wrapContent)
 
-                                    textView {
-                                        text = data.audittime?.split(" ")?.get(1)
-                                        textSizeAuto = 17
-                                        textColorInt = R.color.rma_black_33
-                                    }.lparams(wrapContent, wrapContent)
+//                                    textView {
+//                                        text = data.audittime?.split(" ")?.get(1)
+//                                        textSizeAuto = 17
+//                                        textColorInt = R.color.rma_black_33
+//                                    }.lparams(wrapContent, wrapContent)
 
                                 }.lparams(matchParent, wrapContent)
 
@@ -488,7 +491,7 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                             topMargin = autoSize(50)
                             bottomMargin = autoSize(40)
                         }
-                    }
+                    }.lparams(autoSize(900), matchParent)
                 }
 
                 linearLayout {
@@ -565,7 +568,7 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                         }
                         gravity = Gravity.CENTER
                         backgroundResource = R.mipmap.rma_submit_bg
-                        text = "撤"
+                        text = "撤"
                         textColorInt = R.color.white
                         textSizeAuto = 38
                     }.lparams(autoSize(780), autoSize(119)){
@@ -574,7 +577,7 @@ class ProductionInventoryActivity : BaseActivity<InventoryAuditViewModel>(){
                 }.lparams(matchParent, autoSize(144)) {
                     gravity = Gravity.BOTTOM
                 }
-            }
+            }.lparams(matchParent, matchParent)
 
         }
     }

+ 3 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/registration/MidpointsRegistrationActivity.kt

@@ -369,7 +369,7 @@ class MidpointsRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                                                 if (it.toString().isNotEmpty()){
                                                     goodsPrice.text = it.toString().toDouble().plus(data.pricemove?.toDouble() ?: 0.0).toString()
                                                     if (qty_edittext.text.toString().isNotEmpty()){
-                                                        amountText.text = goodsPrice.text.toString().toDouble().times(qty_edittext.text.toString().toDouble()).toString() + "元"
+                                                        amountText.text = NumberUtils.roundNum(NumberUtils.doubleDistortion(goodsPrice.text.toString().toDouble().times(qty_edittext.text.toString().toDouble()).toString()),2) + "元"
                                                     }
                                                 }
                                             }
@@ -458,7 +458,7 @@ class MidpointsRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                                             afterTextChanged {
                                                 if (it.toString().isNotEmpty()){
                                                     if (price_edittext.text.toString().isNotEmpty()){
-                                                        amountText.text = goodsPrice.text.toString().toDouble().times(qty_edittext.text.toString().toDouble()).toString() + "元"
+                                                        amountText.text = NumberUtils.roundNum(NumberUtils.doubleDistortion(goodsPrice.text.toString().toDouble().times(qty_edittext.text.toString().toDouble()).toString()),2) + "元"
                                                     }
                                                 }
                                             }
@@ -469,6 +469,7 @@ class MidpointsRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                                         hint = "0.00"
                                         background = null
                                         inputType = EditorInfo.TYPE_CLASS_NUMBER
+                                        setDecimalInputType()
                                         hintColorStr = "#CCCCCC"
                                         textSizeAuto = 31
                                         textColorStr = "#333333"

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

@@ -361,7 +361,7 @@ class PaymentRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                                     linearLayout {
                                         emptyView()
                                         textView {
-                                            text = data.pricedamount?.toDouble()?.plus(data.reckonadjustamount?.toDouble() ?: 0.0).toString()
+                                            text = NumberUtils.roundNum(NumberUtils.doubleDistortion(data.pricedamount?.toDouble()?.plus(data.reckonadjustamount?.toDouble() ?: 0.0).toString()),2)
                                             textSizeAuto = 29
                                             textColorInt = R.color.rma_black_33
                                         }.lparams(wrapContent, wrapContent)

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

@@ -24,7 +24,7 @@ import org.jetbrains.anko.*
 import org.json.JSONObject
 
 /**
- * 结算登记页面
+ * 交收登记页面
  */
 class SettlementRegistrationActivity : BaseActivity<RegistrationViewModel>() {
 
@@ -411,7 +411,7 @@ class SettlementRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                             linearLayout {
                                 gravity = Gravity.CENTER_VERTICAL
                                 textView {
-                                    text = "本次结算信息"
+                                    text = "本次交收信息"
                                     textSizeAuto = 34
                                     textColorInt = R.color.rma_blue_color
                                 }.lparams(wrapContent, wrapContent) {
@@ -893,7 +893,7 @@ class SettlementRegistrationActivity : BaseActivity<RegistrationViewModel>() {
                             }
                             gravity = Gravity.CENTER
                             backgroundResource = R.mipmap.rma_submit_bg
-                            text = "结算登记"
+                            text = "交收登记"
                             textColorInt = R.color.white
                             textSizeAuto = 38
                         }.lparams(autoSize(780), autoSize(119)) {
@@ -938,7 +938,7 @@ class SettlementRegistrationActivity : BaseActivity<RegistrationViewModel>() {
         val contractInfobuilder = ErmcpMI1.ContractOperateApplyInfo.newBuilder()
 
         contractInfobuilder.relatedID = data.spotcontractid?.toLong() ?: 0// 现货合同ID
-        contractInfobuilder.operateApplyType = 2//结算
+        contractInfobuilder.operateApplyType = 2//交收
         contractInfobuilder.detailJson = ByteString.copyFrom(json.toString().toByteArray())
 
         return contractInfobuilder.build()
@@ -950,7 +950,7 @@ class SettlementRegistrationActivity : BaseActivity<RegistrationViewModel>() {
      */
     private fun checkUpdate(): Boolean {
         if (determine_checkbox.isChecked.not() && other_amount_checkbox.isChecked.not() && margin_checkbox.isChecked.not() && amount_checkbox.isChecked.not()) {
-            ToastUtils.showLong("本次结算至少需要勾选一项信息填写")
+            ToastUtils.showLong("本次交收至少需要勾选一项信息填写")
             return false
         }
 

+ 22 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/SettingActivity.kt

@@ -3,6 +3,7 @@ package cn.muchinfo.rma.view.base.home.set
 import android.app.Dialog
 import android.content.Intent
 import android.os.Bundle
+import android.os.CountDownTimer
 import android.view.Gravity
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.view.autoWidget.*
@@ -11,20 +12,33 @@ import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.home.contract.emptyView
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.AppUtils
-import com.blankj.utilcode.util.ToastUtils
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
 import mtp.polymer.com.autowidget.utils.bindTaskStatus
 import org.jetbrains.anko.*
 
+
 class SettingActivity : BaseActivity<SettingViewModel>(){
     var loadingDialog: Dialog? = null
 
+    /**
+     * CountDownTimer 实现倒计时
+     */
+    private val countDownTimer: CountDownTimer = object : CountDownTimer(3000, 1000) {
+        override fun onTick(millisUntilFinished: Long) {
+
+        }
+
+        override fun onFinish() {
+            AppUtils.relaunchApp()
+        }
+    }
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
             loadingDialog = createLoadingDialog(hintStr = "登出中..")
             loadingDialog?.bindTaskStatus(context, viewModel.loadingDialogStatus)
-            background = resources.getDrawable(R.color.main_tab_color)
+            background = resources.getDrawable(R.color.white)
             //头部标题
             topBar {
                 commonLeftButton()
@@ -47,7 +61,7 @@ class SettingActivity : BaseActivity<SettingViewModel>(){
                     marginStart = autoSize(30)
                 }
                 textView {
-                    text = "修改登密码"
+                    text = "修改登密码"
                     textSizeAuto = 34
                     textColorInt = R.color.rma_black_33
                 }.lparams(wrapContent, wrapContent){
@@ -80,7 +94,7 @@ class SettingActivity : BaseActivity<SettingViewModel>(){
                     marginStart = autoSize(30)
                 }
                 textView {
-                    text = "重置登密码"
+                    text = "重置登密码"
                     textSizeAuto = 34
                     textColorInt = R.color.rma_black_33
                 }.lparams(wrapContent, wrapContent){
@@ -105,6 +119,7 @@ class SettingActivity : BaseActivity<SettingViewModel>(){
                             AppUtils.relaunchApp()
                         }
                     }
+                    countDownTimer.start()
                 }
                 gravity = Gravity.CENTER
                 backgroundResource = R.drawable.rma_market_item_botton_bg_2
@@ -119,4 +134,7 @@ class SettingActivity : BaseActivity<SettingViewModel>(){
         }
     }
 
+
+
+
 }

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

@@ -157,13 +157,13 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 View.VISIBLE
                             }
                             gravity = Gravity.CENTER_VERTICAL
-                            background = if (type == "2" || type == "4") {
+                            background = if (type == "2" || type == "4"|| type == "5") {
                                 resources.getDrawable(R.color.rma_pass_status)//rma_pass_status已通过背景色
                             } else {
                                 resources.getDrawable(R.color.rma_details_status)//rma_pass_status未通过背景色
                             }
                             imageView {
-                                imageResource = if (type == "2" || type == "4") {
+                                imageResource = if (type == "2" || type == "4"|| type == "5") {
                                     R.mipmap.rma_pass_status
                                 } else {
                                     R.mipmap.rma_wait_status
@@ -173,9 +173,9 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 marginStart = autoSize(37)
                             }
                             textView {
-                                if (type == "2" || type == "4") {
+                                if (type == "2" || type == "4" || type == "5") {
                                     text = "正常"
-                                    textColorInt = R.color.rma_blue_color
+                                    textColorInt = R.color.rma_green_color
                                 } else {
                                     text = "停用"
                                     textColorInt = R.color.rma_yellow_text_color
@@ -212,7 +212,9 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 if (type != "1"){
                                     setText(data.warehousecode)
                                 }
-                                if (type != "1" || type  != "5"){
+                                if (type == "1" || type  == "5"){
+                                    isEnabled = true
+                                }else{
                                     isEnabled = false
                                 }
                                 warehouse_referred = this
@@ -308,7 +310,9 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 if (type != "1"){
                                     setText(data.warehousename)
                                 }
-                                if (type != "1" || type  != "5"){
+                                if (type == "1" || type  == "5"){
+                                    isEnabled = true
+                                }else{
                                     isEnabled = false
                                 }
                                 warehouse_name = this
@@ -349,7 +353,9 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 if (type != "1"){
                                     setText(data.contactname?.isBlankString())
                                 }
-                                if (type != "1" || type  != "5"){
+                                if (type == "1" || type  == "5"){
+                                    isEnabled = true
+                                }else{
                                     isEnabled = false
                                 }
                                 contact_edittext = this
@@ -390,7 +396,9 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 if (type != "1"){
                                     setText(data.contactnum?.isBlankString())
                                 }
-                                if (type != "1" || type  != "5"){
+                                if (type == "1" || type  == "5"){
+                                    isEnabled = true
+                                }else{
                                     isEnabled = false
                                 }
                                 contact_phone = this
@@ -411,7 +419,7 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                             background = resources.getDrawable(R.color.white)
                             gravity = Gravity.CENTER_VERTICAL
                             onThrottleFirstClick {
-                                if (type != "1" || type  != "5"){
+                                if ((type == "1" || type  == "5").not()){
                                     return@onThrottleFirstClick
                                 }
                                 showAddress()
@@ -509,7 +517,9 @@ class AddWareHouseInformationActivity : BaseActivity<WarehouseInformationViewMod
                                 if (type != "1"){
                                     setText(data.address?.isBlankString())
                                 }
-                                if (type != "1" || type  != "5"){
+                                if (type == "1" || type  == "5"){
+                                    isEnabled = true
+                                }else{
                                     isEnabled = false
                                 }
                                 detailed_address = this

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

@@ -71,7 +71,7 @@
             android:textSize="12sp"
             android:layout_width="70dp"
             android:layout_height="25dp"
-            android:text="撤"
+            android:text="撤"
             android:textColor="@color/rma_blue_color"
             android:background="@drawable/rma_item_click_bg"/>