li.shaoyi 3 anni fa
parent
commit
dc13f6f0e8

+ 1 - 1
public/config/app.config.json

@@ -1,4 +1,4 @@
 {
-    "apiUrl": "http://103.40.249.123:38280/cfg?key=mtp_20",
+    "apiUrl": "http://192.168.31.139:8080/cfg?key=test_139",
     "icoTitle": "云融"
 }

+ 10 - 8
src/assets/styles/mixin.less

@@ -3764,17 +3764,19 @@ input:-internal-autofill-selected {
         }
 
         .anticon-minus {
-            position: absolute;
-            top     : 0px;
-            left    : 9px;
-            z-index : 1;
+            position   : absolute;
+            top        : 0px;
+            left       : 9px;
+            z-index    : 1;
+            user-select: none;
         }
 
         .anticon-plus {
-            position: absolute;
-            top     : 0px;
-            right   : 98px;
-            z-index : 1;
+            position   : absolute;
+            top        : 0px;
+            right      : 98px;
+            z-index    : 1;
+            user-select: none;
         }
 
         .anticon-calendar {

+ 1 - 0
src/services/go/Tjmd/interface.ts

@@ -16,6 +16,7 @@ export interface QueryQuoteGoodsListRsp {
     refgoodsid: number;//标的合约id
     refgoodsname: string;//标的合约名称
     sellqty: number;//卖量(暂不做, 无值, 保留字段)
+    decimalplace: number;//报价小数位
 }
 
 export interface QueryTjmdTodayAccountMarginReq {

+ 8 - 10
src/views/account-manager/account-manager-agency/account-manager-agency-sub/index.vue

@@ -1,25 +1,23 @@
 <template>
   <!-- 签约账号管理 -->
-  <mtp-table-scroll>
+  <mtp-table-scroll :style="{ display: tableList.length ? 'flex' : 'block' }">
     <template #default="{ scroll }">
       <a-table :columns="columns" class="srcollYTable" :scroll="scroll" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon" :expandIconAsCell="false" rowKey="key" :data-source="tableList">
-
         <template #handle="{ record }">
           <BtnList :btnList="tableBtns" v-if="record.signstatus === 4" :record="record" class="btn-list-sticky" @click="openComponent" />
         </template>
         <!-- 签约状态 -->
         <template #signstatus="{ text }">
-
           <span>{{ getSignStatus(text) }}</span>
         </template>
       </a-table>
-      <div v-if="tableList.length === 0">
-        <span class="add-bank" @click="componentId = addCode">
-          <svg class="icon svg-icon add-svg" aria-hidden="true">
-            <use xlink:href="#icon-tianjiayinhangka"></use>
-          </svg>
-          添加签约银行
-        </span>
+    </template>
+    <template #footer v-if="tableList.length === 0">
+      <div class="add-bank" @click="componentId = addCode">
+        <svg class="icon svg-icon add-svg" aria-hidden="true">
+          <use xlink:href="#icon-tianjiayinhangka"></use>
+        </svg>
+        <span>添加签约银行</span>
       </div>
     </template>
   </mtp-table-scroll>

+ 133 - 163
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -2,8 +2,7 @@
   <!-- 买卖大厅 -->
   <div class="buy-sell-market">
     <div class="buy-sell-market-title">
-      <a class="backIcon"
-         @click="cancel">
+      <a class="backIcon" @click="cancel">
         <LeftOutlined />
       </a>
       <div class="titleBtn">
@@ -20,27 +19,21 @@
         <div class="name">{{ selectedRow.warehousename }}</div>
         <div class="arrowRightIcon"></div>
       </div>
-      <div class="titleBtn titleBtn3"
-           v-if="!isWR(enumName)">
+      <div class="titleBtn titleBtn3" v-if="!isWR(enumName)">
         <div class="arrowLeftIcon"></div>
         <div class="name">
-          <a-month-picker :allowClear="false"
-                          v-model:value="time"
-                          @change="timeChange"
-                          class="commonDatePicker conditionPicker" />
+          <a-month-picker :allowClear="false" v-model:value="time" @change="timeChange" class="commonDatePicker conditionPicker" />
         </div>
         <DownOutlined />
       </div>
 
       <div class="priceBar bdf1 ml20">
         <div class="greenBar green">
-          <div class="numBlock"
-               v-if="isFloat()">
+          <div class="numBlock" v-if="isFloat()">
             <div class="first">卖基差</div>
             <div class="last">{{ selectedRow.sellpricemove }}</div>
           </div>
-          <div class="numBlock"
-               v-else>
+          <div class="numBlock" v-else>
             <div class="first">卖价</div>
             <div class="last">{{ selectedRow.sellprice }}</div>
           </div>
@@ -50,13 +43,11 @@
           </div>
         </div>
         <div class="redBar red">
-          <div class="numBlock"
-               v-if="isFloat()">
+          <div class="numBlock" v-if="isFloat()">
             <div class="first">买基差</div>
             <div class="last">{{ selectedRow.buypricemove }}</div>
           </div>
-          <div class="numBlock ml15"
-               v-else>
+          <div class="numBlock ml15" v-else>
             <div class="first">买价</div>
             <div class="last">{{ selectedRow.buyprice }}</div>
           </div>
@@ -66,48 +57,27 @@
           </div>
         </div>
       </div>
-      <a-button class="market"
-                v-if="isFloat()"
-                @click="openComponent({ code: 'GoodsChart' })">
+      <a-button class="market" v-if="isFloat()" @click="openComponent({ code: 'GoodsChart' })">
         <div class="first">{{ selectedRow.goodscode }}</div>
         <div class="last red">{{ getGoodsPrice() }}</div>
         <LineChartOutlined />
       </a-button>
       <!-- 历史走势按钮 -->
-      <a-button class="historyBtn"
-                @click="openComponent({ code: 'HisChart' })">
+      <a-button class="historyBtn" @click="openComponent({ code: 'HisChart' })">
         历史走势
         <LineChartOutlined />
       </a-button>
-      <BtnList :btnList="firstBtn"
-               :record="selectedRow"
-               @click="openComponent" />
+      <BtnList :btnList="firstBtn" :record="selectedRow" @click="openComponent" />
     </div>
     <a-row class="buySellHall">
-      <a-col :span="12"
-             v-if="sellMarket.isMarket">
-        <Sell :enumName="enumName"
-              ref="sellRef"
-              :parantSelectedRow="selectedRow"
-              :time="time"
-              :btnList="handleBtnList(sellMarket.btnList)" />
+      <a-col :span="12" v-if="sellMarket.isMarket">
+        <Sell :enumName="enumName" ref="sellRef" :parantSelectedRow="selectedRow" :time="time" :btnList="handleBtnList(sellMarket.btnList)" />
       </a-col>
-      <a-col :span="12"
-             v-if="buyMarket.isMarket">
-        <Buy :enumName="enumName"
-             ref="buyRef"
-             :time="time"
-             :parantSelectedRow="selectedRow"
-             :btnList="handleBtnList(buyMarket.btnList)" />
+      <a-col :span="12" v-if="buyMarket.isMarket">
+        <Buy :enumName="enumName" ref="buyRef" :time="time" :parantSelectedRow="selectedRow" :btnList="handleBtnList(buyMarket.btnList)" />
       </a-col>
     </a-row>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="getSelectedRow()"
-               :goodsPrice="getGoodsPrice()"
-               :enumName="enumName"
-               :time="time"
-               @cancel="closeComponent"> </component>
+    <component :is="componentId" v-if="componentId" :selectedRow="getSelectedRow()" :enumName="enumName" :time="time" @cancel="closeComponent"> </component>
   </div>
 </template>
 
@@ -135,131 +105,131 @@ import { BuyOrSell } from '@/common/constants/enumCommon';
 import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'buy-sell-market',
-    props: {
-        selectedRow: {
-            type: Object as PropType<WrOrderQuote>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
+  emits: ['cancel', 'update'],
+  name: 'buy-sell-market',
+  props: {
+    selectedRow: {
+      type: Object as PropType<WrOrderQuote>,
+      default: {},
+    },
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        Buy,
-        Sell,
-        BtnList,
-        LeftOutlined,
-        DownOutlined,
-        LineChartOutlined,
-        warehouse_receipt_trade_floating_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        warehouse_receipt_trade_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        warehouse_pre_sale_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        warehouse_pre_sale_floating_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
+  },
+  components: {
+    Buy,
+    Sell,
+    BtnList,
+    LeftOutlined,
+    DownOutlined,
+    LineChartOutlined,
+    warehouse_receipt_trade_floating_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
+    warehouse_receipt_trade_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
+    warehouse_pre_sale_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
+    warehouse_pre_sale_floating_price_spot_trade_warehouse_detail: defineAsyncComponent(() => import('../detail/index.vue')),
 
-        warehouse_receipt_trade_floating_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        warehouse_receipt_trade_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        warehouse_pre_sale_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        warehouse_pre_sale_floating_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
+    warehouse_receipt_trade_floating_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
+    warehouse_receipt_trade_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
+    warehouse_pre_sale_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
+    warehouse_pre_sale_floating_price_spot_trade_warehouse_post_buying: defineAsyncComponent(() => import('../post_buying/index.vue')),
 
-        HisChart: defineAsyncComponent(() => import('../history-chart/index.vue')),
-        GoodsChart: defineAsyncComponent(() => import('../goods-chart/index.vue')), // 待优化
-    },
-    setup(props, context) {
-        const time = ref<Moment>(moment(props.selectedRow.deliverymonth)); // string 交收月
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
+    HisChart: defineAsyncComponent(() => import('../history-chart/index.vue')),
+    GoodsChart: defineAsyncComponent(() => import('../goods-chart/index.vue')), // 待优化
+  },
+  setup(props, context) {
+    const time = ref<Moment>(moment(new Date(props.selectedRow.deliverymonth))); // string 交收月
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
 
-        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        // 买卖大厅 配置数据
-        // 表格操作按钮列表
-        const { firstBtn, buyMarket, sellMarket } = handleSpotBtnList(props.enumName);
-        // 获取浮动价商品实时价格
+    const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
+    // 买卖大厅 配置数据
+    // 表格操作按钮列表
+    const { firstBtn, buyMarket, sellMarket } = handleSpotBtnList(props.enumName);
+    // 获取浮动价商品实时价格
 
-        function getGoodsPrice() {
-            const result = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
-            setGoodsPrice(result);
-            return result;
-        }
-        const uuid = v4();
-        if (isFloat()) {
-            // 如果是浮动价需要行情订阅
-            const arr = [{ exchangeCode: 250, goodsCode: props.selectedRow.goodscode, subState: 0 }];
-            addSubscribeQuotation(uuid, arr);
-        }
-        onBeforeUnmount(() => {
-            removeSubscribeQuotation(uuid);
-            TimerUtils.clearInterval('buyAndSellMartet');
-            TimerUtils.clearTimeout('debounce');
-        });
-        const buyRef = ref<null | { queryTableAction: Function }>(null);
-        const sellRef = ref<null | { queryTableAction: Function }>(null);
-        const queryFn = () => {
-            buyRef.value?.queryTableAction();
-            sellRef.value?.queryTableAction();
-        };
-        const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
-        const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
-        function handleBtnList(list: BtnListType[]) {
-            console.log('list', list);
-            if (!hasFinacing()) {
-                return list.filter((e) => e.code !== 'warehouse_receipt_trade_floating_price_spot_trade_warehouse_financing_delisting');
-            } else {
-                return list;
-            }
-        }
-        function timeChange() {
-            TimerUtils.setTimeout(
-                () => {
-                    queryFn();
-                },
-                200,
-                'debounce'
-            );
-        }
-        TimerUtils.setInterval(
-            () => {
-                queryFn();
-            },
-            10 * 1000,
-            'buyAndSellMartet'
-        );
-        // 单据挂牌成功 通知买大厅刷新数据
-        Bus.$on('spotTrade', queryFn);
+    function getGoodsPrice() {
+      const result = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
+      setGoodsPrice(result);
+      return result;
+    }
+    const uuid = v4();
+    if (isFloat()) {
+      // 如果是浮动价需要行情订阅
+      const arr = [{ exchangeCode: 250, goodsCode: props.selectedRow.goodscode, subState: 0 }];
+      addSubscribeQuotation(uuid, arr);
+    }
+    onBeforeUnmount(() => {
+      removeSubscribeQuotation(uuid);
+      TimerUtils.clearInterval('buyAndSellMartet');
+      TimerUtils.clearTimeout('debounce');
+    });
+    const buyRef = ref<null | { queryTableAction: Function }>(null);
+    const sellRef = ref<null | { queryTableAction: Function }>(null);
+    const queryFn = () => {
+      buyRef.value?.queryTableAction();
+      sellRef.value?.queryTableAction();
+    };
+    const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
+    const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
+    function handleBtnList(list: BtnListType[]) {
+      console.log('list', list);
+      if (!hasFinacing()) {
+        return list.filter((e) => e.code !== 'warehouse_receipt_trade_floating_price_spot_trade_warehouse_financing_delisting');
+      } else {
+        return list;
+      }
+    }
+    function timeChange() {
+      TimerUtils.setTimeout(
+        () => {
+          queryFn();
+        },
+        200,
+        'debounce'
+      );
+    }
+    TimerUtils.setInterval(
+      () => {
+        queryFn();
+      },
+      10 * 1000,
+      'buyAndSellMartet'
+    );
+    // 单据挂牌成功 通知买大厅刷新数据
+    Bus.$on('spotTrade', queryFn);
 
-        const quote = getQuoteDayInfoByCode(props.selectedRow.goodscode);
-        // 切换组件数据
-        const getSelectedRow = () => {
-            if (componentId.value === 'GoodsChart') {
-                return quote;
-            } else {
-                return props.selectedRow;
-            }
-        };
+    const quote = getQuoteDayInfoByCode(props.selectedRow.goodscode);
+    // 切换组件数据
+    const getSelectedRow = () => {
+      if (componentId.value === 'GoodsChart') {
+        return quote;
+      } else {
+        return props.selectedRow;
+      }
+    };
 
-        return {
-            time,
-            buyRef,
-            sellRef,
-            cancel,
-            isFloat,
-            getGoodsPrice,
-            visible,
-            firstBtn,
-            buyMarket,
-            sellMarket,
-            componentId,
-            closeComponent,
-            openComponent,
-            enumName: props.enumName,
-            handleBtnList,
-            isWR,
-            timeChange,
-            getSelectedRow,
-        };
-    },
+    return {
+      time,
+      buyRef,
+      sellRef,
+      cancel,
+      isFloat,
+      getGoodsPrice,
+      visible,
+      firstBtn,
+      buyMarket,
+      sellMarket,
+      componentId,
+      closeComponent,
+      openComponent,
+      enumName: props.enumName,
+      handleBtnList,
+      isWR,
+      timeChange,
+      getSelectedRow,
+    };
+  },
 });
 </script>
 <style lang="less" scoped>

+ 31 - 97
src/views/market/spot_trade/components/goods-chart/chart/index.vue

@@ -3,39 +3,18 @@
   <div class="chart-container">
     <div class="chart-content">
       <div class="chart-content__header">
-        <a-menu
-          class="chart-content__tabs"
-          v-model:selectedKeys="activeCycleName"
-          mode="horizontal"
-          @click="changeCycleType"
-        >
+        <a-menu class="chart-content__tabs" v-model:selectedKeys="activeCycleName" mode="horizontal" @click="changeCycleType">
           <a-menu-item v-for="item in chartType" :key="item.name">{{ item.label }}</a-menu-item>
         </a-menu>
-        <a-menu
-          class="chart-content__tabs"
-          v-model:selectedKeys="activeSeriesType"
-          mode="horizontal"
-          v-show="activeCycleType !== CycleType.time"
-        >
+        <a-menu class="chart-content__tabs" v-model:selectedKeys="activeSeriesType" mode="horizontal" v-show="activeCycleType !== CycleType.time">
           <a-menu-item key="MACD">MACD</a-menu-item>
           <a-menu-item key="VOL">VOL</a-menu-item>
           <a-menu-item key="KDJ">KDJ</a-menu-item>
           <a-menu-item key="CCI">CCI</a-menu-item>
         </a-menu>
       </div>
-      <echart-time
-        class="chart-content__main"
-        :quote-data="selectedRow"
-        @change="getHistoryTikDatas"
-        v-if="activeCycleType === CycleType.time"
-      ></echart-time>
-      <echart-kline
-        class="chart-content__main"
-        :quote-data="selectedRow"
-        :cycle-type="activeCycleType"
-        :series-type="activeSeriesType[0]"
-        v-else
-      ></echart-kline>
+      <echart-time class="chart-content__main" :quote-data="selectedRow" @change="getHistoryTikDatas" v-if="activeCycleType === CycleType.time"></echart-time>
+      <echart-kline class="chart-content__main" :quote-data="selectedRow" :cycle-type="activeCycleType" :series-type="activeSeriesType[0]" v-else></echart-kline>
       <div class="chart-content__footer"></div>
     </div>
     <div class="chart-slider">
@@ -48,40 +27,22 @@
           <div class="content content--right">{{ selectedRow.goodsname }}</div>
         </div>
         <div class="chart-tips__last">
-          <div
-            :class="['content content--left', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]"
-          >{{ handleNoneValue(selectedRow.last) }}</div>
+          <div :class="['content content--left', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]">{{ handleNoneValue(selectedRow.last) }}</div>
           <div class="content content--right">
-            <span
-              :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-            >{{ quoteChange(selectedRow) }}</span>
-            <span
-              :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-            >{{ quoteAmplitude(selectedRow) }}</span>
+            <span :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteChange(selectedRow) }}</span>
+            <span :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteAmplitude(selectedRow) }}</span>
           </div>
         </div>
         <div class="chart-tips__volume">
           <a-row>
             <a-col :span="8">卖一</a-col>
-            <a-col
-              :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
-              :span="8"
-            >{{ handleNoneValue(selectedRow.ask) }}</a-col>
-            <a-col
-              :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
-              :span="8"
-            >{{ handleNoneValue(selectedRow.askvolume) }}</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.ask) }}</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.askvolume) }}</a-col>
           </a-row>
           <a-row>
             <a-col :span="8">买一</a-col>
-            <a-col
-              :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
-              :span="8"
-            >{{ handleNoneValue(selectedRow.bid) }}</a-col>
-            <a-col
-              :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
-              :span="8"
-            >{{ handleNoneValue(selectedRow.bidvolume) }}</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.bid) }}</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.bidvolume) }}</a-col>
           </a-row>
         </div>
       </div>
@@ -97,62 +58,35 @@
         <div class="row-content">
           <a-row v-for="(item, index) in tradedList" :key="index + '11'">
             <a-col :span="8">{{ formatTime(item.TS, 'hm') }}</a-col>
-            <a-col
-              :class="handleQuotePriceColor(item.PE, selectedRow.presettle)"
-              :span="8"
-            >{{ item.PE }}</a-col>
-            <a-col
-              :class="handleQuotePriceColor(item.Vol, selectedRow.presettle)"
-              :span="8"
-            >{{ item.Vol }}</a-col>
+            <a-col :class="handleQuotePriceColor(item.PE, selectedRow.presettle)" :span="8">{{ item.PE }}</a-col>
+            <a-col :class="handleQuotePriceColor(item.Vol, selectedRow.presettle)" :span="8">{{ item.Vol }}</a-col>
           </a-row>
         </div>
       </div>
       <div class="chart-tips__info">
         <a-row>
           <a-col :span="4">最新</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-            :span="8"
-          >{{ handleNoneValue(selectedRow.last) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.last) }}</a-col>
           <a-col :span="4">均价</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.averageprice, selectedRow.presettle)"
-            :span="8"
-          >{{ handleNoneValue(selectedRow.averageprice) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.averageprice, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.averageprice) }}</a-col>
         </a-row>
         <a-row>
           <a-col :span="4">涨跌</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-            :span="8"
-          >{{ quoteChange(selectedRow) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ quoteChange(selectedRow) }}</a-col>
           <a-col :span="4">今开</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.opened, selectedRow.presettle)"
-            :span="8"
-          >{{ handleNoneValue(selectedRow.opened) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.opened, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.opened) }}</a-col>
         </a-row>
         <a-row>
           <a-col :span="4">涨幅</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-            :span="8"
-          >{{ quoteAmplitude(selectedRow) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ quoteAmplitude(selectedRow) }}</a-col>
           <a-col :span="4">最高</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.highest, selectedRow.presettle)"
-            :span="8"
-          >{{ handleNoneValue(selectedRow.highest) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.highest, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.highest) }}</a-col>
         </a-row>
         <a-row>
-          <a-col :span="4">总量</a-col>
-          <a-col :span="8">{{ handleNoneValue(selectedRow.totalvolume) }}</a-col>
+          <a-col :span="4">结算</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.settle) }}</a-col>
           <a-col :span="4">最低</a-col>
-          <a-col
-            :class="handleQuotePriceColor(selectedRow.lowest, selectedRow.presettle)"
-            :span="8"
-          >{{ handleNoneValue(selectedRow.lowest) }}</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.lowest, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.lowest) }}</a-col>
         </a-row>
         <!-- <a-row>
           <a-col :span="4">金额</a-col>
@@ -166,21 +100,21 @@
           <a-col :span="4">跌停</a-col>
           <a-col class="green" :span="8">{{ handleNoneValue(selectedRow.limitdown) }}</a-col>
         </a-row> -->
-        <a-row>
+        <!-- <a-row>
           <a-col :span="4">外盘</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.totalbidvolume) }}</a-col>
           <a-col :span="4">内盘</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.totalaskvolume) }}</a-col>
-        </a-row>
-        <a-row>
+        </a-row> -->
+        <!-- <a-row>
           <a-col :span="4">持仓</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.holdvolume) }}</a-col>
-          <a-col :span="4">结算</a-col>
-          <a-col :span="8">{{ handleNoneValue(selectedRow.settle) }}</a-col>
-        </a-row>
+          <a-col :span="4">仓差</a-col>
+          <a-col :span="8">{{ '--' }}</a-col>
+        </a-row> -->
         <a-row>
-          <!-- <a-col :span="4">仓差</a-col>
-          <a-col :span="8">{{ '--' }}</a-col> -->
+          <!-- <a-col :span="4">总量</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.totalvolume) }}</a-col> -->
           <a-col :span="4">昨结</a-col>
           <a-col :span="8">{{ handleNoneValue(selectedRow.presettle) }}</a-col>
         </a-row>
@@ -321,5 +255,5 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-@import "./index.less";
+@import './index.less';
 </style>

+ 252 - 252
src/views/market/spot_trade/components/post_buying/index.vue

@@ -1,78 +1,78 @@
 <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">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="交易账户" name="accountid">
-                                <a-select class="inlineFormSelect" style="width: 260px" v-model:value="formState.accountid" placeholder="请选择">
-                                    <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-col>
-                        <a-col :span="24" v-if="!isFloat()">
-                            <a-form-item label="挂牌价格" name="FixedPrice">
-                                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.FixedPrice" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-else>
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input-number class="commonInput" style="width: 260px" v-model:value="formState.PriceMove" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat()">
-                            <a-form-item label="估算价">
-                                <span class="white">{{ getPrice() }}</span>
-                            </a-form-item>
-                        </a-col>
+  <!-- 挂牌求购 -->
+  <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">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="交易账户" name="accountid">
+                <a-select class="inlineFormSelect" style="width: 260px" v-model:value="formState.accountid" placeholder="请选择">
+                  <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-col>
+            <a-col :span="24" v-if="!isFloat()">
+              <a-form-item label="挂牌价格" name="FixedPrice">
+                <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.FixedPrice" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-else>
+              <a-form-item label="基差" name="PriceMove">
+                <a-input-number class="commonInput" style="width: 260px" v-model:value="formState.PriceMove" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="isFloat()">
+              <a-form-item label="估算价">
+                <span class="white">{{ getPrice() }}</span>
+              </a-form-item>
+            </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" />
-                                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isWR()">
-                            <a-form-item label="交收月" name="DeliveryMonth">
-                                <a-month-picker style="width: 260px" v-model:value="formState.DeliveryMonth" :allowClear="false" class="commonDatePicker dialogDatePicker" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="mt-10">
-                            <a-form-item>
-                                <a-slider :min="0" v-model:value="formState.OrderQty" :max="getMaxNum()" class="formSlider" />
-                                <div class="unit">
-                                    <span>{{ getMaxNum() ? selectedRow.minivalue : 0 }}</span>
-                                    <span>{{ getMaxNum() }}{{ selectedRow.enumdicname }}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="起摘数量" name="DelistMinQty" class="relative">
-                                <a-input-number class="commonInput" :suffix="selectedRow.enumdicname" v-model:value="formState.DelistMinQty" :min="0" style="width: 260px !important" />
-                                <div class="tip-listing"> 最小单位:{{ selectedRow.minivalue }}{{ selectedRow.enumdicname }}</div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="履约方式" class="inputIconBox">
-                                <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 260px" @click="handlePermance">{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
-                                <svg class="icon svg-icon" aria-hidden="true" @click="handlePermance">
-                                    <use xlink:href="#icon-moban" />
-                                </svg>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative mt20">
-                            <a-form-item :label="isFloat() ? '估算金额' : '挂牌金额'">
-                                <span class="white ml8">{{ getMoney() }}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="getMargin()">
-                            <a-form-item :label="getMargin() ? '履约保证金' : ''">
-                                <!-- <a-row>
+            <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" />
+                <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="!isWR()">
+              <a-form-item label="交收月" name="DeliveryMonth">
+                <a-month-picker style="width: 260px" v-model:value="formState.DeliveryMonth" :allowClear="false" class="commonDatePicker dialogDatePicker" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" class="mt-10">
+              <a-form-item>
+                <a-slider :min="0" v-model:value="formState.OrderQty" :max="getMaxNum()" class="formSlider" />
+                <div class="unit">
+                  <span>{{ getMaxNum() ? selectedRow.minivalue : 0 }}</span>
+                  <span>{{ getMaxNum() }}{{ selectedRow.enumdicname }}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="起摘数量" name="DelistMinQty" class="relative">
+                <a-input-number class="commonInput" :suffix="selectedRow.enumdicname" v-model:value="formState.DelistMinQty" :min="0" style="width: 260px !important" />
+                <div class="tip-listing"> 最小单位:{{ selectedRow.minivalue }}{{ selectedRow.enumdicname }}</div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="履约方式" class="inputIconBox">
+                <span :class="['clickBox', formState.permanceTempName ? 'white' : '']" style="width: 260px" @click="handlePermance">{{ formState.permanceTempName ? formState.permanceTempName : '选择履约模板' }}</span>
+                <svg class="icon svg-icon" aria-hidden="true" @click="handlePermance">
+                  <use xlink:href="#icon-moban" />
+                </svg>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" class="relative mt20">
+              <a-form-item :label="isFloat() ? '估算金额' : '挂牌金额'">
+                <span class="white ml8">{{ getMoney() }}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" v-if="getMargin()">
+              <a-form-item :label="getMargin() ? '履约保证金' : ''">
+                <!-- <a-row>
                                 <a-col :span="8">-->
-                                <span class="white ml8">{{ getMargin() }}</span>
-                                <!-- </a-col>
+                <span class="white ml8">{{ getMargin() }}</span>
+                <!-- </a-col>
                                     <a-col :span="4" class="tr">
                                         <span class="grey1">可用资金</span>
                                     </a-col>
@@ -82,28 +82,28 @@
                                         >{{getCanUseMoney(getSelectedAccount())}}</span>
                                     </a-col>
                                 </a-row>-->
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <span class="white ml8">{{ getCanUseMoney(getSelectedAccount()) }}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button class="listedBtn" @click="submit" :loading="loading">买入</a-button>
-                            <a-button class="ml10 cancelBtn" @click="cancel" :disabled="loading">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="可用资金">
+                <span class="white ml8">{{ getCanUseMoney(getSelectedAccount()) }}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
         </div>
-    </Drawer>
-    <!-- 选择履约模板 -->
-    <Permance v-if="showPermance" :marketid="formState.marketid" @cancel="choosePermance" @update="choosePermance" />
+        <a-row :gutter="24">
+          <a-col :span="24" class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn" @click="submit" :loading="loading">买入</a-button>
+              <a-button class="ml10 cancelBtn" @click="cancel" :disabled="loading">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
+  <!-- 选择履约模板 -->
+  <Permance v-if="showPermance" :marketid="formState.marketid" @cancel="choosePermance" @update="choosePermance" />
 </template>
 
 <script lang="ts">
@@ -134,174 +134,174 @@ import { QueryPermancePlanTmpRsp } from '@/services/go/wrtrade/interface';
 import { getMarketByTradeMode } from '@/services/bus/market';
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: {
-        Des,
-        Drawer,
-        Permance,
-        PlusOutlined,
-        MinusOutlined,
+  emits: ['cancel', 'update'],
+  name: ModalEnum.spot_trade_warehouse_post_buying,
+  components: {
+    Des,
+    Drawer,
+    Permance,
+    PlusOutlined,
+    MinusOutlined,
+  },
+  props: {
+    selectedRow: {
+      type: Object as PropType<TempWrOrderQuoteDetail>,
+      default: {},
     },
-    props: {
-        selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        time: {
-            type: Object as PropType<Moment>,
-            default: moment(),
-        },
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        const { rules, formState, formRef } = handleForm(props.selectedRow);
-        const loading = ref<boolean>(false);
-        const accountList = getAccountTypeList([2]);
-        if (accountList.length) {
-            formState.accountid = accountList[0].accountid;
-        }
-        function getSelectedAccount() {
-            return accountList.find((e) => e.accountid === formState.accountid);
-        }
-        formState.DeliveryMonth = props.selectedRow.deliverymonth ? moment(props.selectedRow.deliverymonth) : props.time;
+    time: {
+      type: Object as PropType<Moment>,
+      default: moment(),
+    },
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
+    const { rules, formState, formRef } = handleForm(props.selectedRow);
+    const loading = ref<boolean>(false);
+    const accountList = getAccountTypeList([2]);
+    if (accountList.length) {
+      formState.accountid = accountList[0].accountid;
+    }
+    function getSelectedAccount() {
+      return accountList.find((e) => e.accountid === formState.accountid);
+    }
+    formState.DeliveryMonth = props.selectedRow.deliverymonth ? moment(new Date(props.selectedRow.deliverymonth)) : props.time;
 
-        // 17=仓单贸易市场
-        const market = getMarketByTradeMode(17);
-        if (market) {
-            formState.marketid = market.marketid;
-        }else{
-           message.error('市场信息异常,请稍后重试');
-        }
+    // 17=仓单贸易市场
+    const market = getMarketByTradeMode(17);
+    if (market) {
+      formState.marketid = market.marketid;
+    } else {
+      message.error('市场信息异常,请稍后重试');
+    }
 
-        const { getMaxNum, getMoney, getMargin, getPrice } = handleNumAndPrice(props.enumName, props.selectedRow);
-        if (getMaxNum()) {
-            formState.OrderQty = props.selectedRow.minivalue;
-        }
+    const { getMaxNum, getMoney, getMargin, getPrice } = handleNumAndPrice(props.enumName, props.selectedRow);
+    if (getMaxNum()) {
+      formState.OrderQty = props.selectedRow.minivalue;
+    }
 
-        const showPermance = ref<boolean>(false);
-        function choosePermance(value: QueryPermancePlanTmpRsp | false) {
-            if (value) {
-                formState.permanceTempName = value.templatename;
-                formState.permaceTempId = value.autoid;
-            }
-            showPermance.value = false;
-        }
-        function openPermance() {
-            showPermance.value = true;
-        }
+    const showPermance = ref<boolean>(false);
+    function choosePermance(value: QueryPermancePlanTmpRsp | false) {
+      if (value) {
+        formState.permanceTempName = value.templatename;
+        formState.permaceTempId = value.autoid;
+      }
+      showPermance.value = false;
+    }
+    function openPermance() {
+      showPermance.value = true;
+    }
 
-        // 点选履约模板
-        function handlePermance() {
-            // 必须先选择市场再选择对应的履约模板
-            if (!formState.marketid) {
-                message.info('请先选择市场');
-                return;
-            }
+    // 点选履约模板
+    function handlePermance() {
+      // 必须先选择市场再选择对应的履约模板
+      if (!formState.marketid) {
+        message.info('请先选择市场');
+        return;
+      }
 
-            openPermance();
-        }
+      openPermance();
+    }
 
-        function submit() {
-            const marketInfo = getMarketRunByTradeMode(17);
-            if (marketInfo) {
-                validateAction<FormParam>(formRef, formState).then((res) => {
-                    // 现在增加一种挂牌求购的情况
-                    // 这种求购模式会生成一种仓单贸易商品
+    function submit() {
+      const marketInfo = getMarketRunByTradeMode(17);
+      if (marketInfo) {
+        validateAction<FormParam>(formRef, formState).then((res) => {
+          // 现在增加一种挂牌求购的情况
+          // 这种求购模式会生成一种仓单贸易商品
 
-                    const wrGoodsInfo: WRGoodsInfo = {
-                        GoodsID: props.selectedRow.goodsid, // uint32 配置商品ID
-                        GoodsCode: props.selectedRow.goodscode, // string 配置商品代码
-                        PriceFactor: 1, // double 商品价格系数
-                        PriceMove: 0, // double 商品升贴水值
-                        WeightRatio: 1, // double 商品重量系数
-                    };
-                    const param = {
-                        AccountID: res.accountid, // 默认内部资金账号第一个
-                        ClientSerialNo: uuidv4(), // 客户端流水号
-                        // OperateSrc: 2,
-                        ClientType: 4,
-                        MarketID: res.marketid,
-                        // MarketID: marketInfo.marketid,
-                        LadingBillId: 0, // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-                        TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
-                        // SubNum: '0', // 提单子单号
-                        SubNum: 0,
-                        // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
-                        IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
-                        // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
-                        OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
-                        DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID  // 有仓单求购
-                        WRPriceType: isFloat() ? 2 : 1, // 价格方式 1:固定价 2:浮动价
-                        FixedPrice: res.FixedPrice, // 固定价格
-                        PriceFactor: 1, // 价格系数(浮动价时填写)
-                        PriceMove: res.PriceMove ? res.PriceMove : 0, // 升贴水(浮动价时填写)
-                        TimevalidType: 4, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
-                        // ValidTime: moment('2021-08-25 00:00:00').format('YYYY-MM-DD HH:mm:ss'), // 有效期限
-                        ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'),
-                        FirstRatio: 0, // 首付比例
-                        PerformanceTemplateID: res.permaceTempId, // 履约计划模板ID
-                        UserID: getUserId(),
-                        OperatorID: getUserId(), // 操作员账号ID
-                        BuyOrSell: 0, // 买卖方向 0买1卖
-                        PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
-                        CanBargain: 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
-                        Attachment1: '', // 附件1
-                        Attachment2: '', // 附件2
-                        Remark: '', // 备注
-                        ApplyID: 0, // 申请ID
-                        WRTradeGoods: isFloat() ? [wrGoodsInfo] : [],
-                        CanPart: 1, // 是否允许部份摘牌0:不允许;1:允许
-                        WRStandardID: props.selectedRow.wrstandardid,
-                        HasWr: isWR(), // 无仓单挂牌  是否有无仓单
-                        DelistMinQty: res.DelistMinQty, // 起摘数量
-                        DeliveryMonth: isWR() ? '' : moment(res.DeliveryMonth).format('YYYY-MM'),
-                        FactoryItems:
-                            props.selectedRow.wrResult != undefined
-                                ? props.selectedRow.wrResult.flatMap((it) => {
-                                      return {
-                                          DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
-                                          DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值
-                                          ItemTypeMode: 1, // uint32 要素项类型模式
-                                      };
-                                  })
-                                : [], // DGFactoryItems 要素类型明细集合(没有仓单要素ID填写)
-                    };
-                    requestResultLoadingAndInfo(hdWROrder, param, loading, ['求购成功', '求购失败:']).then(() => {
-                        cancel(true);
-                    });
-                });
-            }
-        }
-        return {
-            submit,
-            cancel,
-            loading,
-            visible,
-            accountList,
-            rules,
-            formState,
-            formRef,
-            isFloat,
-            isWR,
-            getMaxNum,
-            getMoney,
-            getMargin,
-            getSelectedAccount,
-            getCanUseMoney,
-            getPrice,
-            showPermance,
-            handlePermance,
-            choosePermance,
-        };
-    },
+          const wrGoodsInfo: WRGoodsInfo = {
+            GoodsID: props.selectedRow.goodsid, // uint32 配置商品ID
+            GoodsCode: props.selectedRow.goodscode, // string 配置商品代码
+            PriceFactor: 1, // double 商品价格系数
+            PriceMove: 0, // double 商品升贴水值
+            WeightRatio: 1, // double 商品重量系数
+          };
+          const param = {
+            AccountID: res.accountid, // 默认内部资金账号第一个
+            ClientSerialNo: uuidv4(), // 客户端流水号
+            // OperateSrc: 2,
+            ClientType: 4,
+            MarketID: res.marketid,
+            // MarketID: marketInfo.marketid,
+            LadingBillId: 0, // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            TradeDate: moment(marketInfo.tradedate).format('YYYYMMDD'), // 交易日 string
+            // SubNum: '0', // 提单子单号
+            SubNum: 0,
+            // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
+            // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
+            OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
+            DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID  // 有仓单求购
+            WRPriceType: isFloat() ? 2 : 1, // 价格方式 1:固定价 2:浮动价
+            FixedPrice: res.FixedPrice, // 固定价格
+            PriceFactor: 1, // 价格系数(浮动价时填写)
+            PriceMove: res.PriceMove ? res.PriceMove : 0, // 升贴水(浮动价时填写)
+            TimevalidType: 4, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
+            // ValidTime: moment('2021-08-25 00:00:00').format('YYYY-MM-DD HH:mm:ss'), // 有效期限
+            ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'),
+            FirstRatio: 0, // 首付比例
+            PerformanceTemplateID: res.permaceTempId, // 履约计划模板ID
+            UserID: getUserId(),
+            OperatorID: getUserId(), // 操作员账号ID
+            BuyOrSell: 0, // 买卖方向 0买1卖
+            PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
+            CanBargain: 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
+            Attachment1: '', // 附件1
+            Attachment2: '', // 附件2
+            Remark: '', // 备注
+            ApplyID: 0, // 申请ID
+            WRTradeGoods: isFloat() ? [wrGoodsInfo] : [],
+            CanPart: 1, // 是否允许部份摘牌0:不允许;1:允许
+            WRStandardID: props.selectedRow.wrstandardid,
+            HasWr: isWR(), // 无仓单挂牌  是否有无仓单
+            DelistMinQty: res.DelistMinQty, // 起摘数量
+            DeliveryMonth: isWR() ? '' : moment(res.DeliveryMonth).format('YYYY-MM'),
+            FactoryItems:
+              props.selectedRow.wrResult != undefined
+                ? props.selectedRow.wrResult.flatMap((it) => {
+                  return {
+                    DGFactoryItemTypeID: it.dgfactoryitemtypeid, // uint64 要素项类型ID
+                    DGFactoryItemID: it.dgfactoryitemid, // uint64 预约要素项类型值
+                    ItemTypeMode: 1, // uint32 要素项类型模式
+                  };
+                })
+                : [], // DGFactoryItems 要素类型明细集合(没有仓单要素ID填写)
+          };
+          requestResultLoadingAndInfo(hdWROrder, param, loading, ['求购成功', '求购失败:']).then(() => {
+            cancel(true);
+          });
+        });
+      }
+    }
+    return {
+      submit,
+      cancel,
+      loading,
+      visible,
+      accountList,
+      rules,
+      formState,
+      formRef,
+      isFloat,
+      isWR,
+      getMaxNum,
+      getMoney,
+      getMargin,
+      getSelectedAccount,
+      getCanUseMoney,
+      getPrice,
+      showPermance,
+      handlePermance,
+      choosePermance,
+    };
+  },
 });
 </script>
 

+ 1 - 1
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -353,7 +353,7 @@ export default defineComponent({
       useUserType,
       canUseMoney,
       accountList,
-      ...usePrice(),
+      ...usePrice(props.selectedRow.decimalplace),
       ...useNum(getMaxNum),
       ...useChart(),
       getPrice,

+ 4 - 3
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/setup.ts

@@ -55,13 +55,14 @@ export function useBuySellDirection() {
 }
 
 // 价格
-export const usePrice = () => {
+export const usePrice = (decimalplace = 0) => {
+    const num = 1 / Math.pow(10, decimalplace); // 小数位变动数
     function increasePrice() {
-        formState.FixedPrice++;
+        formState.FixedPrice = +(formState.FixedPrice + num).toFixed(decimalplace);
     }
     function decreasePrice() {
         if (formState.FixedPrice) {
-            formState.FixedPrice--;
+            formState.FixedPrice = +(formState.FixedPrice - num).toFixed(decimalplace);
         }
     }
     return { increasePrice, decreasePrice };

+ 1 - 0
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/interface.ts

@@ -6,4 +6,5 @@ export interface RefGoodsList extends QueryQuoteDayRsp {
     refgoodscode: string
     orderid: number
     goodsid: number
+    decimalplace: number
 }