|
@@ -29,6 +29,7 @@ import cn.muchinfo.rma.view.base.future.trade.itemView
|
|
|
import cn.muchinfo.rma.view.base.home.contract.emptyView
|
|
import cn.muchinfo.rma.view.base.home.contract.emptyView
|
|
|
import cn.muchinfo.rma.view.base.home.contract.verticalEmptyView
|
|
import cn.muchinfo.rma.view.base.home.contract.verticalEmptyView
|
|
|
import com.blankj.utilcode.util.ToastUtils
|
|
import com.blankj.utilcode.util.ToastUtils
|
|
|
|
|
+import com.desfate.chart.util.LogUtils
|
|
|
import com.desfate.chart.util.MathUtil
|
|
import com.desfate.chart.util.MathUtil
|
|
|
import kotlinx.android.synthetic.main.list_head.view.*
|
|
import kotlinx.android.synthetic.main.list_head.view.*
|
|
|
import mtp.polymer.com.autowidget.dialog.creatAccountDataSheetDialog
|
|
import mtp.polymer.com.autowidget.dialog.creatAccountDataSheetDialog
|
|
@@ -534,7 +535,17 @@ class SwapsDelistingActivity : BaseActivity<SwapsDelistingViewModel>(){
|
|
|
}else{
|
|
}else{
|
|
|
val numberInput = onePriceInputNumberEdittext.text.toString().toDouble()
|
|
val numberInput = onePriceInputNumberEdittext.text.toString().toDouble()
|
|
|
if (priceType.value == 1){//市价计算
|
|
if (priceType.value == 1){//市价计算
|
|
|
- text = NumberUtils.roundNum(viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit) ?: 0.0,2) + " 需履约保证金 :" + infoc?.getMargainValue(amout = viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit) ?: 0.0,number = numberInput ?: 0.0,goodsid = goodsId ?: "0")
|
|
|
|
|
|
|
+ val money = viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit)
|
|
|
|
|
+ if (money == null) {
|
|
|
|
|
+ LogUtils.e("aaaaa", viewModel.quoteDayData.value?.getPrice().toString())
|
|
|
|
|
+ LogUtils.e("aaaaa", numberInput.toString())
|
|
|
|
|
+
|
|
|
|
|
+ ToastUtils.showLong("初始化数据异常,请重试")
|
|
|
|
|
+ finish()
|
|
|
|
|
+
|
|
|
|
|
+ return@bindOptional
|
|
|
|
|
+ }
|
|
|
|
|
+ text = NumberUtils.roundNum(money ?: 0.0,2) + " 需履约保证金 :" + infoc?.getMargainValue(amout = viewModel.quoteDayData.value?.getPrice()?.times(numberInput)?.times(goodsInfo.agreeunit) ?: 0.0,number = numberInput ?: 0.0,goodsid = goodsId ?: "0")
|
|
|
}else{//限价计算
|
|
}else{//限价计算
|
|
|
if (limit_price_edittext.text.toString().isNullOrEmpty()){
|
|
if (limit_price_edittext.text.toString().isNullOrEmpty()){
|
|
|
text = "--"
|
|
text = "--"
|