|
|
@@ -0,0 +1,443 @@
|
|
|
+/* 各批方案共用的内容数据(沿用第五轮从代码提取的内容,只作内容来源,不含任何设计)。
|
|
|
+ * 字段、顺序、文案取自三端前端代码与 ddl 字典 seed;表内数值是按字段格式编写的示例值,未按业务公式计算。
|
|
|
+ * 2026-09-30 同步代码:TRS 委托状态「已过期」改为「过期」。
|
|
|
+ * 修改后执行:python3 build.py
|
|
|
+ */
|
|
|
+window.SPEC_DATA = (function () {
|
|
|
+ // 字典:文案 -> Element Plus tag 类型(取自 ddl/<sys>/public/数据字典/seed.sql)
|
|
|
+ const dict = {
|
|
|
+ direction: { 买入: "danger", 卖出: "success" },
|
|
|
+ op_type: { 正常: "primary", 强平: "danger", 到期: "warning" },
|
|
|
+ process_mode: { 自动: "primary", 人工: "warning" },
|
|
|
+ hedge_progress: { 未开始: "info", 对冲中: "primary", 已结束: "success" },
|
|
|
+ note_order_status: {
|
|
|
+ 待处理: "info", 执行中: "primary", 待撤: "warning", 撤单中: "warning", 确认中: "primary",
|
|
|
+ 已完成: "success", 已结算: "success", 已撤: "info", 已拒绝: "danger",
|
|
|
+ },
|
|
|
+ note_type: { "Delta A": "primary", "Delta B": "warning" },
|
|
|
+ order_source: { CRM: "primary", IOS: "info", Android: "info", H5: "info", 发行端: "warning" },
|
|
|
+ // 销售端下单方式的文案取自代码注释;标签颜色在 seed 里未核对,这里按「本端 primary、其余 info」示意
|
|
|
+ sales_order_source: { 销售端: "primary", iOS: "info", Android: "info", H5: "info" },
|
|
|
+ hedge_system: { TRS: "primary", 自定义: "info" },
|
|
|
+ hedge_order_type: { 普通单: "primary", 算法TWAP: "warning", 算法POV: "warning", "算法E-Amount": "warning" },
|
|
|
+ trs_order_status: {
|
|
|
+ 未报: "info", 待报: "info", 已报: "primary", 部成: "warning", 待撤: "warning", 已撤: "info",
|
|
|
+ 部撤: "warning", 已成: "success", 废单: "danger", 过期: "info", 部废: "danger",
|
|
|
+ },
|
|
|
+ trade_channel: { QFII: "primary", 深沪港通: "primary", 港股自营: "info" },
|
|
|
+ price_req_type: { 限价: "primary", 市价: "warning" },
|
|
|
+ order_type: { 正常下单: "primary", 后台下单: "info", 算法下单: "warning", 后台平仓: "danger", 后台补单: "info", 条件单: "success" },
|
|
|
+ order_mode: { Windows: "primary", iOS: "primary", Android: "primary", FIX: "warning", 电话: "info", 邮件: "info", CRM: "info", OpenAPI: "warning", H5: "info" },
|
|
|
+ };
|
|
|
+
|
|
|
+ const menus = {
|
|
|
+ issue: [
|
|
|
+ ["报表管理", "chart", ["共赢票据交易确认书", "日常报表"]],
|
|
|
+ ["风控管理", "shield", ["白名单管理", "共赢票据额度管理", "共赢票据风险监控"]],
|
|
|
+ ["共赢票据管理", "ticket", ["订单管理", "票据管理", "票据日常对冲统计", "票据展期管理", "询价管理"]],
|
|
|
+ ["汇率管理", "coin", ["账面汇率"]],
|
|
|
+ ["清算管理", "check", ["共赢票据成交对账", "共赢票据持仓对账", "共赢票据清算", "营业日日切"]],
|
|
|
+ ["系统设置", "gear", ["对冲账户管理", "费用管理", "交易时间片设置", "平台参数", "日历配置", "自动化配置"]],
|
|
|
+ ["常驻工作进程", "cpu", ["工作进程配置", "实例与分片监控", "操作记录"]],
|
|
|
+ ["销售机构管理", "building", ["机构管理", "平台参数"]],
|
|
|
+ ["计划任务中心", "clock", ["计划任务配置", "任务运行记录"]],
|
|
|
+ ["通知和告警管理", "mail", ["通知设置", "邮件发送记录", "短信发送记录", "飞书发送记录"]],
|
|
|
+ ],
|
|
|
+ sales: [
|
|
|
+ ["报表管理", "chart", ["共赢票据交易确认书", "日常报表", "日结单", "月结单"]],
|
|
|
+ ["费用管理", "coin", ["费用串列表", "投资者费用管理"]],
|
|
|
+ ["风控管理", "shield", ["共赢票据风险监控"]],
|
|
|
+ ["共赢票据管理", "ticket", ["订单管理", "票据管理", "票据展期管理", "询价管理"]],
|
|
|
+ ["机构系统设置", "gear", ["帮助中心", "机构参数", "日历配置"]],
|
|
|
+ ["清算管理", "check", ["共赢票据成交对账", "共赢票据持仓对账", "共赢票据清算"]],
|
|
|
+ ["投资者管理", "user", ["开户审核", "投资者信息"]],
|
|
|
+ ["资金管理", "card", ["出金", "汇率", "票据转外部", "入金", "透支额度管理", "外部转票据", "BizCode管理"]],
|
|
|
+ ["常驻工作进程", "cpu", ["工作进程配置", "实例与分片监控", "操作记录"]],
|
|
|
+ ["计划任务中心", "clock", ["计划任务配置", "任务运行记录"]],
|
|
|
+ ["通知和告警管理", "mail", ["通知设置", "邮件发送记录", "短信发送记录", "飞书发送记录"]],
|
|
|
+ ],
|
|
|
+ trs: [
|
|
|
+ ["报表管理", "chart", ["TRS 报表"]],
|
|
|
+ ["财务管理", "coin", ["收取利息"]],
|
|
|
+ ["对账管理", "scale", ["成交对账", "持仓对账"]],
|
|
|
+ ["风险监控", "shield", ["成交数据统计", "股票融资额度监控", "平台风险监控", "通道风险监控", "用户风险监控", "用户融资额度管理"]],
|
|
|
+ ["清算管理", "check", ["公司行动", "清算"]],
|
|
|
+ ["通道管理", "sliders", ["通道连接", "通道账户"]],
|
|
|
+ ["系统设置", "gear", ["交易补单", "交易下单", "算法下单", "系统参数", "下单风控设置", "交易日历"]],
|
|
|
+ ["用户管理", "user", ["成交查询", "清算群组管理", "委托查询", "用户通道优先级", "用户信息"]],
|
|
|
+ ["资金管理", "card", ["出金", "汇率", "亏损交收", "流水 bizcode 维护", "入金"]],
|
|
|
+ ["常驻工作进程", "cpu", ["工作进程配置", "实例与分片监控", "操作记录"]],
|
|
|
+ ["计划任务中心", "clock", ["计划任务配置", "任务运行记录"]],
|
|
|
+ ["通知和告警管理", "mail", ["通知设置", "邮件发送记录", "短信发送记录", "飞书发送记录"]],
|
|
|
+ ],
|
|
|
+ };
|
|
|
+
|
|
|
+ const sysName = { issue: "发行管理系统", sales: "销售管理系统", trs: "TRS管理系统" };
|
|
|
+ const tradeDays = [["营业日", "2026-09-25"], ["A股交易日 (QFII)", "2026-09-25"], ["A股交易日 (深沪港通)", "2026-09-25"]];
|
|
|
+
|
|
|
+ /* ---------- 发行端 · 订单管理(issue_frontend/src/views/issue/order/index.vue) ---------- */
|
|
|
+ const issueSearch = [
|
|
|
+ { label: "主订单编号", type: "input", ph: "主订单编号" },
|
|
|
+ { label: "子订单编号", type: "input", ph: "子订单编号" },
|
|
|
+ { label: "订单方向", type: "select", ph: "全部" },
|
|
|
+ { label: "订单状态", type: "select", ph: "全部", multiple: true },
|
|
|
+ { label: "票据类型", type: "select", ph: "全部" },
|
|
|
+ { label: "操作类型", type: "select", ph: "全部", multiple: true },
|
|
|
+ { label: "处理方式", type: "select", ph: "全部" },
|
|
|
+ { label: "投资者", type: "input", ph: "投资者编号/账户/名称" },
|
|
|
+ { label: "机构名称", type: "select", ph: "全部" },
|
|
|
+ { label: "证券代码/名称", type: "input", ph: "证券代码/名称" },
|
|
|
+ { label: "交易日期", type: "daterange", value: ["2026-09-25", "2026-09-25"], sep: "~" },
|
|
|
+ ];
|
|
|
+ const issueActions = [["查找", "primary", "search"], ["重置", "", "refresh"], ["数据导出", "", "download"]];
|
|
|
+
|
|
|
+ // merge: 按主订单跨行合并;group: 激进套用的列分组
|
|
|
+ const issueColumns = [
|
|
|
+ { key: "no", title: "主订单编号", w: 200, merge: true, fixed: true, mono: true, group: "订单" },
|
|
|
+ { key: "direction", title: "订单方向", w: 90, tag: "direction", merge: true, group: "订单" },
|
|
|
+ { key: "op", title: "操作类型", w: 100, tag: "op_type", merge: true, group: "订单" },
|
|
|
+ { key: "mode", title: "处理方式", w: 90, tag: "process_mode", merge: true, group: "订单" },
|
|
|
+ { key: "hedge", title: "对冲进度", w: 90, tag: "hedge_progress", merge: true, group: "订单" },
|
|
|
+ { key: "status", title: "订单状态", w: 90, tag: "note_order_status", group: "订单" },
|
|
|
+ { key: "noteType", title: "票据类型", w: 90, tag: "note_type", group: "订单" },
|
|
|
+ { key: "invNo", title: "投资者编号", w: 150, mono: true, group: "投资者" },
|
|
|
+ { key: "invAcct", title: "投资者账户", w: 120, mono: true, group: "投资者" },
|
|
|
+ { key: "invName", title: "投资者名称", w: 110, group: "投资者" },
|
|
|
+ { key: "fundAcct", title: "资金账户", w: 150, mono: true, group: "投资者" },
|
|
|
+ { key: "org", title: "机构名称", w: 160, group: "投资者" },
|
|
|
+ { key: "stock", title: "证券代码/名称", w: 200, group: "标的与条款" },
|
|
|
+ { key: "noteDir", title: "票据方向", w: 90, group: "标的与条款" },
|
|
|
+ { key: "period", title: "周期", w: 90, group: "标的与条款" },
|
|
|
+ { key: "notional", title: "订单名义本金(交易币种)", w: 200, align: "right", num: true, group: "金额与成交" },
|
|
|
+ { key: "priceReq", title: "价格要求(交易币种)", w: 170, align: "center", priceReq: true, group: "金额与成交" },
|
|
|
+ { key: "execNotional", title: "执行名义本金(交易币种)", w: 200, align: "right", num: true, group: "金额与成交" },
|
|
|
+ { key: "avgPrice", title: "订单成交均价(交易币种)", w: 200, align: "right", num: true, group: "金额与成交" },
|
|
|
+ { key: "execQty", title: "执行订单股数", w: 170, align: "right", num: true, group: "金额与成交" },
|
|
|
+ { key: "hedgeQty", title: "对冲股数", w: 110, align: "right", num: true, group: "金额与成交" },
|
|
|
+ { key: "tradeCcy", title: "交易币种", w: 90, group: "金额与成交" },
|
|
|
+ { key: "settleCcy", title: "结算币种", w: 90, group: "金额与成交" },
|
|
|
+ { key: "orderTime", title: "下单时间", w: 165, mono: true, group: "时间" },
|
|
|
+ { key: "tradeDate", title: "交易日", w: 110, mono: true, group: "时间" },
|
|
|
+ { key: "settleDate", title: "预计交收日", w: 110, mono: true, group: "时间" },
|
|
|
+ { key: "subNo", title: "子订单编号", w: 200, mono: true, group: "关联" },
|
|
|
+ { key: "noteNo", title: "关联主票据编号", w: 200, link: true, mono: true, group: "关联" },
|
|
|
+ { key: "subNoteNo", title: "关联子票据编号", w: 200, link: true, mono: true, group: "关联" },
|
|
|
+ { key: "source", title: "下单方式", w: 100, tag: "order_source", group: "关联" },
|
|
|
+ { key: "remark", title: "备注", w: 140, group: "关联" },
|
|
|
+ ];
|
|
|
+
|
|
|
+ const people = [
|
|
|
+ ["张明远", "明德资产管理"], ["李婉清", "远航财富"], ["王子豪", "明德资产管理"], ["陈思雨", "安衡证券"],
|
|
|
+ ["刘建国", "远航财富"], ["赵雅琳", "启原投资"], ["孙浩然", "明德资产管理"], ["周晓彤", "安衡证券"],
|
|
|
+ ["吴俊杰", "远航财富"], ["郑可欣", "启原投资"], ["黄一鸣", "安衡证券"], ["林书瑶", "远航财富"],
|
|
|
+ ];
|
|
|
+ const stocks = ["600519 贵州茅台", "300750 宁德时代", "000858 五粮液", "601318 中国平安", "002594 比亚迪", "600036 招商银行",
|
|
|
+ "601899 紫金矿业", "600900 长江电力", "688981 中芯国际", "000333 美的集团", "601012 隆基绿能", "600276 恒瑞医药"];
|
|
|
+ // [方向, 操作类型, 处理方式, 对冲进度, [子单状态...], 周期, 名义本金, 价格要求, 下单方式]
|
|
|
+ const plan = [
|
|
|
+ ["买入", "正常", "自动", "未开始", ["待处理"], "3M", 3000000, "限价:1,688.00", "CRM"],
|
|
|
+ ["买入", "正常", "人工", "对冲中", ["执行中"], "6M", 2000000, "限价:245.30", "IOS"],
|
|
|
+ ["卖出", "正常", "自动", "对冲中", ["执行中", "执行中"], "", 0, "市价", "CRM"],
|
|
|
+ ["买入", "正常", "自动", "已结束", ["确认中"], "3M", 1500000, "限价:52.18", "Android"],
|
|
|
+ ["卖出", "强平", "人工", "已结束", ["已完成"], "", 0, "市价", "发行端"],
|
|
|
+ ["买入", "正常", "自动", "已结束", ["已完成", "已完成"], "6M", 1000000, "限价:35.60", "CRM"],
|
|
|
+ ["买入", "正常", "自动", "未开始", ["待撤"], "1M", 800000, "限价:16.42", "H5"],
|
|
|
+ ["卖出", "到期", "自动", "已结束", ["已结算"], "", 0, "市价", "发行端"],
|
|
|
+ ["买入", "正常", "自动", "未开始", ["已拒绝"], "3M", 500000, "限价:88.20", "CRM"],
|
|
|
+ ["买入", "正常", "人工", "对冲中", ["撤单中"], "3M", 1200000, "限价:61.75", "IOS"],
|
|
|
+ ["卖出", "正常", "自动", "已结束", ["已完成", "已完成"], "", 0, "限价:1,692.50", "CRM"],
|
|
|
+ ["买入", "正常", "自动", "未开始", ["已撤"], "1M", 600000, "限价:21.06", "Android"],
|
|
|
+ ];
|
|
|
+ const fmt = (n, d = 2) => Number(n).toLocaleString("en-US", { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
|
+ const issueRows = [];
|
|
|
+ plan.forEach((p, i) => {
|
|
|
+ const seq = String(31 - i).padStart(4, "0");
|
|
|
+ const no = "ORD00120260925" + seq;
|
|
|
+ const [name, org] = people[i];
|
|
|
+ const acct = String(1100151 - i);
|
|
|
+ const done = ["确认中", "已完成", "已结算"].includes(p[4][0]);
|
|
|
+ const price = p[7].startsWith("限价") ? Number(p[7].slice(3).replace(/,/g, "")) : [168.4, 245.1, 1690.2][i % 3];
|
|
|
+ const qty = [1700, 8100, 12400, 28700, 5200, 28000, 48700, 9300, 5600, 19400, 800, 28400][i];
|
|
|
+ p[4].forEach((st, j) => {
|
|
|
+ issueRows.push({
|
|
|
+ master: i, sub: j, span: j === 0 ? p[4].length : 0,
|
|
|
+ no, direction: p[0], op: p[1], mode: p[2], hedge: p[3], status: st,
|
|
|
+ noteType: j === 0 ? "Delta A" : "Delta B",
|
|
|
+ invNo: "INV00" + acct, invAcct: "HH1002" + String(3431 - i), invName: name, fundAcct: "FA00" + acct, org,
|
|
|
+ stock: stocks[i], noteDir: p[0] === "买入" ? "CALL" : "--", period: p[5] || "--",
|
|
|
+ notional: p[6] ? fmt(p[6]) : "--", priceReq: p[7],
|
|
|
+ execNotional: done && p[6] ? fmt(p[6] * 0.998) : "--",
|
|
|
+ avgPrice: done ? fmt(price) : "--", execQty: done ? fmt(qty, 0) : "--", hedgeQty: p[3] === "未开始" ? "--" : fmt(qty, 0),
|
|
|
+ tradeCcy: "CNY", settleCcy: "HKD",
|
|
|
+ orderTime: "2026-09-25 " + ["09:31:07", "09:42:55", "10:03:18", "10:15:42", "10:28:09", "10:47:31", "11:02:26", "13:05:44", "13:21:10", "13:48:37", "14:06:52", "14:33:15"][i],
|
|
|
+ tradeDate: "2026-09-25", settleDate: done ? "2026-09-29" : "--",
|
|
|
+ subNo: no + (j === 0 ? "A" : "B"),
|
|
|
+ noteNo: done || p[0] === "卖出" ? "NT00120260" + String(8120 + i * 7) : "--",
|
|
|
+ subNoteNo: done || p[0] === "卖出" ? "NT00120260" + String(8120 + i * 7) + (j === 0 ? "A" : "B") : "--",
|
|
|
+ source: p[8], remark: i === 4 ? "触发平仓线,风控发起" : i === 8 ? "额度不足" : "",
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ /* ---------- 发行端 · 订单详情抽屉(OrderDetailDrawer 及子组件),以一笔人工买入单为例 ---------- */
|
|
|
+ const issueDetail = {
|
|
|
+ title: "订单详情",
|
|
|
+ toolbar: "刷新数据",
|
|
|
+ master: {
|
|
|
+ title: "主订单信息",
|
|
|
+ buttons: [["转为自动处理", ""]],
|
|
|
+ fields: [
|
|
|
+ ["主订单编号", "ORD001202609250030", "mono"], ["订单方向", "买入", "tag:direction"], ["操作类型", "正常", "tag:op_type"], ["处理方式", "人工", "tag:process_mode"],
|
|
|
+ ["证券代码/名称", "300750 宁德时代"], ["票据方向", "CALL"], ["周期", "6M"], ["价格要求", "限价:245.30", "priceReq"],
|
|
|
+ ["交易币种", "CNY"], ["结算币种", "HKD"], ["下单时间", "2026-09-25 09:42:55", "mono"], ["状态", "执行中", "tag:note_order_status"],
|
|
|
+ ["对冲进度", "对冲中", "tag:hedge_progress"], ["关联主票据编号", "--", "span2"],
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ subA: {
|
|
|
+ title: "A类订单信息",
|
|
|
+ fields: [
|
|
|
+ ["子订单编号", "ORD001202609250030A", "mono"], ["订单状态", "执行中", "tag:note_order_status"], ["交易日", "2026-09-25", "mono"], ["预计交收日", "2026-09-29", "mono"],
|
|
|
+ ["投资者编号", "INV001100150", "mono"], ["投资者账户", "HH10023430", "mono"], ["投资者名称", "李婉清"], ["资金账户", "FA001100150", "mono"],
|
|
|
+ ["机构名称", "远航财富"], ["订单名义本金", "2,000,000.00 CNY", "num"], ["报价", "12.50%", "num"], ["A类收益比例", "80.00%", "num"],
|
|
|
+ ["票据面值", "273,437.50 HKD", "num"], ["发行费用", "2,734.38 HKD", "num"], ["票据发行价", "276,171.88 HKD", "num"],
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ hedge: {
|
|
|
+ title: "对冲执行",
|
|
|
+ buttons: [["直接下单", "success"], ["补录", "success"], ["完成对冲", "primary"]],
|
|
|
+ refresh: "刷新",
|
|
|
+ suggest: "对冲建议:使用TRS系统 hedge01/发行对冲一号-880012 对冲,建议建仓比例(100.00%),建议建仓股数(8,100股)",
|
|
|
+ suggestParts: { system: "TRS", account: "hedge01/发行对冲一号-880012", ratio: "100.00%", qty: "8,100股" },
|
|
|
+ columns: [
|
|
|
+ ["操作", 110], ["对冲类型", 100], ["对冲系统", 100], ["对冲账号", 130], ["资金号", 110], ["下单类型", 110], ["委托编号", 180], ["状态", 168], ["方向", 80],
|
|
|
+ ["委托股数", 110, "r"], ["委托价格(交易币种)", 180, "r"], ["成交股数", 110, "r"], ["成交均价(交易币种)", 180, "r"], ["发生金额(交易币种)", 180, "r"], ["发生金额(结算币种)", 180, "r"],
|
|
|
+ ],
|
|
|
+ rows: [
|
|
|
+ { ops: [["撤单", "danger"]], type: "直接下单", sys: "TRS", acct: "hedge01", fund: "880012", otype: "算法TWAP", no: "ALG202609250007", status: ["执行中", "primary", "已成(执行中)"], dir: "买入", qty: "5,000", price: "245.30", fqty: "3,200", fprice: "245.12", amt: "784,384.00 CNY", samt: "858,429.85 HKD" },
|
|
|
+ { ops: [], type: "直接下单", sys: "TRS", acct: "hedge01", fund: "880012", otype: "普通单", no: "T2026092500418", status: ["已成", "success"], dir: "买入", qty: "2,000", price: "245.20", fqty: "2,000", fprice: "245.18", amt: "490,360.00 CNY", samt: "536,649.98 HKD" },
|
|
|
+ { ops: [["修改", "primary"], ["删除", "danger"]], type: "补录", sys: "自定义", acct: "--", fund: "--", otype: "普通单", no: "--", status: ["已成", "success"], dir: "买入", qty: "--", price: "--", fqty: "1,100", fprice: "245.26", amt: "269,786.00 CNY", samt: "295,253.80 HKD" },
|
|
|
+ ],
|
|
|
+ summary: [
|
|
|
+ ["累计有效委托数量", "8,100"], ["累计成交数量", "6,300"], ["对冲含费成交均价", "245.2112 CNY"], ["对冲比例", "77.78%"],
|
|
|
+ ["累计发生金额(交易币种)", "1,544,530.00 CNY"], ["累计发生金额(结算币种)", "1,690,333.63 HKD"], ["结算汇率", "1.0944"],
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ /* ---------- 发行端 · 补录弹窗(HedgeFillDialog.vue),对冲系统选「自定义」 ---------- */
|
|
|
+ const fill = {
|
|
|
+ title: "补录",
|
|
|
+ common: [
|
|
|
+ { label: "交易日", type: "select", value: "2026-09-25", ph: "请选择" },
|
|
|
+ { label: "对冲系统", type: "select", value: "自定义" },
|
|
|
+ ],
|
|
|
+ custom: [
|
|
|
+ { label: "方向", type: "tag", value: "买入", tag: "direction" },
|
|
|
+ { label: "成交股数", type: "amount", value: "1,100", unit: "股" },
|
|
|
+ { label: "成交均价", type: "amount", value: "245.260000", unit: "CNY" },
|
|
|
+ { label: "发生金额(交易币种)", type: "text", value: "269,786.00", unit: "CNY" },
|
|
|
+ { label: "结算币种", type: "text", value: "HKD" },
|
|
|
+ { label: "发生金额(结算币种)", type: "amount", value: "", ph: "请输入", unit: "HKD", error: "请输入发生金额(HKD)" },
|
|
|
+ ],
|
|
|
+ trs: [
|
|
|
+ { label: "对冲账号", type: "select", value: "hedge01" },
|
|
|
+ { label: "资金号", type: "select", value: "880012", ph: "请选择" },
|
|
|
+ { label: "方向", type: "tag", value: "买入", tag: "direction" },
|
|
|
+ { label: "下单类型", type: "select", value: "普通单" },
|
|
|
+ { label: "委托编号/算法母单编号", type: "input", value: "", ph: "请输入委托编号" },
|
|
|
+ ],
|
|
|
+ footer: [["确定", "primary"]],
|
|
|
+ };
|
|
|
+
|
|
|
+ /* ---------- TRS · 下单详情页 + 下单弹窗(trs/config/order-place/detail) ---------- */
|
|
|
+ const trsTrade = {
|
|
|
+ host: {
|
|
|
+ title: "下单详情", account: "ceshi1", user: "李四测",
|
|
|
+ accountCols: ["币种", "可用金额", "冻结金额", "持仓市值", "总资产", "应付利息(汇总)", "净资产", "预警线", "平仓线"],
|
|
|
+ accountRows: [["HKD", "1,286,430.52", "127,760.00", "2,418,905.00", "3,833,095.52", "1,204.66", "3,831,890.86", "130.00%", "110.00%"]],
|
|
|
+ posCols: [["股票代码", 100], ["股票名称", 110], ["交易渠道", 100], ["持仓数量", 110, "r"], ["可用数量", 110, "r"], ["参考成本价", 110, "r"], ["最新价格", 100, "r"],
|
|
|
+ ["持仓市值(交易币种)", 170, "r"], ["结算币种", 90], ["持仓市值(结算币种)", 170, "r"], ["浮动盈亏(结算币种)", 170, "r"], ["盈亏比例", 100, "r"]],
|
|
|
+ posRows: [
|
|
|
+ ["000007", "全新好", "QFII", "12,000", "12,000", "11.20", "11.64", "139,680.00", "HKD", "152,865.79", "+5,778.43", "+3.93%"],
|
|
|
+ ["600519", "贵州茅台", "深沪港通", "800", "500", "1,702.40", "1,688.00", "1,350,400.00", "HKD", "1,477,877.76", "-12,607.49", "-0.85%"],
|
|
|
+ ["300750", "宁德时代", "QFII", "3,000", "3,000", "238.15", "245.30", "735,900.00", "HKD", "805,368.96", "+23,474.88", "+3.00%"],
|
|
|
+ ],
|
|
|
+ orderCols: [["委托编号", 180], ["股票代码", 100], ["股票名称", 110], ["交易渠道", 100], ["委托时间", 160], ["委托方向", 90], ["委托数量", 110, "r"], ["委托价格", 100, "r"],
|
|
|
+ ["成交数量", 110, "r"], ["成交价格", 100, "r"], ["委托状态", 100], ["备注", 140]],
|
|
|
+ orderRows: [
|
|
|
+ ["T2026092500431", "000007", "全新好", "QFII", "2026-09-25 10:42:16", "买入", "2,000", "11.62", "0", "--", "已报", ""],
|
|
|
+ ["T2026092500418", "300750", "宁德时代", "QFII", "2026-09-25 10:15:03", "买入", "2,000", "245.20", "2,000", "245.18", "已成", ""],
|
|
|
+ ["T2026092500377", "600519", "贵州茅台", "深沪港通", "2026-09-25 09:48:51", "卖出", "300", "1,690.00", "100", "1,690.00", "部成", ""],
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ dialog: {
|
|
|
+ account: "ceshi1", user: "李四测",
|
|
|
+ strip: [["可用余额", "1,286,430.52", "HKD"], ["最大可买股数", "100,900", "股"]],
|
|
|
+ channels: ["QFII", "深沪港通"],
|
|
|
+ stock: { code: "000007", name: "全新好", mkt: "SZ" },
|
|
|
+ price: "11.65", priceCcy: "CNY", quick: [["卖一", "11.65"], ["最新", "11.64"], ["买一", "11.64"]],
|
|
|
+ qty: "1000", qtyQuick: ["1/4", "1/3", "1/2", "全部可买"], qtyHelp: "买入须为 100 股整数倍",
|
|
|
+ amounts: [["买入金额(交易币种)", "11,650.00", "CNY"], ["买入金额(结算币种)", "12,749.76", "HKD"]],
|
|
|
+ quote: {
|
|
|
+ last: "11.64", chg: "0.03", pct: "0.26%", prev: "11.61", source: "实时推送", hint: "点击任一档位填入委托价",
|
|
|
+ asks: [["卖五", "11.70", 254], ["卖四", "11.69", 20], ["卖三", "11.67", 16], ["卖二", "11.66", 38], ["卖一", "11.65", 20]],
|
|
|
+ bids: [["买一", "11.64", 102], ["买二", "11.60", 11], ["买三", "11.59", 22], ["买四", "11.57", 5], ["买五", "11.56", 50]],
|
|
|
+ },
|
|
|
+ footHint: "提交后可在「当日委托」中查看与撤单",
|
|
|
+ footer: [["取消", ""], ["确认买入 1,000 股", "primary"]],
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ /* ---------- TRS · 委托查询(trs/order/index.vue) ---------- */
|
|
|
+ const trsSearch = [
|
|
|
+ { label: "用户ID", type: "input", ph: "精确搜索" }, { label: "手机号", type: "input", ph: "精确搜索" }, { label: "委托编号", type: "input", ph: "精确搜索" },
|
|
|
+ { label: "账户", type: "input", ph: "模糊搜索" }, { label: "用户名称", type: "input", ph: "模糊搜索" }, { label: "股票代码/名称", type: "input", ph: "模糊搜索" },
|
|
|
+ { label: "委托状态", type: "select", ph: "全部", multiple: true }, { label: "下单类型", type: "select", ph: "全部" }, { label: "下单方式", type: "select", ph: "全部" },
|
|
|
+ { label: "委托日期", type: "daterange", value: ["2026-09-25", "2026-09-25"], sep: "至" },
|
|
|
+ ];
|
|
|
+ const trsActions = [["查找", "primary", "search"], ["重置", "", "refresh"], ["导出", "", "download"]];
|
|
|
+
|
|
|
+ /* ---------- 销售端 · 新建投资者(sales/investor/components/InvestorCreateDialog.vue) ---------- */
|
|
|
+ const salesForm = {
|
|
|
+ title: "新建投资者",
|
|
|
+ mode: "手动新建",
|
|
|
+ host: { title: "投资者信息", button: "新建投资者" },
|
|
|
+ groups: [
|
|
|
+ {
|
|
|
+ title: "基础信息", cols: 2,
|
|
|
+ fields: [
|
|
|
+ { label: "投资者账户", type: "input", req: true, value: "lwq_2026", ph: "请输入投资者账户" },
|
|
|
+ { label: "投资者类别", type: "select", req: true, value: "PI", ph: "请选择" },
|
|
|
+ { label: "投资者名称", type: "input", req: true, value: "李婉清", ph: "请输入投资者名称" },
|
|
|
+ { label: "投资者英文名", type: "input", req: true, value: "LI WANQING", ph: "请输入投资者英文名" },
|
|
|
+ { label: "E-mail", type: "input", req: true, value: "wanqing.li@", ph: "请输入E-mail", error: "邮箱格式不正确" },
|
|
|
+ { label: "手机号码", type: "combo", req: true, parts: [{ w: 92, value: "+86", ph: "区号" }, { value: "13800138000", ph: "请输入手机号码" }] },
|
|
|
+ { label: "联系地址", type: "combo", req: true, parts: [{ w: 150, value: "CN", ph: "国别代码" }, { value: "", ph: "请输入详细地址" }] },
|
|
|
+ { label: "证件号码", type: "combo", req: true, parts: [{ w: 150, value: "", ph: "证件类型", select: true }, { value: "", ph: "请输入证件号码" }] },
|
|
|
+ { label: "投资者状态", type: "select", req: true, value: "正常", ph: "请选择" },
|
|
|
+ { label: "状态说明", type: "input", value: "", ph: "请输入状态说明" },
|
|
|
+ { label: "A.E. Code", type: "input", value: "", ph: "请输入A.E. Code" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "问卷信息", cols: 2,
|
|
|
+ fields: [
|
|
|
+ { label: "投资者风险等级", type: "select", req: true, value: "3-增长型", ph: "请选择" },
|
|
|
+ { label: "投资者年龄", type: "select", req: true, value: "35~50岁", ph: "请选择" },
|
|
|
+ { label: "投资年限", type: "select", req: true, value: "5-10年", ph: "请选择" },
|
|
|
+ { label: "投资者目标", type: "select", req: true, value: "", ph: "请选择" },
|
|
|
+ { label: "场外衍生品经验", type: "select", req: true, value: "", ph: "请选择" },
|
|
|
+ { label: "资产净值(HKD)", type: "amount", req: true, value: "", ph: "请输入大于0的数,最多2位小数" },
|
|
|
+ { label: "问卷有效期", type: "date", req: true, value: "", ph: "请选择日期" },
|
|
|
+ { label: "衍生产品问卷", type: "select", req: true, value: "", ph: "请选择" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "交易品类", cols: 1,
|
|
|
+ fields: [{ label: "可交易品类", type: "checks", req: true, options: [["共赢票据(A类)", false], ["共赢票据(B类)", false]] }],
|
|
|
+ alert: "未启用共赢票据(A类),请确认该投资者当前无需A类交易权限。",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "其它信息", cols: 1,
|
|
|
+ uploads: [
|
|
|
+ { label: "开户文件", files: [["开户申请表-李婉清.pdf", "2.4M"]] },
|
|
|
+ { label: "其它附件", files: [] },
|
|
|
+ ],
|
|
|
+ uploadBtn: "上传附件", uploadTip: "PNG、JPEG、PDF;单个30M;单次100M;最多20个",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ footer: [["取消", ""], ["保存", "primary"]],
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ // 委托查询表格列(trs/order/index.vue)。align 为代码现状;group 为激进套的分组
|
|
|
+ const trsColumns = [
|
|
|
+ { key: "uid", title: "用户ID", w: 90, group: "用户" }, { key: "acct", title: "账户", w: 120, group: "用户" },
|
|
|
+ { key: "uname", title: "用户名称", w: 110, group: "用户" }, { key: "phone", title: "手机号", w: 120, group: "用户" },
|
|
|
+ { key: "channel", title: "交易渠道", w: 100, tag: "trade_channel", group: "委托" },
|
|
|
+ { key: "code", title: "股票代码", w: 100, group: "委托" }, { key: "sname", title: "股票名称", w: 110, group: "委托" },
|
|
|
+ { key: "dir", title: "委托方向", w: 90, tag: "direction", group: "委托" }, { key: "ptype", title: "报价方式", w: 90, tag: "price_req_type", group: "委托" },
|
|
|
+ { key: "status", title: "委托状态", w: 180, tag: "trs_order_status", group: "委托" },
|
|
|
+ { key: "qty", title: "委托数量", w: 110, num: true, group: "委托" }, { key: "price", title: "委托价格", w: 100, num: true, group: "委托" },
|
|
|
+ { key: "otime", title: "委托时间", w: 160, group: "委托" },
|
|
|
+ { key: "fqty", title: "成交数量", w: 110, num: true, group: "成交" }, { key: "fprice", title: "成交价格", w: 100, num: true, group: "成交" },
|
|
|
+ { key: "ccy", title: "交易币种", w: 90, group: "成交" }, { key: "famt", title: "成交金额", w: 130, num: true, group: "成交" },
|
|
|
+ { key: "ftime", title: "成交时间", w: 160, group: "成交" },
|
|
|
+ { key: "comm", title: "佣金", w: 100, num: true, group: "费用" }, { key: "stamp", title: "印花税", w: 100, num: true, group: "费用" },
|
|
|
+ { key: "fee", title: "规费", w: 100, num: true, group: "费用" }, { key: "total", title: "交易总费用", w: 110, num: true, group: "费用" },
|
|
|
+ { key: "amt", title: "发生金额(交易币种)", w: 170, num: true, group: "结算" }, { key: "sccy", title: "结算币种", w: 90, group: "结算" },
|
|
|
+ { key: "samt", title: "发生金额(结算币种)", w: 170, num: true, group: "结算" },
|
|
|
+ { key: "no", title: "委托编号", w: 200, group: "来源" }, { key: "operator", title: "操作方", w: 120, group: "来源" },
|
|
|
+ { key: "otype", title: "下单类型", w: 100, tag: "order_type", group: "来源" }, { key: "omode", title: "下单方式", w: 100, tag: "order_mode", group: "来源" },
|
|
|
+ { key: "ip", title: "IP", w: 130, group: "来源" }, { key: "lbs", title: "LBS", w: 130, group: "来源" },
|
|
|
+ { key: "vpn", title: "是否用VPN", w: 100, group: "来源" }, { key: "remark", title: "备注", w: 140, group: "来源" },
|
|
|
+ ];
|
|
|
+ // [用户, 渠道, 股票, 方向, 报价, 状态, 数量, 价格, 成交数量, 成交价, 下单类型, 下单方式, 子单数]
|
|
|
+ const trsPlan = [
|
|
|
+ [0, "QFII", 0, "买入", "限价", "已报", 2000, 11.62, 0, 0, "正常下单", "iOS", 0],
|
|
|
+ [1, "QFII", 1, "买入", "限价", "已成", 2000, 245.2, 2000, 245.18, "后台下单", "CRM", 2],
|
|
|
+ [2, "深沪港通", 2, "卖出", "限价", "部成", 300, 1690, 100, 1690, "正常下单", "Android", 0],
|
|
|
+ [3, "QFII", 3, "买入", "市价", "已成", 5000, 52.2, 5000, 52.18, "算法下单", "OpenAPI", 0],
|
|
|
+ [4, "深沪港通", 4, "卖出", "限价", "待撤", 1200, 35.6, 0, 0, "正常下单", "Windows", 0],
|
|
|
+ [5, "QFII", 5, "买入", "限价", "已撤", 800, 16.42, 0, 0, "正常下单", "iOS", 0],
|
|
|
+ [0, "QFII", 6, "卖出", "限价", "废单", 600, 88.2, 0, 0, "后台平仓", "CRM", 0],
|
|
|
+ [1, "深沪港通", 7, "买入", "限价", "部撤", 3000, 61.75, 1200, 61.74, "正常下单", "H5", 0],
|
|
|
+ [2, "QFII", 8, "买入", "限价", "已成", 1000, 21.06, 1000, 21.05, "条件单", "Android", 0],
|
|
|
+ [3, "QFII", 9, "卖出", "市价", "已成", 400, 245.3, 400, 245.31, "后台补单", "CRM", 0],
|
|
|
+ ];
|
|
|
+ const trsUsers = [["10021", "ceshi1", "李四测"], ["10034", "zhangmy", "张明远"], ["10058", "wangzh", "王子豪"], ["10077", "chensy", "陈思雨"], ["10092", "liujg", "刘建国"], ["10105", "zhaoyl", "赵雅琳"]];
|
|
|
+ const trsStocks = [["000007", "全新好"], ["300750", "宁德时代"], ["600519", "贵州茅台"], ["601318", "中国平安"], ["600036", "招商银行"], ["601899", "紫金矿业"], ["688981", "中芯国际"], ["000333", "美的集团"], ["601012", "隆基绿能"], ["002594", "比亚迪"]];
|
|
|
+ const trsRows = [];
|
|
|
+ trsPlan.forEach((p, i) => {
|
|
|
+ const u = trsUsers[p[0]], s = trsStocks[p[2]], t = ["10:42:16", "10:15:03", "09:48:51", "09:41:27", "09:38:02", "09:35:44", "09:33:10", "09:31:58", "09:31:05", "09:30:12"][i];
|
|
|
+ const famt = p[8] * p[9], comm = famt * 0.0003, stamp = p[3] === "卖出" ? famt * 0.0005 : 0, fee = famt * 0.0000687, total = comm + stamp + fee;
|
|
|
+ const amt = famt ? (p[3] === "买入" ? -(famt + total) : famt - total) : 0;
|
|
|
+ const mk = (sub, qty, fq) => ({
|
|
|
+ sub, kids: sub ? 0 : p[12], uid: u[0], acct: u[1], uname: u[2], phone: "1380000" + String(1001 + p[0]), channel: p[1],
|
|
|
+ code: s[0], sname: s[1], dir: p[3], ptype: p[4], status: p[5], qty: fmt(qty, 0), price: fmt(p[7]), otime: "2026-09-25 " + t,
|
|
|
+ fqty: fmt(fq, 0), fprice: fq ? fmt(p[9]) : "--", ccy: "CNY", famt: fq ? fmt(fq * p[9]) : "--", ftime: fq ? "2026-09-25 " + t.slice(0, 6) + "59" : "--",
|
|
|
+ comm: fq ? fmt(comm * fq / (p[8] || 1)) : "--", stamp: fq ? fmt(stamp * fq / (p[8] || 1)) : "--", fee: fq ? fmt(fee * fq / (p[8] || 1)) : "--", total: fq ? fmt(total * fq / (p[8] || 1)) : "--",
|
|
|
+ amt: fq ? fmt(amt * fq / (p[8] || 1)) : "--", sccy: sub ? "" : "HKD", samt: fq ? fmt(amt * fq / (p[8] || 1) * 1.0944) : "--",
|
|
|
+ no: "T20260925" + String(431 - i * 9).padStart(5, "0") + (sub ? "-" + sub : ""), operator: sub ? "" : p[10] === "正常下单" ? "--" : "admin",
|
|
|
+ otype: sub ? "" : p[10], omode: sub ? "" : p[11], ip: "203.0.113." + (20 + i), lbs: ["上海", "深圳", "香港", "北京"][i % 4], vpn: i === 3 ? "是" : "否",
|
|
|
+ remark: p[5] === "废单" ? "超出持仓可卖数量" : "", route: sub ? "通道" + sub : "",
|
|
|
+ cancel: p[5] === "待撤" ? ["撤单结果未知", "danger", "上轮撤单未取得明确结果,可人工再次撤单"] : null,
|
|
|
+ });
|
|
|
+ trsRows.push(mk(0, p[6], p[8]));
|
|
|
+ for (let k = 1; k <= p[12]; k++) trsRows.push(mk(k, p[6] / p[12], p[8] / p[12]));
|
|
|
+ });
|
|
|
+
|
|
|
+ /* ---------- 销售端 · 订单管理(sales/order/components/OrderSearchForm.vue、OrderTable.vue,management 模式) ---------- */
|
|
|
+ const salesSearch = [
|
|
|
+ { label: "主订单编号", type: "input", ph: "主订单编号" },
|
|
|
+ { label: "子订单编号", type: "input", ph: "子订单编号" },
|
|
|
+ { label: "订单方向", type: "select", ph: "全部" },
|
|
|
+ { label: "操作类型", type: "select", ph: "全部", multiple: true },
|
|
|
+ { label: "订单状态", type: "select", ph: "全部", multiple: true },
|
|
|
+ { label: "票据类型", type: "select", ph: "全部", multiple: true },
|
|
|
+ { label: "投资者", type: "input", ph: "编号/账户/名称" },
|
|
|
+ { label: "证券代码/名称", type: "input", ph: "证券代码/名称" },
|
|
|
+ { label: "交易日期", type: "daterange", value: ["2026-09-25", "2026-09-25"], sep: "~" },
|
|
|
+ ];
|
|
|
+ const salesStatuses = ["未报", "待报", ...Object.keys(dict.note_order_status)];
|
|
|
+ const SW = { direction: 95, op: 90, invAcct: 110, invName: 100, period: 70, execQty: 120, tradeCcy: 85, settleCcy: 85, tradeDate: 105, settleDate: 105, source: 90 };
|
|
|
+ const salesColumns = issueColumns.filter((c) => !["mode", "hedge", "org", "hedgeQty"].includes(c.key)).map((c) => ({
|
|
|
+ ...c, w: SW[c.key] || c.w, merge: ["no", "direction", "op"].includes(c.key),
|
|
|
+ title: c.key === "execQty" ? "订单执行股数" : c.title, tag: c.key === "source" ? "sales_order_source" : c.tag,
|
|
|
+ }));
|
|
|
+ const srcMap = { CRM: "销售端", IOS: "iOS", Android: "Android", H5: "H5", 发行端: "销售端" };
|
|
|
+ const salesRows = issueRows.map((r) => ({ ...r, source: srcMap[r.source] }));
|
|
|
+
|
|
|
+ /* ---------- 首页 ---------- */
|
|
|
+ // 保守套:现有首页(views/dashboard/index.vue)的内容,文案为代码原文
|
|
|
+ // 激进套:工作台。数字是示例值,上线需要后端提供按状态汇总的接口;字段全部来自订单管理
|
|
|
+ const home = {
|
|
|
+ greeting: "上午好,admin!", weather: "今日天气晴朗,气温在15℃至25℃之间,东南风。",
|
|
|
+ tradeDate: "2026-09-25", total: 128,
|
|
|
+ status: [["待处理", 6, true], ["执行中", 14], ["待撤", 2, true], ["撤单中", 1], ["确认中", 9, true], ["已完成", 61], ["已结算", 27], ["已撤", 5], ["已拒绝", 3]],
|
|
|
+ manualCols: [["主订单编号", 176], ["方向", 60], ["订单状态", 92], ["对冲进度", 92], ["投资者", 88], ["证券代码/名称", 148], ["订单名义本金", 128, "r"], ["下单时间", 150]],
|
|
|
+ shortcuts: [["订单管理", "ticket", "共赢票据管理"], ["票据管理", "file", "共赢票据管理"], ["询价管理", "search", "共赢票据管理"], ["共赢票据风险监控", "shield", "风控管理"], ["共赢票据清算", "check", "清算管理"], ["日常报表", "chart", "报表管理"]],
|
|
|
+ };
|
|
|
+
|
|
|
+ return { dict, menus, sysName, tradeDays, salesSearch, salesStatuses, salesColumns, salesRows, home, issueSearch, issueActions, issueColumns, issueRows, issueDetail, fill, trsTrade, trsSearch, trsActions, trsColumns, trsRows, salesForm };
|
|
|
+})();
|