li.shaoyi 4 tahun lalu
induk
melakukan
49751d07c8
23 mengubah file dengan 262 tambahan dan 280 penghapusan
  1. 4 4
      src/assets/styles/mixin.less
  2. 17 11
      src/common/components/echart/echart-kline/index.vue
  3. 17 11
      src/common/components/echart/echart-timeline/index.vue
  4. 15 43
      src/common/components/filter/index.vue
  5. 11 4
      src/common/setup/table/clolumn.ts
  6. 2 0
      src/services/bus/goods.ts
  7. 24 12
      src/services/go/ermcp/futures/index.ts
  8. 1 0
      src/services/go/ermcp/goodsInfo/interface.ts
  9. 6 6
      src/views/business/plan/components/filterTable/index.vue
  10. 8 19
      src/views/business/spotmarket/components/filter/index.vue
  11. 14 14
      src/views/business/spotmarket/list/price/index.vue
  12. 3 0
      src/views/information/spot-contract/components/detail/setup.ts
  13. 56 56
      src/views/information/spot-contract/list/audit/index.vue
  14. 1 1
      src/views/information/spot-contract/list/purchase/index.vue
  15. 1 1
      src/views/information/spot-contract/list/sell/index.vue
  16. 5 7
      src/views/manage/inventory-review/components/filterTable/index.vue
  17. 1 1
      src/views/manage/inventory-review/list/audit/index.vue
  18. 36 28
      src/views/market/futures/compoments/futures-trade/index.vue
  19. 2 4
      src/views/market/futures/index.vue
  20. 1 1
      src/views/market/futures/setup.tsx
  21. 25 27
      src/views/market/spot_trade/components/goods-chart/chart/index.vue
  22. 7 29
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/index.vue
  23. 5 1
      src/views/order/futures_information/components/futures_information_position/columns.tsx

+ 4 - 4
src/assets/styles/mixin.less

@@ -1512,6 +1512,7 @@
 
 .filterTable {
     display     : inline-flex;
+    align-items : center;
     width       : calc(100% - 3px);
     padding-left: 3px;
     background  : @m-black35;
@@ -3175,10 +3176,9 @@ input:-internal-autofill-selected {
 
 // 表格按钮列表固定在右边
 .btn-list-sticky {
-    position  : sticky;
-    position  : -webkit-sticky;
-    right     : 2px;
-    margin-top: 7px;
+    position: sticky;
+    position: -webkit-sticky;
+    right   : 2px;
 }
 
 // 步骤条

+ 17 - 11
src/common/components/echart/echart-kline/index.vue

@@ -326,18 +326,24 @@ export default defineComponent({
                 count: 1440,
             };
             // 查询K线数据
-            queryHistoryDatas(params).then((res) => {
-                loading.value = false;
-                if (res.length) {
-                    isEmpty.value = false;
-                    // 日期升序排序
-                    const kdata = res.sort((a, b) => moment(a.ts).valueOf() - moment(b.ts).valueOf());
-                    handleData(kdata);
-                } else {
+            queryHistoryDatas(params)
+                .then((res) => {
+                    if (res.length) {
+                        isEmpty.value = false;
+                        // 日期升序排序
+                        const kdata = res.sort((a, b) => moment(a.ts).valueOf() - moment(b.ts).valueOf());
+                        handleData(kdata);
+                    } else {
+                        isEmpty.value = true;
+                    }
+                    initOptions(props.seriesType);
+                })
+                .catch(() => {
                     isEmpty.value = true;
-                }
-                initOptions(props.seriesType);
-            });
+                })
+                .finally(() => {
+                    loading.value = false;
+                });
         });
 
         return {

+ 17 - 11
src/common/components/echart/echart-timeline/index.vue

@@ -166,18 +166,24 @@ export default defineComponent({
         onMounted(() => {
             loading.value = true;
             // 查询分时数据
-            QueryTSData(props.quoteData.goodscode).then((res) => {
-                loading.value = false;
-                if (res.historyDatas.length) {
-                    isEmpty.value = false;
-                    handleData(res);
-                    // 调用父级函数查询tik数据 (不合理的逻辑处理,待优化)
-                    emit('change', res.startTime, res.endTime);
-                } else {
+            QueryTSData(props.quoteData.goodscode)
+                .then((res) => {
+                    if (res.historyDatas.length) {
+                        isEmpty.value = false;
+                        handleData(res);
+                        // 调用父级函数查询tik数据 (不合理的逻辑处理,待优化)
+                        emit('change', res.startTime, res.endTime);
+                    } else {
+                        isEmpty.value = true;
+                    }
+                    initOptions();
+                })
+                .catch(() => {
                     isEmpty.value = true;
-                }
-                initOptions();
-            });
+                })
+                .finally(() => {
+                    loading.value = false;
+                });
         });
 
         watch(

+ 15 - 43
src/common/components/filter/index.vue

@@ -1,40 +1,16 @@
 <template>
-    <!-- 过滤客户资料表格 -->
-    <div class="filter-custom-table">
-        <slot name="selectBefore"></slot>
-        <a-select
-            label-in-value
-            class="conditionSelect"
-            v-for="(item, i) in selectList"
-            :key="i + '11'"
-            style="width: 120px"
-            v-model:value="item.value"
-            :placeholder="item.placeholder"
-            @change="item.change"
-        >
-            <a-select-option
-                v-for="(option, j) in item.list"
-                :key="j + '22'"
-                :value="option.value"
-            >{{option.lable}}</a-select-option>
-        </a-select>
-        <slot name="selectAfter"></slot>
-        <a-input
-            v-model:value="item.value"
-            v-for="(item,i) in inputList"
-            :key="i + '33'"
-            class="tableConditionInput"
-            :placeholder="item.placeholder"
-        />
-        <slot name="inputAfter"></slot>
-        <a-button
-            class="selectBtn"
-            v-for="(item, i) in fixedBtnList"
-            :key="i + 'fixed'"
-            @click="item.event"
-        >{{item.lable}}</a-button>
-        <slot></slot>
-    </div>
+  <!-- 过滤客户资料表格 -->
+  <div class="filter-custom-table">
+    <slot name="selectBefore"></slot>
+    <a-select label-in-value class="conditionSelect" v-for="(item, i) in selectList" :key="i + '11'" style="width: 120px" v-model:value="item.value" :placeholder="item.placeholder" @change="item.change">
+      <a-select-option v-for="(option, j) in item.list" :key="j + '22'" :value="option.value">{{option.lable}}</a-select-option>
+    </a-select>
+    <slot name="selectAfter"></slot>
+    <a-input v-model:value="item.value" v-for="(item,i) in inputList" :key="i + '33'" class="tableConditionInput" :placeholder="item.placeholder" />
+    <slot name="inputAfter"></slot>
+    <a-button class="selectBtn" v-for="(item, i) in fixedBtnList" :key="i + 'fixed'" @click="item.event">{{item.lable}}</a-button>
+    <slot></slot>
+  </div>
 </template>
 
 <script lang="ts">
@@ -73,23 +49,19 @@ export default defineComponent({
 }
 .filter-custom-table {
     display: inline-flex;
-    padding-top: 7px;
-    padding-bottom: 7px;
-    height: 46px;
+    align-items: center;
+    padding: 7px 0;
     .btnDeafault.ant-btn,
     .operBtn.ant-btn {
         height: 26px !important;
         line-height: 26px !important;
     }
-ant-btn operBtn
-    .ant-select-single:not(.ant-select-customize-input) + .ant-select-single:not(.ant-select-customize-input),
+    ant-btn operBtn .ant-select-single:not(.ant-select-customize-input) + .ant-select-single:not(.ant-select-customize-input),
     .ant-select + .ant-space.ant-space-vertical {
         margin-left: 10px;
         margin-top: 0px;
     }
     .ant-select-single:not(.ant-select-customize-input) {
-        height: 26px;
-        line-height: 26px !important;
         .ant-select-selector {
             height: 30px;
             border-color: @m-grey46 !important;

+ 11 - 4
src/common/setup/table/clolumn.ts

@@ -69,10 +69,17 @@ export function getTableColumns() {
                 }
             }
             // 以下添加过滤数据对应的方法
-            filterKeyList.forEach(el => {
-                if (e.columnfield === el) {
-                    item.onFilter = (value: string, record: any) => record[el].toString().includes(String(value));
-                    item.filteredValue = filtered[el] || null;
+            filterKeyList.forEach(key => {
+                if (e.columnfield === key) {
+                    item.onFilter = (value: string, record: any) => {
+                        const fieldValue = record[key];
+                        if (fieldValue !== undefined) {
+                            return fieldValue.toString().indexOf(value.toString()) === 0;
+                        }
+                        console.warn(`属性 ${key} 不存在表头中`);
+                        return true;
+                    }
+                    item.filteredValue = filtered[key] || null;
                 }
             })
             cb && cb(e, item, filtered);

+ 2 - 0
src/services/bus/goods.ts

@@ -158,6 +158,7 @@ export function getGoodsQuoteList(exchangeId?: number): GoodsQuote[] {
             quoteminunit: el.quoteminunit,
             outerdealmode: el.outerdealmode,
             last: 0, // 最新价
+            lasttime: '', // 最新时间
             bid: 0,// 买价
             ask: 0, // 卖价
             bidvolume: 0, // 买量
@@ -182,6 +183,7 @@ export function getGoodsQuoteList(exchangeId?: number): GoodsQuote[] {
         if (quote) {
             const refs = toRefs(quote)
             item.last = refs.last; // 最新价
+            item.lasttime = refs.lasttime;
             item.bid = refs.bid; // 买价
             item.ask = refs.ask; // 卖价
             item.bidvolume = refs.bidvolume; // 买量

+ 24 - 12
src/services/go/ermcp/futures/index.ts

@@ -8,10 +8,14 @@ import { getSelectedAccountId } from '@/services/bus/account';
  */
 export async function queryErmcpTradePosition(params?: QueryErmcpTradePositionReq): Promise<QueryErmcpTradePositionRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QueryErmcpTradePosition', {
-            accountID: getSelectedAccountId(),
-            ...params
-        });
+        const accountID = getSelectedAccountId();
+        if (accountID) {
+            return commonSearch_go('/Ermcp/QueryErmcpTradePosition', {
+                accountID: getSelectedAccountId(),
+                ...params
+            });
+        }
+        return []
     } catch (err) {
         throw new Error(`获取企业风管期货持仓头寸信息: ${err}`);
     }
@@ -22,10 +26,14 @@ export async function queryErmcpTradePosition(params?: QueryErmcpTradePositionRe
  */
 export async function queryErmcpOrderDetails(params?: QueryErmcpOrderDetailsReq): Promise<QueryErmcpOrderDetailsRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QueryErmcpOrderDetails', {
-            accountID: getSelectedAccountId(),
-            ...params
-        });
+        const accountID = getSelectedAccountId();
+        if (accountID) {
+            return commonSearch_go('/Ermcp/QueryErmcpOrderDetails', {
+                accountID: getSelectedAccountId(),
+                ...params
+            });
+        }
+        return []
     } catch (err) {
         throw new Error(`获取企业风管期货成交单信息: ${err}`);
     }
@@ -36,10 +44,14 @@ export async function queryErmcpOrderDetails(params?: QueryErmcpOrderDetailsReq)
  */
 export async function queryErmcpTradeDetails(params?: QueryErmcpTradeDetailsReq): Promise<QueryErmcpTradeDetailsRsp[]> {
     try {
-        return commonSearch_go('/Ermcp/QueryErmcpTradeDetails', {
-            accountID: getSelectedAccountId(),
-            ...params
-        });
+        const accountID = getSelectedAccountId();
+        if (accountID) {
+            return commonSearch_go('/Ermcp/QueryErmcpTradeDetails', {
+                accountID: getSelectedAccountId(),
+                ...params
+            });
+        }
+        return []
     } catch (err) {
         throw new Error(`获取企业风管期货成交单信息: ${err}`);
     }

+ 1 - 0
src/services/go/ermcp/goodsInfo/interface.ts

@@ -334,6 +334,7 @@ export interface GoodsQuote {
     quoteminunit: number;//行情最小变动单位 [整数,报价小数位一起使用]
     outerdealmode: number;//外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今
     last: UnwrapRef<Ref>; // 最新价
+    lasttime: UnwrapRef<Ref>; // 最新时间
     bid: UnwrapRef<Ref>; // 买价
     ask: UnwrapRef<Ref>; // 卖价
     bidvolume: UnwrapRef<Ref>; // 买量

+ 6 - 6
src/views/business/plan/components/filterTable/index.vue

@@ -1,9 +1,9 @@
 <template>
-    <!-- 过滤客户资料表格 -->
-    <div class="filterTable">
-        <FilterOption :selectList="selectList" :inputList="inputList" :fixedBtnList="fixedBtnList" />
-        <slot></slot>
-    </div>
+  <!-- 过滤客户资料表格 -->
+  <div class="filterTable">
+    <FilterOption :selectList="selectList" :inputList="inputList" :fixedBtnList="fixedBtnList" />
+    <slot></slot>
+  </div>
 </template>
 
 <script lang="ts">
@@ -19,7 +19,7 @@ export default defineComponent({
             {
                 value: undefined,
                 key: 'contracttype',
-                placeholder: '全部合同类型',
+                placeholder: '全部计划类型',
                 list: [
                     { value: 1, lable: '采购' },
                     { value: -1, lable: '销售' },

+ 8 - 19
src/views/business/spotmarket/components/filter/index.vue

@@ -1,9 +1,9 @@
 <template>
-    <!-- 过滤客户资料表格 -->
-    <div class="filterTable">
-        <FilterOption :selectList="selectList" :fixedBtnList="fixedBtnList" />
-        <slot></slot>
-    </div>
+  <!-- 过滤客户资料表格 -->
+  <div class="filterTable">
+    <FilterOption :selectList="selectList" :fixedBtnList="fixedBtnList" />
+    <slot></slot>
+  </div>
 </template>
 
 <script lang="ts">
@@ -23,30 +23,19 @@ export default defineComponent({
                 value: undefined,
                 key: 'deliverygoodsid',
                 placeholder: '全部现货品种',
-                list: [
-                    { value: 1, lable: '采购' },
-                    { value: -1, lable: '销售' },
-                ],
+                list: [],
             },
             {
                 value: undefined,
                 key: 'wrstandardid',
                 placeholder: '全部商品',
-                list: [
-                    { value: 1, lable: '一口价' },
-                    { value: 2, lable: '点价' },
-                    { value: 3, lable: '暂定价' },
-                ],
+                list: [],
             },
             {
                 value: undefined,
                 key: 'brandid',
                 placeholder: '全部品牌',
-                list: [
-                    { value: 1, lable: '一口价' },
-                    { value: 2, lable: '点价' },
-                    { value: 3, lable: '暂定价' },
-                ],
+                list: [],
             },
         ]);
         const input: InputList[] = [];

+ 14 - 14
src/views/business/spotmarket/list/price/index.vue

@@ -1,17 +1,17 @@
 <template>
-    <!-- 现货参考价 -->
-    <div class="spotmarket_price" :loading="loading">
-        <mtp-table-filter></mtp-table-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>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
-    </div>
+  <!-- 现货参考价 -->
+  <div class="spotmarket_price" :loading="loading">
+    <mtp-table-filter @search="updateColumn"></mtp-table-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>
+    </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">
@@ -47,7 +47,7 @@ export default defineComponent({
             queryFn: queryTableAction,
             menuType: EnumRouterName.goods_info,
             tableName: 'table_pcweb_hedging_plan',
-            tableFilterKey: ['contracttype', 'hedgeplanno', 'deliverygoodsname'],
+            tableFilterKey: ['deliverygoodsid', 'wrstandardid', 'brandid'],
             isDetail: true,
         };
 

+ 3 - 0
src/views/information/spot-contract/components/detail/setup.ts

@@ -106,6 +106,9 @@ export const columnsPaTradeLink: ColumnType[] = [
         key: 'relatedqty',
         align: 'center',
         width: 120,
+        customRender: ({ record }: { record: Ermcp3PaTradeLinkDetailReqRsp }) => {
+            return record.relatedqty + record.enumdicname;
+        },
     },
     {
         title: '关联方式',

+ 56 - 56
src/views/information/spot-contract/list/audit/index.vue

@@ -1,53 +1,53 @@
 <template>
-    <!-- 现货合同: 待审核-已审核-->
-    <div class="spot-contract-peddding" :loading="loading">
-        <filterCustomTable @search="updateColumn"></filterCustomTable>
-        <a-table :columns="columns" class="topTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
-            <!-- 额外的展开行 -->
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
-            </template>
-            <template #biztype="{ text }">
-                <a>{{ getBizTypeName(text) }}</a>
-            </template>
-            <template #pricetype="{ text }">
-                <a>{{ getPriceTypeName(text) }}</a>
-            </template>
-            <template #contracctstatus="{ text }">
-                <a>{{ getContractStatusName(text) }}</a>
-            </template>
-            <template #contracttype="{ text }">
-                <a>{{ getContractTypeName(text) }}</a>
-            </template>
-            <!-- 对手方 -->
-            <template #negative="{ record }">
-                <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-            </template>
-            <template #startdate="{ record }">
-                <span>{{ formatValue(formatTime(record.startdate, 'd') + '--' + formatTime(record.enddate, 'd')) }}</span>
-            </template>
-            <!-- 交收期 -->
-            <template #deliverystartdate="{ record }">
-                <span>{{ formatValue(formatTime(record.deliverystartdate, 'd') + '--' + formatTime(record.deliveryenddate, 'd')) }}</span>
-            </template>
-            <!-- 业务员 -->
-            <template #saleuserid="{ record }">
-                <span>{{ findManagerName(record.saleuserid) }}</span>
-            </template>
-            <!-- 跟单员 -->
-            <template #meruserid="{ record }">
-                <span>{{ findManagerName(record.meruserid) }}</span>
-            </template>
-            <!-- 合同量 -->
-            <template #qty="{ text, record }">
-                <span>{{ handleEnumdic(text, record) }}</span>
-            </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="spot-contract-peddding" :loading="loading">
+    <filterCustomTable @search="updateColumn"></filterCustomTable>
+    <a-table :columns="columns" class="topTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+      <!-- 额外的展开行 -->
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
+      </template>
+      <template #biztype="{ text }">
+        <a>{{ getBizTypeName(text) }}</a>
+      </template>
+      <template #pricetype="{ text }">
+        <a>{{ getPriceTypeName(text) }}</a>
+      </template>
+      <template #contracctstatus="{ text }">
+        <a>{{ getContractStatusName(text) }}</a>
+      </template>
+      <template #contracttype="{ text }">
+        <a>{{ getContractTypeName(text) }}</a>
+      </template>
+      <!-- 对手方 -->
+      <template #negative="{ record }">
+        <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+      </template>
+      <template #startdate="{ record }">
+        <span>{{ formatValue(formatTime(record.startdate, 'd') + '--' + formatTime(record.enddate, 'd')) }}</span>
+      </template>
+      <!-- 交收期 -->
+      <template #deliverystartdate="{ record }">
+        <span>{{ formatValue(formatTime(record.deliverystartdate, 'd') + '--' + formatTime(record.deliveryenddate, 'd')) }}</span>
+      </template>
+      <!-- 业务员 -->
+      <template #saleuserid="{ record }">
+        <span>{{ findManagerName(record.saleuserid) }}</span>
+      </template>
+      <!-- 跟单员 -->
+      <template #meruserid="{ record }">
+        <span>{{ findManagerName(record.meruserid) }}</span>
+      </template>
+      <!-- 合同量 -->
+      <template #qty="{ text, record }">
+        <span>{{ handleEnumdic(text, record) }}</span>
+      </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">
@@ -61,7 +61,7 @@ import { QuerySpotContract } from '@/services/go/ermcp/spot-contract';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getTableButton } from '@/common/setup/table/button';
 import { useRoute } from 'vue-router';
-import moment from "moment"
+import moment from 'moment';
 
 export default defineComponent({
     name: EnumRouterName.spot_contract_checkpending,
@@ -85,11 +85,11 @@ export default defineComponent({
         const queryTableAction = () => {
             switch (routeName) {
                 case 'contract_checkpending':
-                    queryTable(QuerySpotContract, { querytype: 2 }).then((res)=>{
-                        tableList.value.sort((a,b)=>{
-                            return moment(b.createtime).valueOf()-moment(a.createtime).valueOf()
-                        })
-                    })
+                    queryTable(QuerySpotContract, { querytype: 2 }).then((res) => {
+                        tableList.value.sort((a, b) => {
+                            return moment(b.createtime).valueOf() - moment(a.createtime).valueOf();
+                        });
+                    });
                     break;
                 case 'contract_performance':
                     queryTable(QuerySpotContract, { querytype: 3 });
@@ -116,7 +116,7 @@ export default defineComponent({
             queryFn: queryTableAction,
             menuType: EnumRouterName.spot_contract_checkpending,
             tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'pricetype', 'contractno'],
+            tableFilterKey: ['contracttype', 'pricetype', 'contractno', 'negative'],
             tableFilterCB,
             isDetail: true,
         };

+ 1 - 1
src/views/information/spot-contract/list/purchase/index.vue

@@ -122,7 +122,7 @@ export default defineComponent({
             queryFn: queryTableAction,
             menuType: EnumRouterName.spot_contract_unsubmitted,
             tableName: 'table_pcweb_delivery',
-            tableFilterKey: ['pricetype', 'contractno'],
+            tableFilterKey: ['pricetype', 'contractno', 'sellusername'],
             tableFilterCB,
             isDetail: true,
         };

+ 1 - 1
src/views/information/spot-contract/list/sell/index.vue

@@ -105,7 +105,7 @@ export default defineComponent({
             queryFn: queryTableAction,
             menuType: EnumRouterName.spot_contract_unsubmitted,
             tableName: 'table_pcweb_delivery',
-            tableFilterKey: ['contracttype', 'pricetype', 'contractno'],
+            tableFilterKey: ['pricetype', 'contractno', 'buyusername'],
             tableFilterCB,
             isDetail: true,
         };

+ 5 - 7
src/views/manage/inventory-review/components/filterTable/index.vue

@@ -1,9 +1,7 @@
 <template>
   <!-- 过滤客户资料表格 -->
   <div class="filterTable">
-    <FilterOption :selectList="selectList"
-                  :inputList="inputList"
-                  :fixedBtnList="fixedBtnList" />
+    <FilterOption :selectList="selectList" :inputList="inputList" :fixedBtnList="fixedBtnList" />
     <slot></slot>
   </div>
 </template>
@@ -26,13 +24,13 @@ export default defineComponent({
     setup(props, context) {
         // 入库过滤类型
         const inList = [
-            { value: 1, lable: '采购入库' },
-            { value: 3, lable: '生产入库' },
+            { value: 5, lable: '采购入库' },
+            { value: 7, lable: '生产入库' },
         ];
         // 出库过滤类型
         const outList = [
-            { value: 2, lable: '销售出库' },
-            { value: 4, lable: '生产出库' },
+            { value: 6, lable: '销售出库' },
+            { value: 8, lable: '生产出库' },
         ];
         const select: SelectList[] = [
             {

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

@@ -111,7 +111,7 @@ export default defineComponent({
             queryFn: queryTableAction,
             menuType: EnumRouterName.inventory_review_checkin,
             tableName: getTableName(),
-            tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
+            tableFilterKey: ['contracttype', 'inouttype', 'buyusernameOrsellusername', 'contractno', 'deliverygoodsname'],
             tableFilterCB: filtrFn,
             isDetail: true,
         };

+ 36 - 28
src/views/market/futures/compoments/futures-trade/index.vue

@@ -52,6 +52,8 @@
           </a-button>
           <!--如果有持仓则显示按钮-->
           <a-button :loading="loading" @click="submit('close')" v-show="positionList.length && !isHedging">
+            <!--根据持仓方向显示平仓价格-->
+            <span v-if="selectedPosition">{{selectedPosition.buyorsell === BuyOrSell.buy ? sellPrice : buyPrice}}</span>
             <span>平仓</span>
           </a-button>
         </div>
@@ -109,43 +111,44 @@ export default defineComponent({
 
         // 表格选中的 rowKey 数据 :rowKey="(record,index)=>index"
         const selectedRowKeys = ref<number[]>([]);
-        const onSelectChange = (keys: number[]) => {
+        // 当前选择的持仓单据
+        const selectedPosition = ref<QueryErmcpTradePositionRsp>();
+        // 选择持仓
+        const onSelectChange = (keys: number[], record: QueryErmcpTradePositionRsp[]) => {
             selectedRowKeys.value = keys;
-            // 选中的单据数据
-            const { enableqty, positionaverageprice } = positionList.value[keys[0]];
+            selectedPosition.value = record[0];
+            const { enableqty, positionaverageprice } = record[0];
             // 更新价格和数量
             formData.OrderPrice = positionaverageprice;
             formData.OrderQty = enableqty;
-            // 指定价格类型显示为限价
-            selectedPriceType.value = 3;
         };
 
         // 持仓列表
         const positionList = computed(() => allPositionList.value.filter((item) => item.goodsid === selectedGoods.value.goodsid));
         // 选中的价格类型
-        const selectedPriceType = ref(0);
+        const selectedPriceType = ref(1);
         // 价格类型列表
         const priceTypeList = [
-            {
-                priceType: 0,
-                priceName: '最新价',
-            },
+            // {
+            //     priceType: 0,
+            //     priceName: '最新价',
+            // },
             {
                 priceType: 1,
                 priceName: '市价',
             },
-            {
-                priceType: 2,
-                priceName: '对手价',
-            },
+            // {
+            //     priceType: 2,
+            //     priceName: '对手价',
+            // },
             {
                 priceType: 3,
                 priceName: '限价',
             },
-            {
-                priceType: 4,
-                priceName: '超价',
-            },
+            // {
+            //     priceType: 4,
+            //     priceName: '超价',
+            // },
         ];
 
         // 买价
@@ -174,12 +177,15 @@ export default defineComponent({
                 }
                 // 超价
                 case 4: {
-                    // 系统参数
-                    const paramValue = APP.get('systemParams').find((el: Systemparam) => el.paramcode === '148')?.paramvalue ?? '0';
-                    // 点数
-                    const point = decimalplace > 0 ? -decimalplace * quoteminunit * Number(paramValue) : 1;
-                    const num = Math.pow(10, point);
-                    return direction === BuyOrSell.buy ? ask + num : bid - num;
+                    if (ask && bid) {
+                        // 系统参数
+                        const paramValue = APP.get('systemParams').find((el: Systemparam) => el.paramcode === '148')?.paramvalue ?? '0';
+                        // 点数
+                        const point = decimalplace > 0 ? -decimalplace * quoteminunit * Number(paramValue) : 1;
+                        const num = Math.pow(10, point);
+                        return direction === BuyOrSell.buy ? ask + num : bid - num;
+                    }
+                    return 0;
                 }
                 default: {
                     return 0;
@@ -257,14 +263,13 @@ export default defineComponent({
                     successMsg = '平仓成功';
                     failMsg = '平仓失败';
 
-                    const positionIndex = selectedRowKeys.value[0]; // 选中的单据索引
-                    if (positionIndex === undefined) {
+                    if (!selectedPosition.value) {
                         message.error('请选择需要平仓的单据');
                         return;
                     }
 
                     // 选中的单据数据
-                    const { curpositionqty, curtdpositionenabled, buyorsell } = positionList.value[positionIndex];
+                    const { curpositionqty, curtdpositionenabled, buyorsell } = selectedPosition.value;
 
                     // 判断平仓数量
                     if (formData.OrderQty > curpositionqty) {
@@ -272,7 +277,8 @@ export default defineComponent({
                         return;
                     }
 
-                    formData.BuyOrSell = buyorsell === BuyOrSell.buy ? BuyOrSell.sell : BuyOrSell.buy; // 如果单据方向是买,平仓方向就是卖,如果是卖,平仓方向就是买
+                    formData.BuyOrSell = buyorsell === BuyOrSell.buy ? BuyOrSell.sell : BuyOrSell.buy; // 根据持仓方向选择平仓方向
+                    formData.OrderPrice = buyorsell === BuyOrSell.buy ? sellPrice.value : buyPrice.value; // 根据持仓方向选择平仓价格
                     formData.ChannelBuildType = BuildType.close;
 
                     const account = accountList.find((el) => el.accountid === formData.AccountID)!;
@@ -310,6 +316,7 @@ export default defineComponent({
             getPositionList,
             goodsChange,
             selectedRowKeys,
+            selectedPosition,
             priceTypeList,
             PriceType,
             selectedPriceType,
@@ -319,6 +326,7 @@ export default defineComponent({
             onSelectChange,
             minusQty,
             plusQty,
+            BuyOrSell,
         };
     },
 });

+ 2 - 4
src/views/market/futures/index.vue

@@ -90,8 +90,8 @@ export default defineComponent({
 }
 .filter-custom-table {
     display: inline-flex;
-    padding-top: 4px;
-    height: 34px;
+    align-items: center;
+    padding: 7px 0;
     .conditionSelect:first-child {
         margin-right: 10px;
     }
@@ -106,8 +106,6 @@ export default defineComponent({
         margin-left: 10px;
     }
     .ant-select-single:not(.ant-select-customize-input) {
-        height: 26px;
-        line-height: 26px !important;
         .ant-select-selector {
             height: 26px;
             border-color: @m-grey46 !important;

+ 1 - 1
src/views/market/futures/setup.tsx

@@ -230,7 +230,7 @@ export const useExternalexchange = () => {
     })
 
     onBeforeUnmount(() => {
-        stopSubcribe();
+        stopSubcribe && stopSubcribe();
     })
 
     return { loading, exchangeId, tabList, tableList, changeTab, }

+ 25 - 27
src/views/market/spot_trade/components/goods-chart/chart/index.vue

@@ -191,42 +191,40 @@ export default defineComponent({
 
         // Tik列表
         const getHistoryTikDatas = (startTime: string, endTime: string) => {
-            if (!tradedList.value.length) {
-                const param = {
-                    goodsCode: props.selectedRow.goodscode,
-                    count: 20,
-                    startTime: moment(startTime).format('YYYY-MM-DD HH:mm:ss'),
-                    endTime: moment(endTime).format('YYYY-MM-DD HH:mm:ss'),
-                };
-                QueryHistoryTikDatas(param).then((res) => {
-                    tradedList.value = res;
-                });
-            }
+            const param = {
+                goodsCode: props.selectedRow.goodscode.toUpperCase(),
+                count: 20,
+                startTime: moment(startTime).format('YYYY-MM-DD HH:mm:ss'),
+                endTime: moment(endTime).format('YYYY-MM-DD HH:mm:ss'),
+            };
+            QueryHistoryTikDatas(param).then((res) => {
+                tradedList.value = res;
+            });
         };
 
         // 监听行情变化刷Tik列表
         watch(
             () => props.selectedRow.last,
             () => {
-                if (tradedList.value.length) {
+                if (tradedList.value.length > 19) {
                     // 移除列表最后一条记录
                     tradedList.value.pop();
-                    // 向列表开头添加新纪录
-                    tradedList.value.unshift({
-                        AV: 0,
-                        Ask: 0,
-                        BV: 0,
-                        Bid: 0,
-                        HI: 0,
-                        HV: 0,
-                        PE: props.selectedRow.last,
-                        TDR: 0,
-                        TK: 0,
-                        TS: props.selectedRow.lasttime,
-                        TT: 0,
-                        Vol: props.selectedRow.lastvolume,
-                    });
                 }
+                // 向列表开头添加新纪录
+                tradedList.value.unshift({
+                    AV: 0,
+                    Ask: 0,
+                    BV: 0,
+                    Bid: 0,
+                    HI: 0,
+                    HV: 0,
+                    PE: props.selectedRow.last,
+                    TDR: 0,
+                    TK: 0,
+                    TS: props.selectedRow.lasttime,
+                    TT: 0,
+                    Vol: props.selectedRow.lastvolume,
+                });
             }
         );
 

+ 7 - 29
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/index.vue

@@ -3,29 +3,15 @@
   <div class="topTableHeight">
     <div class="filterTable">
       <div class="filter-custom-table">
-        <a-select class="conditionSelect"
-                  :style="{width: '180px', maxHeight: '400px', overflow: 'auto' }"
-                  @change="goodsChange"
-                  placeholder="全部标的合约">
-          <a-select-option v-for="item in getRefGoodsList()"
-                           :value="item"
-                           :key="item">{{item}}</a-select-option>
+        <a-select class="conditionSelect" :style="{width: '180px', maxHeight: '400px', overflow: 'auto' }" @change="goodsChange" placeholder="全部标的合约">
+          <a-select-option v-for="item in getRefGoodsList()" :value="item" :key="item">{{item}}</a-select-option>
         </a-select>
         <!-- <a-button class="btnDeafault"
                 @click="search(true)"
                 style="width: 80px">筛选</a-button>-->
       </div>
     </div>
-    <a-table :columns="columns"
-             :class="['srcollYTable', isBottom ? 'secondTabTable' : 'secondTabTableNoBottom', goodsList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
-             :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 407px)' : 'calc(100vh - 167px)' }"
-             :pagination="false"
-             :loading="loading"
-             :expandedRowKeys="expandedRowKeys"
-             :customRow="Rowclick"
-             rowKey="goodscode"
-             ref="tableRef"
-             :data-source="goodsList">
+    <a-table :columns="columns" :class="['srcollYTable', isBottom ? 'secondTabTable' : 'secondTabTableNoBottom', goodsList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 407px)' : 'calc(100vh - 167px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="goodscode" ref="tableRef" :data-source="goodsList">
       <template #totalturnover="{ text }">
         <span>{{changeUnit(text)}}</span>
       </template>
@@ -66,13 +52,8 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu"
-                 @cancel="closeContext"
-                 :list="btnList"></contextMenu>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="btnList"></contextMenu>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -143,8 +124,8 @@ export default defineComponent({
 }
 .filter-custom-table {
     display: inline-flex;
-    padding-top: 4px;
-    height: 34px;
+    align-items: center;
+    padding: 7px 0;
     .btnDeafault.ant-btn,
     .operBtn.ant-btn {
         height: 26px !important;
@@ -156,8 +137,6 @@ export default defineComponent({
         margin-left: 10px;
     }
     .ant-select-single:not(.ant-select-customize-input) {
-        height: 26px;
-        line-height: 26px !important;
         .ant-select-selector {
             height: 26px;
             border-color: @m-grey46 !important;
@@ -183,7 +162,6 @@ export default defineComponent({
         height: 26px !important;
         border: 1px solid @m-grey46 !important;
         .ant-calendar-picker-input.ant-input {
-
             height: 26px;
             line-height: 26px;
             &::placeholder {

+ 5 - 1
src/views/order/futures_information/components/futures_information_position/columns.tsx

@@ -113,7 +113,11 @@ function calcPositionPl(record: QueryErmcpTradePositionRsp) {
 function calcPositionPlRate(record: QueryErmcpTradePositionRsp) {
     const { opencost } = record
     // 持仓盈亏 ÷ 开仓成本
-    return calcPositionPl(record) / opencost * 100
+    const result = calcPositionPl(record) / opencost * 100
+    if (isNaN(result)) {
+        return 0
+    }
+    return result
 }
 
 /**