Handy_Cao 1 vuosi sitten
vanhempi
commit
194ec29fdf

+ 6 - 1
src/packages/pc/views/footer/presell/transferposition/giveup/index.vue

@@ -29,7 +29,7 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, PropType, computed } from 'vue'
+import { ref, PropType, computed, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { handleNumberValue } from '@/filters'
 import { useDeposiTransferOperate } from '@/business/trade'
@@ -84,4 +84,9 @@ const onConfirm = () => {
         }
     })
 }
+
+onMounted(() => {
+    /// 默认数量
+    formData.Qty = enableqty.value
+})
 </script>

+ 12 - 1
src/packages/pc/views/footer/presell/transferposition/index.vue

@@ -47,7 +47,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, defineAsyncComponent } from 'vue'
+import { shallowRef, defineAsyncComponent, onUnmounted } from 'vue'
 import { parsePercent, formatDecimal } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradePositionExs } from '@/services/api/transfer'
@@ -55,6 +55,7 @@ import { getPayStatusName, PayStatus } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
 import { useTableColumnsStore, i18n } from '@/stores'
+import eventBus from '@/services/bus'
 import AppTable from '@pc/components/base/table/index.vue'
 
 const componentMap = new Map<string, unknown>([
@@ -83,4 +84,14 @@ const showComponent = (componentName: string, row?: Model.MineTradePositionExsRs
 getTableColumns('transfer-position').then((res) => {
     tableColumns.value = res
 })
+
+// 接收委托回应通知
+const orderRspNotify = eventBus.$on('OrderRsp', () => {
+    run()
+})
+
+onUnmounted(() => {
+    orderRspNotify.cancel()
+})
+
 </script>

+ 3 - 1
src/packages/pc/views/market/trade/presell/transfer/listing/index.vue

@@ -105,7 +105,6 @@ const enableqty = computed(() => {
 
 // 价格类型
 const orderPriceType = computed(() => settingStore.getSettingValue('orderPriceType'))
-
 // 是否禁用价格输入
 const isDisabled = computed(() => [3, 4].includes(orderPriceType.value))
 
@@ -244,6 +243,9 @@ futuresStore.onDataCompleted(() => {
 })
 
 watch([selectedGoodsId, orderPriceType], () => {
+    /// 商品变了
+    onGoodsChange()
+    /// 
     formData.OrderPrice = getOrderPrice()
 })