li.shaoyi 2 rokov pred
rodič
commit
65689a397c
34 zmenil súbory, kde vykonal 362 pridanie a 210 odobranie
  1. 1 1
      .env.tjmd
  2. 1 1
      .env.tjmd@pc
  3. 22 21
      app/main.js
  4. 1 1
      app/package.json
  5. 7 0
      file/android/fxgl.txt
  6. BIN
      oem/tjmd/favicon.ico
  7. 23 0
      oem/zrwyt/config/router.json
  8. 23 23
      public/config/router.json
  9. 17 6
      src/packages/mobile/views/goods/detail/components/listing/Index.vue
  10. 31 12
      src/packages/mobile/views/mine/Index.vue
  11. 16 19
      src/packages/mobile/views/mine/index.less
  12. 53 34
      src/packages/pc/components/layouts/header/components/setting/index.vue
  13. 1 1
      src/packages/pc/views/account/address/components/default/index.vue
  14. 1 1
      src/packages/pc/views/account/address/components/delete/index.vue
  15. 1 1
      src/packages/pc/views/account/receipt/components/delete/index.vue
  16. 1 1
      src/packages/pc/views/account/sign/components/cancel/index.vue
  17. 1 1
      src/packages/pc/views/footer/goods/delivery/cancel/index.vue
  18. 23 3
      src/packages/pc/views/footer/goods/order/cancel/index.vue
  19. 47 0
      src/packages/pc/views/footer/inout/in/confirm/index.vue
  20. 34 50
      src/packages/pc/views/footer/inout/in/index.vue
  21. 4 3
      src/packages/pc/views/footer/inout/out/add/index.vue
  22. 2 3
      src/packages/pc/views/footer/inout/out/index.vue
  23. 1 1
      src/packages/pc/views/footer/presell/presellposition/deposit/index.vue
  24. 1 1
      src/packages/pc/views/footer/presell/transferorder/cancel/index.vue
  25. 1 1
      src/packages/pc/views/footer/presell/transferposition/append/index.vue
  26. 1 1
      src/packages/pc/views/footer/spot/order/cancel/index.vue
  27. 1 1
      src/packages/pc/views/footer/swap/order/cancel/index.vue
  28. 11 18
      src/packages/pc/views/market/trade/goods/list/listing/index.vue
  29. 1 1
      src/services/api/trade/index.ts
  30. 28 1
      src/stores/modules/account.ts
  31. 3 1
      src/stores/modules/setting.ts
  32. 2 0
      src/types/model/common.d.ts
  33. 1 1
      src/types/model/transfer.d.ts
  34. 1 1
      src/types/proto/trade.d.ts

+ 1 - 1
.env.tjmd

@@ -1,5 +1,5 @@
 VUE_APP_ENV = 'tjmd'
-VUE_APP_NAME = 天津麦顿
+VUE_APP_NAME = 海南掉期市场
 VUE_APP_ROOT = src/packages/tjmd/
 VUE_APP_OEM = oem/tjmd/
 VUE_APP_TRADE_CHANNEL = ws

+ 1 - 1
.env.tjmd@pc

@@ -1,5 +1,5 @@
 VUE_APP_ENV = 'pc'
-VUE_APP_NAME = 天津麦顿
+VUE_APP_NAME = 海南掉期市场
 VUE_APP_ROOT = src/packages/pc/
 VUE_APP_OEM = oem/tjmd/
 VUE_APP_TRADE_CHANNEL = ws

+ 22 - 21
app/main.js

@@ -10,7 +10,7 @@ const updateHandle = (win) => {
         const data = yaml.load(fileContents)
 
         if (data.url) {
-            autoUpdater.autoDownload = false
+            autoUpdater.autoDownload = true // 自动下载更新
             autoUpdater.autoInstallOnAppQuit = false
 
             autoUpdater.setFeedURL({
@@ -20,7 +20,7 @@ const updateHandle = (win) => {
 
             // 检查更新出错
             // autoUpdater.on('error', (err) => {
-            //     dialog.showMessageBox({
+            //     dialog.showMessageBox(win, {
             //         type: 'error',
             //         title: '错误',
             //         noLink: true,
@@ -30,20 +30,20 @@ const updateHandle = (win) => {
             // })
 
             // 检测到有版本更新
-            autoUpdater.on('update-available', (e) => {
-                dialog.showMessageBox({
-                    type: 'info',
-                    title: '提示',
-                    noLink: true,
-                    message: e.version,
-                    detail: '发现新版本,是否现在下载?',
-                    buttons: ['取消', '下载']
-                }).then((res) => {
-                    if (res.response === 1) {
-                        autoUpdater.downloadUpdate()
-                    }
-                })
-            })
+            // autoUpdater.on('update-available', (e) => {
+            //     dialog.showMessageBox(win, {
+            //         type: 'info',
+            //         title: '提示',
+            //         noLink: true,
+            //         message: e.version,
+            //         detail: '发现新版本,是否现在下载?',
+            //         buttons: ['下载', '取消']
+            //     }).then((res) => {
+            //         if (res.response === 1) {
+            //             autoUpdater.downloadUpdate()
+            //         }
+            //     })
+            // })
 
             // 更新下载进度事件
             autoUpdater.on('download-progress', (progress) => {
@@ -53,18 +53,19 @@ const updateHandle = (win) => {
 
             // 下载完成,询问用户是否更新
             autoUpdater.on('update-downloaded', (e) => {
-                dialog.showMessageBox({
+                dialog.showMessageBox(win, {
                     type: 'info',
                     title: '提示',
                     noLink: true,
                     message: e.version,
-                    detail: '已下载新版本,是否关闭应用更新?',
-                    buttons: ['取消', '安装']
+                    detail: '已下载新版本,是否立即安装?',
+                    buttons: ['安装', '退出']
                 }).then((res) => {
-                    if (res.response === 1) {
+                    win.setProgressBar(-1)
+                    if (res.response === 0) {
                         autoUpdater.quitAndInstall()
                     } else {
-                        win.setProgressBar(-1)
+                        app.quit()
                     }
                 })
             })

+ 1 - 1
app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "trading",
-  "version": "1.0.16",
+  "version": "1.0.5",
   "main": "main.js",
   "dependencies": {
     "electron-updater": "^6.1.4",

+ 7 - 0
file/android/fxgl.txt

@@ -58,7 +58,14 @@ http://47.104.103.190:8280/cfg?key=qdsp_sp
 cn.muchinfo.tc_release_v1.0.0.apk
 http://39.108.156.35:8280/cfg?key=tc_sp
 
+
 水贝亿爵
 实盘
 cn.muchinfo.sbyj_release_v1.0.0.apk
 http://112.74.182.230:8280/cfg?key=yjhj_sp
+
+
+天津麦顿
+实盘
+cn.muchinfo.tjmd_release_v1.0.0.apk
+http://47.104.141.54:8280/cfg?key=tjmd_sp

BIN
oem/tjmd/favicon.ico


+ 23 - 0
oem/zrwyt/config/router.json

@@ -179,6 +179,29 @@
             },
             {
                 "authType": 2,
+                "sort": 7,
+                "title": "持仓过户",
+                "code": "bottom_inout",
+                "component": "views/footer/index.vue",
+                "children": [
+                    {
+                        "authType": 2,
+                        "sort": 1,
+                        "title": "我的转入",
+                        "code": "bottom_inout_in",
+                        "component": "views/footer/inout/in/index.vue"
+                    },
+                    {
+                        "authType": 2,
+                        "sort": 2,
+                        "title": "我的转出",
+                        "code": "bottom_inout_out",
+                        "component": "views/footer/inout/out/index.vue"
+                    }
+                ]
+            },
+            {
+                "authType": 2,
                 "sort": 5,
                 "title": "资金信息",
                 "code": "bottom_capital",

+ 23 - 23
public/config/router.json

@@ -208,6 +208,29 @@
             },
             {
                 "authType": 2,
+                "sort": 7,
+                "title": "持仓过户",
+                "code": "bottom_inout",
+                "component": "views/footer/index.vue",
+                "children": [
+                    {
+                        "authType": 2,
+                        "sort": 1,
+                        "title": "我的转入",
+                        "code": "bottom_inout_in",
+                        "component": "views/footer/inout/in/index.vue"
+                    },
+                    {
+                        "authType": 2,
+                        "sort": 2,
+                        "title": "我的转出",
+                        "code": "bottom_inout_out",
+                        "component": "views/footer/inout/out/index.vue"
+                    }
+                ]
+            },
+            {
+                "authType": 2,
                 "sort": 6,
                 "title": "资金信息",
                 "code": "bottom_capital",
@@ -235,29 +258,6 @@
                         "component": "views/footer/capital/inoutapply/index.vue"
                     }
                 ]
-            },
-            {
-                "authType": 2,
-                "sort": 7,
-                "title": "持仓过户",
-                "code": "bottom_inout",
-                "component": "views/footer/index.vue",
-                "children": [
-                    {
-                        "authType": 2,
-                        "sort": 1,
-                        "title": "我的转入",
-                        "code": "bottom_inout_in",
-                        "component": "views/footer/inout/in/index.vue"
-                    },
-                    {
-                        "authType": 2,
-                        "sort": 2,
-                        "title": "我的转出",
-                        "code": "bottom_inout_out",
-                        "component": "views/footer/inout/out/index.vue"
-                    }
-                ]
             }
         ]
     },

+ 17 - 6
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -30,7 +30,12 @@
                     </Field>
                     <Field label="预估可订立量">
                         <template #input>
-                            <span>{{ enableQty }}</span>
+                            <span>{{ total.enableQty }}</span>
+                        </template>
+                    </Field>
+                    <Field label="预扣保证金">
+                        <template #input>
+                            <span>{{ total.deposit.toFixed(2) }}</span>
                         </template>
                     </Field>
                     <Field label="可用资金">
@@ -117,23 +122,29 @@ const priceStep = computed(() => {
     return 1
 })
 
-// 订立可用数量
-const enableQty = computed(() => {
+const total = computed(() => {
     const { avaiableMoney = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = quote.value ?? {}
 
+    const result = {
+        enableQty: 0,
+        deposit: 0
+    }
+
     const fixed = agreeunit * marketmarginvalue
     const ratio = fixed * (formData.OrderPrice ?? 0)
 
     if (fixed && ratio) {
         if (marketmarginalgorithm === 1) {
-            return Math.trunc(avaiableMoney / ratio) || 0
+            result.deposit = (formData.OrderQty ?? 0) * ratio || 0
+            result.enableQty = Math.trunc(avaiableMoney / ratio) || 0
         }
         if (marketmarginalgorithm === 2) {
-            return Math.trunc(avaiableMoney / fixed) || 0
+            result.deposit = (formData.OrderQty ?? 0) * fixed || 0
+            result.enableQty = Math.trunc(avaiableMoney / fixed) || 0
         }
     }
-    return 0
+    return result
 })
 
 // 买方向持仓数量

+ 31 - 12
src/packages/mobile/views/mine/Index.vue

@@ -26,18 +26,36 @@
                     </div>
                 </div>
                 <div class="bank">
-                    <div class="bank-item">
-                        <span>余额</span>
-                        <span>{{ currentAccount.currentbalance?.toFixed(2) ?? '0.00' }}</span>
-                    </div>
-                    <div class="bank-item">
-                        <span>冻结</span>
-                        <span>{{ currentAccount.freezeMargin?.toFixed(2) }}</span>
-                    </div>
-                    <div class="bank-item">
-                        <span>可用</span>
-                        <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
-                    </div>
+                    <ul>
+                        <li>
+                            <span>余额</span>
+                            <span>{{ currentAccount.currentbalance?.toFixed(2) }}</span>
+                        </li>
+                        <li>
+                            <span>净值</span>
+                            <span>{{ currentAccount.netvalue?.toFixed(2) }}</span>
+                        </li>
+                    </ul>
+                    <ul>
+                        <li>
+                            <span>预扣</span>
+                            <span>{{ currentAccount.freezeMargin?.toFixed(2) }}</span>
+                        </li>
+                        <li>
+                            <span>占用</span>
+                            <span>{{ currentAccount.usedmargin?.toFixed(2) }}</span>
+                        </li>
+                    </ul>
+                    <ul>
+                        <li>
+                            <span>可用</span>
+                            <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
+                        </li>
+                        <li>
+                            <span>风险率</span>
+                            <span>{{ parsePercent(currentAccount.hazardRatio) }}</span>
+                        </li>
+                    </ul>
                 </div>
                 <div class="button">
                     <Button type="danger" size="small" round @click="doInOutMoney('0')">入金</Button>
@@ -120,6 +138,7 @@
 import { shallowRef, onMounted, onActivated, computed } from 'vue'
 import { Cell, CellGroup, Button, Icon } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
+import { parsePercent } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { AuthStatus } from '@/constants/account'
 import { queryBankAccountSign } from '@/services/api/bank'

+ 16 - 19
src/packages/mobile/views/mine/index.less

@@ -63,7 +63,6 @@
 
                     .bottom {
                         line-height: .4rem;
-                        font-size: .3rem;
                         font-weight: bold;
                     }
                 }
@@ -89,7 +88,6 @@
                     }
 
                     &:last-child {
-                        font-size: .3rem;
                         font-weight: bold;
                     }
                 }
@@ -99,29 +97,28 @@
         .bank {
             display: flex;
             justify-content: space-around;
-            padding: .48rem 0;
+            padding: .36rem 0;
 
-            &-item {
-                display: flex;
-                flex-direction: column;
+            ul {
+                li {
+                    display: flex;
+                    flex-direction: column;
+                    padding-bottom: .1rem;
 
-                span {
-                    line-height: .4rem;
+                    span {
+                        line-height: .4rem;
 
-                    &:first-child {
-                        font-size: .24rem;
-                        color: #A1B1C5;
-                    }
+                        &:first-child {
+                            font-size: .24rem;
+                            color: #A1B1C5;
+                        }
 
-                    &:last-child {
-                        font-size: .3rem;
-                        font-weight: bold;
+                        &:last-child {
+                            font-size: .3rem;
+                            font-weight: bold;
+                        }
                     }
                 }
-
-                a {
-                    color: #00577C;
-                }
             }
         }
 

+ 53 - 34
src/packages/pc/components/layouts/header/components/setting/index.vue

@@ -1,40 +1,58 @@
 <!-- 快捷设置 -->
 <template>
     <app-drawer title="快捷设置" width="800" v-model:show="show">
-        <el-form ref="formRef" class="el-form--horizontal" label-width="140px" :model="formData">
-            <el-form-item prop="orderFocusType" label="下单价格类型">
-                <el-select placeholder="请选择" v-model="formData.orderPriceType">
-                    <el-option label="现价" :value="1" />
-                    <el-option label="对手价" :value="2" />
-                    <el-option label="实时现价" :value="3" />
-                    <el-option label="实时对手价" :value="4" />
-                </el-select>
-            </el-form-item>
-            <!-- <el-form-item label="单笔最大下单量">
-                <el-input-number placeholder="请输入" v-model="formData.orderMaxQty" :min="1" :max="1000000" />
-            </el-form-item> -->
-            <el-form-item prop="orderFocusType" label="下单后默认焦点">
-                <el-select placeholder="请选择" v-model="formData.orderFocusType">
-                    <el-option label="价格" :value="1" />
-                    <el-option label="数量" :value="2" />
-                </el-select>
-            </el-form-item>
-            <el-form-item prop="showOrderDialog" label="下单确认提示框">
-                <el-switch v-model="formData.showOrderDialog" />
-            </el-form-item>
-            <el-form-item prop="orderQtyIsEmpty" label="下单后清空数量">
-                <el-switch v-model="formData.orderQtyIsEmpty" />
-            </el-form-item>
-            <el-form-item prop="showOrderSuccessMessage" label="下单成功消息">
-                <el-switch v-model="formData.showOrderSuccessMessage" />
-            </el-form-item>
-            <el-form-item prop="showOrderEnableQty" label="显示预估订立量">
-                <el-switch v-model="formData.showOrderEnableQty" />
-            </el-form-item>
-            <el-form-item prop="showOrderFailMessage" label="下单失败消息">
-                <el-switch v-model="formData.showOrderFailMessage" />
-            </el-form-item>
-        </el-form>
+        <fieldset class="g-fieldset">
+            <legend class="g-fieldset__legend">下单设置</legend>
+            <el-form ref="formRef" class="el-form--horizontal" label-width="140px" :model="formData">
+                <el-form-item prop="orderBuyOrSell" label="默认买卖方向">
+                    <el-select placeholder="请选择" v-model="formData.orderBuyOrSell">
+                        <template v-for="(item, index) in getBuyOrSellList()" :key="index">
+                            <el-option :label="item.label" :value="item.value" />
+                        </template>
+                    </el-select>
+                </el-form-item>
+                <!-- <el-form-item label="单笔最大下单量">
+                    <el-input-number placeholder="请输入" v-model="formData.orderMaxQty" :min="1" :max="1000000" />
+                </el-form-item> -->
+                <el-form-item prop="orderQtyIsEmpty" label="下单后清空数量">
+                    <el-switch v-model="formData.orderQtyIsEmpty" />
+                </el-form-item>
+                <el-form-item prop="orderFocusType" label="下单价格类型">
+                    <el-select placeholder="请选择" v-model="formData.orderPriceType">
+                        <el-option label="现价" :value="1" />
+                        <el-option label="对手价" :value="2" />
+                        <el-option label="实时现价" :value="3" />
+                        <el-option label="实时对手价" :value="4" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item prop="showOrderEnableQty" label="显示预估订立量">
+                    <el-switch v-model="formData.showOrderEnableQty" />
+                </el-form-item>
+                <el-form-item prop="orderFocusType" label="下单后默认焦点">
+                    <el-select placeholder="请选择" v-model="formData.orderFocusType">
+                        <el-option label="价格" :value="1" />
+                        <el-option label="数量" :value="2" />
+                    </el-select>
+                </el-form-item>
+            </el-form>
+        </fieldset>
+        <fieldset class="g-fieldset">
+            <legend class="g-fieldset__legend">提示设置</legend>
+            <el-form ref="formRef" class="el-form--horizontal" label-width="140px" :model="formData">
+                <el-form-item prop="showOrderDialog" label="下单确认提示框">
+                    <el-switch v-model="formData.showOrderDialog" />
+                </el-form-item>
+                <el-form-item prop="showOrderSuccessMessage" label="下单成功消息">
+                    <el-switch v-model="formData.showOrderSuccessMessage" />
+                </el-form-item>
+                <el-form-item prop="showOrderCancelDialog" label="撤单确认提示框">
+                    <el-switch v-model="formData.showOrderCancelDialog" />
+                </el-form-item>
+                <el-form-item prop="showOrderFailMessage" label="下单失败消息">
+                    <el-switch v-model="formData.showOrderFailMessage" />
+                </el-form-item>
+            </el-form>
+        </fieldset>
         <template #footer>
             <el-button type="info" @click="resetSettings">恢复默认</el-button>
             <el-button type="primary" @click="updateSettings">保存设置</el-button>
@@ -45,6 +63,7 @@
 <script lang="ts" setup>
 import { ref } from 'vue'
 import { ElMessageBox, FormInstance } from 'element-plus'
+import { getBuyOrSellList } from '@/constants/order'
 import { useSettingStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 

+ 1 - 1
src/packages/pc/views/account/address/components/default/index.vue

@@ -1,7 +1,7 @@
 <!-- 账户管理-收货地址管理-设为默认 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div style="font-size:16px;text-align:center">该地址是否设为默认?</div>
+        <div class="g-text-message">该地址是否设为默认?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>

+ 1 - 1
src/packages/pc/views/account/address/components/delete/index.vue

@@ -1,7 +1,7 @@
 <!-- 账户管理-收货地址管理-删除 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div style="font-size:16px;text-align:center">是否删除该地址?</div>
+        <div class="g-text-message">是否删除该地址?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>

+ 1 - 1
src/packages/pc/views/account/receipt/components/delete/index.vue

@@ -1,7 +1,7 @@
 <!-- 账户管理-发票信息管理-删除 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div style="font-size:16px;text-align:center">是否删除该发票?</div>
+        <div class="g-text-message">是否删除该发票?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>

+ 1 - 1
src/packages/pc/views/account/sign/components/cancel/index.vue

@@ -1,7 +1,7 @@
 <!-- 账户管理-签约账号管理-解约 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div>确认要解约吗?</div>
+        <div class="g-text-message">确认要解约吗?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>

+ 1 - 1
src/packages/pc/views/footer/goods/delivery/cancel/index.vue

@@ -1,7 +1,7 @@
 <!-- 商品订单-线下交收-撤销 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div>是否撤销该交收单?</div>
+        <div class="g-text-message">是否撤销该交收单?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>

+ 23 - 3
src/packages/pc/views/footer/goods/order/cancel/index.vue

@@ -1,6 +1,6 @@
 <!-- 商品订单-委托-撤销 -->
 <template>
-    <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
+    <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh" :style="styles">
         <div class="g-text-message">确认要撤销吗?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
@@ -10,10 +10,11 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, PropType } from 'vue'
-import { ElMessage } from 'element-plus'
+import { ref, PropType, onMounted } from 'vue'
+import { ElMessage, ElLoading } from 'element-plus'
 import { handleRequestBigNumber } from '@/filters'
 import { useCancelOrder } from '@/business/trade'
+import { useSettingStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({
@@ -23,6 +24,12 @@ const props = defineProps({
     }
 })
 
+const settingStore = useSettingStore()
+const showOrderCancelDialog = settingStore.getSettingValue('showOrderCancelDialog')
+const styles = {
+    opacity: showOrderCancelDialog ? 1 : 0
+}
+
 const { cancelSubmit, formData } = useCancelOrder()
 const loading = ref(false)
 const show = ref(true)
@@ -54,4 +61,17 @@ const onCancelSumit = async () => {
     }
     onCancel(true)
 }
+
+onMounted(() => {
+    // 不显示确认框
+    if (!showOrderCancelDialog) {
+        const loading = ElLoading.service({
+            lock: true,
+            background: 'rgba(0, 0, 0, .25)',
+        })
+        onCancelSumit().finally(() => {
+            loading.close()
+        })
+    }
+})
 </script>

+ 47 - 0
src/packages/pc/views/footer/inout/in/confirm/index.vue

@@ -0,0 +1,47 @@
+<!-- 持仓过户-我的转入-确认 -->
+<template>
+    <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
+        <div class="g-text-message">是否确认接收此转入请求?</div>
+        <template #footer>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
+            <el-button type="primary" @click="onSubmit">确认</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { handleRequestBigNumber } from '@/filters'
+import { holderTransferConfirm } from '@/services/api/trade'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.InTradePositionTransferRsp>,
+        required: true
+    }
+})
+
+const loading = shallowRef(false)
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    holderTransferConfirm({
+        data: {
+            ApplyID: handleRequestBigNumber(props.selectedRow.applyid)
+        }
+    }).then(() => {
+        ElMessage.success('提交成功')
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error('提交失败:' + err)
+    })
+}
+</script>

+ 34 - 50
src/packages/pc/views/footer/inout/in/index.vue

@@ -1,70 +1,54 @@
 <!-- 持仓过户-我的转入 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns">
-        <!-- 挂牌类型 -->
-        <template #buyorsell="{ value }">
-            {{ getBuyOrSellName(value) }}
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
+        <!-- 展开行 -->
+        <template #expand="{ row }">
+            <div class="buttonbar" v-if="row.transferapplystatus === 2">
+                <el-button type="primary" @click="showComponent('confirm', row)">确认</el-button>
+            </div>
         </template>
-        <!-- 最新价 -->
-        <template #lastprice="{ row }">
-            <span :class="row.lastColor">
-                {{ handleNumberValue(formatDecimal(row.lastprice, row.decimalplace)) }}
-            </span>
-        </template>
-        <!-- 市值-->
-        <template #marketValue="{ value }">
-            {{ formatDecimal(value) }}
-        </template>
-        <!-- 浮动盈亏-->
-        <template #closepl="{ row }">
-            <span :class="row.closeplColor">{{ formatDecimal(row.closepl, row.decimalplace) }}</span>
-        </template>
-        <!-- 操作 -->
-        <template #operate="{ row }">
-            <app-auth-operation :code="code" :menus="handleOperateButtons(row)" :options="{ selectedRow: row }" />
+        <template #footer>
+            <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                @closed="closeComponent" v-if="componentId" />
         </template>
     </app-table>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { handleNumberValue, formatDecimal } from '@/filters'
-import { getBuyOrSellName } from '@/constants/order'
+import { shallowRef, defineAsyncComponent } from 'vue'
 import { useRequest } from '@/hooks/request'
+import { useComponent } from '@/hooks/component'
+import { useComposeTable } from '@pc/components/base/table'
 import { queryInTradePositionTransfer } from '@/services/api/transfer'
 import AppTable from '@pc/components/base/table/index.vue'
-import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 
-defineProps({
-    code: String
+const componentMap = new Map<string, unknown>([
+    ['confirm', defineAsyncComponent(() => import('./confirm/index.vue'))], // 确认
+])
+
+const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.InTradePositionTransferRsp>({ rowKey: 'applyid' })
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    run()
 })
 
-const { dataList } = useRequest(queryInTradePositionTransfer)
+const { loading, dataList, run } = useRequest(queryInTradePositionTransfer)
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
-    { prop: 'goodsname', label: '订单合约' },
-    { prop: 'buyorsell', label: '方向' },
-    { prop: 'curpositionqty', label: '持有数量' },
-    { prop: 'enableqty', label: '可用数量' },
-    { prop: 'frozenqty', label: '预扣数量' },
-    { prop: 'averageprice', label: '均价' },
-    { prop: 'lastprice', label: '现价' },
-    { prop: 'curholderamount', label: '持仓金额' },
-    { prop: 'marketValue', label: '市值' },
-    { prop: 'closepl', label: '参考损益' },
-    { prop: 'operate', label: '操作', fixed: 'right', width: 140 },
+    { prop: 'goodsdisplay', label: '商品' },
+    { prop: 'outusername', label: '转出方' },
+    { prop: 'qty', label: '转让数量' },
+    { prop: 'transferprice', label: '转让价格' },
+    { prop: 'freezedays', label: '冻结天数' },
+    { prop: 'goodscurprice', label: '商品价格' },
+    { prop: 'outcharge', label: '手续费' },
+    { prop: 'transferapplystatus', label: '状态' },
+    { prop: 'applytime', label: '申请时间' }
 ])
 
-const handleOperateButtons = (row: Model.TradePositionRsp) => {
-    const buttons = ['bottom_goods_position_transfer']
-    switch (row.trademode) {
-        case 16:
-            buttons.push('bottom_goods_position_delivery16')
-            break;
-        case 50:
-            buttons.push('bottom_goods_position_delivery50')
-            break;
-    }
-    return buttons
+const showComponent = (componentName: string, row: Model.InTradePositionTransferRsp) => {
+    selectedRow.value = row
+    openComponent(componentName)
 }
 </script>

+ 4 - 3
src/packages/pc/views/footer/inout/out/add/index.vue

@@ -19,13 +19,14 @@
                 </el-select>
             </el-form-item>
             <el-form-item prop="TransferPrice" label="转让价格">
-                <el-input-number placeholder="请输入" v-model="formData.TransferPrice" />
+                <el-input-number placeholder="请输入" v-model="formData.TransferPrice" :min="0"
+                    :precision="selectedGoods?.decimalplace" />
             </el-form-item>
             <el-form-item prop="Qty" label="转让数量">
-                <el-input-number placeholder="请输入" v-model="formData.Qty" :min="0" :max="enableqty" />
+                <el-input-number placeholder="请输入" v-model="formData.Qty" :precision="0" :min="0" :max="enableqty" />
             </el-form-item>
             <el-form-item prop="FreezeDays" label="冻结天数">
-                <el-input-number placeholder="请输入" v-model="formData.FreezeDays" />
+                <el-input-number placeholder="请输入" v-model="formData.FreezeDays" :precision="0" :min="0" />
             </el-form-item>
             <el-form-item label="可用数量">
                 <span>{{ enableqty }}</span>

+ 2 - 3
src/packages/pc/views/footer/inout/out/index.vue

@@ -1,12 +1,11 @@
 <!-- 持仓过户-我的转入 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns">
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
         <template #headerRight>
             <div class="buttonbar">
                 <el-button type="primary" size="small" @click="openComponent('add')">新增</el-button>
             </div>
         </template>
-        <!-- 操作 -->
         <template #footer>
             <component ref="componentRef" :is="componentMap.get(componentId)" @closed="closeComponent" v-if="componentId" />
         </template>
@@ -28,7 +27,7 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
     run()
 })
 
-const { dataList, run } = useRequest(queryOutTradepositiontransfer)
+const { loading, dataList, run } = useRequest(queryOutTradepositiontransfer)
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'goodsdisplay', label: '商品' },

+ 1 - 1
src/packages/pc/views/footer/presell/presellposition/deposit/index.vue

@@ -1,7 +1,7 @@
 <!-- 预售转让-预售持仓-补足定金 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div>是否补足转让定金?</div>
+        <div class="g-text-message">是否补足转让定金?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onMakeUpDeposit">确认</el-button>

+ 1 - 1
src/packages/pc/views/footer/presell/transferorder/cancel/index.vue

@@ -1,7 +1,7 @@
 <!-- 预售转让-预售委托-撤销 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div>是否撤销该委托单?</div>
+        <div class="g-text-message">是否撤销该委托单?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>

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

@@ -1,7 +1,7 @@
 <!-- 预售转让-预售持仓-补足定金 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :refresh="refresh">
-        <div>是否追加未付转让定金?</div>
+        <div class="g-text-message">是否追加未付转让定金?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onMakeUpDeposit">确认</el-button>

+ 1 - 1
src/packages/pc/views/footer/spot/order/cancel/index.vue

@@ -1,7 +1,7 @@
 <!-- 掉期市场-挂单-撤销 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div>确认要撤销吗?</div>
+        <div class="g-text-message">确认要撤销吗?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>

+ 1 - 1
src/packages/pc/views/footer/swap/order/cancel/index.vue

@@ -1,7 +1,7 @@
 <!-- 掉期市场-挂单-撤销 -->
 <template>
     <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div>确认要撤销吗?</div>
+        <div class="g-text-message">确认要撤销吗?</div>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
             <el-button type="primary" @click="onCancelSumit()">提交</el-button>

+ 11 - 18
src/packages/pc/views/market/trade/goods/list/listing/index.vue

@@ -5,7 +5,8 @@
         </div>
         <div class="goods-listing__form">
             <h4 class="header-title">订单交易</h4>
-            <el-form ref="formRef" class="el-form--vertical" label-width="60px" :show-message="false" :model="formData" :rules="formRules">
+            <el-form ref="formRef" class="el-form--vertical" label-width="60px" :show-message="false" :model="formData"
+                :rules="formRules">
                 <el-form-item prop="GoodsID" label="商品">
                     <el-select placeholder="请选择" v-model="selectedGoodsId" filterable>
                         <el-option :label="item.goodsname" :value="item.goodsid" v-for="(item, index) in marketGoodsList"
@@ -47,7 +48,7 @@
                         <div style="display: flex;flex-direction: column;line-height: normal;font-size: 12px;color: #7a8a94;"
                             v-if="settingStore.getSettingValue('showOrderEnableQty')">
                             <span>预估可订立量:{{ total.enableQty }}</span>
-                            <!-- <span>预扣保证金:{{ total.deposit.toFixed(2) }}</span> -->
+                            <span>预扣保证金:{{ total.deposit.toFixed(2) }}</span>
                         </div>
                     </div>
                 </el-form-item>
@@ -116,22 +117,6 @@ const priceStep = computed(() => {
     return 1
 })
 
-const deposit = computed(() => {
-    const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = selectedGoods.value ?? {}
-
-    const fixed = agreeunit * marketmarginvalue
-    const ratio = fixed * (formData.OrderPrice ?? 0)
-
-    if (marketmarginalgorithm === 1) {
-        return (formData.OrderQty ?? 0) * ratio
-    }
-    if (marketmarginalgorithm === 2) {
-        return (formData.OrderQty ?? 0) * fixed
-    }
-
-    return 0
-})
-
 const total = computed(() => {
     const { avaiableMoney = 0 } = accountStore.currentAccount
     const { marketmarginalgorithm = 0, marketmarginvalue = 0, agreeunit = 0 } = selectedGoods.value ?? {}
@@ -166,6 +151,9 @@ const sellQty = computed(() => getOrderQty(BuyOrSell.Sell, selectedGoodsId.value
 // 价格类型
 const orderPriceType = computed(() => settingStore.getSettingValue('orderPriceType'))
 
+// 买卖方向
+const orderBuyOrSell = computed(() => settingStore.getSettingValue('orderBuyOrSell'))
+
 // 是否禁用价格输入
 const isDisabled = computed(() => [3, 4].includes(orderPriceType.value))
 
@@ -306,6 +294,10 @@ watch([selectedGoodsId, orderPriceType], () => {
     formData.OrderPrice = getOrderPrice()
 })
 
+watch(orderBuyOrSell, (val) => {
+    formData.BuyOrSell = val
+})
+
 watch([() => formData.BuyOrSell, () => selectedGoods.value?.last, () => selectedGoods.value?.bid, () => selectedGoods.value?.ask], () => {
     if (isDisabled.value) {
         formData.OrderPrice = getOrderPrice()
@@ -315,6 +307,7 @@ watch([() => formData.BuyOrSell, () => selectedGoods.value?.last, () => selected
 onMounted(() => {
     formData.OrderPrice = getOrderPrice()
     formData.OrderQty = qtyStep.value
+    formData.BuyOrSell = orderBuyOrSell.value
 })
 </script>
 

+ 1 - 1
src/services/api/trade/index.ts

@@ -373,7 +373,7 @@ export function holderTransferApply(config: RequestConfig<Proto.HolderTransferAp
 /**
  * 持仓过户确认接口
  */
-export function holderTransferConfirm(config: RequestConfig<Proto.HolderTransferConfirmReq>) {
+export function holderTransferConfirm(config: RequestConfig<Partial<Proto.HolderTransferConfirmReq>>) {
     return http.mqRequest<Proto.HolderTransferConfirmRsp>({
         data: {
             UserID: loginStore.userId,

+ 28 - 1
src/stores/modules/account.ts

@@ -28,6 +28,7 @@ export const useAccountStore = defineStore(() => {
             avaiableMoney: number; // 可用资金
             netvalue: number; // 净值
             profitLoss: number; // 浮动盈亏
+            hazardRatio: number; // 风险率
         })[] = []
 
         state.accountList.forEach((item) => {
@@ -37,7 +38,7 @@ export const useAccountStore = defineStore(() => {
             // 计算浮动盈亏
             const profitLoss = positionList.reduce((pre, cur) => cur.tradeproperty === 1 ? pre += cur.closepl : pre, 0)
 
-            // 计算市值
+            // 计算市值(所有权)
             const marketValue = positionList.reduce((pre, cur) => cur.tradeproperty === 2 ? pre += cur.marketValue : pre, 0)
 
             // 计算权益/净值
@@ -65,12 +66,38 @@ export const useAccountStore = defineStore(() => {
                 avaiableMoney = item.currentbalance - item.usedmargin - freezeMargin
             }
 
+            // 计算风险净值 = 期末余额 + 浮动盈亏(收益权) - 其他冻结 - 出金冻结
+            let valueAtRisk = item.currentbalance + profitLoss - item.otherfreezemargin - item.outamountfreeze
+
+            // 根据系统参数“087 风险净值是否加上市值 - 0:不加 1:加“
+            const param087 = userStore.getSystemParamValue('087')
+
+            if (param087 === '1') {
+                // 风险净值 = 期末余额 + 市值(所有权) + 浮动盈亏(收益权) - 其他冻结 - 出金冻结
+                valueAtRisk += marketValue
+            }
+
+            // 计算风险率
+            let hazardRatio = 0
+
+            // 根据系统参数“132 风险率计算公式”
+            const param132 = userStore.getSystemParamValue('132')
+
+            if (param132 === '1') {
+                // 风险率 = 占用 / 风险净值
+                hazardRatio = item.usedmargin / valueAtRisk
+            } else {
+                // 风险率 = (占用 - 授信金额) / (风险净值 - 授信金额)
+                hazardRatio = (item.usedmargin - item.mortgagecredit) / (valueAtRisk - item.mortgagecredit)
+            }
+
             result.push({
                 ...item,
                 freezeMargin,
                 avaiableMoney,
                 netvalue,
                 profitLoss,
+                hazardRatio
             })
         })
 

+ 3 - 1
src/stores/modules/setting.ts

@@ -18,10 +18,12 @@ export const useSettingStore = defineStore(() => {
         showOrderSuccessMessage: true,
         showOrderFailMessage: true,
         showOrderEnableQty: false,
+        showOrderCancelDialog: true,
         orderMaxQty: 10000000,
         orderFocusType: 1,
         orderPriceType: 1,
-        orderQtyIsEmpty: false
+        orderQtyIsEmpty: false,
+        orderBuyOrSell: 0,
     }))
 
     // 获取设置项值

+ 2 - 0
src/types/model/common.d.ts

@@ -330,10 +330,12 @@ declare global {
             showOrderSuccessMessage: boolean; // 挂/摘牌成功是否显示消息提示
             showOrderFailMessage: boolean; // 挂/摘牌失败是否显示消息提示
             showOrderEnableQty: boolean; // 挂/摘牌是否显示预估订立量
+            showOrderCancelDialog: boolean; // 撤单时弹出提示确认对话框
             orderMaxQty: number; // 单笔最大下单量
             orderFocusType: number; // 下单后默认焦点对象,1=价格,2=数量
             orderPriceType: number; // 下单默认价格类型,1=现价,2=对手价,3=实时价,4=实时对手价
             orderQtyIsEmpty: boolean; // 下单后是否清空数量输入框
+            orderBuyOrSell: number; // 默认买卖方向
         }
 
         /** 查询会员商品限制配置表 请求 */

+ 1 - 1
src/types/model/transfer.d.ts

@@ -337,7 +337,7 @@ declare namespace Model {
     /** 获取持仓过户申请表信息 - 我的转入 响应 */
     interface InTradePositionTransferRsp {
         applicantid: number; // 申请人ID
-        applyid: number; // 申请ID(185+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        applyid: string; // 申请ID(185+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
         applyremark: string; // 申请备注
         applystatus: string; // 状态
         applytime: string; // 申请时间

+ 1 - 1
src/types/proto/trade.d.ts

@@ -766,7 +766,7 @@ declare global {
         /** 持仓过户确认接口请求 */
         interface HolderTransferConfirmReq {
             Header?: IMessageHead; // 消息头
-            ApplyID: number; // 申请ID,必填
+            ApplyID: string | Long; // 申请ID,必填
             UserID: number; // 用户ID,必填
             ClientSerialNo: string; // 客户端流水号
             ClientType: number; // 终端类型