zhou.xiaoning пре 3 година
родитељ
комит
64739fd312

+ 1688 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/listed/YrdzListedActivity.kt

@@ -0,0 +1,1688 @@
+package cn.muchinfo.rma.view.base.hnstmain.spotwarehouse.listed
+
+import android.annotation.SuppressLint
+import android.content.Intent
+import android.graphics.Color
+import android.os.Build
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import android.view.inputmethod.EditorInfo
+import android.widget.CheckBox
+import android.widget.EditText
+import android.widget.SeekBar
+import android.widget.TextView
+import androidx.annotation.RequiresApi
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.MTPEnums
+import cn.muchinfo.rma.global.data.*
+import cn.muchinfo.rma.global.data.account.loginQeruy.GoodsInfo
+import cn.muchinfo.rma.global.database.DataBase
+import cn.muchinfo.rma.global.isBlankString
+import cn.muchinfo.rma.global.toDoubleNoNull
+import cn.muchinfo.rma.global.utils.TimeUtils
+import cn.muchinfo.rma.global.utils.VIewUtils
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.protobuf.protoclasses.WarehouseTradeMI1
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.autoWidget.PickerView.builder.OptionsPickerBuilder
+import cn.muchinfo.rma.view.autoWidget.PickerView.listener.OnOptionsSelectListener
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.autoWidget.view.MangeNumberEditText2
+import cn.muchinfo.rma.view.autoWidget.view.MangeNumberEditText3
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.hnstmain.friend.SelectFriendActivty
+import cn.muchinfo.rma.view.base.hnstmain.friend.SelectFriendListData
+import cn.muchinfo.rma.view.base.hnstmain.performancetemplate.SelectPerformanceTemplateActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.home.contract.viewItemUI
+import cn.muchinfo.rma.view.base.main.addressmanagement.AddressSelectActivity
+import cn.muchinfo.rma.view.base.main.castsurely.JsonBean
+import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
+import com.blankj.utilcode.util.LogUtils
+
+import com.blankj.utilcode.util.ToastUtils
+import mtp.polymer.com.autowidget.dialog.*
+import mtp.polymer.com.autowidget.utils.bindTaskStatus
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+import org.greenrobot.eventbus.ThreadMode
+import org.jetbrains.anko.*
+import org.jetbrains.anko.sdk25.coroutines.textChangedListener
+import java.math.BigDecimal
+
+/**
+ * 现货仓单-挂单
+ */
+class YrdzListedActivity : BaseActivity<YrdzListedViewModel>() {
+
+    //1 现货仓单的挂 2 是预售仓单的挂
+    private val type by lazy {
+        intent.getStringExtra("type")
+    }
+
+    //现货仓单明细传入的实体
+    private val data by lazy {
+        intent.getParcelableExtra<HoldLBData>("data") as HoldLBData
+    }
+
+    //预售仓单汇总传入的实体
+    private val data1 by lazy {
+        intent.getParcelableExtra<HnstWrPositionData>("data1") as HnstWrPositionData
+    }
+
+    /** 用于订阅行情的唯一标识 */
+    val thisTag by lazy {
+        "ListedActivity"
+    }
+
+    private var options1Items: List<JsonBean> = java.util.ArrayList<JsonBean>()
+    private var options2Items = java.util.ArrayList<java.util.ArrayList<String>>()
+
+    var opt1tx: JsonBean? = null
+    var opt2tx: JsonBean.CityBean? = null
+
+    lateinit var main_seekbar : SeekBar
+
+    /**
+     * 查询所用的date 注意(页面显示时间规则yyyy-MM-dd,而接口请求规则yyyyMMdd,简直无fuck可说)
+     */
+    var tradedate: String = ""
+
+    //基差输入
+    lateinit var basisInputEdittext: MangeNumberEditText3
+
+    //初始化后基差是否被define
+    var isdefineByBasis: Boolean = false
+
+    //挂牌数量
+    lateinit var listednumberEdittext: MangeNumberEditText2
+
+    //起摘数量输入框
+    lateinit var startInputNumber: EditText
+
+    //挂牌金额 / 估算总额
+    lateinit var one_delisting_amount: TextView
+
+    //估算单价
+    lateinit var estimate_the_price: TextView
+
+    //交收月
+    lateinit var month_text: TextView
+
+    //挂牌价格输入
+    lateinit var onePriceInputEdittext: MangeNumberEditText2
+
+    //------------贸易圈时多余的内容-----------
+    //履约保证金
+    lateinit var performance_bond: EditText
+
+    //挂牌有效期
+    lateinit var validity_of_listing: TextView
+
+    //选择的履约模版数据
+    val selectPerformanceStepData: MutableLiveData<PermancePlanTmpData> = MutableLiveData()
+
+    //选择的朋友列表
+    val selectFriendList: MutableLiveData<List<WrUserFriendData>> = MutableLiveData()
+
+    /**
+     * 本页面选择的挂牌方式
+     */
+    var listedType: MutableLiveData<SelectData> = MutableLiveData()
+
+    /**
+     * 选择的行情商品
+     */
+    var selectGoodsInfo: MutableLiveData<SelectData> = MutableLiveData()
+
+
+    fun initData() {
+        listedType.postValue(SelectData(id = "1", value = "一口价"))
+        viewModel.initSelectGoodsInfo()
+    }
+
+    var marginValue: MutableLiveData<Double> = MutableLiveData()//履约保证金比例
+
+    //浮动价挂牌金额
+    val listed_price: MutableLiveData<Double> = MutableLiveData()
+
+    /**
+     * 是否可议价的选择
+     */
+    lateinit var can_be_negotiation: CheckBox
+
+    /**
+     * 是否整单
+     */
+    lateinit var whole_list: CheckBox
+
+    val whole_list_data: MutableLiveData<Boolean> =
+        MutableLiveData<Boolean>().apply { value = false }
+
+    /**
+     * 朋友是否不限
+     */
+    lateinit var no_friend: CheckBox
+
+    //初始化设置履约保证金比例
+    fun setMarginValue() {
+        viewModel.queryMarketRun()
+        if (type == "1") {//现货仓单
+            marginValue.value =
+                GlobalDataCollection.instance?.marketTradeConfigData?.sellmarginvalue?.toDoubleNoNull()
+                    ?: 0.0
+        } else {
+            marginValue.value =
+                GlobalDataCollection.instance?.marketTradeConfigData?.sellmarginvalue2?.toDoubleNoNull()
+                    ?: 0.0
+        }
+    }
+
+    //行情推送通知
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    fun onQuoteMessageEvent(quoteMessageEvent: QuoteMessageEvent) {
+        val goodsids = quoteMessageEvent.goodsid
+        //如果推送的goodsid包含当前页面的goodsid,则进行页面刷新
+        if (selectGoodsInfo.value?.id.isNullOrEmpty().not()) {
+            if (goodsids.contains(selectGoodsInfo.value?.id?.toInt())) {
+                LogUtils.eTag("BusinessHallActivity", "行情推送" + selectGoodsInfo.value?.id)
+                val quote =
+                    GlobalDataCollection.instance?.goodsInfoAndQuotesList?.find { selectGoodsInfo.value?.value == it.outgoodscode }?.quoteDayData
+                if (quote != null) {
+                    //赋值盘面信息
+                    viewModel.quoteDayData.postValue(quote)
+                }
+            }
+        }
+
+    }
+
+    override fun onDestroy() {
+        super.onDestroy()
+        viewModel.removeSubscriptQuote(thisTag)
+        EventBus.getDefault().unregister(this)
+    }
+
+
+    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
+        super.onActivityResult(requestCode, resultCode, data)
+        if (requestCode == 1004 && resultCode == 1005) {
+            val permancePlanTmpData =
+                data?.getParcelableExtra<PermancePlanTmpData>("data") as PermancePlanTmpData
+            selectPerformanceStepData.postValue(permancePlanTmpData)
+        } else if (requestCode == 1000 && resultCode == 1001) {
+            val selectFriendDataList =
+                data?.getParcelableExtra<SelectFriendListData>("datalist") as SelectFriendListData
+            selectFriendList.postValue(selectFriendDataList.selectFriendList)
+        }
+    }
+
+    @SuppressLint("SetTextI18n")
+    @RequiresApi(Build.VERSION_CODES.O)
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        EventBus.getDefault().register(this)
+        verticalLayout {
+            createLoadingDialog(hintStr = "").bindTaskStatus(context, viewModel.loadingDialogStatus)
+            setMarginValue()
+            viewModel.resetAccountData()
+            initData()
+            viewModel.quoteDayData.bindOptional(context) {
+                //行情下发计算挂牌金额 = (基差价格+期货合约价)* 挂牌数量
+                if (isdefineByBasis && basisInputEdittext.text.toString().isNullOrEmpty()
+                        .not() && basisInputEdittext.text.toString() != "-"
+                ) {//初始化相应控件后才能取值计算
+                    listed_price.postValue(
+                        basisInputEdittext.text.toString().toDouble().plus(it?.getPrice() ?: 0.0)
+                    )
+                }
+            }
+            background = resources.getDrawable(R.color.white)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "挂牌"
+                }
+            }
+
+            frameLayout {
+                scrollView {
+                    verticalLayout {
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            linearLayout {
+                                textView {
+                                    text = "品        种"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            textView {
+                                if (type == "1") {
+                                    text = data.deliverygoodsname
+                                } else {
+                                    text = data1.deliverygoodsname
+                                }
+
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+
+                        }.lparams(matchParent, autoSize(132))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            linearLayout {
+                                textView {
+                                    text = "商        品"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            textView {
+                                if (type == "1") {
+                                    text = data.wrtypename
+                                } else {
+                                    text = data1.wrtypename
+                                }
+
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+
+                        }.lparams(matchParent, autoSize(132))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            linearLayout {
+                                textView {
+                                    text = "仓        库"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            textView {
+                                if (type == "1") {
+                                    text = data.warehousename
+                                } else {
+                                    text = data1.warehousename
+                                }
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+
+                        }.lparams(matchParent, autoSize(132))
+
+                        viewItemUI()
+
+                        linearLayout {
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val selectDataList = arrayListOf(
+                                    SelectData(
+                                        id = "1",
+                                        value = "一口价"
+                                    ),
+                                    SelectData(
+                                        id = "2",
+                                        value = "浮动价"
+                                    ),
+                                    SelectData(
+                                        id = "3",
+                                        value = "贸易圈"
+                                    )
+                                )
+                                creatBottomSheetDialog("请选择挂牌方式", selectDataList) {
+                                    listedType.postValue(this)
+                                }
+                            }
+
+
+                            textView {
+                                text = "挂牌方式"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                listedType.bindOptional(context) {
+                                    text = it?.value
+                                    textColorInt = R.color.rma_black_33
+                                }
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(80)
+                            }
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(36), autoSize(36)) {
+                                marginEnd = autoSize(25)
+                            }
+                        }.lparams(matchParent, autoSize(132))
+
+                        viewItemUI()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "2") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val pvOptions = OptionsPickerBuilder(
+                                    context,
+                                    OnOptionsSelectListener { options1, options2, options3, v ->
+                                        opt2tx =
+                                            if (options2Items.size > 0 && options2Items.get(options1).size > 0)
+                                                options1Items.get(options1).cityList.get(options2)
+                                            else
+                                                JsonBean.CityBean()
+                                        selectGoodsInfo.postValue(
+                                            SelectData(
+                                                id = opt2tx?.autoId ?: "",
+                                                value = opt2tx?.code ?: ""
+                                            )
+                                        )
+                                    })
+                                    .setTitleText("行情商品")
+                                    .setDividerColor(Color.BLACK)
+                                    .setTextColorCenter(Color.BLACK) //设置选中项文字颜色
+                                    .setContentTextSize(20)
+                                    .build<Any>()
+
+                                options1Items = viewModel.firstSelectData.value!!
+                                options2Items =
+                                    viewModel.secondSelectData.value!! as ArrayList<ArrayList<String>>
+                                pvOptions.setPicker(
+                                    viewModel.firstSelectData.value,
+                                    viewModel.secondSelectData.value
+                                )
+                                pvOptions.show()
+                            }
+                            textView {
+                                text = "行情商品"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                selectGoodsInfo.bindOptional(context) {
+                                    viewModel.removeSubscriptQuote(thisTag)
+                                    viewModel.queryQuoteDay(
+                                        tag = thisTag,
+                                        goodsCodes = it?.value ?: "",
+                                        isShowLoading = false
+                                    )
+                                    text = it?.value
+                                    textColorInt = R.color.rma_black_33
+                                }
+                                text = "请选择交易所/商品/合约"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(80)
+                            }
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(36), autoSize(36)) {
+                                marginEnd = autoSize(25)
+                            }
+                        }.lparams(matchParent, autoSize(132))
+
+                        itemView()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "1" || it?.id == "3") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "挂牌价格"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            numberEditText {
+                                onePriceInputEdittext = this
+                                text = "0"
+                                decimal = 2
+                                setOnTextChangeListener { view, value ->
+                                    if (value.toString().isNullOrEmpty().not()) {
+                                        val delistingAmount = value.toDouble().times(
+                                            listednumberEdittext.text.toString()
+                                                .toDouble()
+                                        )
+                                        one_delisting_amount.text =
+                                            NumberUtils.roundNum(
+                                                delistingAmount,
+                                                2
+                                            ) + "(需履约保证金" + NumberUtils.roundNum(
+                                                delistingAmount.times(
+                                                    marginValue.value ?: 0.0
+                                                ), 2
+                                            ) + ")"
+                                    }
+
+                                }
+                                setTextColor(R.color.buy_hall_color)
+                            }.lparams(0, autoSize(72), 1f) {
+                                marginEnd = autoSize(110)
+                            }
+
+                            linearLayout {
+                                listedType.bindOptional(context) {
+                                    if (it?.id == "3") {
+                                        visibility = View.VISIBLE
+                                    } else {
+                                        visibility = View.GONE
+                                    }
+                                }
+                                gravity = Gravity.CENTER_VERTICAL
+                                checkBox {
+                                    can_be_negotiation = this
+                                    buttonDrawable = null
+                                    background =
+                                        resources.getDrawable(R.drawable.yrdz_check_select_backgrond)
+
+                                }.lparams(autoSize(41), autoSize(41)) {
+                                    marginStart = autoSize(36)
+                                    marginEnd = autoSize(36)
+                                }
+
+                                textView {
+                                    text = "可议价"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_zhushi_text_color
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginEnd = autoSize(36)
+                                }
+                            }.lparams(wrapContent, autoSize(143))
+                        }.lparams(matchParent, autoSize(143))
+
+                        itemView()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "2") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "基        差"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            numberEditText3 {
+                                viewModel.quoteDayData.bindOptional(context) {
+                                    val MarketTradeConfig = GlobalDataCollection.instance?.marketTradeConfigData
+                                    max =
+                                        it?.preclose?.times(MarketTradeConfig?.basisupratio?.toDouble() ?: 0.0)
+                                            ?: 0.0
+                                    min = it?.preclose?.times(-1.0)
+                                        ?.times(MarketTradeConfig?.basisdownratio?.toDouble() ?: 0.0) ?: 0.0
+                                }
+
+                                basisInputEdittext = this
+                                text = "0"
+                                setOnTextChangeListener { view, value ->
+                                    if (value.isNullOrEmpty().not()) {
+                                        if (type == "1") {
+                                            estimate_the_price.text = data.enableqty
+                                        } else {
+
+                                        }
+                                        if (value.isNotEmpty()) {
+                                            //行情下发计算挂牌金额 = (基差价格+期货合约价)* 挂牌数量
+                                            listed_price.postValue(
+                                                value.toString().toDouble().plus(
+                                                    viewModel.quoteDayData.value?.getPrice() ?: 0.0
+                                                )
+                                            )
+                                        }
+                                    }
+                                }
+
+                            }.lparams(0, autoSize(72), 1f) {
+                                marginEnd = autoSize(110)
+                            }
+                        }.lparams(matchParent, autoSize(143))
+
+                        itemView()
+
+                        linearLayout {
+                            verticalLayout {
+                                textView {
+                                    text = "挂牌数量"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                    topMargin = autoSize(36)
+                                }
+
+                            }.lparams(autoSize(250), autoSize(290))
+
+                            verticalLayout {
+                                linearLayout {
+                                    gravity = Gravity.CENTER_VERTICAL
+                                    numberEditText {
+                                        listednumberEdittext = this
+                                        if (type == "1") {
+                                            changeValue = data.minivalue?.toDouble() ?: 1.0
+                                            text = data.minivalue
+                                        } else {
+                                            changeValue = data1.minivalue?.toDouble() ?: 1.0
+                                            text = data1.minivalue
+                                        }
+
+                                        setOnTextChangeListener { view, value ->
+                                            if (value.isNullOrEmpty().not()) {
+
+                                                if (type == "1") {
+//                                                    main_seekbar.progress = value.toString().toDouble().div(data.enableqty?.toDouble() ?: 1.0).toInt()
+                                                    main_seekbar.progress = value.toString().toDouble().div(data.enableqty?.toDouble() ?: 1.0).times(100).toInt()
+                                                } else {
+                                                    main_seekbar.progress = value.toString().toDouble().div(data1.creditenableqty?.toDouble() ?: 1.0).times(100).toInt()
+                                                }
+
+                                                if (listedType.value?.id == "1" || listedType.value?.id == "3") {//一口价
+                                                    val delistingAmount = value.toDouble().times(
+                                                        onePriceInputEdittext.text.toString()
+                                                            .toDouble()
+                                                    )
+                                                    one_delisting_amount.text =
+                                                        NumberUtils.roundNum(
+                                                            delistingAmount,
+                                                            2
+                                                        ) + "(需履约保证金" + NumberUtils.roundNum(
+                                                            delistingAmount.times(
+                                                                marginValue.value ?: 0.0
+                                                            ), 2
+                                                        ) + ")"
+                                                } else if (listedType.value?.id == "2") {//浮动价 //计算估算总额
+                                                    val floatDelistingAmount =
+                                                        listed_price.value?.times(
+                                                            value.toString().toDouble()
+                                                        )
+                                                    if (floatDelistingAmount != 0.0) {
+                                                        //显示估算总额
+                                                        if (marginValue.value == 0.0) {
+                                                            one_delisting_amount.text =
+                                                                NumberUtils.roundNum(
+                                                                    floatDelistingAmount ?: 0.0,
+                                                                    2
+                                                                )
+                                                        } else {
+                                                            one_delisting_amount.text =
+                                                                NumberUtils.roundNum(
+                                                                    floatDelistingAmount ?: 0.0,
+                                                                    2
+                                                                ) + "(需履约保证金" + NumberUtils.roundNum(
+                                                                    floatDelistingAmount?.times(
+                                                                        marginValue.value ?: 0.0
+                                                                    ) ?: 0.0,
+                                                                    2
+                                                                ) + ")"
+                                                        }
+                                                    }
+                                                }
+                                            }
+                                        }
+                                        setTextColor(R.color.buy_hall_color)
+                                    }.lparams(0, autoSize(72), 1f) {
+                                        marginEnd = autoSize(72)
+                                    }
+
+                                    textView {
+                                        text = data.enumdicname
+                                        textSizeAuto = 34
+                                        textColorInt = R.color.rma_hint_text_color_ccc
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = autoSize(36)
+                                    }
+
+                                    linearLayout {
+                                        listedType.bindOptional(context) {
+                                            if (it?.id == "3") {
+                                                visibility = View.VISIBLE
+                                            } else {
+                                                visibility = View.GONE
+                                            }
+                                        }
+                                        gravity = Gravity.CENTER_VERTICAL
+                                        checkBox {
+                                            whole_list = this
+                                            buttonDrawable = null
+                                            background =
+                                                resources.getDrawable(R.drawable.yrdz_check_select_backgrond)
+                                            setOnCheckedChangeListener { compoundButton, b ->
+                                                whole_list_data.postValue(b)
+                                            }
+                                        }.lparams(autoSize(41), autoSize(41)) {
+                                            marginStart = autoSize(36)
+                                            marginEnd = autoSize(36)
+                                        }
+
+                                        textView {
+                                            text = "整单"
+                                            textSizeAuto = 34
+                                            textColorInt = R.color.rma_zhushi_text_color
+                                        }.lparams(wrapContent, wrapContent) {
+                                            marginEnd = autoSize(36)
+                                        }
+                                    }.lparams(wrapContent, autoSize(143))
+                                }.lparams(matchParent, autoSize(143))
+
+                                inflateLayout<SeekBar>(R.layout.main_seekbar) {
+                                    main_seekbar = this
+
+                                    min = 10
+                                    max = 100
+                                    isIndeterminate = false
+                                    splitTrack = false
+                                    setPadding(autoSize(30), 0, autoSize(30), 0)
+                                    thumb = resources.getDrawable(R.mipmap.hnst_seekbar)
+                                    progressDrawable = resources.getDrawable(R.drawable.seekbar_bg)
+                                    setOnSeekBarChangeListener(object :
+                                        SeekBar.OnSeekBarChangeListener {
+                                        override fun onProgressChanged(
+                                            p0: SeekBar?,
+                                            p1: Int,
+                                            p2: Boolean
+                                        ) {
+                                            if (type == "1") {
+                                                listednumberEdittext.text = NumberUtils.roundNum(
+                                                    data.enableqty?.toDouble()?.times(p1.div(100.0))
+                                                        ?.toString(), 0
+                                                )
+                                            } else {
+                                                listednumberEdittext.text = NumberUtils.roundNum(
+                                                    data1.credittotalqty?.toDouble()
+                                                        ?.times(p1.div(100.0))?.toString(), 0
+                                                )
+                                            }
+
+                                        }
+
+                                        override fun onStartTrackingTouch(p0: SeekBar?) {
+
+                                        }
+
+                                        override fun onStopTrackingTouch(p0: SeekBar?) {
+
+                                        }
+                                    })
+                                }.lparams(matchParent, autoSize(46)) {
+                                    marginEnd = autoSize(110)
+                                    topMargin = autoSize(20)
+                                }
+
+                                linearLayout {
+                                    textView {
+                                        text = "0"
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_gray_color
+                                    }.lparams(wrapContent, wrapContent)
+
+                                    emptyView()
+
+                                    textView {
+                                        if (type == "1") {
+                                            text = data.enableqty + data.enumdicname
+                                        } else {
+                                            text = data1.creditenableqty + data1.enumdicname
+                                        }
+                                        textSizeAuto = 29
+                                        textColorInt = R.color.rma_gray_color
+                                    }.lparams(wrapContent, wrapContent)
+                                }.lparams(matchParent, wrapContent) {
+                                    marginEnd = autoSize(110)
+                                    topMargin = autoSize(10)
+                                }
+
+                            }.lparams(matchParent, autoSize(290))
+                        }.lparams(matchParent, autoSize(290))
+
+                        itemView()
+
+                        linearLayout {
+                            whole_list_data.bindOptional(context) {
+                                if (it == true) {
+                                    visibility = View.GONE
+                                } else {
+                                    visibility = View.VISIBLE
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "起摘数量"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            verticalLayout {
+                                linearLayout {
+                                    editText {
+                                        startInputNumber = this
+                                        hint = "请输入起摘数量"
+                                        background = null
+                                        inputType = EditorInfo.TYPE_CLASS_NUMBER
+//                                        setDecimalInputType()
+                                        hintColorStr = "#CCCCCC"
+                                        textSizeAuto = 31
+                                        textColorStr = "#333333"
+                                    }.lparams(0, autoSize(132), 1f)
+
+                                    textView {
+                                        text = data.enumdicname
+                                        textSizeAuto = 31
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = autoSize(36)
+                                    }
+                                }.lparams(matchParent, autoSize(100))
+
+                                textView {
+                                    if (type == "1") {
+                                        text = "最小单位" + data.minivalue + data.enumdicname
+                                    } else {
+                                        text = "最小单位" + data1.minivalue + data1.enumdicname
+                                    }
+
+                                    textSizeAuto = 29
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginEnd = autoSize(36)
+                                }
+                            }.lparams(matchParent, autoSize(167))
+
+                        }.lparams(matchParent, autoSize(167))
+
+                        itemView()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "3") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            linearLayout {
+                                textView {
+                                    text = "履约保证金"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_hint_text_color_ccc
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginStart = autoSize(36)
+                                }
+                            }.lparams(autoSize(250), wrapContent)
+
+                            verticalLayout {
+                                linearLayout {
+                                    gravity = Gravity.CENTER_VERTICAL
+                                    editText {
+                                        performance_bond = this
+                                        textChangedListener {
+                                            afterTextChanged {
+                                                if (it.toString().isNotEmpty()) {
+                                                    marginValue.postValue(
+                                                        it?.toString()?.toDouble()?.div(100.0)
+                                                    )
+                                                }
+                                            }
+                                        }
+                                        hint = "请输入履约保证金"
+                                        background = null
+                                        inputType = EditorInfo.TYPE_CLASS_NUMBER
+                                        setDecimalInputType(maxValue = BigDecimal("100.00"))
+                                        hintColorStr = "#CCCCCC"
+                                        textSizeAuto = 31
+                                        textColorStr = "#333333"
+                                    }.lparams(0, autoSize(143), 1f)
+
+                                    textView {
+                                        text = "%"
+                                        textSizeAuto = 31
+                                        textColorInt = R.color.rma_black_33
+                                    }.lparams(wrapContent, wrapContent) {
+                                        marginEnd = autoSize(36)
+                                    }
+                                }.lparams(matchParent, autoSize(143))
+                            }.lparams(matchParent, autoSize(143))
+
+                        }.lparams(matchParent, autoSize(143))
+
+                        itemView()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "3") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            onThrottleFirstClick {
+                                showDataSelectDialog(type = "1") {
+                                    validity_of_listing.text = this
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "挂牌有效期"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(autoSize(214), wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                viewModel.marketRunData.bindOptional(context) {
+                                    text = it?.tradedate
+                                }
+                                validity_of_listing = this
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_search_by_time
+                            }.lparams(autoSize(38), autoSize(38)) {
+                                marginEnd = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(143))
+
+                        viewItemUI()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "3") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(
+                                    context,
+                                    SelectPerformanceTemplateActivity::class.java
+                                )
+                                startActivityForResult(intent, 1004)
+                            }
+
+                            textView {
+                                text = "履约方式"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                selectPerformanceStepData.bindOptional(context) {
+                                    text = it?.templatename
+                                    textColorInt = R.color.rma_black_33
+                                }
+                                text = "请选择履约模版"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(80)
+                            }
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(36), autoSize(36)) {
+                                marginEnd = autoSize(25)
+                            }
+                        }.lparams(matchParent, autoSize(132))
+
+                        itemView()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "3") {
+                                    visibility = View.VISIBLE
+                                } else {
+                                    visibility = View.GONE
+                                }
+                            }
+                            background = resources.getDrawable(R.color.white)
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                if (no_friend.isChecked.not()) {
+                                    val intent = Intent()
+                                    intent.setClass(context, SelectFriendActivty::class.java)
+                                    startActivityForResult(intent, 1000)
+                                } else {
+                                    ToastUtils.showLong("勾选不限后不能选择朋友")
+                                }
+
+                            }
+
+                            textView {
+                                text = "指定朋友"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                selectFriendList.bindOptional(context) {
+                                    if (no_friend.isChecked) {
+                                        text = "不限"
+                                    } else {
+                                        text = "已选" + it?.size + "人"
+                                        textColorInt = R.color.rma_black_33
+                                    }
+                                }
+                                text = "请选择朋友"
+                                textSizeAuto = 31
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(80)
+                            }
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(36), autoSize(36)) {
+                                marginEnd = autoSize(25)
+                            }
+
+                            linearLayout {
+                                gravity = Gravity.CENTER_VERTICAL
+                                checkBox {
+                                    no_friend = this
+                                    buttonDrawable = null
+                                    background =
+                                        resources.getDrawable(R.drawable.yrdz_check_select_backgrond)
+                                    setOnCheckedChangeListener { compoundButton, b ->
+                                        if (b) {
+                                            selectFriendList.postValue(arrayListOf())
+                                        }
+                                    }
+                                }.lparams(autoSize(41), autoSize(41)) {
+                                    marginStart = autoSize(36)
+                                    marginEnd = autoSize(36)
+                                }
+
+                                textView {
+                                    text = "不限"
+                                    textSizeAuto = 34
+                                    textColorInt = R.color.rma_zhushi_text_color
+                                }.lparams(wrapContent, wrapContent) {
+                                    marginEnd = autoSize(36)
+                                }
+                            }.lparams(wrapContent, autoSize(132))
+                        }.lparams(matchParent, autoSize(132))
+
+                        itemView()
+
+                        linearLayout {
+                            if (type == "2") {
+                                visibility = View.VISIBLE
+                            } else {
+                                visibility = View.GONE
+                            }
+                            onThrottleFirstClick {
+                                showDataSelectDialog(type = "2") {
+                                    month_text.text = this
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "交收月"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(autoSize(214), wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                text = TimeUtils.getNowTime("yyyy-MM")
+                                month_text = this
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+
+                            emptyView()
+
+                            imageView {
+                                imageResource = R.mipmap.rma_search_by_time
+                            }.lparams(autoSize(38), autoSize(38)) {
+                                marginEnd = autoSize(36)
+                            }
+                        }.lparams(matchParent, autoSize(143))
+
+
+                        itemView()
+
+                        linearLayout {
+                            listedType.bindOptional(context) {
+                                if (it?.id == "1" || it?.id == "3") {
+                                    visibility = View.GONE
+                                } else {
+                                    visibility = View.VISIBLE
+                                }
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                text = "估算价"
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(autoSize(214), wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                text = "--"
+                                listed_price.bindOptional(context) {
+                                    text = NumberUtils.roundNum(it ?: 0.0, 2)
+                                    if (onePriceInputEdittext.text.toString().isNullOrEmpty()
+                                            .not() && listednumberEdittext.text.toString()
+                                            .isNullOrEmpty().not()
+                                    ) {
+                                        val delistingAmount =
+                                            it?.times(
+                                                listednumberEdittext.text.toString()
+                                                    .toDouble()
+                                            )
+                                        one_delisting_amount.text =
+                                            NumberUtils.roundNum(
+                                                delistingAmount ?: 0.0,
+                                                2
+                                            ) + "(需履约保证金" + NumberUtils.roundNum(
+                                                delistingAmount?.times(
+                                                    marginValue.value ?: 0.0
+                                                ) ?: 0.0, 2
+                                            ) + ")"
+                                    }
+                                }
+                                estimate_the_price = this
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+                        }.lparams(matchParent, autoSize(143))
+
+                        itemView()
+
+                        linearLayout {
+                            gravity = Gravity.CENTER_VERTICAL
+                            textView {
+                                listedType.bindOptional(context) {
+                                    if (it?.id == "1" || it?.id == "3") {
+                                        text = "挂牌金额"
+                                    } else {
+                                        text = "估算总额"
+                                    }
+                                }
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(autoSize(214), wrapContent) {
+                                marginStart = autoSize(36)
+                            }
+
+                            textView {
+                                marginValue.bindOptional(context) {
+                                    if (onePriceInputEdittext.text.toString().isNullOrEmpty()
+                                            .not() && listednumberEdittext.text.toString()
+                                            .isNullOrEmpty().not()
+                                    ) {
+                                        val delistingAmount =
+                                            onePriceInputEdittext.text.toString().toDouble().times(
+                                                listednumberEdittext.text.toString()
+                                                    .toDouble()
+                                            )
+                                        one_delisting_amount.text =
+                                            NumberUtils.roundNum(
+                                                delistingAmount,
+                                                2
+                                            ) + "(需履约保证金" + NumberUtils.roundNum(
+                                                delistingAmount.times(
+                                                    it ?: 0.0
+                                                ), 2
+                                            ) + ")"
+                                    }
+                                }
+                                text = "0"
+                                one_delisting_amount = this
+                                textSizeAuto = 34
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent)
+                        }.lparams(matchParent, autoSize(143))
+
+                        textView {
+                            viewModel.usedAccountData.bindOptional(context) {
+                                text =
+                                    "可用资金" + NumberUtils.roundNum(it?.canUserAmount.toString(), 2)
+                            }
+                            textSizeAuto = 29
+                            textColorInt = R.color.rma_black_33
+                        }.lparams(wrapContent, wrapContent) {
+                            topMargin = autoSize(20)
+                            marginStart = autoSize(250)
+                        }
+
+
+                        view {
+
+                        }.lparams(matchParent, autoSize(200))
+                    }
+                }
+
+                linearLayout {
+                    background = resources.getDrawable(R.color.white)
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        onThrottleFirstClick {
+                            if (check().not()) {
+                                return@onThrottleFirstClick
+                            }
+                            if (type == "1") {//现货仓单挂单
+                                if (listedType.value?.id == "1") {//一口价
+                                    viewModel.requeryWRListingOrderReq(
+                                        FactoryItems = arrayListOf<WarehouseTradeMI1.DGFactoryItems>(),
+                                        LadingBillId = data.ladingbillid?.toLong() ?: 0,
+                                        TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
+                                        SubNum = data.subnum?.toLong() ?: 0,
+                                        WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                        UserID = GlobalDataCollection.instance?.loginRsp?.userID
+                                            ?: 0,
+                                        AccountID = GlobalDataCollection.instance?.accountId ?: 0,
+                                        IsSpecified = 0,
+                                        OrderQty = listednumberEdittext.text.toString().toLong(),
+                                        DeliveryGoodsID = data.deliverygoodsid?.toInt() ?: 0,
+                                        WRPriceType = 1,
+                                        FixedPrice = onePriceInputEdittext.text.toString()
+                                            .toDouble(),
+                                        WRTradeGoods = WarehouseTradeMI1.WRGoodsInfo.newBuilder()
+                                            .build(),
+                                        TimevalidType = 4,
+                                        FirstRatio = 0.0,
+                                        PerformanceTemplateID = 0,
+                                        BuyOrSell = 1,
+                                        PriceDisplayMode = 1,
+                                        CanBargain = 0,
+                                        ApplyID = 0,
+                                        CanPart = 1,
+                                        HasWr = 1,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
+                                        WRStandardID = data.wrstandardid?.toInt() ?: 0
+                                    ) {
+                                        finish()
+                                    }
+                                } else if (listedType.value?.id == "2") {//浮动价
+                                    viewModel.requeryWRListingOrderReq(
+                                        FactoryItems = arrayListOf<WarehouseTradeMI1.DGFactoryItems>(),
+                                        LadingBillId = data.ladingbillid?.toLong() ?: 0,
+                                        TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
+                                        SubNum = data.subnum?.toLong() ?: 0,
+                                        WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                        UserID = GlobalDataCollection.instance?.loginRsp?.userID
+                                            ?: 0,
+                                        AccountID = GlobalDataCollection.instance?.accountId ?: 0,
+                                        IsSpecified = 0,
+                                        OrderQty = listednumberEdittext.text.toString().toLong(),
+                                        DeliveryGoodsID = data.deliverygoodsid?.toInt() ?: 0,
+                                        WRPriceType = 2,
+                                        WRTradeGoods = getWRTradeGoods(),
+                                        PriceFactor = 1.0,
+                                        PriceMove = basisInputEdittext.text.toString().toDouble(),
+                                        TimevalidType = 4,
+                                        FirstRatio = 0.0,
+                                        PerformanceTemplateID = 0,
+                                        BuyOrSell = 1,
+                                        PriceDisplayMode = 1,
+                                        CanBargain = 0,
+                                        ApplyID = 0,
+                                        CanPart = 1,
+                                        HasWr = 1,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
+                                        WRStandardID = data.wrstandardid?.toInt() ?: 0
+                                    ) {
+                                        finish()
+                                    }
+                                } else if (listedType.value?.id == "3"){//贸易圈
+                                    var canBargain = 0
+                                    if (can_be_negotiation.isChecked) {
+                                        canBargain = 1
+                                    } else {
+                                        canBargain = 0
+                                    }
+                                    var canPart = 1
+                                    var the_pick: Long = 0
+                                    if (whole_list.isChecked) {
+                                        canPart = 0
+                                    } else {
+                                        the_pick = startInputNumber.text.toString().toLong()
+                                        canPart = 1
+                                    }
+                                    var allFriendsFlag = 0
+                                    if (no_friend.isChecked) {
+                                        allFriendsFlag = 1
+                                    } else {
+                                        allFriendsFlag = 0
+                                    }
+
+                                    viewModel.requeryWRListingOrderReq(
+                                        ValidTime = validity_of_listing.text.toString()
+                                            .removeSuffix("-"),
+                                        MarginFlag = 1,//挂牌是否指定保证金 0:否 1:是
+                                        MarginAlgorithm = 1,//指定保证金方式 1:比率 2:固定
+                                        MarginValue = performance_bond.text.toString().toDouble()
+                                            .div(100),//指定保证金设置值
+                                        AllFriendsFlag = allFriendsFlag,
+                                        MatchAccIDsString = getSelectFriendList(),
+                                        FactoryItems = arrayListOf<WarehouseTradeMI1.DGFactoryItems>(),
+                                        LadingBillId = data.ladingbillid?.toLong() ?: 0,
+                                        TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
+                                        SubNum = data.subnum?.toLong() ?: 0,
+                                        WRFactorTypeId = data.wrfactortypeid?.toLong() ?: 0,
+                                        UserID = GlobalDataCollection.instance?.loginRsp?.userID
+                                            ?: 0,
+                                        AccountID = GlobalDataCollection.instance?.accountId ?: 0,
+                                        IsSpecified = 1,
+                                        OrderQty = listednumberEdittext.text.toString().toLong(),
+                                        DeliveryGoodsID = data.deliverygoodsid?.toInt() ?: 0,
+                                        WRPriceType = 1,
+                                        FixedPrice = onePriceInputEdittext.text.toString()
+                                            .toDouble(),
+                                        WRTradeGoods = getWRTradeGoods(),
+                                        TimevalidType = 3,
+                                        FirstRatio = 0.0,
+                                        PerformanceTemplateID = selectPerformanceStepData.value?.autoid?.toLong()
+                                            ?: 0,
+                                        BuyOrSell = 1,
+                                        PriceDisplayMode = 1,
+                                        CanBargain = canBargain,
+                                        ApplyID = 0,
+                                        CanPart = canPart,
+                                        HasWr = 1,
+                                        DelistMinQty = the_pick,
+                                        WRStandardID = data.wrstandardid?.toInt() ?: 0
+                                    ) {
+                                        finish()
+                                    }
+                                }
+                            } else {//预售仓单挂单
+                                if (listedType.value?.id == "1") {//一口价
+                                    viewModel.requeryWRListingOrderReq(
+                                        FactoryItems = arrayListOf<WarehouseTradeMI1.DGFactoryItems>(),
+                                        LadingBillId = 0,
+                                        TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
+                                        SubNum = 0,
+                                        WRFactorTypeId = data1.wrfactortypeid?.toLong() ?: 0,
+                                        UserID = GlobalDataCollection.instance?.loginRsp?.userID
+                                            ?: 0,
+                                        AccountID = GlobalDataCollection.instance?.accountId ?: 0,
+                                        IsSpecified = 0,
+                                        OrderQty = listednumberEdittext.text.toString().toLong(),
+                                        DeliveryGoodsID = data1.deliverygoodsid?.toInt() ?: 0,
+                                        WRPriceType = 1,
+                                        FixedPrice = onePriceInputEdittext.text.toString()
+                                            .toDouble(),
+                                        WRTradeGoods = WarehouseTradeMI1.WRGoodsInfo.newBuilder()
+                                            .build(),
+                                        TimevalidType = 4,
+                                        FirstRatio = 0.0,
+                                        DeliveryMonth = month_text.text.toString(),
+                                        PerformanceTemplateID = 0,
+                                        BuyOrSell = 1,
+                                        PriceDisplayMode = 1,
+                                        CanBargain = 0,
+                                        ApplyID = 0,
+                                        CanPart = 1,
+                                        HasWr = 0,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
+                                        WRStandardID = data1.wrstandardid?.toInt() ?: 0
+                                    ) {
+                                        finish()
+                                    }
+                                } else if (listedType.value?.id == "2") {//浮动价
+                                    viewModel.requeryWRListingOrderReq(
+                                        FactoryItems = arrayListOf<WarehouseTradeMI1.DGFactoryItems>(),
+                                        LadingBillId = 0,
+                                        TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
+                                        SubNum = 0,
+                                        WRFactorTypeId = data1.wrfactortypeid?.toLong() ?: 0,
+                                        UserID = GlobalDataCollection.instance?.loginRsp?.userID
+                                            ?: 0,
+                                        AccountID = GlobalDataCollection.instance?.accountId ?: 0,
+                                        IsSpecified = 0,
+                                        OrderQty = listednumberEdittext.text.toString().toLong(),
+                                        DeliveryGoodsID = data1.deliverygoodsid?.toInt() ?: 0,
+                                        WRPriceType = 2,
+                                        WRTradeGoods = getWRTradeGoods(),
+                                        PriceFactor = 1.0,
+                                        PriceMove = basisInputEdittext.text.toString().toDouble(),
+                                        TimevalidType = 4,
+                                        FirstRatio = 0.0,
+                                        PerformanceTemplateID = 0,
+                                        DeliveryMonth = month_text.text.toString(),
+                                        BuyOrSell = 1,
+                                        PriceDisplayMode = 1,
+                                        CanBargain = 0,
+                                        ApplyID = 0,
+                                        CanPart = 1,
+                                        HasWr = 0,
+                                        DelistMinQty = startInputNumber.text.toString().toLong(),
+                                        WRStandardID = data1.wrstandardid?.toInt() ?: 0
+                                    ) {
+                                        finish()
+                                    }
+                                } else if (listedType.value?.id == "3") {//贸易圈
+                                    var canBargain = 0
+                                    if (can_be_negotiation.isChecked) {
+                                        canBargain = 1
+                                    } else {
+                                        canBargain = 0
+                                    }
+                                    var canPart = 1
+                                    var the_pick: Long = 0
+                                    if (whole_list.isChecked) {
+                                        canPart = 0
+                                    } else {
+                                        the_pick = startInputNumber.text.toString().toLong()
+                                        canPart = 1
+                                    }
+                                    var allFriendsFlag = 0
+                                    if (no_friend.isChecked) {
+                                        allFriendsFlag = 1
+                                    } else {
+                                        allFriendsFlag = 0
+                                    }
+                                    viewModel.requeryWRListingOrderReq(
+                                        ValidTime = validity_of_listing.text.toString()
+                                            .removeSuffix("-"),
+                                        MarginFlag = 1,//挂牌是否指定保证金 0:否 1:是
+                                        MarginAlgorithm = 1,//指定保证金方式 1:比率 2:固定
+                                        MarginValue = performance_bond.text.toString().toDouble()
+                                            .div(100),//指定保证金设置值
+                                        AllFriendsFlag = allFriendsFlag,
+                                        MatchAccIDsString = getSelectFriendList(),
+                                        FactoryItems = arrayListOf<WarehouseTradeMI1.DGFactoryItems>(),
+                                        LadingBillId = 0,
+                                        TradeDate = TimeUtils.getNowTime("yyyyMMdd"),
+                                        SubNum = 0,
+                                        WRFactorTypeId = data1.wrfactortypeid?.toLong() ?: 0,
+                                        UserID = GlobalDataCollection.instance?.loginRsp?.userID
+                                            ?: 0,
+                                        AccountID = GlobalDataCollection.instance?.accountId ?: 0,
+                                        IsSpecified = 1,
+                                        OrderQty = listednumberEdittext.text.toString().toLong(),
+                                        DeliveryGoodsID = data1.deliverygoodsid?.toInt() ?: 0,
+                                        WRPriceType = 1,
+                                        WRTradeGoods = getWRTradeGoods(),
+                                        FixedPrice = onePriceInputEdittext.text.toString()
+                                            .toDouble(),
+                                        TimevalidType = 3,
+                                        FirstRatio = 0.0,
+                                        PerformanceTemplateID = selectPerformanceStepData.value?.autoid?.toLong()
+                                            ?: 0,
+                                        DeliveryMonth = month_text.text.toString(),
+                                        BuyOrSell = 1,
+                                        PriceDisplayMode = 1,
+                                        CanBargain = canBargain,
+                                        ApplyID = 0,
+                                        CanPart = canPart,
+                                        HasWr = 0,
+                                        DelistMinQty = the_pick,
+                                        WRStandardID = data1.wrstandardid?.toInt() ?: 0
+                                    ) {
+                                        finish()
+                                    }
+                                }
+                            }
+
+                        }
+                        gravity = Gravity.CENTER
+                        backgroundResource = R.mipmap.rma_submit_bg
+                        text = "卖出"
+                        textSizeAuto = 38
+                        textColorInt = R.color.white
+                    }.lparams(0, autoSize(119), 1f) {
+                        marginStart = autoSize(59)
+                        marginEnd = autoSize(59)
+                    }
+
+                }.lparams(matchParent, autoSize(144)) {
+                    gravity = Gravity.BOTTOM
+                }
+            }.lparams(matchParent, matchParent)
+
+        }
+    }
+
+    fun getSelectFriendList(): List<String> {
+        val returnList = arrayListOf<String>()
+        selectFriendList.value?.forEach {
+            returnList.add(it.frienduserid?.toString() ?: "")
+        }
+        return returnList
+    }
+
+    fun getWRTradeGoods(): WarehouseTradeMI1.WRGoodsInfo {
+        val wRTradeGoods = WarehouseTradeMI1.WRGoodsInfo.newBuilder()
+        wRTradeGoods.setGoodsID(selectGoodsInfo.value?.id?.toInt() ?: 0)
+        wRTradeGoods.setGoodsCode(selectGoodsInfo.value?.value ?: "")
+        wRTradeGoods.setPriceFactor(1.0)
+        wRTradeGoods.setPriceMove(1.0)
+        wRTradeGoods.setWeightRatio(1.0)
+        return wRTradeGoods.build()
+    }
+
+    /**
+     * 提交数据前的校验
+     */
+    fun check(): Boolean {
+        if (listedType.value?.id == "1") {//一口价校验
+            if (onePriceInputEdittext.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入挂牌价格")
+                return false
+            }
+            if (onePriceInputEdittext.text.toString() == "0" || onePriceInputEdittext.text.toString() == "0.0" || onePriceInputEdittext.text.toString() == "0.00") {
+                ToastUtils.showLong("挂牌价格不能为0")
+                return false
+            }
+            if (listednumberEdittext.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入挂牌数量")
+                return false
+            }
+            if (listednumberEdittext.text.toString() == "0" || listednumberEdittext.text.toString() == "0.0" || listednumberEdittext.text.toString() == "0.00") {
+                ToastUtils.showLong("挂牌数量不能为0")
+                return false
+            }
+            if (startInputNumber.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入起摘数量")
+                return false
+            }
+            if (type == "2") {
+                if (startInputNumber.text.toString().toLong() < data1.minivalue?.toLong() ?: 0) {
+                    ToastUtils.showLong("起摘数量不能小于" + data1.minivalue)
+                    return false
+                }
+            } else {
+                if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0) {
+                    ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                    return false
+                }
+            }
+            if (type == "2") {
+                if (month_text.text.toString().isNullOrEmpty()) {
+                    ToastUtils.showLong("请选择交收月")
+                    return false
+                }
+            }
+        } else if (listedType.value?.id == "2") {//浮动价校验
+            if (selectGoodsInfo.value?.value.isNullOrEmpty()) {
+                ToastUtils.showLong("请选择行情商品")
+                return false
+            }
+            if (basisInputEdittext.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入基差")
+                return false
+            }
+
+            if (listednumberEdittext.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入挂牌数量")
+                return false
+            }
+            if (listednumberEdittext.text.toString() == "0" || listednumberEdittext.text.toString() == "0.0" || listednumberEdittext.text.toString() == "0.00") {
+                ToastUtils.showLong("挂牌数量不能为0")
+                return false
+            }
+            if (startInputNumber.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入起摘数量")
+                return false
+            }
+            if (type == "2") {
+                if (startInputNumber.text.toString().toLong() < data1.minivalue?.toLong() ?: 0) {
+                    ToastUtils.showLong("起摘数量不能小于" + data1.minivalue)
+                    return false
+                }
+            } else {
+                if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0) {
+                    ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                    return false
+                }
+            }
+
+            if (type == "2") {
+                if (month_text.text.toString().isNullOrEmpty()) {
+                    ToastUtils.showLong("请选择交收月")
+                    return false
+                }
+            }
+        } else {
+            if (onePriceInputEdittext.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入挂牌价格")
+                return false
+            }
+            if (onePriceInputEdittext.text.toString() == "0" || onePriceInputEdittext.text.toString() == "0.0" || onePriceInputEdittext.text.toString() == "0.00") {
+                ToastUtils.showLong("挂牌价格不能为0")
+                return false
+            }
+            if (listednumberEdittext.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入挂牌数量")
+                return false
+            }
+            if (listednumberEdittext.text.toString() == "0" || listednumberEdittext.text.toString() == "0.0" || listednumberEdittext.text.toString() == "0.00") {
+                ToastUtils.showLong("挂牌数量不能为0")
+                return false
+            }
+
+            if (whole_list.isChecked.not()) {
+
+                if (startInputNumber.text.toString().isNullOrEmpty()) {
+                    ToastUtils.showLong("请输入起摘数量")
+                    return false
+                }
+
+                if (type == "2") {
+                    if (startInputNumber.text.toString()
+                            .toLong() < data1.minivalue?.toLong() ?: 0
+                    ) {
+                        ToastUtils.showLong("起摘数量不能小于" + data1.minivalue)
+                        return false
+                    }
+                } else {
+                    if (startInputNumber.text.toString().toLong() < data.minivalue?.toLong() ?: 0) {
+                        ToastUtils.showLong("起摘数量不能小于" + data.minivalue)
+                        return false
+                    }
+                }
+            }
+
+            if (performance_bond.text.toString().isNullOrEmpty()) {
+                ToastUtils.showLong("请输入履约保证金比例")
+                return false
+            }
+            if (performance_bond.text.toString() == "0" || performance_bond.text.toString() == "0.0" || performance_bond.text.toString() == "0.00") {
+                ToastUtils.showLong("履约保证金比例不能为0")
+                return false
+            }
+
+            if (selectPerformanceStepData.value?.autoid.isNullOrEmpty()) {
+                ToastUtils.showLong("请选择履约模版")
+                return false
+            }
+
+            if (no_friend.isChecked.not()) {
+                if (selectFriendList.value.isNullOrEmpty()) {
+                    ToastUtils.showLong("请选择朋友")
+                    return false
+                }
+            }
+        }
+        return true
+    }
+
+}

+ 310 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/hnstmain/spotwarehouse/listed/YrdzListedViewModel.kt

@@ -0,0 +1,310 @@
+package cn.muchinfo.rma.view.base.hnstmain.spotwarehouse.listed
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.AccountData
+import cn.muchinfo.rma.global.data.GoodsGroupData
+import cn.muchinfo.rma.global.data.MarketRunData
+import cn.muchinfo.rma.global.data.QuoteDayData
+import cn.muchinfo.rma.global.data.account.loginQeruy.GoodsGroups
+import cn.muchinfo.rma.global.database.DataBase
+import cn.muchinfo.rma.netManage.base.InteractiveException
+import cn.muchinfo.rma.protobuf.protoclasses.WarehouseTradeMI1
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.base.BaseViewModel
+import cn.muchinfo.rma.view.base.main.castsurely.JsonBean
+import com.blankj.utilcode.util.LogUtils
+import kotlinx.coroutines.GlobalScope
+import kotlinx.coroutines.launch
+import mtp.polymer.com.autowidget.utils.TaskUiModel
+
+/**
+ * 现货仓单-挂单
+ */
+class YrdzListedViewModel : BaseViewModel(){
+
+    /**
+     * 加载状态控制
+     */
+    val loadingDialogStatus: MutableLiveData<TaskUiModel> = MutableLiveData()
+
+
+    val firstSelectData : MutableLiveData<List<JsonBean>> = MutableLiveData()//商品组
+
+    val secondSelectData : MutableLiveData<List<List<String>>> = MutableLiveData()//商品
+
+    /**
+     * 交易页面的当前商品的盘面信息
+     */
+    val quoteDayData: MutableLiveData<QuoteDayData> = MutableLiveData()
+
+    /**
+     * 当前选择的资金账户
+     */
+    val usedAccountData : MutableLiveData<AccountData> = MutableLiveData()
+
+
+    //当前交易日信息
+    val marketRunData : MutableLiveData<MarketRunData> = MutableLiveData()
+
+
+    fun queryMarketRun(){
+        val params = mutableMapOf<String,String>().apply {
+            put("marketID",GlobalDataCollection.instance?.getMaketidByTrademode(16).toString())
+        }
+        MyApplication.getInstance()?.customerManage?.queryMarketRun(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                if (respData?.size ?: 0 > 0){
+                    marketRunData.postValue(respData?.get(0))
+                }
+            }
+        }
+    }
+
+    //重新赋值资金账户
+    fun resetAccountData(){
+        val accountDataList = GlobalDataCollection.instance?.accountDataList
+        if (accountDataList.isNullOrEmpty().not()) {
+            val accountData = GlobalDataCollection.instance?.accountData
+            accountData?.clearData()
+            accountData?.setNormalData()
+            usedAccountData.postValue(accountData)
+        }
+    }
+
+    /**
+     * 请求盘面信息
+     * @param first Int
+     * @param last Int
+     * @param callback Function2<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryQuoteDay(
+        tag: String,
+        goodsCodes: String,
+        isShowLoading: Boolean
+    ) {
+        if (isShowLoading) {
+            loadingDialogStatus.postValue(TaskUiModel.inFlight())
+        }
+
+        val params = mutableMapOf<String, String>().apply {
+            put("goodsCodes", goodsCodes)
+        }
+        MyApplication.getInstance()?.futureManager?.queryQuoteDay(params = params) { isSuccess, respData, error ->
+            if (isSuccess) {
+                if (respData?.isEmpty()?.not() == true) {
+                    quoteDayData.postValue(respData[0])
+                }
+                if (isShowLoading) {
+                    loadingDialogStatus.postValue(TaskUiModel.success(msg = "数据请求成功"))
+                }
+
+            } else {
+                if (isShowLoading) {
+                    loadingDialogStatus.postValue(
+                        TaskUiModel.failed(
+                            InteractiveException(
+                                errorMessage = "数据请求失败"
+                            )
+                        )
+                    )
+                }
+            }
+        }
+        addSubscriptQuote(tag = tag, goodsCodes = setOf(goodsCodes))
+    }
+
+
+    /**
+     * 订阅行情
+     * @param tag String
+     * @param goodsInfoList List<GoodsInfo>
+     */
+    fun addSubscriptQuote(tag: String, goodsCodes: Set<String>) {
+        GlobalScope.launch {
+            MyApplication.getInstance()?.quoteManager?.addSubscriptQuote(
+                tag = tag, goodsCodeSet = goodsCodes
+            ) { isCompleted, err ->
+                LogUtils.eTag("订阅行情", goodsCodes)
+            }
+        }
+    }
+
+    /**
+     * 取消订阅
+     * @param tag String
+     */
+    fun removeSubscriptQuote(tag: String) {
+        GlobalScope.launch {
+            MyApplication.getInstance()?.quoteManager?.removeSubscriptQuote(
+                tag = tag
+            )
+        }
+    }
+
+    //初始化选择商品的数据
+    fun initSelectGoodsInfo(){
+        val selectGoodsGroupsList = arrayListOf<JsonBean>()//最终组装的商品选择列表
+        val selectGoodsName = arrayListOf<List<String>>()//每个商品组对应的商品名称
+        val marketData = GlobalDataCollection.instance?.loginQueryData?.market?.find { it.trademode == 99 }//找出trademode 为99的市场
+        val goodsGroupList = arrayListOf<GoodsGroups>()
+        GlobalDataCollection.instance?.loginQueryData?.goodsgroups?.forEach {
+            if (it.marketid == marketData?.marketid){
+                goodsGroupList.add(it)
+            }
+        }
+
+        val goodsInfoList = DataBase.getInstance().goodsInfoDao().all
+        goodsGroupList.forEach {data ->
+            val jsonBean = JsonBean()//每个商品组的组合
+            val goodsList  = arrayListOf<JsonBean.CityBean>()//商品组对应的商品列表
+            val selectGoodsCode = arrayListOf<String>()
+            jsonBean.autoId = data.goodsgroupid.toString()
+            jsonBean.name = data.goodsgroupname
+            goodsInfoList?.forEach {
+                if (it?.goodsgroupid == data.goodsgroupid && it.goodsstatus == 3){
+                    val jsonSonBean = JsonBean.CityBean()
+                    jsonSonBean.autoId = it.goodsid.toString()
+                    jsonSonBean.name = it.goodsname
+                    jsonSonBean.code = it.goodscode
+                    goodsList.add(jsonSonBean)
+                    selectGoodsCode.add(it.goodsname ?: "")
+                }
+            }
+            selectGoodsName.add(selectGoodsCode)
+            jsonBean.cityList = goodsList
+            selectGoodsGroupsList.add(jsonBean)
+        }
+
+        firstSelectData.postValue(selectGoodsGroupsList)
+        secondSelectData.postValue(selectGoodsName)
+    }
+
+    /**
+     * 持仓挂牌
+     * @param LadingBillId Long
+     * @param TradeDate String
+     * @param SubNum Long
+     * @param WRFactorTypeId Long
+     * @param UserID Int
+     * @param AccountID Long
+     * @param IsSpecified Int
+     * @param MatchAccIDs List<Long>
+     * @param OrderQty Long
+     * @param DeliveryGoodsID Int
+     * @param WRPriceType Int
+     * @param FixedPrice Double
+     * @param WRTradeGoods WRGoodsInfo
+     * @param PriceFactor Double
+     * @param PriceMove Double
+     * @param TimevalidType Int
+     * @param FirstRatio Double
+     * @param PerformanceTemplateID Long
+     * @param BuyOrSell Int
+     * @param PriceDisplayMode Int
+     * @param CanBargain Int
+     * @param Attachment1 String
+     * @param Attachment2 String
+     * @param Remark String
+     * @param ApplyID Long
+     * @param CanPart Int
+     * @param HasWr Int
+     * @param WRStandardID Int
+     * @param isSuccess Function1<[@kotlin.ParameterName] Boolean, Unit>
+     */
+    fun requeryWRListingOrderReq(
+        ValidTime : String = "",//有效期限
+        LadingBillId: Long = 0,//提单id(wrholdlb的LadingBillId字段),卖的时候填写
+        TradeDate: String = "",//交易日
+        SubNum: Long = 0,// 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+        WRFactorTypeId: Long = 0,//仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+        UserID: Int = 0,//用户ID
+        AccountID: Long = 0,//资金账号
+        IsSpecified: Int = 0,//是否指定对手 0 不指定 1 指定
+        OrderQty: Long = 0,//委托数量(可挂部分数据量)
+        DeliveryGoodsID: Int = 0,//交割商品商品ID
+        WRPriceType: Int = 0,//价格方式
+        FixedPrice: Double = 0.0,//固定价格
+        WRTradeGoods: WarehouseTradeMI1.WRGoodsInfo,//仓单贸易商品配置集合(浮动价时填写)
+        PriceFactor: Double = 0.0,//价格系数(浮动价时填写)    -   [挂牌]
+        PriceMove: Double = 0.0,//升贴水(浮动价时填写)
+        TimevalidType: Int = 0,//时间有效类型
+        FirstRatio: Double = 0.0,//首付比例
+        PerformanceTemplateID: Long = 0,//履约计划模板ID
+        BuyOrSell: Int = 0,// 买卖方向
+        PriceDisplayMode: Int = 0,//浮动价显示方式
+        CanBargain: Int = 0,//挂牌是否可议价0:不可1:可-摘牌是否议价
+        Attachment1: String = "",//附件1
+        Attachment2: String = "",//附件2
+        Remark: String = "",//备注
+        ApplyID: Long = 0,//申请ID
+        CanPart: Int = 0,//是否允许部份摘牌0:不允许;1:允许
+        MatchAccIDsString : List<String> = arrayListOf(),//仓单贸易对手用户ID集合(指定对手时填写)
+        DeliveryMonth : String = "",//交收月
+        HasWr: Int = 0,//是否有仓单-0:没有仓单 1:有仓单
+        DelistMinQty : Long = 0,//起摘数量
+        WRStandardID: Int = 0,//现货品种ID
+        MarginFlag : Int = 0,//挂牌是否指定保证金 0:否 1:是
+        MarginAlgorithm : Int = 0,//指定保证金方式 1:比率 2:固定
+        MarginValue : Double = 0.0,//指定保证金设置值
+        AllFriendsFlag : Int = 0,//是否全好友可见 0:否 1:是
+        FactoryItems : List<WarehouseTradeMI1.DGFactoryItems>,//要素类型明细集合(没有仓单要素ID填写)
+        isSuccess: (isCompleted: Boolean) -> Unit
+    ){
+        loadingDialogStatus.value = TaskUiModel.inFlight()
+        GlobalScope.launch {
+            MyApplication.getInstance()?.warehouseManager?.HdWROrderReq(
+                ValidTime = ValidTime,
+                MarginFlag = MarginFlag,
+                MarginAlgorithm = MarginAlgorithm,
+                MarginValue = MarginValue,
+                AllFriendsFlag = AllFriendsFlag,
+                LadingBillId = LadingBillId,
+                TradeDate = TradeDate,
+                AccountID = AccountID,
+                OrderQty = OrderQty,
+                IsSpecified = IsSpecified,
+                SubNum = SubNum,
+                DeliveryMonth = DeliveryMonth,
+                DeliveryGoodsID = DeliveryGoodsID,
+                WRFactorTypeId = WRFactorTypeId,
+                UserID = UserID,
+                MatchAccIDsString = MatchAccIDsString,
+                WRPriceType = WRPriceType,
+                FixedPrice = FixedPrice,
+                WRTradeGoods = WRTradeGoods,
+                PriceFactor = PriceFactor,
+                PriceMove = PriceMove,
+                DelistMinQty = DelistMinQty,
+                TimevalidType = TimevalidType,
+                FirstRatio = FirstRatio,
+                PerformanceTemplateID = PerformanceTemplateID,
+                BuyOrSell = BuyOrSell,
+                CanPart = CanPart,
+                HasWr = HasWr,
+                WRStandardID = WRStandardID,
+                PriceDisplayMode = PriceDisplayMode,
+                CanBargain = CanBargain,
+                Attachment1 = Attachment1,
+                Attachment2 = Attachment2,
+                Remark = Remark,
+                ApplyID = ApplyID,
+                FactoryItems = FactoryItems
+            ) { isCompleted, err ->
+                if (isCompleted) {
+                    loadingDialogStatus.postValue(TaskUiModel.success(msg = "请求成功"))
+                    isSuccess(true)
+                } else {
+                    loadingDialogStatus.postValue(
+                        TaskUiModel.failed(
+                            InteractiveException(
+                                errorMessage = err?.message!!
+                            )
+                        )
+                    )
+                }
+            }
+        }
+    }
+
+}

+ 279 - 0
RMA/app/src/main/res/layout/activity_tjmd_chart.xml

@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/roots_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <!-- 图表标题 -->
+    <RelativeLayout
+        android:id="@+id/title_lay"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/main_title_bg_color"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        >
+
+        <ImageView
+            android:id="@+id/back_img"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@mipmap/back"
+            android:layout_centerVertical="true"
+            android:layout_marginStart="15dp"
+            android:contentDescription="back_btn" />
+
+        <RelativeLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:padding="5dp"
+            android:layout_centerInParent="true">
+
+            <!-- goods name -->
+            <TextView
+                android:id="@+id/goods_name_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text = "商品名称"
+                android:layout_centerHorizontal="true"
+                android:textColor="@color/white"
+                />
+
+            <!-- goods code -->
+            <TextView
+                android:id="@+id/goods_code_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/goods_name_tv"
+                android:text="cu2013"
+                android:textColor="@color/white"
+                />
+
+            <!-- goods tag -->
+            <TextView
+                android:id="@+id/tag_type_tv"
+                android:visibility="gone"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/goods_name_tv"
+                android:layout_toEndOf="@+id/goods_code_tv"
+                android:text="主"
+                android:textColor="@color/white"
+                android:background="@color/rma_yellow_text_color"
+                android:layout_marginStart="3dp"
+                android:layout_marginRight="3dp"
+                />
+
+            <!-- market tag -->
+            <TextView
+                android:id="@+id/tag_market_tag"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/goods_name_tv"
+                android:layout_toEndOf="@+id/tag_type_tv"
+                android:text="上期所"
+                android:textColor="@color/white"
+                android:background="@color/teal_200"
+                android:layout_marginStart="3dp"
+                android:layout_marginRight="3dp"
+                />
+
+        </RelativeLayout>
+
+        <ImageView
+            android:id="@+id/add_img"
+            android:layout_width="25dp"
+            android:layout_height="25dp"
+            android:layout_alignParentEnd="true"
+            android:layout_centerVertical="true"
+            android:src="@mipmap/hnst_add_icon"
+            android:layout_marginEnd="60dp"
+            />
+
+        <ImageView
+            android:id="@+id/details_img"
+            android:layout_width="25dp"
+            android:layout_height="25dp"
+            android:layout_alignParentEnd="true"
+            android:layout_centerVertical="true"
+            android:src="@mipmap/business_two"
+            android:layout_marginEnd="15dp"
+            />
+
+    </RelativeLayout>
+
+    <!-- 图表属性 -->
+    <include
+        android:id="@+id/chart_info_lay"
+        layout="@layout/chart_info_layout_tjmd"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/title_lay"
+        app:layout_constraintTop_toBottomOf="@+id/title_lay"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        />
+
+    <com.google.android.material.tabs.TabLayout
+        android:layout_below="@+id/chart_info_lay"
+        android:id="@+id/mtp_chart_head"
+        android:layout_width="match_parent"
+        android:layout_height="30dp"
+        app:tabMode="scrollable"
+        app:tabGravity="center"
+        app:tabIndicatorColor="@color/rma_item_yellow_color"
+        app:tabSelectedTextColor="@color/rma_item_yellow_color"
+        app:tabTextColor="@color/__picker_black_40"
+        app:tabBackground="@android:color/transparent"
+        app:tabRippleColor="@android:color/transparent"
+        app:layout_constraintTop_toBottomOf="@+id/chart_info_lay"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        />
+
+    <RelativeLayout
+        android:layout_below="@+id/mtp_chart_head"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:id="@+id/chart_lay"
+        app:layout_constraintTop_toBottomOf="@+id/mtp_chart_head"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintBottom_toTopOf="@+id/bottom_lay"
+        >
+
+        <TextView
+            android:id="@+id/chart_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:paddingBottom="2dip"
+            android:paddingLeft="10dip"
+            android:paddingRight="15dip"
+            android:paddingTop="2dip" />
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_below="@+id/chart_title"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <RelativeLayout
+                android:layout_width="0dp"
+                android:layout_weight="4"
+                android:layout_height="match_parent">
+                <cn.muchinfo.rma.view.base.chart.old.timeCharts.TimeChartView
+                    android:id="@+id/time_chart_view"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    />
+
+                <cn.muchinfo.rma.view.base.chart.old.timeCharts.KChartView
+                    android:id="@+id/k_chart_view"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:visibility="invisible" />
+
+                <ProgressBar
+                    android:id="@+id/progress_view"
+                    android:layout_width="50dp"
+                    android:layout_height="50dp"
+                    android:layout_centerInParent="true"
+                    />
+            </RelativeLayout>
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="0dp"
+                android:layout_weight="2"
+                android:layout_height="match_parent">
+                <com.qmuiteam.qmui.widget.tab.QMUITabSegment
+                    android:layout_width="match_parent"
+                    android:layout_height="40dp"
+                    android:id="@+id/id_future_tab"
+                    app:tabMode="fixed"/>
+
+                <androidx.viewpager.widget.ViewPager
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:id="@+id/id_market_pager" />
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+
+    </RelativeLayout>
+
+    <LinearLayout
+        android:visibility="gone"
+        android:id="@+id/bottom_lay"
+        android:layout_width="match_parent"
+        android:layout_height="60dp"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/chart_lay"
+        >
+
+        <RelativeLayout
+            android:layout_weight="1"
+            android:layout_height="match_parent"
+            android:layout_width="wrap_content"
+            android:gravity="center_horizontal"
+            android:padding="5dp"
+            >
+            <ImageView
+                android:id="@+id/self_choice_img"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@mipmap/chart_buy_icon"
+                android:layout_centerHorizontal="true"
+                />
+
+            <TextView
+                android:layout_below="@+id/self_choice_img"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true"
+                android:textSize="@dimen/textsize_18sp"
+                android:text="自选"
+                />
+
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:id="@+id/trade_rly"
+            android:layout_height="match_parent"
+            android:layout_width="wrap_content"
+            android:layout_weight="1"
+            android:padding="5dp"
+            >
+            <ImageView
+                android:id="@+id/trade_img"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@mipmap/chart_buy_icon"
+                android:layout_centerHorizontal="true"
+                />
+
+            <TextView
+                android:layout_below="@+id/trade_img"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="交易"
+                android:textSize="@dimen/textsize_18sp"
+                android:layout_centerHorizontal="true"
+                />
+
+        </RelativeLayout>
+
+
+    </LinearLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 449 - 0
RMA/app/src/main/res/layout/chart_info_layout_tjmd.xml

@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:padding="10dp"
+    android:orientation="horizontal">
+
+    <!-- 第一行 -->
+    <LinearLayout
+        android:id="@+id/first_lay"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginEnd="10dp"
+        android:orientation="vertical">
+
+        <!-- 现价 -->
+        <RelativeLayout
+            android:id="@+id/now_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/now_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="--" />
+
+            <TextView
+                android:id="@+id/now_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 涨跌 涨幅 -->
+        <RelativeLayout
+            android:id="@+id/up_down"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/up_down_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="--" />
+
+            <TextView
+                android:id="@+id/up_down_present"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 成交量 -->
+        <RelativeLayout
+            android:id="@+id/business_value"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/business_value_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textSize="12sp"
+                android:textColor="@color/rma_black_33"
+                android:text="成交量" />
+
+            <TextView
+                android:id="@+id/business_value_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 持仓量 -->
+        <RelativeLayout
+            android:id="@+id/holder_amount"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/holder_amount_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:textColor="@color/rma_black_33"
+                android:layout_alignParentStart="true"
+                android:text="持仓量" />
+
+            <TextView
+                android:id="@+id/holder_amount_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 作结 -->
+        <RelativeLayout
+            android:id="@+id/daily_settlement"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/daily_settlement_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:textColor="@color/rma_black_33"
+                android:layout_alignParentStart="true"
+                android:text="昨&#8195;结" />
+
+            <TextView
+                android:id="@+id/daily_settlement_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 昨收 -->
+        <RelativeLayout
+            android:id="@+id/daily_close"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/daily_close_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:textColor="@color/rma_black_33"
+                android:layout_alignParentStart="true"
+                android:text="昨&#8195;收" />
+
+            <TextView
+                android:id="@+id/daily_close_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+    </LinearLayout>
+
+    <!-- 第二行 -->
+    <LinearLayout
+        android:id="@+id/second_lay"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="10dp"
+        android:layout_weight="1"
+        android:orientation="vertical">
+
+        <!-- 卖价 -->
+        <RelativeLayout
+            android:id="@+id/sell_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/sell_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:textColor="@color/rma_black_33"
+                android:layout_alignParentStart="true"
+                android:text="卖&#8195;价" />
+
+            <TextView
+                android:id="@+id/sell_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 买价 -->
+        <RelativeLayout
+            android:id="@+id/buy_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/buy_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textSize="12sp"
+                android:textColor="@color/rma_black_33"
+                android:text="买&#8195;价" />
+
+            <TextView
+                android:id="@+id/buy_price_present"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 最高 -->
+        <RelativeLayout
+            android:id="@+id/highest_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/highest_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp"
+                android:text="最&#8195;高" />
+
+            <TextView
+                android:id="@+id/highest_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 最低 -->
+        <RelativeLayout
+            android:id="@+id/lowest_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/lowest_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp"
+                android:text="最&#8195;低" />
+
+            <TextView
+                android:id="@+id/lowest_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 涨停 -->
+        <RelativeLayout
+            android:id="@+id/trading_limit"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:visibility="invisible">
+
+            <TextView
+                android:id="@+id/trading_limit_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp"
+                android:text="涨&#8195;停" />
+
+            <TextView
+                android:id="@+id/trading_limit_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 跌停 -->
+        <RelativeLayout
+            android:id="@+id/drop_limit"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:visibility="invisible">
+
+            <TextView
+                android:id="@+id/drop_limit_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:text="跌&#8195;停" />
+
+            <TextView
+                android:id="@+id/drop_limit_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+    </LinearLayout>
+
+    <!-- 第三行 -->
+    <LinearLayout
+        android:id="@+id/third_lay"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginStart="10dp"
+        android:orientation="vertical">
+
+        <!-- 开盘 -->
+        <RelativeLayout
+            android:id="@+id/opening_quotation"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/opening_quotation_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp"
+                android:text="开&#8195;盘" />
+
+            <TextView
+                android:id="@+id/opening_quotation_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 均价 -->
+        <RelativeLayout
+            android:id="@+id/average_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/laverage_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp"
+                android:text="均&#8195;价" />
+
+            <TextView
+                android:id="@+id/average_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 交收 -->
+        <RelativeLayout
+            android:id="@+id/settlement_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/settlement_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="结&#8195;算"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp" />
+
+            <TextView
+                android:id="@+id/settlement_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+        </RelativeLayout>
+
+        <!-- 卖量 -->
+        <RelativeLayout
+            android:id="@+id/sell_amount"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:visibility="invisible" >
+
+            <TextView
+                android:id="@+id/sell_amount_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:text="卖&#8195;量" />
+
+            <TextView
+                android:id="@+id/sell_amount_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:text="--" />
+
+        </RelativeLayout>
+
+        <!-- 买量 -->
+        <RelativeLayout
+            android:id="@+id/buy_amount"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:visibility="invisible" >
+
+            <TextView
+                android:id="@+id/buy_amount_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:textColor="@color/rma_black_33"
+                android:textSize="12sp"
+                android:text="买&#8195;量" />
+
+            <TextView
+                android:id="@+id/buy_amount_present"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="--" />
+
+        </RelativeLayout>
+    </LinearLayout>
+</LinearLayout>

+ 18 - 0
RMA/app/yrdz/release/output-metadata.json

@@ -0,0 +1,18 @@
+{
+  "version": 2,
+  "artifactType": {
+    "type": "APK",
+    "kind": "Directory"
+  },
+  "applicationId": "cn.muchinfo.yrdz",
+  "variantName": "processYrdzReleaseResources",
+  "elements": [
+    {
+      "type": "SINGLE",
+      "filters": [],
+      "versionCode": 50042,
+      "versionName": "5.0.42",
+      "outputFile": "yrdzRelease-v5.0.42.apk"
+    }
+  ]
+}