Quellcode durchsuchen

现货仓单 议价

huangbin vor 4 Jahren
Ursprung
Commit
511300ef7f

+ 60 - 59
src/common/constants/enumOrderComponents.ts

@@ -1,61 +1,62 @@
 // 组件名枚举
 export enum enumOrderComponents {
-						bottom = 'bottom', // 底部单据菜单
-						
-						spot_warrant = 'spot_warrant', // 现货仓单
-						
-						pre_sale_warehouse_receipt = 'pre_sale_warehouse_receipt', // 预售仓单
-						
-						commodity_contract = 'commodity_contract', // 商品合约
-						
-						financing_manager = 'financing_manager', // 融资管理
-						
-						performance_information = 'performance_information', // 履约信息
-						
-						funding_information = 'funding_information', // 资金信息
-						
-						spot_warrant_spot_summary = 'spot_warrant_spot_summary', // 现货汇总
-						
-						spot_warrant_inventory_summary = 'spot_warrant_inventory_summary', // 库存汇总
-						
-						spot_warrant_spot_details = 'spot_warrant_spot_details', // 现货明细
-						
-						spot_warrant_pending_order = 'spot_warrant_pending_order', // 挂单
-						
-						spot_warrant_deal = 'spot_warrant_deal', // 成交
-						
-						spot_warrant_in_and_out_warehouse = 'spot_warrant_in_and_out_warehouse', // 提货
-						
-						spot_warrant_designated_deal = 'spot_warrant_designated_deal', // 指定成交
-						
-						pre_sale_warehouse_receipt_order_summary = 'pre_sale_warehouse_receipt_order_summary', // 订单汇总
-						
-						pre_sale_warehouse_receipt_pending_order = 'pre_sale_warehouse_receipt_pending_order', // 挂单
-						
-						pre_sale_warehouse_receipt_designated_deal = 'pre_sale_warehouse_receipt_designated_deal', // 指定成交
-						
-						pre_sale_warehouse_receipt_deal = 'pre_sale_warehouse_receipt_deal', // 成交
-						
-						commodity_contract_commission = 'commodity_contract_commission', // 委托
-						
-						commodity_contract_make_deal = 'commodity_contract_make_deal', // 成交
-						
-						commodity_contract_summary = 'commodity_contract_summary', // 合约汇总
-						
-						commodity_contract_settlement = 'commodity_contract_settlement', // 交收
-						
-						financing_manager_apply_order = 'financing_manager_apply_order', // 申请单
-						
-						financing_manager_contract = 'financing_manager_contract', // 合同
-						
-						performance_information_buy_performance = 'performance_information_buy_performance', // 买履约
-						
-						performance_information_sell_performance = 'performance_information_sell_performance', // 卖履约
-						
-						funding_information_funding_log = 'funding_information_funding_log', // 资金流水
-						
-						funding_information_funding_summary = 'funding_information_funding_summary', // 资金汇总
-						
-						pre_sale_warehouse_receipt_designated_deal_resell = 'pre_sale_warehouse_receipt_designated_deal_resell', // 撤销出售
-						
-		}
+	bottom = 'bottom', // 底部单据菜单
+
+	spot_warrant = 'spot_warrant', // 现货仓单
+
+	pre_sale_warehouse_receipt = 'pre_sale_warehouse_receipt', // 预售仓单
+
+	commodity_contract = 'commodity_contract', // 商品合约
+
+	financing_manager = 'financing_manager', // 融资管理
+
+	performance_information = 'performance_information', // 履约信息
+
+	funding_information = 'funding_information', // 资金信息
+
+	spot_warrant_spot_summary = 'spot_warrant_spot_summary', // 现货汇总
+
+	spot_warrant_inventory_summary = 'spot_warrant_inventory_summary', // 库存汇总
+
+	spot_warrant_spot_details = 'spot_warrant_spot_details', // 现货明细
+	spot_warrant_bargain = 'spot_warrant_bargain', // 现货仓单 议价
+
+	spot_warrant_pending_order = 'spot_warrant_pending_order', // 挂单
+
+	spot_warrant_deal = 'spot_warrant_deal', // 成交
+
+	spot_warrant_in_and_out_warehouse = 'spot_warrant_in_and_out_warehouse', // 提货
+
+	spot_warrant_designated_deal = 'spot_warrant_designated_deal', // 指定成交
+
+	pre_sale_warehouse_receipt_order_summary = 'pre_sale_warehouse_receipt_order_summary', // 订单汇总
+
+	pre_sale_warehouse_receipt_pending_order = 'pre_sale_warehouse_receipt_pending_order', // 挂单
+
+	pre_sale_warehouse_receipt_designated_deal = 'pre_sale_warehouse_receipt_designated_deal', // 指定成交
+
+	pre_sale_warehouse_receipt_deal = 'pre_sale_warehouse_receipt_deal', // 成交
+
+	commodity_contract_commission = 'commodity_contract_commission', // 委托
+
+	commodity_contract_make_deal = 'commodity_contract_make_deal', // 成交
+
+	commodity_contract_summary = 'commodity_contract_summary', // 合约汇总
+
+	commodity_contract_settlement = 'commodity_contract_settlement', // 交收
+
+	financing_manager_apply_order = 'financing_manager_apply_order', // 申请单
+
+	financing_manager_contract = 'financing_manager_contract', // 合同
+
+	performance_information_buy_performance = 'performance_information_buy_performance', // 买履约
+
+	performance_information_sell_performance = 'performance_information_sell_performance', // 卖履约
+
+	funding_information_funding_log = 'funding_information_funding_log', // 资金流水
+
+	funding_information_funding_summary = 'funding_information_funding_summary', // 资金汇总
+
+	pre_sale_warehouse_receipt_designated_deal_resell = 'pre_sale_warehouse_receipt_designated_deal_resell', // 撤销出售
+
+}

+ 14 - 3
src/services/go/wrtrade/index.ts

@@ -9,8 +9,7 @@ import {
     QueryFilterItemReq,
     QueryHoldLBReq,
     QueryOrderQuoteDetailReq,
-    QueryOrderQuoteMyqQsp,
-    QueryOrderQuoteMyqQsq,
+    QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq,
     QueryOrderQuoteReq,
     QueryPerformancePlanReq,
     QueryWrBuybackDetailReq,
@@ -24,6 +23,8 @@ import {
     QueryWrScfContractInterestReq,
     QueryWrSpecialMatchOrderReq,
     QueryWrStandardFactoryItemReq,
+    QueryWrTradeBargainApplyQsp,
+    QueryWrTradeBargainApplyReq,
     QueryWrTradeDetailReq,
     WrAverageTradePriceQsp,
     WrAverageTradePriceQsq,
@@ -340,7 +341,7 @@ export function queryWrDeliveryAvalidHoldLB(param: QueryWrDeliveryAvalidHoldLBRe
  * /WrTrade2/QueryOrderQuoteMyq 查询贸易圈挂牌大厅
  * @param QueryOrderQuoteMyq
  */
-export function queryQueryOrderQuoteMyq(param: QueryOrderQuoteMyqQsq): Promise<QueryOrderQuoteMyqQsp[]> {
+export function queryQueryOrderQuoteMyq(param: QueryOrderQuoteMyqReq): Promise<QueryOrderQuoteMyqQsp[]> {
     if (!param.userid) {
         param.userid = getUsrId()
     }
@@ -349,3 +350,13 @@ export function queryQueryOrderQuoteMyq(param: QueryOrderQuoteMyqQsq): Promise<Q
     });
 }
 
+/**
+ * /WrTrade2/QueryWrTradeBargainApply 查询议价单
+ * @param QueryWrTradeBargainApply
+ */
+export function queryQueryWrTradeBargainApply(param: QueryWrTradeBargainApplyReq): Promise<QueryWrTradeBargainApplyQsp[]> {
+    return commonSearch_go('/WrTrade2/QueryWrTradeBargainApply', param).catch((err) => {
+        throw new Error(`查询议价单: ${err}`);
+    });
+}
+

+ 47 - 2
src/services/go/wrtrade/interface.ts

@@ -1050,7 +1050,7 @@ export interface QueryOrderQuoteMyqQsp {
     wrtypename: string;//商品
 }
 
-export interface QueryOrderQuoteMyqQsq {
+export interface QueryOrderQuoteMyqReq {
     page?: number; // 页码
     pagesize?: number; // 每页条数
     userid?: number; // 用户id
@@ -1061,4 +1061,49 @@ export interface QueryOrderQuoteMyqQsq {
     wrstandardid?: number; // 品类id
     deliverymonth?: number; // 交收月(yyyy-mm) 仓单预售填写
     dgitemname?: number; // 商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm
-}
+}
+
+export interface QueryWrTradeBargainApplyReq {
+    userid?: number; // 用户id
+    wrtradeorderid?: number; //关联委托单id
+    haswr: 0 | 1; // 0:仓单预售 1:仓单贸易
+}
+
+export interface QueryWrTradeBargainApplyQsp {
+    buyorsell: number;//买卖 - number;
+    //:买 1:卖
+    canbargain: number;//是否可议价 - number;
+    //:不可 1:可
+    canpart: number;//是否允许部份摘牌 - number;
+    //:不允许 1:允许
+    delistminqty: number;//起摘数量
+    deliverygoodscode: string;//品种代码
+    deliverygoodsid: number;//品种ID
+    deliverygoodsname: string;//品种名称
+    deliverymonth: string;//交收月
+    enumdicname: string;//单位名称
+    fixedprice: number;//买(卖)价
+    goodscode: string;//商品合约代码
+    marginflag: number;//挂牌是否指定保证金 - number;
+    //:未指定 1:指定
+    marginvalue: number;//保证金设置值
+    minivalue: number;//现货商品最小变动值
+    orderqty: number;//买(卖)量(=委托量-成交量)
+    ordertime: string;//委托时间
+    performancetemplateid: number;//履约模板id
+    pricemove: number;//买(卖)升贴水- 基差
+    templatename: string;//履约模板名称
+    userid: number;//购买方(销售方)用户ID
+    username: string;//购买方(销售方)
+    validtime: string;//有效期限
+    validtype: number;//有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
+    warehousename: string;//仓库名称
+    wrfactortypeid: string;//仓单要素id
+    wrstandardcode: string;//现货商品代码
+    wrstandardid: number;//现货商品ID
+    wrstandardname: string;//商品名称
+    wrtradeorderid: string;//仓单贸易委托单ID(32number;
+    //+Unix秒时间戳(1number;
+    //位)+xxxxxx)
+    wrtypename: string;//商品
+}

+ 3 - 6
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/buy/index.vue

@@ -41,7 +41,7 @@
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqQsq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
+import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/common/setup/table/compose';
 import Filter from '../../components/filter/index.vue';
@@ -60,16 +60,13 @@ export default defineComponent({
         const isBottom = getShowBottomValue();
         // 表头
         const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.buy).map((el) => {
-            const slots = { customRender: el.key };
-            return { ...el, slots, dataIndex: el.key };
-        });
+        const columns = getBuyOrSellColumns(BuyOrSell.buy);
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqQsq = {
+            const param: QueryOrderQuoteMyqReq = {
                 buyorsell: BuyOrSell.buy,
                 haswr: 0,
             };

+ 3 - 6
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/components/sell/index.vue

@@ -41,7 +41,7 @@
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqQsq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
+import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/common/setup/table/compose';
 import Filter from '../../components/filter/index.vue';
@@ -60,16 +60,13 @@ export default defineComponent({
         const isBottom = getShowBottomValue();
         // 表头
         const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.sell).map((el) => {
-            const slots = { customRender: el.key };
-            return { ...el, slots, dataIndex: el.key };
-        });
+        const columns = getBuyOrSellColumns(BuyOrSell.sell);
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqQsq = {
+            const param: QueryOrderQuoteMyqReq = {
                 buyorsell: BuyOrSell.sell,
                 haswr: 0,
             };

+ 5 - 1
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_blocs/setup.ts

@@ -18,10 +18,14 @@ export function handleColumns() {
     ];
     function getBuyOrSellColumns(type: BuyOrSell) {
         const title = type === BuyOrSell.buy ? '买' : '卖'
-        return [
+        const result = [
             { title, dataIndex: 'index', key: 'index', width: 80, align: 'center' },
             ...columns
         ]
+        return result.map(el => {
+            const slots = { customRender: el.key };
+            return { ...el, slots, dataIndex: el.key };
+        })
     }
     return { getBuyOrSellColumns }
 }

+ 6 - 7
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/buy/index.vue

@@ -41,7 +41,7 @@
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqQsq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
+import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/common/setup/table/compose';
 import Filter from '../../components/filter/index.vue';
@@ -52,24 +52,23 @@ import { BuyOrSell } from '@/common/constants/enumCommon';
 import { formatTime } from '@/common/methods';
 
 export default defineComponent({
-    name: EnumRouterName.warehouse_receipt_trade_floating_price,
+    name: 'warehouse_receipt_trade_blocs_buy',
     components: {
         contextMenu,
+        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();
         // 表头
         const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.buy).map((el) => {
-            const slots = { customRender: el.key };
-            return { ...el, slots, dataIndex: el.key };
-        });
+        const columns = getBuyOrSellColumns(BuyOrSell.buy);
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqQsq = {
+            const param: QueryOrderQuoteMyqReq = {
                 buyorsell: BuyOrSell.buy,
                 haswr: 1,
             };

+ 279 - 0
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/delisting/index.vue

@@ -0,0 +1,279 @@
+<template>
+  <!--仓单贸易 贸易圈挂牌 摘牌-->
+  <Drawer :title="'挂牌求购'"
+          :placement="'right'"
+          :visible="visible"
+          @cancel="cancel"
+          class="top">
+    <div class="post_buying">
+
+    </div>
+  </Drawer>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { Des } from '@/common/components/commonDes';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { ModalEnum } from '@/common/constants/modalNameEnum';
+import Drawer from '@/common/components/drawer/index.vue';
+import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
+import { hdWROrder } from '@/services/proto/warehousetrade';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { DGFactoryItems, WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
+import { getAccountTypeList, getUserId } from '@/services/bus/account';
+import { v4 as uuidv4 } from 'uuid';
+import moment, { Moment } from 'moment';
+import { getMarketRunByTradeMode } from '@/services/bus/market';
+import { QueryOrderQuoteMyqQsp, WrOrderQuote } from '@/services/go/wrtrade/interface';
+
+import { validateAction } from '@/common/setup/form';
+
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+
+import { BuyOrSell } from '@/common/constants/enumCommon';
+import { getCanUseMoney } from '@/services/bus/account';
+import { TempWrOrderQuoteDetail } from '@/views/market/spot_trade/components/post_buying/interface';
+
+export default defineComponent({
+    emits: ['cancel', 'update'],
+    name: 'warehouse_receipt_trade_blocs_delisting',
+    components: { Des, Drawer, PlusOutlined, MinusOutlined },
+    props: {
+        selectedRow: {
+            type: Object as PropType<TempWrOrderQuoteDetail>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        // const { rules, formState, formRef } = handleForm();
+        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);
+        // }
+
+        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: 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, // 升贴水(浮动价时填写)
+            //             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: 0, // 履约计划模板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(), // 无仓单挂牌  是否有无仓单
+            //             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,
+            visible,
+            // accountList,
+            // rules,
+            // formState,
+            // formRef,
+            // getSelectedAccount,
+            getCanUseMoney,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.post_buying {
+    width: 100%;
+    height: 100%;
+    .flex;
+    flex-direction: column;
+    position: relative;
+    overflow: hidden;
+    .ant-form {
+        height: 100%;
+    }
+    .condition {
+        width: 100%;
+        height: 48px;
+        margin: 0 16px;
+        padding: 10px 0;
+        border-bottom: 1px solid @m-black6;
+        .inlineflex;
+        .conditionBtn {
+            align-self: center;
+            align-items: center;
+            border: 0;
+            min-width: 80px;
+            height: 28px;
+            line-height: 28px;
+            background: @m-black7;
+            .rounded-corners(3px);
+            font-size: 14px;
+            color: @m-blue0;
+            &:hover {
+                background: @m-black7-hover;
+                color: @m-blue0-hover;
+            }
+        }
+        .conditionBtn + .conditionBtn {
+            margin-left: 10px;
+        }
+    }
+}
+
+.unit {
+    margin-left: 70px;
+    width: 260px;
+    .flex;
+    justify-content: space-between;
+    font-size: 14px;
+    color: @m-grey41;
+    height: 14px;
+    line-height: 14px;
+}
+.listedBtn {
+    width: 120px;
+    height: 30px;
+    line-height: 30px;
+    background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
+    border-radius: 3px;
+    color: @m-white0;
+    font-size: 14px;
+    text-align: center;
+    border: 0;
+    &:hover {
+        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+        color: @m-white0-hover;
+    }
+}
+.cancelBtn:extend(.listedBtn) {
+    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
+    &:hover {
+        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
+        color: @m-white0-hover;
+    }
+}
+.ml10 {
+    margin-left: 10px;
+}
+.ant-form.dialogForm .ant-row.ant-form-item {
+    margin-bottom: 14px;
+}
+.mt20 {
+    margin-top: 20px;
+}
+.mt-10 {
+    margin-top: -10px;
+}
+.ant-input-suffix {
+    position: absolute;
+    right: -25px;
+}
+.minusBtn,
+.plusBtn {
+    width: 15px;
+    height: 32px;
+    line-height: 32px;
+    font-size: 15px;
+    color: @m-blue15;
+    cursor: pointer;
+}
+.minusBtn {
+    position: absolute;
+    top: -6px;
+    left: 14px;
+    z-index: 1;
+}
+.plusBtn {
+    position: absolute;
+    top: -6px;
+    right: 14px;
+    z-index: 1;
+}
+.stepper {
+    padding-left: 30px;
+    padding-right: 30px;
+    text-align: center;
+    color: @m-yellow1;
+    font-size: 16px;
+}
+.ant-slider.formSlider {
+    width: 260px !important;
+    margin-left: 70px;
+    .ant-slider-rail {
+        margin-right: 0;
+        padding-right: 0;
+        height: 3px !important;
+        border-radius: 2px !important;
+        background-color: @m-blue14;
+    }
+    .ant-slider-track {
+        height: 3px;
+        background-color: @m-blue0;
+    }
+    .ant-slider-step {
+        height: 3px;
+    }
+    .ant-progress-text {
+        display: none;
+    }
+}
+</style>

+ 6 - 7
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/sell/index.vue

@@ -41,7 +41,7 @@
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqQsq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
+import { QueryOrderQuoteMyqQsp, QueryOrderQuoteMyqReq, QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
 import { queryOrderQuote, queryQueryOrderQuoteMyq } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/common/setup/table/compose';
 import Filter from '../../components/filter/index.vue';
@@ -52,24 +52,23 @@ import { BuyOrSell } from '@/common/constants/enumCommon';
 import { formatTime } from '@/common/methods';
 
 export default defineComponent({
-    name: EnumRouterName.warehouse_receipt_trade_floating_price,
+    name: 'warehouse_receipt_trade_blocs_sell',
     components: {
         contextMenu,
+        warehouse_receipt_trade_blocs_delisting: defineAsyncComponent(() => import('../delisting/index.vue')),
+        warehouse_receipt_trade_blocs_detail: defineAsyncComponent(() => import('@/views/market/spot_trade/components/detail/index.vue')),
     },
     setup() {
         const isBottom = getShowBottomValue();
         // 表头
         const { getBuyOrSellColumns } = handleColumns();
-        const columns = getBuyOrSellColumns(BuyOrSell.sell).map((el) => {
-            const slots = { customRender: el.key };
-            return { ...el, slots, dataIndex: el.key };
-        });
+        const columns = getBuyOrSellColumns(BuyOrSell.sell);
 
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryOrderQuoteMyqQsp>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryOrderQuoteMyqQsq = {
+            const param: QueryOrderQuoteMyqReq = {
                 buyorsell: BuyOrSell.sell,
                 haswr: 1,
             };

+ 5 - 1
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/setup.ts

@@ -18,10 +18,14 @@ export function handleColumns() {
     ];
     function getBuyOrSellColumns(type: BuyOrSell) {
         const title = type === BuyOrSell.buy ? '买' : '卖'
-        return [
+        const result = [
             { title, dataIndex: 'index', key: 'index', width: 80, align: 'center' },
             ...columns
         ]
+        return result.map(el => {
+            const slots = { customRender: el.key };
+            return { ...el, slots, dataIndex: el.key };
+        })
     }
     return { getBuyOrSellColumns }
 }

+ 72 - 0
src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <!-- 现货仓单 现货明细 撤单 -->
+  <div></div>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import Drawer from '@/common/components/drawer/index.vue';
+import { WrOrderDetail } from '@/services/go/wrtrade/interface';
+import { getInTaAccount, getUserId } from '@/services/bus/account';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { wRListingCancelOrder } from '@/services/proto/warehousetrade';
+import { v4 as uuidv4 } from 'uuid';
+import moment from 'moment';
+import { ModalEnum } from '@/common/constants/modalNameEnum';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { WRListingCancelOrderReq } from '@/services/proto/warehousetrade/interface';
+import * as Long from 'long';
+import { getLongTypeLoginID } from '@/services/bus/login';
+import { Modal } from 'ant-design-vue';
+import Bus from '@/utils/eventBus/index';
+
+export default defineComponent({
+    name: ModalEnum.spot_warrant_pending_order_cancel_order,
+    components: { Drawer },
+    emits: ['cancel', 'update'],
+    props: {
+        selectedRow: {
+            type: Object as PropType<WrOrderDetail>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        const loading = ref<boolean>(false);
+
+        function submit() {
+            const param: WRListingCancelOrderReq = {
+                UserID: getUserId(), // uint32 用户ID
+                AccountID: getInTaAccount(), // uint64 资金账号
+                OldWRTradeOrderID: Long.fromString(props.selectedRow.wrtradeorderid), // uint64 目标仓单贸易委托单ID
+                OrderSrc: 1, // uint32 委托来源
+                ClientSerialNo: uuidv4(), // string 客户端流水号
+                ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
+                ClientType: 4, // uint32 终端类型
+                OperatorID: Number(getLongTypeLoginID()), // uint64 操作员账号ID
+                BuyOrSell: props.selectedRow.buyorsell, // uint32 买卖方向
+                WRID: props.selectedRow.wrfactortypeid, // uint64 仓单ID,卖的时候填写
+            };
+            requestResultLoadingAndInfo(wRListingCancelOrder, param, loading, ['撤单成功', '撤单失败:']).then(() => {
+                Bus.$emit('spotTrade', true);
+                cancel(true);
+            });
+        }
+
+        Modal.confirm({
+            title: '撤单',
+            content: '是否确认撤单?',
+            onOk: submit,
+            onCancel: cancel,
+        });
+
+        return {
+            visible,
+            cancel,
+        };
+    },
+});
+</script>
+
+<style lang="less" scoped>
+</style>;

+ 116 - 0
src/views/order/spot_warran/components/spot_warrant_bargain/index.vue

@@ -0,0 +1,116 @@
+<template>
+  <!-- 现货仓单 挂单 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable expandLeftTable"
+             :scroll="{ x: '100%', y: '190px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             :expandIcon="expandIcon"
+             :expandIconAsCell="false"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
+      </template>
+      <!-- 挂牌有效期 -->
+      <template #validtime="{ text }">
+        <span>{{ formatTime(text, 'd') }}</span>
+      </template>
+      <!--  委托状态-->
+      <!-- <template #wrtradeorderstatus="{ record }">
+        <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
+      </template> -->
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+      <!-- 挂牌价格 -->
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
+</template>
+
+<script lang="ts">
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import { queryTableList, BtnList, defineAsyncComponent, defineComponent, ModalEnum } from '@/common/export/commonTable';
+import { queryQueryWrTradeBargainApply, queryWrOrderDetail } from '@/services/go/wrtrade';
+import { QueryWrOrderDetailReq, QueryWrTradeBargainApplyReq, WrOrderDetail } from '@/services/go/wrtrade/interface';
+import { getRecordItemTab } from '@/common/setup/order/orderData';
+import { handleComposeOrderTable } from '@/common/setup/table/compose';
+import { ComposeOrderTableParam } from '@/common/setup/table/interface';
+import { getWrOrderTypeName, getWrTradeOrderStatusName } from '@/common/constants/enumsName';
+import { BtnListType } from '@/common/components/btnList/interface';
+import { expandIcon } from '@/common/setup/table/clolumn';
+import { getSpotWarrantBargainColumns } from './setup';
+import { formatTime } from '@/common/methods';
+
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_pending_order,
+    components: {
+        BtnList,
+        detail: defineAsyncComponent(() => import('./components/bargain_detail/index.vue')),
+    },
+    setup() {
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<WrOrderDetail>();
+        // 获取列表数据
+        const queryTableAction = () => {
+            const param: QueryWrTradeBargainApplyReq = {
+                haswr: 1,
+            };
+            queryTable(queryQueryWrTradeBargainApply, param);
+        };
+        // 表格通用逻辑
+        const param: ComposeOrderTableParam = {
+            queryFn: queryTableAction,
+            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_pending_order',
+            recordList: getRecordItemTab(),
+        };
+        const {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent,
+            openComponent, // 控制异步组件
+            btnList, // 表格按钮
+        } = handleComposeOrderTable<WrOrderDetail>(param);
+
+        return {
+            contextMenu,
+            openContext,
+            closeContext, // 右键
+            expandedRowKeys,
+            selectedRow,
+            Rowclick, // 表格折腾面板数据与单击、双击事件
+            componentId,
+            closeComponent,
+            openComponent, // 控制异步组件
+            btnList, // 表格按钮
+            columns: getSpotWarrantBargainColumns(),
+            loading,
+            tableList,
+            getWrTradeOrderStatusName,
+            getWrOrderTypeName,
+            expandIcon,
+            formatTime,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 19 - 0
src/views/order/spot_warran/components/spot_warrant_bargain/setup.ts

@@ -0,0 +1,19 @@
+export function getSpotWarrantBargainColumns() {
+    const columns = [
+        { title: '挂牌方', key: 'matchusername', align: 'center', width: 120 },
+        { title: '挂牌类型', key: 'buyorsell', align: 'center', width: 100 },
+        { title: '品种', key: 'deliverygoodsname', align: 'center', width: 200 },
+        { title: '商品', key: 'wrtypename', align: 'center', width: 400 },
+        { title: '仓库', key: 'warehousename', align: 'center', width: 140 },
+        { title: '价格', key: 'fixedprice', align: 'center' },
+        { title: '数量', key: 'orderqty', align: 'center', width: 120 },
+        // { title: '整单', key: 'canpart', align: 'center', width: 80 },
+        { title: '挂牌有效期', key: 'validtime', align: 'center', width: 120 },
+        { title: '履约保证金', key: 'marginvalue', align: 'center', width: 120 },
+        { title: '履约方式', key: 'templatename', align: 'center', width: 160 },
+    ];
+    return columns.map(el => {
+        const slots = { customRender: el.key };
+        return { ...el, slots, dataIndex: el.key };
+    })
+}

+ 1 - 0
src/views/order/spot_warran/index.vue

@@ -27,6 +27,7 @@ export default defineComponent({
         [enumOrderComponents.spot_warrant_pending_order]: defineAsyncComponent(() => import('./components/spot_warrant_pending_order/index.vue')),
         [enumOrderComponents.spot_warrant_spot_summary]: defineAsyncComponent(() => import('./components/spot_warrant_spot_summary/index.vue')),
         [enumOrderComponents.spot_warrant_spot_details]: defineAsyncComponent(() => import('./components/spot_warrant_spot_details/index.vue')),
+        [enumOrderComponents.spot_warrant_bargain]: defineAsyncComponent(() => import('./components/spot_warrant_bargain/index.vue')),
     },
     setup() {
         return { ...handleOrderDetailList(enumOrderComponents.spot_warrant) };

+ 66 - 30
swagger-to-ts/swagger.txt

@@ -1,15 +1,33 @@
 {
-    buyorsell	integer
-买卖 - 0:买 1:卖
+    accountid	integer
+摘牌资金账号
 
-canbargain	integer
-是否可议价 - 0:不可 1:可
+applyprice	string
+申请价格(议价价格)
 
-canpart	integer
-是否允许部份摘牌 - 0:不允许 1:允许
+applyqty	number
+摘牌数量(议价数量)
 
-delistminqty	number
-起摘数量
+applyremark	string
+申请备注
+
+applystatus	integer
+申请状态(议价状态) - 1:待确认 2:已确认 3:已拒绝 4:已撤销 5:系统撤销 6:处理失败 7:确认中
+
+applytime	string
+申请时间(议价时间)
+
+buyorsell	integer
+买卖(挂牌类型) - 0:买 1:卖
+
+confirmremark	string
+确认备注
+
+confirmtime	string
+确认时间
+
+confirmuserid	integer
+确认人
 
 deliverygoodscode	string
 品种代码
@@ -27,52 +45,70 @@ enumdicname	string
 单位名称
 
 fixedprice	number
-买(卖)价
-
-goodscode	string
-商品合约代码
+挂牌价格
 
-marginflag	integer
-挂牌是否指定保证金 - 0:未指定 1:指定
+handlestatus	integer
+处理状态
 
 marginvalue	number
-保证金设置值
+履约保证金比例
+
+marketid	integer
+市场ID
+
+matchaccountid	integer
+挂牌方资金账号
+
+matchuserid	integer
+挂牌方用户id
+
+matchusername	string
+挂牌方用户名称(已脱敏)
 
 minivalue	integer
 现货商品最小变动值
 
-orderqty	number
-买(卖)量(=委托量-成交量)
+optioncompare	string
+选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
 
-ordertime	string
-委托时间
+orderqty	integer
+挂牌数量
 
-performancetemplateid	integer
-履约模板id
+refprice	string
+参考价格
 
-pricemove	number
-买(卖)升贴水- 基差
+retcode	integer
+委托返回代码
 
 templatename	string
-履约模板名称
+履约方式(履约模板名称)
+
+tradedate	string
+交易日(yyyyMMdd)
 
 userid	integer
-购买方(销售方)用户ID
+摘牌人用户ID(议价人ID)
 
 username	string
-购买方(销售方)
+议价人名字(已脱敏)
 
 validtime	string
 有效期限
 
-validtype	integer
-有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效
+warehouseid	integer
+仓库ID
 
 warehousename	string
 仓库名称
 
+wrbargainid	string
+议价申请单ID(327+Unix秒时间戳(10位)+xxxxxx)
+
 wrfactortypeid	string
-仓单要素id
+仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+
+wrfactortypename	string
+仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
 
 wrstandardcode	string
 现货商品代码
@@ -84,7 +120,7 @@ wrstandardname	string
 商品名称
 
 wrtradeorderid	string
-仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
+关联委托单ID
 
 wrtypename	string
 商品