Handy_Cao преди 2 години
родител
ревизия
e3340d6a33
променени са 1 файла, в които са добавени 3 реда и са изтрити 22 реда
  1. 3 22
      src/packages/pc/views/footer/goods/detail/components/transfer/index.vue

+ 3 - 22
src/packages/pc/views/footer/goods/detail/components/transfer/index.vue

@@ -23,14 +23,8 @@
             </el-form-item>
             <el-form-item prop="OrderQty" label="转让数量">
                 <div class="g-qty-group">
-                    <el-input-number placeholder="请输入数量" v-model="formData.OrderQty" :precision="0"
+                    <el-input-number placeholder="请输入数量" readonly v-model="formData.OrderQty" :precision="0"
                         :max="selectedRow.holderqty" :min="0" />
-                    <el-radio-group size="small" v-model="qtyStep" @change="onRadioChange">
-                        <el-radio v-for="(value, index) in qtyStepList" :key="index" :label="value" border
-                            style="width: 25%;">
-                            {{ parsePercent(value, 0) }}
-                        </el-radio>
-                    </el-radio-group>
                 </div>
             </el-form-item>
             <el-form-item prop="OrderPrice" label="转让价格">
@@ -49,7 +43,7 @@
 import { ref, PropType, computed, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useOrder } from '@/business/trade'
-import { formatDecimal, handlePriceColor, parsePercent } from '@/filters'
+import { formatDecimal, handlePriceColor } from '@/filters'
 import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
 import { useFuturesStore } from '@/stores'
 import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EPriceMode, EValidType } from '@/constants/client'
@@ -75,8 +69,6 @@ const { formSubmit, formData, loading } = useOrder()
 const show = ref(true)
 const refresh = ref(false)
 const formRef = ref<FormInstance>()
-const qtyStepList = [0.25, 0.5, 0.75, 1] // 数量步长列表
-const qtyStep = ref<number>() // 数量步长
 
 const formRules: FormRules = {
     OrderPrice: [{
@@ -85,12 +77,6 @@ const formRules: FormRules = {
             return !!formData.OrderPrice
         }
     }],
-    OrderQty: [{
-        message: '请输入转让数量',
-        validator: () => {
-            return !!formData.OrderQty
-        }
-    }],
 }
 
 const onCancel = (isRefresh = false) => {
@@ -101,7 +87,7 @@ const onCancel = (isRefresh = false) => {
 const onCloseSumit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {
-            const { marketid, goodsid, buyorsell, tradeid } = props.selectedRow
+            const { marketid, goodsid, buyorsell, tradeid, holderqty } = props.selectedRow
             /// 市场ID
             formData.Header = { GoodsID: goodsid }
             formData.MarketID = marketid
@@ -125,11 +111,6 @@ const onCloseSumit = () => {
     })
 }
 
-const onRadioChange = (value: number) => {
-    const { holderqty, freezeqty } = props.selectedRow
-    formData.OrderQty = Math.trunc((holderqty-freezeqty) * value) || 1
-}
-
 onMounted(() => {
     const { bid, ask, presettle = 0 } = quote.value ?? {}
     switch (props.selectedRow.buyorsell) {