Browse Source

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

Liu.bolan 4 năm trước cách đây
mục cha
commit
7c160e35cd
16 tập tin đã thay đổi với 937 bổ sung7 xóa
  1. 29 0
      RMA/app/src/main/java/cn/muchinfo/rma/business/spot/SpotManager.kt
  2. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/OrderQuoteDetailData.kt
  3. 17 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/PaAreaAuditCfgData.kt
  4. 147 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ParamChangeAppData.kt
  5. 2 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstcdys/CdysWarehouseScreeningDialog.kt
  6. 19 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditActivity.kt
  7. 65 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditViewModel.kt
  8. 121 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientUI.kt
  9. 135 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/convertcoefficient/ConvertCoefficientViewHolder.kt
  10. 10 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/costweight/CostWeightUI.kt
  11. 111 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateUI.kt
  12. 126 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateViewHolder.kt
  13. 144 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reviewset/ReviewSettingActivity.kt
  14. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/AddWithDrawActivity.kt
  15. 4 6
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/BusinessHallActivity.kt
  16. 2 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/warehousereceipt/WarehouseScreeningDialog.kt

+ 29 - 0
RMA/app/src/main/java/cn/muchinfo/rma/business/spot/SpotManager.kt

@@ -21,6 +21,35 @@ import java.lang.Exception
 class SpotManager {
 
     /**
+     * 查询现货商品参数变更申请(流水)
+     * 原型页面:
+      1.商品信息->商品参数修改流水-> 增值税税率 | 折算系数 | 成本权重
+      2.风管审核->套保比例审核 | 折算系数审核 | 增值税税率审核 | 成本权重审核
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<SpotGoodsPriceData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryParamChangeApp(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<ParamChangeAppData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Ermcp3/QueryParamChangeApp",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<ParamChangeAppData>>>() {
+                override fun onResponse(response: BaseResult<List<ParamChangeAppData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+    /**
      * 查询外部成交单关联详情接口
      * 页面 app 现货->期现关联->外部成交单关联
      * @param params Map<String, String>

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

@@ -20,6 +20,8 @@ data class OrderQuoteDetailData(
     val userid : String? = "",//购买方(销售方)用户ID
     @SerializedName("username")
     val username : String? = "",//购买方(销售方)
+    @SerializedName("delistminqty")
+    val delistminqty : String? = "",//起摘数量
     @SerializedName("isClick")
     var isClick: Int = 0,//是否点击展开
     @SerializedName("wrtradeorderid")
@@ -32,6 +34,7 @@ data class OrderQuoteDetailData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
+        parcel.readString(),
         parcel.readInt(),
         parcel.readString()
     ) {
@@ -44,6 +47,7 @@ data class OrderQuoteDetailData(
         parcel.writeString(pricemove)
         parcel.writeString(userid)
         parcel.writeString(username)
+        parcel.writeString(delistminqty)
         parcel.writeInt(isClick)
         parcel.writeString(wrtradeorderid)
     }

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

@@ -12,6 +12,14 @@ data class PaAreaAuditCfgData(
     val areauserid : String? = "",//用户ID
     @SerializedName("buyinauditflag")
     val buyinauditflag : Int? = 0,//采购入库是否需要审核 - 0:不需审核 1:需要审核
+    @SerializedName("costratioauditflag")
+    val costratioauditflag : Int? = 0,//现货商品成本权重修改是否需要审核 - 0:不需审核 1:需要审核
+    @SerializedName("mgneedhedgeratioauditflag")
+    val mgneedhedgeratioauditflag : Int? = 0,//套保品种套保比例修改是否需要审 - 0:不需审核 1:需要审核
+    @SerializedName("sgconvertratioauditflag")
+    val sgconvertratioauditflag : Int? = 0,//现货商品折算系数修改是否需要审核 - 0:不需审核 1:需要审核
+    @SerializedName("sgvtaratioauditflag")
+    val sgvtaratioauditflag : Int? = 0,//现货商品增值税税率修改是否需要审核 - 0:不需审核 1:需要审核
     @SerializedName("customerauditflag")
     val customerauditflag : Int? = 0,//客户资料是否需要审核 - 0:不需审核 1:需要审核
     @SerializedName("deliveryauditflag")
@@ -44,6 +52,10 @@ data class PaAreaAuditCfgData(
         parcel.readValue(Int::class.java.classLoader) as? Int,
         parcel.readValue(Int::class.java.classLoader) as? Int,
         parcel.readValue(Int::class.java.classLoader) as? Int,
+        parcel.readValue(Int::class.java.classLoader) as? Int,
+        parcel.readValue(Int::class.java.classLoader) as? Int,
+        parcel.readValue(Int::class.java.classLoader) as? Int,
+        parcel.readValue(Int::class.java.classLoader) as? Int,
         parcel.readString(),
         parcel.readValue(Int::class.java.classLoader) as? Int,
         parcel.readValue(Int::class.java.classLoader) as? Int,
@@ -58,6 +70,10 @@ data class PaAreaAuditCfgData(
     override fun writeToParcel(parcel: Parcel, flags: Int) {
         parcel.writeString(areauserid)
         parcel.writeValue(buyinauditflag)
+        parcel.writeValue(costratioauditflag)
+        parcel.writeValue(mgneedhedgeratioauditflag)
+        parcel.writeValue(sgconvertratioauditflag)
+        parcel.writeValue(sgvtaratioauditflag)
         parcel.writeValue(customerauditflag)
         parcel.writeValue(deliveryauditflag)
         parcel.writeValue(invoiceauditflag)
@@ -86,4 +102,5 @@ data class PaAreaAuditCfgData(
         }
     }
 
+
 }

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

@@ -0,0 +1,147 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+import com.google.gson.annotations.SerializedName
+
+/**
+ * 现货商品参数变更申请(流水)
+ * 原型页面:
+1.商品信息->商品参数修改流水-> 增值税税率 | 折算系数 | 成本权重
+2.风管审核->套保比例审核 | 折算系数审核 | 增值税税率审核 | 成本权重审核
+ */
+data class ParamChangeAppData(
+    @SerializedName("aftervalue")
+    val aftervalue : String? = "",//变更后
+    @SerializedName("applicationid")
+    val applicationid : String? = "",//申请ID(619+Unix秒时间戳(10位)+xxxxxx)
+    @SerializedName("applyid")
+    val applyid : String? = "",//申请人
+    @SerializedName("applyname")
+    val applyname : String? = "",//申请人名称(代码)
+    @SerializedName("applyremark")
+    val applyremark : String? = "",//申请备注
+    @SerializedName("applysrc")
+    val applysrc : String? = "",//申请来源 - 1:管理端 2:终端
+    @SerializedName("applystatus")
+    val applystatus : String? = "",//申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+    @SerializedName("applytime")
+    val applytime : String? = "",//申请时间
+    @SerializedName("areauserid")
+    val areauserid : String? = "",//所属机构用户ID
+    @SerializedName("auditid")
+    val auditid : String? = "",//审核人
+    @SerializedName("auditname")
+    val auditname : String? = "",//审核人名称(代码)
+    @SerializedName("auditremark")
+    val auditremark : String? = "",//审核备注
+    @SerializedName("auditsrc")
+    val auditsrc : String? = "",//审核来源 - 1:管理端 2:终端
+    @SerializedName("audittime")
+    val audittime : String? = "",//审核时间
+    @SerializedName("audittradedate")
+    val audittradedate : String? = "",//审核交易日(yyyyMMdd)
+    @SerializedName("beforevalue")
+    val beforevalue : String? = "",//变更前
+    @SerializedName("deliverygoodscode")
+    val deliverygoodscode : String? = "",//品种代码
+    @SerializedName("deliverygoodsid")
+    val deliverygoodsid : String? = "",//品种id
+    @SerializedName("deliverygoodsname")
+    val deliverygoodsname : String? = "",//品种名称
+    @SerializedName("middlegoodscode")
+    val middlegoodscode : String? = "",//套保品种代码
+    @SerializedName("middlegoodsid")
+    val middlegoodsid : String? = "",//套保品种ID [ParamChangeType = 2,3,4]
+    @SerializedName("middlegoodsname")
+    val middlegoodsname:  String? = "",//套保品种名称
+    @SerializedName("operatetype")
+    val operatetype : String? = "",//操作类型 - 1:新增 2:修改
+    @SerializedName("paramchangetype")
+    val paramchangetype : String? = "",//参数变更类型 - 1:增值税率变更(现货商品) 2:折算系数变更(现货商品) 3:成本权重(现货商品) 4:套保比率变更(套保品种)
+    @SerializedName("wrstandardcode")
+    val wrstandardcode : String? = "",//现货商品代码
+    @SerializedName("wrstandardid")
+    val wrstandardid : String? = "",//现货商品ID [ParamChangeType = 1,2,3]
+    @SerializedName("wrstandardname")
+    val wrstandardname : String? = "",//现货商品名称
+    var isClick : Int = 0
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readInt()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(aftervalue)
+        parcel.writeString(applicationid)
+        parcel.writeString(applyid)
+        parcel.writeString(applyname)
+        parcel.writeString(applyremark)
+        parcel.writeString(applysrc)
+        parcel.writeString(applystatus)
+        parcel.writeString(applytime)
+        parcel.writeString(areauserid)
+        parcel.writeString(auditid)
+        parcel.writeString(auditname)
+        parcel.writeString(auditremark)
+        parcel.writeString(auditsrc)
+        parcel.writeString(audittime)
+        parcel.writeString(audittradedate)
+        parcel.writeString(beforevalue)
+        parcel.writeString(deliverygoodscode)
+        parcel.writeString(deliverygoodsid)
+        parcel.writeString(deliverygoodsname)
+        parcel.writeString(middlegoodscode)
+        parcel.writeString(middlegoodsid)
+        parcel.writeString(middlegoodsname)
+        parcel.writeString(operatetype)
+        parcel.writeString(paramchangetype)
+        parcel.writeString(wrstandardcode)
+        parcel.writeString(wrstandardid)
+        parcel.writeString(wrstandardname)
+        parcel.writeInt(isClick)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<ParamChangeAppData> {
+        override fun createFromParcel(parcel: Parcel): ParamChangeAppData {
+            return ParamChangeAppData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<ParamChangeAppData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

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

@@ -333,6 +333,7 @@ fun AppCompatActivity.CdysScreeningDialog(
 
                                 }
                             }
+                            viewModel.queryFtDeliveryGoods()
                             dialog.dismiss()
                         }
                         backgroundResource = R.drawable.rydz_main_blue_bg
@@ -397,6 +398,7 @@ fun AppCompatActivity.CdysScreeningDialog(
 
                                 }
                             }
+                            viewModel.queryFtDeliveryGoods()
                             dialog.dismiss()
                         }
                         backgroundResource = R.drawable.rydz_main_red_bg

+ 19 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditActivity.kt

@@ -0,0 +1,19 @@
+package cn.muchinfo.rma.view.base.home.ductaudit
+
+import android.os.Bundle
+import cn.muchinfo.rma.view.base.BaseActivity
+import org.jetbrains.anko.verticalLayout
+
+/**
+ * 风管审核页面
+ */
+class DuctAuditActivity : BaseActivity<DuctAuditViewModel>(){
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+
+        }
+    }
+
+}

+ 65 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/DuctAuditViewModel.kt

@@ -0,0 +1,65 @@
+package cn.muchinfo.rma.view.base.home.ductaudit
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.toArrayList
+import cn.muchinfo.rma.view.base.BaseViewModel
+import com.blankj.utilcode.util.TimeUtils
+
+/**
+ * 风管审核viewmodel
+ */
+class DuctAuditViewModel : BaseViewModel(){
+
+    /**
+     * 增值税税率列表数据
+     */
+    val vatrateDataList : MutableLiveData<List<ParamChangeAppData>> = MutableLiveData()
+
+    /**
+     * 折算系数劣币哎数据
+     */
+    val convertcoefficientDataList : MutableLiveData<List<ParamChangeAppData>> = MutableLiveData()
+
+    /**
+     * 查询折算系数列表数据
+     */
+    fun queryConvertCoefficientDataList(){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("paramchangetype","2")
+        }
+
+        MyApplication.getInstance()?.spotManager?.queryParamChangeApp(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                respData?.toArrayList()?.sortWith(Comparator { t1, t2 ->
+                    (TimeUtils.string2Millis(t2.applytime) - TimeUtils.string2Millis(t1.applytime)).toInt()
+                })
+                convertcoefficientDataList.postValue(respData)
+            }
+        }
+    }
+
+    /**
+     * 查询增值税税率数据列表
+     */
+    fun queryVatRateDataList(){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            put("paramchangetype","1")
+        }
+
+        MyApplication.getInstance()?.spotManager?.queryParamChangeApp(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                respData?.toArrayList()?.sortWith(Comparator { t1, t2 ->
+                    (TimeUtils.string2Millis(t2.applytime) - TimeUtils.string2Millis(t1.applytime)).toInt()
+                })
+                vatrateDataList.postValue(respData)
+            }
+        }
+
+    }
+
+}

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

@@ -0,0 +1,121 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.convertcoefficient
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+import cn.muchinfo.rma.view.base.home.ductaudit.vatrate.VarRateViewHolder
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko.*
+
+/**
+ * 折算系数的列表页面
+ * @property activity AppCompatActivity
+ * @property viewModel DuctAuditViewModel
+ * @constructor
+ */
+class ConvertCoefficientUI(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel){
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    init {
+        viewModel.queryConvertCoefficientDataList()
+    }
+
+    private val convertCoefficientViewHolder: BaseAdapter<ParamChangeAppData, ConvertCoefficientViewHolder> = BaseAdapter { _, _ -> ConvertCoefficientViewHolder(activity, viewModel) }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    textView {
+                        text = "商品"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                        topMargin = autoSize(20)
+                    }
+                    textView {
+                        text = "套保品种"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "现货品种"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "原值/"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+                    textView {
+                        text = "新值"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "申请时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+            }.lparams(matchParent, autoSize(80))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryConvertCoefficientDataList()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = convertCoefficientViewHolder
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.convertcoefficientDataList.bindOptional(context){
+                if (it?.isEmpty() == true || it?.size == 0){
+                    statusLayout.showEmpty()
+                }else {
+                    if (swipeToLayout.getIsRefreshing()){
+                        swipeToLayout.finishRefresh()
+                    }
+                    convertCoefficientViewHolder.setNewData(it)
+                }
+            }
+        }
+    }
+}

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

@@ -0,0 +1,135 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.convertcoefficient
+
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 折算系数viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel DuctAuditViewModel
+ * @property itemSize IntArray
+ * @constructor
+ */
+class ConvertCoefficientViewHolder(private val activity : AppCompatActivity, private val viewModel: DuctAuditViewModel) : BaseViewHolder<ParamChangeAppData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    //商品
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.wrstandardname
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                        topMargin = autoSize(20)
+                    }
+                    //套保品种
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.deliverygoodsname
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    //商品
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.deliverygoodsname
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    //原值
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.beforevalue
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+                    //新值
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.aftervalue
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    //申请时间
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.applytime
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+            }.lparams(matchParent, autoSize(100))
+
+            linearLayout {
+                data.bindOptional(context) {
+                    if (it?.isClick == 0) {
+                        visibility = View.GONE
+                    } else if (it?.isClick == 1) {
+                        visibility = View.VISIBLE
+                    }
+                }
+                gravity = Gravity.CENTER_VERTICAL
+                view {
+
+                }.lparams(0, autoSize(1), 1f)
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "审核"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(168), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+            }.lparams(matchParent, autoSize(72))
+            itemView()
+        }.lparams(matchParent, wrapContent)
+    }
+
+
+}

+ 10 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/costweight/CostWeightUI.kt

@@ -0,0 +1,10 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.costweight
+
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+
+class CostWeightUI(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel){
+
+
+
+}

+ 111 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateUI.kt

@@ -0,0 +1,111 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.vatrate
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.FinancialManageData
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+import cn.muchinfo.rma.view.base.home.financial.FinancialViewholder
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import org.jetbrains.anko.*
+
+class VarRateUI(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel){
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    init {
+        viewModel.queryVatRateDataList()
+    }
+
+    private val varRateViewHolder: BaseAdapter<ParamChangeAppData, VarRateViewHolder> = BaseAdapter { _, _ -> VarRateViewHolder(activity, viewModel) }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        text = "现货品种"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "商品"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    textView {
+                        text = "原值%/"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+                    textView {
+                        text = "新值%"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "申请时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+            }.lparams(matchParent, autoSize(80))
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryVatRateDataList()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = varRateViewHolder
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.vatrateDataList.bindOptional(context){
+                if (it?.isEmpty() == true || it?.size == 0){
+                    statusLayout.showEmpty()
+                }else {
+                    if (swipeToLayout.getIsRefreshing()){
+                        swipeToLayout.finishRefresh()
+                    }
+                    varRateViewHolder.setNewData(it)
+                }
+            }
+        }
+    }
+
+}

+ 126 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/ductaudit/vatrate/VarRateViewHolder.kt

@@ -0,0 +1,126 @@
+package cn.muchinfo.rma.view.base.home.ductaudit.vatrate
+
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ParamChangeAppData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.onThrottleFirstClick
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.ductaudit.DuctAuditViewModel
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 增值税税率审核viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel DuctAuditViewModel
+ * @property itemSize IntArray
+ * @constructor
+ */
+class VarRateViewHolder(private val activity : AppCompatActivity,private val viewModel: DuctAuditViewModel) : BaseViewHolder<ParamChangeAppData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    //现货品种
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.deliverygoodsname
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER
+                    //商品
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.wrstandardname
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_HORIZONTAL
+                    //原值
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.beforevalue
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+                    //新值
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.aftervalue
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(80),1f)
+
+                verticalLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    //申请时间
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.applytime
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(32)
+                    }
+                }.lparams(0, autoSize(80),1f)
+            }.lparams(matchParent, autoSize(100))
+
+            linearLayout {
+                data.bindOptional(context) {
+                    if (it?.isClick == 0) {
+                        visibility = View.GONE
+                    } else if (it?.isClick == 1) {
+                        visibility = View.VISIBLE
+                    }
+                }
+                gravity = Gravity.CENTER_VERTICAL
+                view {
+
+                }.lparams(0, autoSize(1), 1f)
+
+                textView {
+                    onThrottleFirstClick {
+
+                    }
+                    backgroundResource = R.drawable.rma_item_click_bg
+                    gravity = Gravity.CENTER
+                    text = "审核"
+                    textColorInt = R.color.rma_item_click_color
+                    textSizeAuto = 26
+                }.lparams(autoSize(168), autoSize(48)) {
+                    marginEnd = autoSize(24)
+                }
+
+            }.lparams(matchParent, autoSize(72))
+            itemView()
+        }.lparams(matchParent, wrapContent)
+    }
+
+
+}

+ 144 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/reviewset/ReviewSettingActivity.kt

@@ -48,6 +48,18 @@ class ReviewSettingActivity : BaseActivity<ReviewSettingViewModel>(){
     /** 生产出库审核 ***/
     val production_outgoing_audit : MutableLiveData<Int> = MutableLiveData()
 
+    /** 套保比例审核 ***/
+    val mgneedhedgeratioauditflag : MutableLiveData<Int> = MutableLiveData()
+
+    /** 增值税税率审核 ***/
+    val sgvtaratioauditflag : MutableLiveData<Int> = MutableLiveData()
+
+    /** 折算系数审核 ***/
+    val sgconvertratioauditflag : MutableLiveData<Int> = MutableLiveData()
+
+    /** 成本权重审核 ***/
+    val costratioauditflag : MutableLiveData<Int> = MutableLiveData()
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
@@ -63,7 +75,10 @@ class ReviewSettingActivity : BaseActivity<ReviewSettingViewModel>(){
                 outbound_review.postValue(it?.selloutauditflag)
                 production_inventory_audit.postValue(it?.produceinauditflag)
                 production_outgoing_audit.postValue(it?.produceoutauditflag)
-
+                mgneedhedgeratioauditflag.postValue(it?.mgneedhedgeratioauditflag)
+                sgvtaratioauditflag.postValue(it?.sgvtaratioauditflag)
+                sgconvertratioauditflag.postValue(it?.sgconvertratioauditflag)
+                costratioauditflag.postValue(it?.costratioauditflag)
             }
             topBar {
                 commonLeftButton()
@@ -392,6 +407,134 @@ class ReviewSettingActivity : BaseActivity<ReviewSettingViewModel>(){
                                 marginStart = autoSize(36)
                             }
                         }.lparams(matchParent, autoSize(100))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "套保比例审核"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent){
+                                marginStart = autoSize(36)
+                            }
+
+                            emptyView()
+
+                            checkBox {
+                                viewModel.settingDataList.bindOptional(context){
+                                    isChecked = it?.mgneedhedgeratioauditflag != 0
+                                }
+                                buttonDrawable = null
+                                background = resources.getDrawable(R.drawable.checkbox_switch_selector)
+                                setOnCheckedChangeListener { _, b ->
+                                    if (b){
+                                        mgneedhedgeratioauditflag.postValue(1)
+                                    }else{
+                                        mgneedhedgeratioauditflag.postValue(0)
+                                    }
+                                }
+                            }.lparams(autoSize(100), autoSize(100)) {
+                                marginStart = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(100))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "增值税税率审核"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent){
+                                marginStart = autoSize(36)
+                            }
+
+                            emptyView()
+
+                            checkBox {
+                                viewModel.settingDataList.bindOptional(context){
+                                    isChecked = it?.sgvtaratioauditflag != 0
+                                }
+                                buttonDrawable = null
+                                background = resources.getDrawable(R.drawable.checkbox_switch_selector)
+                                setOnCheckedChangeListener { _, b ->
+                                    if (b){
+                                        sgvtaratioauditflag.postValue(1)
+                                    }else{
+                                        sgvtaratioauditflag.postValue(0)
+                                    }
+                                }
+                            }.lparams(autoSize(100), autoSize(100)) {
+                                marginStart = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(100))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "折算系数审核"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent){
+                                marginStart = autoSize(36)
+                            }
+
+                            emptyView()
+
+                            checkBox {
+                                viewModel.settingDataList.bindOptional(context){
+                                    isChecked = it?.sgconvertratioauditflag != 0
+                                }
+                                buttonDrawable = null
+                                background = resources.getDrawable(R.drawable.checkbox_switch_selector)
+                                setOnCheckedChangeListener { _, b ->
+                                    if (b){
+                                        sgconvertratioauditflag.postValue(1)
+                                    }else{
+                                        sgconvertratioauditflag.postValue(0)
+                                    }
+                                }
+                            }.lparams(autoSize(100), autoSize(100)) {
+                                marginStart = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(100))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "成本权重审核"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent){
+                                marginStart = autoSize(36)
+                            }
+
+                            emptyView()
+
+                            checkBox {
+                                viewModel.settingDataList.bindOptional(context){
+                                    isChecked = it?.costratioauditflag != 0
+                                }
+                                buttonDrawable = null
+                                background = resources.getDrawable(R.drawable.checkbox_switch_selector)
+                                setOnCheckedChangeListener { _, b ->
+                                    if (b){
+                                        costratioauditflag.postValue(1)
+                                    }else{
+                                        costratioauditflag.postValue(0)
+                                    }
+                                }
+                            }.lparams(autoSize(100), autoSize(100)) {
+                                marginStart = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(100))
                     }
                 }
 

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

@@ -182,6 +182,7 @@ class AddWithDrawActivity : BaseActivity<WithDrawManagementViewModel>(){
                     bank_card_account_name = this
                     if (type == "2"){
                         setText(data.bankaccountname)
+                        isEnabled = false
                     }
                     hint = "请填写开户姓名"
                     background = null

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

@@ -770,8 +770,6 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
         //选择的资金账号
         val selectAccountData: MutableLiveData<AccountData> = MutableLiveData()
 
-
-
         /*** 一口价摘牌金额 **/
         lateinit var one_delisting_amount: TextView
 
@@ -977,7 +975,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                         }
 
                         textView {
-                            text = "(" + data.minivalue + data.enumdicname + "起)"
+                            text = "(" + buySelldata.delistminqty + data.enumdicname + "起)"
                             textSizeAuto = 29
                             textColorInt = R.color.rma_hint_text_color_ccc
                         }.lparams(wrapContent, wrapContent) {
@@ -990,7 +988,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                         linearLayout {
                             gravity = Gravity.CENTER_VERTICAL
                             numberEditText {
-                                text = "1"
+                                text = buySelldata.delistminqty
                                 max = buySelldata.orderqty?.toDouble() ?: 1.0
                                 onePriceInputNumberEdittext = this
                                 setOnTextChangeListener { view, value ->
@@ -1527,7 +1525,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                         }
 
                         textView {
-                            text = "(" + data.minivalue + data.enumdicname + "起)"
+                            text = "(" + buySelldata.delistminqty + data.enumdicname + "起)"
                             textSizeAuto = 29
                             textColorInt = R.color.rma_hint_text_color_ccc
                         }.lparams(wrapContent, wrapContent) {
@@ -1540,7 +1538,7 @@ class BusinessHallActivity : BaseActivity<BusinessHallViewModel>() {
                         linearLayout {
                             gravity = Gravity.CENTER_VERTICAL
                             numberEditText {
-                                text = "1"
+                                text = buySelldata.delistminqty
                                 listednumberEdittext = this
                                 maxpickNumber.bindOptional(context) {
                                     max = it ?: 1.0

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

@@ -279,6 +279,7 @@ fun AppCompatActivity.WarehouseScreeningDialog(
 
                                 }
                             }
+                            viewModel.queryFtDeliveryGoods()
                             dialog.dismiss()
                         }
                         backgroundResource = R.drawable.rydz_main_blue_bg
@@ -341,6 +342,7 @@ fun AppCompatActivity.WarehouseScreeningDialog(
 
                                 }
                             }
+                            viewModel.queryFtDeliveryGoods()
                             dialog.dismiss()
                         }
                         backgroundResource = R.drawable.rydz_main_red_bg