li.shaoyi 2 роки тому
батько
коміт
ed39ee2853

+ 3 - 3
src/hooks/echarts/candlestick/options.ts

@@ -57,10 +57,10 @@ export function useOptions(dataset: EchartsDataset) {
             },
             dataZoom: {
                 type: 'inside',
-                startValue: source.length - 120, // 起始显示K线条数(最新120条)
+                startValue: source.length - 60, // 起始显示K线条数(最新60条)
                 endValue: source.length,
-                minValueSpan: 50, // 限制窗口缩放显示最少数据条数
-                maxValueSpan: 400, // 限制窗口缩放显示最大数据条数
+                minValueSpan: 30, // 限制窗口缩放显示最少数据条数
+                maxValueSpan: 200, // 限制窗口缩放显示最大数据条数
             },
             axisPointer: {
                 label: {

+ 1 - 2
src/packages/pc/views/auth/login/index.vue

@@ -29,8 +29,7 @@
     <el-dialog class="register" v-model="isRegister" title="扫码注册" :width="360" center align-center>
       <div v-loading="rloading" v-if="rloading"></div>
       <div style="text-align: center;" v-else>
-        <app-qrcode class="app-register-code__qrcode" :width="240" :text="qrContent"
-          :logo="require('../../../assets/logo.svg')" />
+        <app-qrcode class="app-register-code__qrcode" :width="240" :text="qrContent" />
       </div>
       <template #footer>
         <span class="dialog-footer">

+ 4 - 6
src/packages/pc/views/footer/goods/order/index.vue

@@ -21,9 +21,11 @@
                     @click="showComponent('cancel', row)">撤销</el-button>
             </div>
         </template>
+        <template #footer>
+            <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                @closed="closeComponent" v-if="componentId" />
+        </template>
     </app-table>
-    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
-        v-if="componentId" />
 </template>
 
 <script lang="ts" setup>
@@ -41,10 +43,6 @@ const componentMap = new Map<string, unknown>([
     ['cancel', defineAsyncComponent(() => import('./cancel/index.vue'))],
 ])
 
-defineProps({
-    code: String
-})
-
 const { loading, dataList, run } = useRequest(queryTradeOrderDetail, {
     params: {
         tradeMode: '50',

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

@@ -14,7 +14,7 @@
         </template>
         <!-- 浮动盈亏-->
         <template #closepl="{ row }">
-            <span :class="row.closeplColor">{{ row.closepl.toFixed(2) }}</span>
+            <span :class="row.closeplColor">{{ row.closepl?.toFixed(2) }}</span>
         </template>
         <!-- 展开行 -->
         <template #expand="{ row }">

+ 18 - 15
src/packages/pc/views/footer/performance/buy/index.vue

@@ -1,8 +1,9 @@
 <!-- 资金流水-卖履约-执行中 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey" :expand-row-keys="expandKeys"  @row-click="rowClick">
-         <!-- 履约状态 -->
-         <template #performancestatus="{ value }">
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
+        <!-- 履约状态 -->
+        <template #performancestatus="{ value }">
             {{ getPerformanceStatusName(value) }}
         </template>
         <!-- 履约类型 -->
@@ -20,20 +21,26 @@
         <!-- 展开行 -->
         <template #expand="{ row }">
             <div class="buttonbar">
-                <el-button type="danger" size="small" v-if="row.buyorsell===row.executeside-1" @click="showComponent('manual', row)">手动确认</el-button>
-                <el-button type="warning" size="small" v-if="row.buyorsell===row.executeside-1" @click="showComponent('delay', row)">延期</el-button>
-                <el-button type="primary" size="small" v-if="![6, 7].includes(row.performancestatus)" @click="showComponent('contracted', row)">违约</el-button>
-                <el-button type="info" v-if="![6, 7].includes(row.performancestatus)" size="small" @click="showComponent('edit', row)">修改</el-button>
+                <el-button type="danger" size="small" v-if="row.buyorsell === row.executeside - 1"
+                    @click="showComponent('manual', row)">手动确认</el-button>
+                <el-button type="warning" size="small" v-if="row.buyorsell === row.executeside - 1"
+                    @click="showComponent('delay', row)">延期</el-button>
+                <el-button type="primary" size="small" v-if="![6, 7].includes(row.performancestatus)"
+                    @click="showComponent('contracted', row)">违约</el-button>
+                <el-button type="info" v-if="![6, 7].includes(row.performancestatus)" size="small"
+                    @click="showComponent('edit', row)">修改</el-button>
                 <el-button type="success" size="small" @click="showComponent('details', row)">详细</el-button>
             </div>
         </template>
+        <template #footer>
+            <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                @closed="closeComponent" v-if="componentId" />
+        </template>
     </app-table>
-    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
-            v-if="componentId" />
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, defineAsyncComponent} from 'vue'
+import { shallowRef, defineAsyncComponent } from 'vue'
 import { formatDate } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryPerformancePlan } from '@/services/api/performance'
@@ -50,10 +57,6 @@ const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('../components/edit/index.vue'))],
 ])
 
-defineProps({
-    code: String
-})
-
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
     run()
 })
@@ -64,7 +67,7 @@ const selectedRow = shallowRef<Model.PerformancePlanRsp>()
 const { loading, dataList, run } = useRequest(queryPerformancePlan, {
     params: {
         buyorsell: BuyOrSell.Buy,
-        status:'2'
+        status: '2'
     },
 })
 

+ 18 - 15
src/packages/pc/views/footer/performance/sell/index.vue

@@ -1,8 +1,9 @@
 <!-- 底部-履约信息-卖履约 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey" :expand-row-keys="expandKeys"  @row-click="rowClick">
-         <!-- 履约状态 -->
-         <template #performancestatus="{ value }">
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
+        <!-- 履约状态 -->
+        <template #performancestatus="{ value }">
             {{ getPerformanceStatusName(value) }}
         </template>
         <!-- 履约类型 -->
@@ -20,16 +21,22 @@
         <!-- 展开行 -->
         <template #expand="{ row }">
             <div class="buttonbar">
-                <el-button type="danger" size="small" v-if="row.buyorsell===row.executeside-1" @click="showComponent('manual', row)">手动确认</el-button>
-                <el-button type="warning" size="small" v-if="row.buyorsell===row.executeside-1" @click="showComponent('delay', row)">延期</el-button>
-                <el-button type="primary" size="small" v-if="![6, 7].includes(row.performancestatus)" @click="showComponent('contracted', row)">违约</el-button>
-                <el-button type="info" v-if="![6, 7].includes(row.performancestatus)" size="small" @click="showComponent('edit', row)">修改</el-button>
+                <el-button type="danger" size="small" v-if="row.buyorsell === row.executeside - 1"
+                    @click="showComponent('manual', row)">手动确认</el-button>
+                <el-button type="warning" size="small" v-if="row.buyorsell === row.executeside - 1"
+                    @click="showComponent('delay', row)">延期</el-button>
+                <el-button type="primary" size="small" v-if="![6, 7].includes(row.performancestatus)"
+                    @click="showComponent('contracted', row)">违约</el-button>
+                <el-button type="info" v-if="![6, 7].includes(row.performancestatus)" size="small"
+                    @click="showComponent('edit', row)">修改</el-button>
                 <el-button type="success" size="small" @click="showComponent('details', row)">详细</el-button>
             </div>
         </template>
+        <template #footer>
+            <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                @closed="closeComponent" v-if="componentId" />
+        </template>
     </app-table>
-    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
-            v-if="componentId" />
 </template>
 
 <script lang="ts" setup>
@@ -50,10 +57,6 @@ const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('../components/edit/index.vue'))],
 ])
 
-defineProps({
-    code: String
-})
-
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
     run()
 })
@@ -64,7 +67,7 @@ const selectedRow = shallowRef<Model.PerformancePlanRsp>()
 const { loading, dataList, run } = useRequest(queryPerformancePlan, {
     params: {
         buyorsell: BuyOrSell.Sell,
-        status:'2'
+        status: '2'
     },
 })
 
@@ -83,7 +86,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'performancestatus', label: '履约状态' },
     { prop: 'curstepname', label: '当前步骤' },
     { prop: 'starttime', label: '开始时间' },
-    
+
 ])
 
 const showComponent = (componentName: string, row: Model.PerformancePlanRsp) => {

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

@@ -1,6 +1,7 @@
 <!-- 现货仓单-挂单 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey" :expand-row-keys="expandKeys"  @row-click="rowClick">
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
         <!-- 挂牌类型 -->
         <template #wrtradetype="{ value }">
             {{ getWrTradeTypeName(value) }}
@@ -9,8 +10,8 @@
         <template #wrtradeorderstatus="{ value }">
             {{ getWRTradeOrderStatusName(value) }}
         </template>
-         <!-- 挂牌方式 -->
-         <template #wrpricetype="{ value }">
+        <!-- 挂牌方式 -->
+        <template #wrpricetype="{ value }">
             {{ getWrPriceTypeName(value) }}
         </template>
         <!-- 过户时间 -->
@@ -20,12 +21,15 @@
         <!-- 展开行 -->
         <template #expand="{ row }">
             <div class="buttonbar">
-                <el-button type="danger" v-if="[3, 7].includes(row.wrtradeorderstatus)" size="small" @click="showComponent('cancel', row)">撤销</el-button>
+                <el-button type="danger" v-if="[3, 7].includes(row.wrtradeorderstatus)" size="small"
+                    @click="showComponent('cancel', row)">撤销</el-button>
             </div>
         </template>
+        <template #footer>
+            <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                @closed="closeComponent" v-if="componentId" />
+        </template>
     </app-table>
-    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
-            v-if="componentId" />
 </template>
 
 <script lang="ts" setup>
@@ -42,10 +46,6 @@ const componentMap = new Map<string, unknown>([
     ['cancel', defineAsyncComponent(() => import('./cancel/index.vue'))],
 ])
 
-defineProps({
-    code: String
-})
-
 const { loading, dataList, run } = useRequest(queryWrOrderDetail, {
     params: {
         wrtradetype: 1,

+ 6 - 7
src/packages/pc/views/footer/spot/position/index.vue

@@ -1,6 +1,7 @@
 <!-- 现货仓单-现货明细 -->
 <template>
-    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey" :expand-row-keys="expandKeys"  @row-click="rowClick">
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading" :row-key="rowKey"
+        :expand-row-keys="expandKeys" @row-click="rowClick">
         <!-- 过户时间 -->
         <template #createtime="{ value }">
             {{ formatDate(value) }}
@@ -12,9 +13,11 @@
                 <el-button type="danger" size="small" @click="showComponent('pickup', row)">提货</el-button>
             </div>
         </template>
+        <template #footer>
+            <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
+                @closed="closeComponent" v-if="componentId" />
+        </template>
     </app-table>
-    <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
-            v-if="componentId" />
 </template>
 
 <script lang="ts" setup>
@@ -37,10 +40,6 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
     run()
 })
 
-defineProps({
-    code: String
-})
-
 const { rowKey, expandKeys, rowClick } = useComposeTable<Model.HoldLBRsp>({ rowKey: 'ladingbillid' })
 const selectedRow = shallowRef<Model.HoldLBRsp>()
 

+ 2 - 2
src/stores/modules/futures.ts

@@ -232,7 +232,7 @@ export const useFuturesStore = defineStore(() => {
     })
 
     // 处理行情数据
-    const handleQuote = (quote: Proto.Quote) => {
+    const handleQuote = (quote: Proto.Quote): Partial<Model.QuoteDayRsp> => {
         const goods = state.goodsList.find((e) => e.goodscode.toUpperCase() === quote.goodscode?.toUpperCase())
         // 处理报价小数位
         const handleDeimalplace = (value?: number) => {
@@ -243,6 +243,7 @@ export const useFuturesStore = defineStore(() => {
             return value
         }
         return {
+            goodscode: quote.goodscode,
             last: handleDeimalplace(quote.last),
             lasttime: (quote.date && quote.time) ? moment(quote.date + quote.time, 'YYYYMMDDHHmmss').format('YYYY-MM-DD HH:mm:ss') : undefined,
             ask: handleDeimalplace(quote.ask),
@@ -272,7 +273,6 @@ export const useFuturesStore = defineStore(() => {
             calloptionpremiums5: quote.calloptionpremiums5,
             exchangecode: quote.exchangecode,
             exchangedate: quote.exchangedate,
-            goodscode: quote.goodscode,
             highest: handleDeimalplace(quote.highest),
             holdvolume: quote.holdvolume,
             inventory: quote.inventory,