Handy_Cao hace 1 año
padre
commit
b2e40e4121

+ 1 - 1
public/config/appconfig.json

@@ -4,7 +4,7 @@
   "appTitle": "多元世纪交易中心",
   "version": "1.0.8",
   "versionCode": "10008",
-  "apiUrl": "http://192.168.31.208:8080/cfg?key=test_208",
+  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
   "tradeChannel": "ws",
   "modules": [
     "register",

+ 16 - 32
src/packages/pc/views/footer/goods/position/components/transfer/index.vue

@@ -28,17 +28,19 @@
                     {{ formatDecimal(selectedRow.closepl, selectedRow.decimalplace) }}
                 </span>
             </el-form-item>
-            <el-form-item prop="PriceMode" :label="t('quote.pricing.pricemode')">
-                <el-radio-group v-model="formData.PriceMode">
-                    <el-radio v-for="(item, index) in getPricemode2List()" :key="index" :label="item.value">
-                        {{ item.label }}
-                    </el-radio>
-                </el-radio-group>
+            <el-form-item prop="OrderQty" :label="t('position.goods.qty')">
+                <div class="g-qty-group">
+                    <el-input-number :placeholder="t('position.goods.tips2')" v-model="formData.OrderQty" :precision="0"
+                        :max="selectedRow.enableqty" :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="MarketMaxSub" :label="t('quote.pricing.marketmaxsub')" v-if="formData.PriceMode === PriceMode.Market">
-                    <el-input-number ref="priceRef" :placeholder="t('common.pleaseenter')" :min="0" :max="999" v-model="formData.MarketMaxSub" integer/>
-                </el-form-item>
-            <el-form-item prop="OrderPrice" :label="t('position.goods.transferprice')" v-if="formData.PriceMode === PriceMode.Limit">
+            <el-form-item prop="OrderPrice" :label="t('position.goods.transferprice')">
                 <div class="el-form-item--col">
                     <el-input-number :placeholder="t('position.goods.tips1')" v-model="formData.OrderPrice" :step="quote?.decimalvalue"
                     :precision="quote?.decimalplace" />
@@ -54,18 +56,6 @@
                     </div>
                 </div>
             </el-form-item>
-            <el-form-item prop="OrderQty" :label="t('position.goods.qty')">
-                <div class="g-qty-group">
-                    <el-input-number :placeholder="t('position.goods.tips2')" v-model="formData.OrderQty" :precision="0"
-                        :max="selectedRow.enableqty" :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>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
@@ -75,13 +65,13 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, PropType, onMounted, computed } from 'vue'
+import { ref, PropType, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useOrder } from '@/business/trade'
 import { formatDecimal, parsePercent } from '@/filters'
-import { getBuyOrSellName, BuyOrSell, getPricemode2List, PriceMode } from '@/constants/order'
+import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
 import { useFuturesStore, i18n } from '@/stores'
-import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EValidType } from '@/constants/client'
+import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EPriceMode, EValidType } from '@/constants/client'
 import Icon from '@pc/components/base/icon/index.vue'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
@@ -125,19 +115,14 @@ const onCancel = (isRefresh = false) => {
     refresh.value = isRefresh
 }
 
-const marketPrice = computed(() => {
-    const { ask = 0, bid = 0 } = quote.value ?? {}
-    return formData.BuyOrSell === BuyOrSell.Buy ? ask : bid
-})
-
 const onCloseSumit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {
             const { marketid, goodsid, buyorsell } = props.selectedRow
             /// 市场ID
             formData.Header = { GoodsID: goodsid }
-            if (formData.PriceMode === PriceMode.Market) { formData.OrderPrice = marketPrice.value }
             formData.MarketID = marketid
+            formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
             formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
             formData.GoodsID = goodsid
             formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
@@ -172,7 +157,6 @@ onMounted(() => {
         default:
             formData.OrderPrice = last || presettle
     }
-    formData.PriceMode = PriceMode.Market
     formData.OrderQty = props.selectedRow.enableqty
 })
 </script>