浏览代码

修改现货明细

huangbin 4 年之前
父节点
当前提交
5714f50b98

+ 17 - 8
src/common/methods/table/interface.ts

@@ -16,8 +16,7 @@
 		render?: Function;
 		customRender?: Function;
 	}
-	export interface TableKey {table_pcweb_delivery:string, // 现货合同
-table_pcweb_userinfo:string, // 客户资料
+	export interface TableKey {table_pcweb_userinfo:string, // 客户资料
 table_pcweb_warehouse:string, // 仓库信息
 table_pcweb_purchase_pointprice:string, // 采购_待点价
 table_pcweb_purchase_settle:string, // 采购_履约交收
@@ -72,25 +71,38 @@ table_pcweb_financial_statement_brand_details:string, // 报表-财务报表-品
 table_pcweb_futures_statement_account_details:string, // 报表-期货报表-账户明细
 table_pcweb_inventory_commodity_report_brand_details:string, // 报表-库存(商品)报表-品牌明细
 table_pcweb_inventory_commodity_report_warehouse_details:string, // 报表-库存(商品)报表-仓库明细
+table_pcweb_delivery:string, // 现货合同
 table_pcweb_inventory_warehouse_report_warehouse_details:string, // 报表-库存(仓库)报表-仓库明细
 table_pcweb_inventory_summary_profit_and_loss_details:string, // 报表-汇总损益报表-损益明细
 table_pcweb_qhj_recharge_review:string, // 铂金宝-充值提现审核-充值审核
 table_pcweb_qhj_withdrawal_review:string, // 铂金宝-充值提现审核-提现审核
-table_pcweb_qhj_pickup_query:string, // 铂金宝-提货查询
-table_pcweb_qhj_fixed_investment_price_query:string, // 铂金宝-定投价查询
 table_pcweb_qhj_fixed_investment_plan_query:string, // 铂金宝-定投查询-定投计划查询
 table_pcweb_qhj_fixed_investment_flow_query:string, // 铂金宝-定投查询-定投流水查询
 table_pcweb_qhj_fixed_financing_information:string, // 铂金宝-融资信息
 table_pcweb_qhj_customer_info:string, // 铂金宝-客户资料
 table_pcweb_qhj_holder_order:string, // 铂金宝-单据查询-持仓单
 table_pcweb_qhj_order:string, // 铂金宝-单据查询-委托单
+table_pcweb_qhj_pay_bill:string, // 铂金宝-单据查询-待付单
+table_pcweb_qhj_deal_order:string, // 铂金宝-单据查询-成交单
+table_pcweb_spot_and_price:string, // 铂金宝-现货市价
 table_pcweb_agreement:string, // 铂金宝-协议管理
 table_pcweb_spot_trade_warehouse_price:string, // 现货贸易-仓单贸易-一口价
 table_pcweb_spot_trade_warehouse_float:string, // 现货贸易-仓单贸易
 table_pcweb_spot_trade_warehouse_sale_price:string, // 现货贸易-仓单预售
 table_pcweb_spot_trade_warehouse_sale_float:string, // 现货贸易-仓单预售
+table_pcweb_spot_trade_warehouse_price_trading_hall_sale:string, // 现货贸易-仓单贸易-买卖大厅
+table_pcweb_spot_trade_warehouse_price_trading_hall_buy:string, // 现货贸易-仓单贸易-买卖大厅
+table_pcweb_spot_trade_warehouse_float_trading_hall_sale:string, // 现货贸易-仓单贸易-买卖大厅
+table_pcweb_qhj_pickup_query:string, // 铂金宝-提货查询
+table_pcweb_qhj_fixed_investment_price_query:string, // 铂金宝-定投价查询
+table_pcweb_spot_trade_warehouse_float_trading_hall_buy:string, // 现货贸易-仓单贸易-买卖大厅
+table_pcweb_spot_trade_warehouse_presale_price_trading_hall_sale:string, // 现货贸易-仓单预售-买卖大厅
+table_pcweb_spot_trade_warehouse_presale_price_trading_hall_buy:string, // 现货贸易-仓单预售-买卖大厅
+table_pcweb_spot_trade_warehouse_presale_float_trading_hall_sale:string, // 现货贸易-仓单预售-买卖大厅
+table_pcweb_spot_trade_warehouse_presale_float_trading_hall_buy:string, // 现货贸易-仓单预售-买卖大厅
 table_pcweb_spot_trade_bottom_spot_warrant_spot_summary:string, // 底部栏-现货仓单
 table_pcweb_spot_trade_bottom_spot_warrant_inventory_summary:string, // 底部栏-现货仓单
+table_pcweb_spot_trade_bottom_spot_warrant_spot_detail:string, // 底部栏-现货仓单
 table_pcweb_spot_trade_bottom_spot_warrant_pending_order:string, // 底部栏-现货仓单
 table_pcweb_spot_trade_bottom_spot_warrant_deal:string, // 底部栏-现货仓单
 table_pcweb_spot_trade_bottom_spot_warrant_designated_deal:string, // 底部栏-现货仓单
@@ -104,8 +116,5 @@ table_pcweb_spot_trade_bottom_commodity_contract_settlement:string, // 底部栏
 table_pcweb_spot_trade_bottom_performance_info_buy:string, // 底部栏-履约信息
 table_pcweb_spot_trade_bottom_performance_info_sale:string, // 底部栏-履约信息
 table_pcweb_spot_trade_bottom_funding_info_summary:string, // 底部栏-资金信息
-table_pcweb_spot_trade_bottom_funding_info_log:string, // 底部栏-资金信息
-table_pcweb_qhj_pay_bill:string, // 铂金宝-单据查询-待付单
-table_pcweb_qhj_deal_order:string, // 铂金宝-单据查询-成交单
-table_pcweb_spot_and_price:string, // 铂金宝-现货市价 
+table_pcweb_spot_trade_bottom_funding_info_log:string, // 底部栏-资金信息 
  }

+ 1 - 1
src/views/order/spot_warran/components/spot_warrant_inventory_summary/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 库存汇总 -->
-  <section class="spot_warrant_inventory_summary">
+  <section>
     <a-table :columns="columns"
              class="srcollYTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"

+ 249 - 0
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -0,0 +1,249 @@
+<template>
+  <!-- 挂单 -->
+  <Drawer :title="'挂牌'"
+          :placement="'bottom'"
+          :visible="visible">
+    <!-- 挂牌 -->
+    <div class="listed">
+      <div class="condition">
+        <a-button class="conditionBtn">螺纹钢</a-button>
+        <a-button class="conditionBtn">12</a-button>
+        <a-button class="conditionBtn">江铜</a-button>
+        <a-button class="conditionBtn">华南仓库</a-button>
+      </div>
+      <div class="formBar">
+        <a-form class="inlineForm"
+                :form="form"
+                @submit="handleSearch">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌方式">
+                <a-select class="inlineFormSelect"
+                          default-value="1"
+                          style="width: 140px">
+                  <a-select-option value="1">
+                    一口价
+                  </a-select-option>
+                  <a-select-option value="2">
+                    一口价2
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="挂牌价">
+                <a-input class="commonInput"
+                         style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌数量">
+                <a-input class="commonInput"
+                         suffix="吨"
+                         style="width: 140px" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="起摘数量"
+                           class="relative">
+                <a-input class="commonInput"
+                         suffix="吨"
+                         style="width: 140px" />
+                <div class="tip">最小单位:1吨</div>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item>
+                <a-progress class="formProgress"
+                            :percent="30" />
+                <div class="unit"><span>0</span><span>300吨</span></div>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24">
+              <a-form-item class="tc">
+                <a-button class="listedBtn">挂牌</a-button>
+                <a-button class="ml10 cancelBtn">取消</a-button>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
+  </Drawer>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import Drawer from '@/common/components/drawer/index.vue';
+import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
+import { getUserId } from '@/services/bus/account';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { hdWROrder } from '@/services/proto/warehousetrade';
+import { v4 as uuidv4 } from 'uuid';
+import moment from 'moment';
+
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_pending_order,
+    components: { Drawer },
+    props: {
+        selectedRow: {
+            type: Object as PropType<WrPosition>,
+            default: {},
+        },
+    },
+    setup(props) {
+        const data = props.selectedRow;
+        const loading = ref<boolean>(false);
+        const param = {
+            AccountID: data.accountid.toString(),
+            ClientSerialNo: uuidv4(), // 客户端流水号
+            // OperateSrc: 2,
+            ClientType: 4,
+            // MarketID: 17201,
+            LadingBillId: '2081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            TradeDate: moment('20210725').format('YYYYMMDD'), // 交易日 string
+            SubNum: '0', // 提单子单号
+            WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
+            // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
+            OrderQty: 1, // 委托数量(可挂部分数据量) ======
+            DeliveryGoodsID: data.deliverygoodsid, // 交割商品商品ID
+            WRPriceType: 1, // 价格方式 1:固定价 2:浮动价
+            FixedPrice: 10, // 固定价格
+            PriceFactor: 0, // 价格系数(浮动价时填写)
+            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: 0, // 履约计划模板ID
+            UserID: getUserId(),
+            OperatorID: getUserId(), // 操作员账号ID
+            BuyOrSell: 1, // 买卖方向 0买1卖
+            PriceDisplayMode: 1, // 浮动价显示方式 1:合并显示 2:分开显示
+            CanBargain: 0, // 挂牌是否可议价0:不可1:可-摘牌是否议价
+            Attachment1: '', // 附件1
+            Attachment2: '', // 附件2
+            Remark: '222', // 备注
+            ApplyID: 0, // 申请ID
+            CanPart: 1, // 是否允许部份摘牌0:不允许;1:允许
+            WRTradeGoods: [],
+            wrstandardid: 1,
+            HasWr: 1,
+        };
+        console.log(param);
+        requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
+            // cancel(true);
+        });
+        return {
+            visible: true,
+        };
+    },
+});
+</script>
+
+<style lang="less" scoped>
+.listed {
+    width: 100%;
+    height: 100%;
+    .flex;
+    flex-direction: column;
+    .condition {
+        width: 100%;
+        height: 48px;
+        padding: 10px 16px;
+        border-bottom: 1px solid @m-black6;
+        .inlineflex;
+        .conditionBtn {
+            align-self: center;
+            align-items: center;
+            border: 0;
+            width: 80px;
+            height: 28px;
+            line-height: 28px;
+            background: @m-black7;
+            .rounded-corners(3px);
+            font-size: 14px;
+            color: @m-blue0;
+            &:hover {
+                background: rgba(@m-black7, 0.8);
+                color: rgba(@m-blue0, 0.8);
+            }
+        }
+        .conditionBtn + .conditionBtn {
+            margin-left: 10px;
+        }
+    }
+    .formBar {
+        width: 100%;
+        flex: 1;
+        padding: 28px 16px 7px;
+    }
+}
+
+::v-deep.formProgress {
+    width: 140px;
+    // height: 3px;
+    // .rounded-corners(2px);
+    margin-left: 80px;
+    .ant-progress-outer {
+        margin-right: 0;
+        padding-right: 0;
+        .ant-progress-inner {
+            background: @m-grey14;
+            .rounded-corners(2px);
+            .ant-progress-bg {
+                height: 3px !important;
+                border-radius: 2px !important;
+                background-color: @m-blue0;
+            }
+        }
+    }
+    .ant-progress-text {
+        display: none;
+    }
+}
+.unit {
+    margin-left: 80px;
+    .flex;
+    justify-content: space-between;
+    font-size: 14px;
+    color: @m-grey1;
+    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%);
+    &:hover {
+        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%);
+        color: @m-white0-hover;
+    }
+}
+.ml10 {
+    margin-left: 10px;
+}
+</style>;

+ 52 - 5
src/views/order/spot_warran/components/spot_warrant_spot_details/index.vue

@@ -1,18 +1,65 @@
 <template>
   <!-- 现货明细 -->
-  <section class="spot_warrant_spot_details">
-    现货明细
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
   </section>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { queryTableList, BtnList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam, handleComposeTable } from '@/common/export/commonTable';
+import { queryWrOrderDetail, queryWrPosition } from '@/services/go/wrtrade';
+import { QueryWrOrderDetailReq, QueryWrPositionReq, WrOrderDetail, WrPosition } 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';
 export default defineComponent({
     name: enumOrderComponents.spot_warrant_spot_details,
-    components: {},
+    components: {
+        BtnList,
+        [ModalEnum.spot_warrant_spot_details_listed]: defineAsyncComponent(() => import('./components/listing/index.vue')),
+    },
     setup() {
-        return {};
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<WrPosition>();
+        // 获取列表数据
+        const queryTableAction = () => {
+            const param: QueryWrPositionReq = {
+                querytype: 3,
+            };
+            queryTable(queryWrPosition, param);
+        };
+        // 表格通用逻辑
+        const param: ComposeOrderTableParam = {
+            queryFn: queryTableAction,
+            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_spot_detail',
+            recordList: getRecordItemTab(),
+        };
+        return {
+            ...handleComposeOrderTable<WrPosition>(param),
+            loading,
+            tableList,
+        };
     },
 });
 </script>

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

@@ -26,7 +26,7 @@ export default defineComponent({
         [enumOrderComponents.spot_warrant_inventory_summary]: defineAsyncComponent(() => import('./components/spot_warrant_inventory_summary/index.vue')),
         [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_spot_details]: defineAsyncComponent(() => import('./components/spot_warrant_spot_details/index.vue')),
     },
     setup() {
         return { ...handleOrderDetailList(enumOrderComponents.spot_warrant) };

文件差异内容过多而无法显示
+ 259 - 307
swagger-to-ts/tableKey.js


部分文件因为文件数量过多而无法显示