li.shaoyi преди 4 години
родител
ревизия
b4b3700bcc

+ 6 - 6
src/common/components/thirdMenu/index.vue

@@ -1,10 +1,10 @@
 <template>
-    <div class="thirdMenu">
-        <a-tabs v-model:activeKey="current" @change="menuClick">
-            <a-tab-pane :key="String(index)" v-for="(item, index) in list" :tab="item[value]"></a-tab-pane>
-        </a-tabs>
-        <slot></slot>
-    </div>
+  <div class="thirdMenu">
+    <a-tabs v-model:activeKey="current" @change="menuClick">
+      <a-tab-pane :key="String(index)" v-for="(item, index) in list" :tab="item[value]"></a-tab-pane>
+    </a-tabs>
+    <slot></slot>
+  </div>
 </template>
 
 <script lang="ts">

+ 20 - 20
src/views/business/plan/list/audit/index.vue

@@ -1,23 +1,23 @@
 <template>
-    <!-- 计划: 审核中-->
-    <div class="plan_uncommitted" :loading="loading">
-        <Filter @search="updateColumn"></Filter>
-        <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
-            </template>
-            <template #contracttype="{ text }">
-                <a>{{ getPlanContractType(text) }}</a>
-            </template>
-            <template #hedgeplanstatus="{ text }">
-                <a>{{ getPlanStatusName(text) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
-    </div>
+  <!-- 计划: 审核中-->
+  <div class="plan_uncommitted" :loading="loading">
+    <Filter @search="updateColumn"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
+      </template>
+      <template #contracttype="{ text }">
+        <a>{{ getPlanContractType(text) }}</a>
+      </template>
+      <template #hedgeplanstatus="{ text }">
+        <a>{{ getPlanStatusName(text) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -55,7 +55,7 @@ export default defineComponent({
                     queryTable(QueryHedgePlan, '1');
                     break;
                 case 'plan_performance':
-                    queryTable(QueryHedgePlan, '2');
+                    queryTable(QueryHedgePlan, '2,4');
                     break;
             }
         };

+ 29 - 30
src/views/manage/business-review/list/settlement/index.vue

@@ -1,32 +1,32 @@
 <template>
-    <!-- 管理-业务审核-交收 -->
-    <div class="business-review-js" :loading="loading">
-        <Filter @search="updateColumn"></Filter>
-        <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
-            </template>
-            <template #operateapplytype="{ text }">
-                <a>{{ getPriceTypeName(text) }}</a>
-            </template>
-            <template #contracttype="{ text }">
-                <a>{{ getContractTypeName(text) }}</a>
-            </template>
-            <template #applystatus="{ text }">
-                <a>{{ getApplyStatusName(text) }}</a>
-            </template>
-            <template #buyusernameOrsellusername="{ record }">
-                <a>{{ getAnalogueName(record.contracttype, record.buyusername, record.sellusername) }}</a>
-            </template>
-            <template #addmargin||decmargin="{ record }">
-                <a>{{ record.addmargin !== 0 && record.addmargin !== undefined ? '+' + record.addmargin : record.decmargin === 0 || record.decmargin === undefined ? '' : '-' + record.decmargin }} </a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 管理-业务审核-交收 -->
+  <div class="business-review-js" :loading="loading">
+    <Filter @search="updateColumn"></Filter>
+    <a-table :columns="columns" class="topTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
+      </template>
+      <template #operateapplytype="{ text }">
+        <a>{{ getPriceTypeName(text) }}</a>
+      </template>
+      <template #contracttype="{ text }">
+        <a>{{ getContractTypeName(text) }}</a>
+      </template>
+      <template #applystatus="{ text }">
+        <a>{{ getApplyStatusName(text) }}</a>
+      </template>
+      <template #buyusernameOrsellusername="{ record }">
+        <a>{{ getAnalogueName(record.contracttype, record.buyusername, record.sellusername) }}</a>
+      </template>
+      <template #addmargin||decmargin="{ record }">
+        <a>{{ record.addmargin !== 0 && record.addmargin !== undefined ? '+' + record.addmargin : record.decmargin === 0 || record.decmargin === undefined ? '' : '-' + record.decmargin }} </a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -68,12 +68,11 @@ export default defineComponent({
                     queryTable(QueryBusinessJs, { applystatus: '1' });
                     break;
                 case 'settlement_performance':
-                    queryTable(QueryBusinessJs, { applystatus: '2' });
+                    queryTable(QueryBusinessJs, { applystatus: '2,3' });
                     break;
             }
         };
 
-
         // 获取表头名称
         const getTableName = () => {
             switch (routeName) {

+ 37 - 38
src/views/manage/business-review/list/someprice/index.vue

@@ -1,32 +1,32 @@
 <template>
-    <!-- 管理-业务审核-点价 -->
-    <div class="business-review-dj" :loading="loading">
-        <Filter @search="updateColumn"></Filter>
-        <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
-            </template>
-            <template #pricetype="{ text }">
-                <a>{{ getPriceTypeName(text) }}</a>
-            </template>
-            <template #applystatus="{ text }">
-                <a>{{ getApplyStatusName(text) }}</a>
-            </template>
-            <template #contracttype="{ text }">
-                <a>{{ getContractTypeName(text) }}</a>
-            </template>
-            <template #contractstatus="{ text }">
-                <a>{{ getContractStatusName(text) }}</a>
-            </template>
-            <template #buyusernameOrsellusername="{ record }">
-                <a>{{ getAnalogueName(record.contracttype, record.buyusername, record.sellusername) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 管理-业务审核-点价 -->
+  <div class="business-review-dj" :loading="loading">
+    <Filter @search="updateColumn"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
+      </template>
+      <template #pricetype="{ text }">
+        <a>{{ getPriceTypeName(text) }}</a>
+      </template>
+      <template #applystatus="{ text }">
+        <a>{{ getApplyStatusName(text) }}</a>
+      </template>
+      <template #contracttype="{ text }">
+        <a>{{ getContractTypeName(text) }}</a>
+      </template>
+      <template #contractstatus="{ text }">
+        <a>{{ getContractStatusName(text) }}</a>
+      </template>
+      <template #buyusernameOrsellusername="{ record }">
+        <a>{{ getAnalogueName(record.contracttype, record.buyusername, record.sellusername) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -41,8 +41,7 @@ import { getTableButton } from '@/common/setup/table/button';
 import { QueryBusinessDj } from '@/services/go/ermcp/business-review';
 import { QryBusinessDjRsp } from '@/services/go/ermcp/business-review/interface';
 import { useRoute } from 'vue-router';
-import moment from "moment"
-
+import moment from 'moment';
 
 export default defineComponent({
     name: 'business-review-dj',
@@ -68,17 +67,17 @@ export default defineComponent({
         const queryTableAction = () => {
             switch (routeName) {
                 case 'someprice_checkpending':
-                    queryTable(QueryBusinessDj, { applystatus: '1' }).then(res => {
-                        tableList.value.sort((a,b)=>{
-                            return moment(b.audittime).valueOf()-moment(a.audittime).valueOf()
-                        })
+                    queryTable(QueryBusinessDj, { applystatus: '1' }).then((res) => {
+                        tableList.value.sort((a, b) => {
+                            return moment(b.audittime).valueOf() - moment(a.audittime).valueOf();
+                        });
                     });
                     break;
                 case 'someprice_performance':
-                    queryTable(QueryBusinessDj, { applystatus: '2' }).then(res => {
-                        tableList.value.sort((a,b)=>{
-                            return moment(b.audittime).valueOf()-moment(a.audittime).valueOf()
-                        })
+                    queryTable(QueryBusinessDj, { applystatus: '2,3' }).then((res) => {
+                        tableList.value.sort((a, b) => {
+                            return moment(b.audittime).valueOf() - moment(a.audittime).valueOf();
+                        });
                     });
             }
         };

+ 34 - 34
src/views/manage/inventory-review/list/audit/index.vue

@@ -1,37 +1,37 @@
 <template>
-    <!-- 库存审核 入库-->
-    <div class="inventory_review_checkin" :loading="loading">
-        <Filter @search="updateColumn" :inOrOut="'in'"></Filter>
-        <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
-            </template>
-            <!-- 状态 -->
-            <template #applystatus="{ text }">
-                <a>{{ getApplyStatusName(text) }}</a>
-            </template>
-            <!-- 现货合同类型 -->
-            <template #contracttype="{ text }">
-                <a>{{ getContractTypeName(text) }}</a>
-            </template>
-            <!-- 点价类型 -->
-            <template #pricetype="{ text }">
-                <a>{{ getPriceTypeName(text) }}</a>
-            </template>
-            <!-- 出入库类型 -->
-            <template #inouttype="{ text }">
-                <a>{{ InOutTypeName(text) }}</a>
-            </template>
-            <!-- 对手方 -->
-            <template #buynicknameOrsellusername="{ record }">
-                <a>{{ handleName(record) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 库存审核 入库-->
+  <div class="inventory_review_checkin" :loading="loading">
+    <Filter @search="updateColumn" :inOrOut="'in'"></Filter>
+    <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="handlePermissionBtn(buttons, record)" :record="record" @click="openComponent" />
+      </template>
+      <!-- 状态 -->
+      <template #applystatus="{ text }">
+        <a>{{ getApplyStatusName(text) }}</a>
+      </template>
+      <!-- 现货合同类型 -->
+      <template #contracttype="{ text }">
+        <a>{{ getContractTypeName(text) }}</a>
+      </template>
+      <!-- 点价类型 -->
+      <template #pricetype="{ text }">
+        <a>{{ getPriceTypeName(text) }}</a>
+      </template>
+      <!-- 出入库类型 -->
+      <template #inouttype="{ text }">
+        <a>{{ InOutTypeName(text) }}</a>
+      </template>
+      <!-- 对手方 -->
+      <template #buynicknameOrsellusername="{ record }">
+        <a>{{ handleName(record) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="handlePermissionBtn(buttons, selectedRow)"> </contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -74,7 +74,7 @@ export default defineComponent({
                     break;
                 // 已审核
                 case 'stock_performance':
-                    queryTable(QueryAreaStockApply, { applystatus: '2' });
+                    queryTable(QueryAreaStockApply, { applystatus: '2,3' });
                     break;
             }
         };

+ 168 - 0
src/views/market/futures/compoments/futures-trade/index.less

@@ -0,0 +1,168 @@
+.futures_trade {
+    display: flex;
+    height : 100%;
+
+    &__left {
+        flex: 1;
+    }
+}
+
+.post_buying {
+    width : 100%;
+    height: 100%;
+    .flex;
+    flex-direction: column;
+    position      : relative;
+    overflow      : hidden;
+
+    .ant-form {
+        height: 100%;
+    }
+
+    .condition {
+        width        : 100%;
+        height       : 48px;
+        margin       : 0 16px;
+        padding      : 10px 0;
+        border-bottom: 1px solid @m-black6;
+        .inlineflex;
+
+        .conditionBtn {
+            align-self : center;
+            align-items: center;
+            border     : 0;
+            min-width  : 80px;
+            height     : 28px;
+            line-height: 28px;
+            background : @m-black7;
+            .rounded-corners(3px);
+            font-size: 14px;
+            color    : @m-blue0;
+
+            &:hover {
+                background: @m-black7-hover;
+                color     : @m-blue0-hover;
+            }
+        }
+
+        .conditionBtn+.conditionBtn {
+            margin-left: 10px;
+        }
+    }
+}
+
+.unit {
+    margin-left: 70px;
+    width      : 260px;
+    .flex;
+    justify-content: space-between;
+    font-size      : 14px;
+    color          : @m-grey41;
+    height         : 14px;
+    line-height    : 14px;
+}
+
+.listedBtn {
+    width        : 120px;
+    height       : 30px;
+    line-height  : 30px;
+    background   : linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
+    border-radius: 3px;
+    color        : @m-white0;
+    font-size    : 14px;
+    text-align   : center;
+    border       : 0;
+
+    &:hover {
+        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+        color     : @m-white0-hover;
+    }
+}
+
+.cancelBtn:extend(.listedBtn) {
+    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
+
+    &:hover {
+        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
+        color     : @m-white0-hover;
+    }
+}
+
+.ml10 {
+    margin-left: 10px;
+}
+
+.ant-form.dialogForm .ant-row.ant-form-item {
+    margin-bottom: 14px;
+}
+
+.mt20 {
+    margin-top: 20px;
+}
+
+.mt-10 {
+    margin-top: -10px;
+}
+
+.ant-input-suffix {
+    position: absolute;
+    right   : -25px;
+}
+
+.minusBtn,
+.plusBtn {
+    width      : 15px;
+    height     : 32px;
+    line-height: 32px;
+    font-size  : 15px;
+    color      : @m-blue15;
+    cursor     : pointer;
+}
+
+.minusBtn {
+    position: absolute;
+    top     : -6px;
+    left    : 14px;
+    z-index : 1;
+}
+
+.plusBtn {
+    position: absolute;
+    top     : -6px;
+    right   : 14px;
+    z-index : 1;
+}
+
+.stepper {
+    padding-left : 30px;
+    padding-right: 30px;
+    text-align   : center;
+    color        : @m-yellow1;
+    font-size    : 16px;
+}
+
+.ant-slider.formSlider {
+    width      : 260px !important;
+    margin-left: 70px;
+
+    .ant-slider-rail {
+        margin-right    : 0;
+        padding-right   : 0;
+        height          : 3px !important;
+        border-radius   : 2px !important;
+        background-color: @m-blue14;
+    }
+
+    .ant-slider-track {
+        height          : 3px;
+        background-color: @m-blue0;
+    }
+
+    .ant-slider-step {
+        height: 3px;
+    }
+
+    .ant-progress-text {
+        display: none;
+    }
+}

+ 40 - 153
src/views/market/futures/compoments/futures-trade/index.vue

@@ -1,8 +1,40 @@
 <template>
-  <!-- 挂牌求购 -->
-  <Drawer :title="'挂牌求购'" :placement="'right'" :visible="visible" @cancel="cancel" class="top">
-    <div class="post_buying">
-      <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
+  <!-- 期货交易 -->
+  <Drawer :title="'期货交易'" :placement="'right'" :visible="visible" @cancel="cancel" class="top">
+    <div class="futures_trade">
+      <div class="futures_trade__left">
+        <a-form class="inlineForm">
+          <a-form-item label="账号">
+            <a-select class="inlineFormSelect" placeholder="请选择" v-model:value="formState.accountid">
+              <a-select-option v-for="item in accountList" :value="item.accountid" :key="item.accountid">{{ item.accountid }}</a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="合约">
+            <a-select class="inlineFormSelect" placeholder="请选择"></a-select>
+          </a-form-item>
+          <a-form-item label="交易价格">
+            <a-input-number class="commonInput" />
+            <MinusOutlined @click="decreaseNumber" />
+            <PlusOutlined @click="increaseNumber" />
+            <a-select class="inlineFormSelect" placeholder="请选择"></a-select>
+          </a-form-item>
+          <a-form-item label="交易数量">
+            <a-input-number class="commonInput" />
+            <MinusOutlined @click="decreaseNumber" />
+            <PlusOutlined @click="increaseNumber" />
+            <a-button>复位</a-button>
+          </a-form-item>
+        </a-form>
+        <div>
+          <a-button>买入</a-button>
+          <a-button>卖出</a-button>
+          <a-button>平仓</a-button>
+        </div>
+      </div>
+      <div class="futures_trade__right">
+
+      </div>
+      <!-- <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
         <div class="formBar">
           <a-row :gutter="24">
             <a-col :span="24">
@@ -19,7 +51,7 @@
             </a-col>
             <a-col :span="24">
               <a-form-item label="挂牌数量" name="OrderQty">
-                <a-input-number class="commonInput" style="width: 260px" :min="0" :max="getMaxNum()" v-model:value="formState.OrderQty" />
+                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.OrderQty" />
                 <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
               </a-form-item>
             </a-col>
@@ -33,7 +65,7 @@
             </a-form-item>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form> -->
     </div>
   </Drawer>
 </template>
@@ -41,8 +73,6 @@
 <script lang="ts">
 import { Des } from '@/common/components/commonDes';
 import Drawer from '@/common/components/drawer/index.vue';
-import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { getAccountTypeList } from '@/services/bus/account';
 import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
@@ -60,20 +90,12 @@ export default defineComponent({
             type: Object as PropType<TempWrOrderQuoteDetail>,
             default: {},
         },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleForm(props.selectedRow);
         const loading = ref<boolean>(false);
-        const accountList = getAccountTypeList([2]);
+        const accountList = getAccountTypeList([1]);
         if (accountList.length) {
             formState.accountid = accountList[0].accountid;
         }
@@ -103,140 +125,5 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-.post_buying {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    position: relative;
-    overflow: hidden;
-    .ant-form {
-        height: 100%;
-    }
-    .condition {
-        width: 100%;
-        height: 48px;
-        margin: 0 16px;
-        padding: 10px 0;
-        border-bottom: 1px solid @m-black6;
-        .inlineflex;
-        .conditionBtn {
-            align-self: center;
-            align-items: center;
-            border: 0;
-            min-width: 80px;
-            height: 28px;
-            line-height: 28px;
-            background: @m-black7;
-            .rounded-corners(3px);
-            font-size: 14px;
-            color: @m-blue0;
-            &:hover {
-                background: @m-black7-hover;
-                color: @m-blue0-hover;
-            }
-        }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
-    }
-}
-
-.unit {
-    margin-left: 70px;
-    width: 260px;
-    .flex;
-    justify-content: space-between;
-    font-size: 14px;
-    color: @m-grey41;
-    height: 14px;
-    line-height: 14px;
-}
-.listedBtn {
-    width: 120px;
-    height: 30px;
-    line-height: 30px;
-    background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
-    border-radius: 3px;
-    color: @m-white0;
-    font-size: 14px;
-    text-align: center;
-    border: 0;
-    &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
-        color: @m-white0-hover;
-    }
-}
-.cancelBtn:extend(.listedBtn) {
-    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
-    &:hover {
-        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
-        color: @m-white0-hover;
-    }
-}
-.ml10 {
-    margin-left: 10px;
-}
-.ant-form.dialogForm .ant-row.ant-form-item {
-    margin-bottom: 14px;
-}
-.mt20 {
-    margin-top: 20px;
-}
-.mt-10 {
-    margin-top: -10px;
-}
-.ant-input-suffix {
-    position: absolute;
-    right: -25px;
-}
-.minusBtn,
-.plusBtn {
-    width: 15px;
-    height: 32px;
-    line-height: 32px;
-    font-size: 15px;
-    color: @m-blue15;
-    cursor: pointer;
-}
-.minusBtn {
-    position: absolute;
-    top: -6px;
-    left: 14px;
-    z-index: 1;
-}
-.plusBtn {
-    position: absolute;
-    top: -6px;
-    right: 14px;
-    z-index: 1;
-}
-.stepper {
-    padding-left: 30px;
-    padding-right: 30px;
-    text-align: center;
-    color: @m-yellow1;
-    font-size: 16px;
-}
-.ant-slider.formSlider {
-    width: 260px !important;
-    margin-left: 70px;
-    .ant-slider-rail {
-        margin-right: 0;
-        padding-right: 0;
-        height: 3px !important;
-        border-radius: 2px !important;
-        background-color: @m-blue14;
-    }
-    .ant-slider-track {
-        height: 3px;
-        background-color: @m-blue0;
-    }
-    .ant-slider-step {
-        height: 3px;
-    }
-    .ant-progress-text {
-        display: none;
-    }
-}
+@import './index.less';
 </style>

+ 41 - 6
src/views/market/futures/index.vue

@@ -55,7 +55,7 @@ import { getShowBottomValue } from '@/common/config/constrolBottom';
 import { handleModalComponent } from '@/common/setup/asyncComponent';
 import { handleQuotePriceColor, handleSubcriteOnDemandQuote, quoteAmplitude, quoteAmplituOfVibration, quoteChange } from '@/common/setup/table/tableQuote';
 import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { ref } from 'vue';
+import { ref, reactive, Ref, toRefs } from 'vue';
 import { getColumnsList, useExternalexchange } from './setup';
 import { getTableButton } from '@/common/setup/table/button';
 import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
@@ -64,6 +64,9 @@ import { TableEventCB } from '@/common/setup/table/interface';
 import { getTableEvent } from '@/common/export/table';
 import { ContextMenuTemp } from '@/common/components/contextMenu/interface';
 import { BtnListType } from '@/common/components/btnList/interface';
+import APP from '@/services';
+import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
+import { getQuoteDayInfoByCode } from '@/services/bus/goods';
 
 export default defineComponent({
     name: 'spot_trade_order_transaction_swap',
@@ -73,22 +76,54 @@ export default defineComponent({
         trade: defineAsyncComponent(() => import('./compoments/futures-trade/index.vue')),
     },
     setup() {
+        interface Quote {
+            goodscode: string;
+            goodsname: string;
+            decimalplace: number;
+            last?: Ref;
+            presettle?: Ref;
+        }
+
+        const goodsList = APP.get('Goods') as Goods[];
+        const tableList = reactive<Quote[]>([]);
+        const quoteList = ref<QueryQuoteDayRsp[]>([]);
+
+        goodsList.forEach((el) => {
+            const quote = getQuoteDayInfoByCode(el.goodscode);
+            if (quote) {
+                quoteList.value.push(quote);
+            }
+            tableList.push({
+                goodscode: el.goodscode,
+                goodsname: el.goodsname,
+                decimalplace: el.decimalplace,
+            });
+        });
+
         const isBottom = getShowBottomValue();
-        const selectedRow = ref<QueryQuoteDayRsp>();
         const buttons = getTableButton();
         console.log('buttons', buttons);
-        const { index, loading, tabList, tableList, hanldeQuoteData } = useExternalexchange();
+        const { index, loading, tabList, hanldeQuoteData } = useExternalexchange();
         // 行情按需订阅
-        let stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(tableList);
+        let stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(quoteList);
         function changeTab(index: number, current: TabList) {
             hanldeQuoteData(index);
             console.log(index, current);
             // 停止上次订阅
             stopSubcribe();
             // 重新发起订阅
-            stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(tableList);
+            stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(quoteList);
         }
 
+        quoteList.value.forEach((item) => {
+            const refs = toRefs(item);
+            const index = tableList.findIndex((e) => e.goodscode === item.goodscode);
+            if (index > -1) {
+                tableList[index].last = refs.last;
+                tableList[index].presettle = refs.presettle;
+            }
+        });
+
         // 右键逻辑
         const { contextMenu, closeContext: closeContextAction } = handleContextMenu();
         // 右键回调函数
@@ -99,7 +134,7 @@ export default defineComponent({
             },
         };
         // 表格事件
-        const { Rowclick } = getTableEvent<QueryQuoteDayRsp>(eventsCB);
+        const { selectedRow, Rowclick } = getTableEvent<QueryQuoteDayRsp>(eventsCB);
         // 控制异步组件
         const { componentId, closeComponent, openComponent } = handleModalComponent(() => {}, selectedRow);
         // 关闭右键

+ 127 - 0
src/views/market/futures/setup.ts

@@ -90,6 +90,133 @@ export const useExternalexchange = () => {
             const quote = getQuoteDayInfoByCode(el.goodscode);
             if (quote) {
                 tableList.value.push(quote)
+            } else {
+                tableList.value.push({
+                    ask: 0,
+                    ask1number: 0,
+                    ask2: 0,
+                    ask3: 0,
+                    ask4: 0,
+                    ask5: 0,
+                    ask6: 0,
+                    ask7: 0,
+                    ask8: 0,
+                    ask9: 0,
+                    askorderid: 0,
+                    askorderid2: 0,
+                    askorderid3: 0,
+                    askorderid4: 0,
+                    askorderid5: 0,
+                    askordervolume: 0,
+                    askordervolume1number: 0,
+                    askordervolume2: 0,
+                    askordervolume3: 0,
+                    askordervolume4: 0,
+                    askordervolume5: 0,
+                    askordervolume6: 0,
+                    askordervolume7: 0,
+                    askordervolume8: 0,
+                    askordervolume9: 0,
+                    askqueueinfo: '',
+                    askvolume: 0,
+                    askvolume1number: 0,
+                    askvolume2: 0,
+                    askvolume3: 0,
+                    askvolume4: 0,
+                    askvolume5: 0,
+                    askvolume6: 0,
+                    askvolume7: 0,
+                    askvolume8: 0,
+                    askvolume9: 0,
+                    averageprice: 0,
+                    bid: 0,
+                    bid1number: 0,
+                    bid2: 0,
+                    bid3: 0,
+                    bid4: 0,
+                    bid5: 0,
+                    bid6: 0,
+                    bid7: 0,
+                    bid8: 0,
+                    bid9: 0,
+                    bidorderid: 0,
+                    bidorderid2: 0,
+                    bidorderid3: 0,
+                    bidorderid4: 0,
+                    bidorderid5: 0,
+                    bidordervolume: 0,
+                    bidordervolume1number: 0,
+                    bidordervolume2: 0,
+                    bidordervolume3: 0,
+                    bidordervolume4: 0,
+                    bidordervolume5: 0,
+                    bidordervolume6: 0,
+                    bidordervolume7: 0,
+                    bidordervolume8: 0,
+                    bidordervolume9: 0,
+                    bidqueueinfo: '',
+                    bidvolume: 0,
+                    bidvolume1number: 0,
+                    bidvolume2: 0,
+                    bidvolume3: 0,
+                    bidvolume4: 0,
+                    bidvolume5: 0,
+                    bidvolume6: 0,
+                    bidvolume7: 0,
+                    bidvolume8: 0,
+                    bidvolume9: 0,
+                    calloptionpremiums: 0,
+                    calloptionpremiums2: 0,
+                    calloptionpremiums3: 0,
+                    calloptionpremiums4: 0,
+                    calloptionpremiums5: 0,
+                    cleartime: 0,
+                    exchangecode: 0,
+                    exchangedate: 0,
+                    goodscode: '',
+                    refgoodscode: '',
+                    grepmarketprice: 0,
+                    highest: 0,
+                    holdincrement: 0,
+                    holdvolume: 0,
+                    iep: 0,
+                    iev: 0,
+                    inventory: 0,
+                    iscleared: 0,
+                    issettled: 0,
+                    last: 0,
+                    lastlot: 0,
+                    lasttime: '',
+                    lastturnover: 0,
+                    lastvolume: 0,
+                    limitdown: 0,
+                    limitup: 0,
+                    lowest: 0,
+                    nontotalholdervolume: 0,
+                    nontotallot: 0,
+                    nontotalturnover: 0,
+                    nontotalvolume: 0,
+                    opened: 0,
+                    opentime: '',
+                    orderid: 0,
+                    preclose: 0,
+                    preholdvolume: 0,
+                    presettle: 0,
+                    publictradetype: '',
+                    putoptionpremiums: 0,
+                    putoptionpremiums2: 0,
+                    putoptionpremiums3: 0,
+                    putoptionpremiums4: 0,
+                    putoptionpremiums5: 0,
+                    settle: 0,
+                    strikeprice: 0,
+                    totalaskvolume: 0,
+                    totalbidvolume: 0,
+                    totallot: 0,
+                    totalturnover: 0,
+                    totalvolume: 0,
+                    utclasttime: '',
+                })
             }
         })
     }