Преглед на файлове

Merge branch 'mtp_v6' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB into mtp_v6

chen.zujie преди 4 години
родител
ревизия
ee2094635b
променени са 30 файла, в които са добавени 1104 реда и са изтрити 644 реда
  1. 2 2
      public/config/app.config.json
  2. 72 27
      public/proto/mtp.proto
  3. 24 0
      src/common/setup/table/interface.ts
  4. 26 12
      src/common/setup/table/tableQuote.ts
  5. 4 0
      src/services/funcode/index.ts
  6. 14 2
      src/services/go/ermcp/qhj/index.ts
  7. 44 2
      src/services/go/ermcp/qhj/interface.ts
  8. 3 0
      src/services/proto/accountinfo/interface.ts
  9. 12 0
      src/services/proto/futures/index.ts
  10. 37 0
      src/services/proto/futures/interface.ts
  11. 3 4
      src/services/proto/manager/index.ts
  12. 11 37
      src/services/socket/protobuf/buildReq.ts
  13. 1 4
      src/services/socket/protobuf/interface.ts
  14. 6 6
      src/utils/objHandle/index.ts
  15. 135 13
      src/views/information/custom/compoments/add/index.vue
  16. 3 0
      src/views/information/custom/compoments/add/interface.ts
  17. 25 2
      src/views/information/custom/compoments/add/setup.ts
  18. 42 2
      src/views/information/custom/compoments/common-detail/index.vue
  19. 43 19
      src/views/information/custom/index.vue
  20. 199 1
      src/views/information/custom/setup.ts
  21. 9 3
      src/views/market/futures/compoments/futures-trade/index.vue
  22. 3 2
      src/views/market/futures/compoments/futures-trade/interface.ts
  23. 8 6
      src/views/market/futures/compoments/futures-trade/setup.ts
  24. 7 80
      src/views/market/futures/index.vue
  25. 0 228
      src/views/market/futures/setup.ts
  26. 279 0
      src/views/market/futures/setup.tsx
  27. 27 64
      swagger-to-ts/swagger.ts
  28. 49 121
      swagger-to-ts/swagger.txt
  29. 13 4
      tsconfig.json
  30. 3 3
      vue.config.js

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

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.203:8080/cfg?key=test_203"
-}
+    "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175"
+}

+ 72 - 27
public/proto/mtp.proto

@@ -1355,33 +1355,39 @@ message ManagerRoleOperateRsp {
 
 // 客户资料操作请求 0 29 187
 message CustomerInfoOperateReq {
- optional MessageHead Header = 1; // MessageHead
- optional uint32 operatetype = 2; // uint32 操作类型-1:新增 2:修改
-  optional uint64 userid = 3; // uint64 用户ID(修改时必填)
-  optional uint64 areaid = 4; // uint64 所属机构
-  optional string logincode = 5; // string 登录帐号
-  optional string loginpwd = 6; // string 登录密码
-  optional uint32 userinfotype = 7; // uint32 客户类型 1:个人  2:企业
-  optional string username = 8; // string 姓名、企业名称
-  optional string nickname = 9; // string 企业简称(企业)
-  optional uint32 cardtype = 10; // uint32 证件类型
-  optional string cardnum = 11; // string 证件号码
-  optional string cardfrontphotourl = 12; // string 身份证正面照(个人)
-  optional string cardbackphotourl = 13; // string 身份证反面照(个人)
-  optional string email = 14; // string 邮箱(个人)
-  optional string referral = 15; // string 推荐码(个人)
-  optional string legalpersonname = 16; // string 法定代表人(企业)
-  optional string taxpayernum = 17; // string 纳税人识别号(企业)
-  optional string proxystatementurl = 18; // string 营业执照(企业)
-  optional string contactname = 19; // string 联系人(企业)
-  optional string mobilephone = 20; // string 手机号码、联系人手机号
-  optional string telphone = 21; // string 联系电话
-  optional uint64 provinceid = 22; // uint64 省
-  optional uint64 cityid = 23; // uint64 市
-  optional uint64 districtid = 24; // uint64 县
-  optional string ipaddress = 25; // string 详细地址
-  optional string remark = 26; // string 备注
-  optional uint32 userstate = 27; // uint32 开户状态 1:保存草稿 2:提交审核
+	optional MessageHead Header = 1; // MessageHead
+	optional uint32 operatetype = 2; // uint32 操作类型-1:新增 2:修改
+		optional uint64 userid = 3; // uint64 用户ID(修改时必填)
+		optional uint64 areaid = 4; // uint64 所属机构
+		optional string logincode = 5; // string 登录帐号
+		optional string loginpwd = 6; // string 登录密码
+		optional uint32 userinfotype = 7; // uint32 客户类型 1:个人  2:企业
+		optional string username = 8; // string 姓名、企业名称
+		optional string nickname = 9; // string 企业简称(企业)
+		optional uint32 cardtype = 10; // uint32 证件类型
+		optional string cardnum = 11; // string 证件号码
+		optional string cardfrontphotourl = 12; // string 身份证正面照(个人)
+		optional string cardbackphotourl = 13; // string 身份证反面照(个人)
+		optional string email = 14; // string 邮箱(个人)
+		optional string referral = 15; // string 推荐码(个人)
+		optional string legalpersonname = 16; // string 法定代表人(企业)
+		optional string taxpayernum = 17; // string 纳税人识别号(企业)
+		optional string proxystatementurl = 18; // string 营业执照(企业)
+		optional string contactname = 19; // string 联系人(企业)
+		optional string mobilephone = 20; // string 手机号码、联系人手机号
+		optional string telphone = 21; // string 联系电话
+		optional uint64 provinceid = 22; // uint64 省
+		optional uint64 cityid = 23; // uint64 市
+		optional uint64 districtid = 24; // uint64 县
+		optional string ipaddress = 25; // string 详细地址
+		optional string remark = 26; // string 备注
+		optional uint32 userstate = 27; // uint32 开户状态 1:保存草稿 2:提交审核
+		optional string birthday = 28; // string 客户生日(yyyy-mm-dd)
+		optional uint64 teammanageruserid = 29; // uint64 客户经理
+		optional uint32 isAudit = 30; // uint32 是否直接审核(1:是,2:否) - 不传根据企业配置
+		optional uint64 loginid = 31; // uint64 当前登录ID
+		optional string auditRemark = 32; // string 审核备注
+		optional uint32 sex = 33; // uint32 性别 0 女 1 男
 }
 // 客户资料操作响应 0 29 188
 message CustomerInfoOperateRsp {
@@ -2048,4 +2054,43 @@ message HolderCloseRsp {
         optional string RetDesc = 3; // string 描述信息
         optional uint64 OrderID = 4; // uint64 一级生成的订单号
         optional string OrderTime = 5; // string 接收委托交易的时间
+}
+
+// 交易委托请求 0 3 31
+message ChannelOrderReq {
+	optional MessageHead Header = 1; // MessageHead
+	optional string ClientSerialNo = 2; // string 客户端流水号
+	optional string ClientOrderTime = 3; // string 客户端委托时间
+	optional uint32 ClientType = 4; // uint32 终端类型
+	optional uint64 LoginID = 5; // uint64 登陆账号
+	optional uint64 AccountID = 6; // uint64 交易账号
+	optional uint32 GoodsID = 7; // uint32 商品ID
+	optional uint32 MarketID = 8; // uint32 市场ID
+	optional int32 ValidType = 9; // int32 有效类型 - 1当日有效
+	optional uint32 ChannelOperateType = 10; // uint32 操作类型:
+	optional uint32 ChannelOrderSrc = 11; // uint32 单据来源委托来源 -  1:客户端 2:管理端 3:风控服务 
+	optional uint32 HedgeFlag = 12; // uint32 投机套保标志 - 0:无 1:投机 2:套保 3:套利 4:套期保值 5:单边 6:移仓 7:错单处理 8:跨期套利
+	optional uint64 OperatorID = 13; // uint64 操作员账号ID
+	optional double OrderPrice = 14; // double 委托价格
+	optional uint64 OrderQty = 15; // uint64 委托数量
+	optional uint32 BuyOrSell = 16; // uint32 买卖方向(买卖 - 0:买 1:卖 )
+	optional uint32 ChannelBuildType = 17; // uint32 下单类型(开平标志 - 0:无 1:建仓 2:平仓)
+	optional uint32 CloseType = 18; // uint32 平仓方式(平仓方式 - 0:无 1:平今 2:平昨)
+	optional uint32 PriceMode = 19; // uint32 取价方式 - 1:市价 2: 限价
+	optional uint32 TimeValidType = 20; // uint32 时间有效类型
+	optional uint64 RelatedID = 21; // uint64 关联单号
+	optional string ServiceTime = 22; // string 服务端时间
+	optional string validtime = 23; // string 有效时间
+	optional uint64 CloseTodayQty = 24; // uint64 平今仓数量
+	optional uint64 SpotContractID = 25; // uint64 现货合同ID - 为4:套期保值时填写
+	optional uint64 SaleUserID = 26; // uint64 业务员ID
+	optional uint64 BizSubjectID = 27; // uint64 归属业务部门ID
+}
+// 交易委托应答 0 3 32
+message ChannelOrderRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+	optional uint64 OrderID = 4; // uint64 一级生成的订单号
+	optional string OrderTime = 5; // string 接收委托交易的时间
 }

+ 24 - 0
src/common/setup/table/interface.ts

@@ -1,6 +1,30 @@
 import { EnumRouterName } from "@/common/constants/enumRouterName";
 import { ColumnType, TableKey } from "@/common/methods/table/interface";
 import { OperationTabMenu } from "@/services/go/commonService/interface";
+import { Ref } from 'vue';
+
+/**
+ * 表格行情列表
+ */
+export interface TableQuote {
+    goodscode: string; // 商品代码
+    goodsname: string; // 商品名称
+    decimalplace: number;
+    last?: Ref; // 最新价
+    bid?: Ref; // 买价
+    ask?: Ref; // 卖价
+    bidvolume?: Ref; // 买量
+    askvolume?: Ref; // 卖量
+    totalvolume?: Ref; // 总量
+    lastvolume?: Ref; // 现量
+    holdvolume?: Ref; // 持仓量
+    holdincrement?: Ref; // 日增
+    presettle?: Ref; // 昨结价
+    totalturnover?: Ref; // 金额
+    opened?: Ref; // 开盘
+    highest?: Ref; // 最高
+    lowest?: Ref; // 最低
+}
 
 export interface TableEventCB {
     clickCB?: Function; // 单击事件回调函数

+ 26 - 12
src/common/setup/table/tableQuote.ts

@@ -82,7 +82,7 @@ export function handleSubcriteOnDemandQuote<T extends object>(tableList: Ref<T[]
         const result: Array<{ exchangeCode: 250, goodsCode: string, subState: 0 }> = []
         for (let i = start; i < end; i++) {
             const obj = tableList.value[i] as unknown as any
-            if (Reflect.has(obj, codeKey)) {
+            if (Object.prototype.hasOwnProperty.call(obj, codeKey)) {
                 result.push({ exchangeCode: 250, goodsCode: obj[codeKey], subState: 0 })
             } else {
                 console.warn(`订阅商品的code对应的key${codeKey}不存在,请手动传入!`)
@@ -140,20 +140,34 @@ export function handleQuotePriceColor(value: number, presettle: number) {
     return result
 }
 
-// 涨跌 最新价 - 昨结价
-export function quoteChange(record: QueryQuoteDayRsp, decimalplace = 2) {
-    const { presettle, last } = record
-    let result = '--'
-    if (isPrice(last, presettle)) {
-        result = (last - presettle).toFixed(decimalplace)
+// 涨跌额/涨跌 最新价 - 昨结价
+export function quoteChange<T>(record: T, decimalplace = 2) {
+    type Key = keyof T;
+    const presettle = record['presettle' as Key];
+    const last = record['last' as Key];
+
+    if (typeof presettle === 'number' && typeof last === 'number') {
+        const calc = last - presettle;
+        if (calc !== 0) {
+            return calc.toFixed(decimalplace);
+        }
     }
-    return result
+    return '--';
 }
 
-// 幅度(最新价 - 昨结价) / 昨结价) *  100 %
-export function quoteAmplitude(record: QueryQuoteDayRsp, decimalplace = 2) {
-    const result = quoteChange(record, decimalplace)
-    return result === '--' ? '--' : (+result / record.presettle * 100).toFixed(decimalplace) + '%'
+// 涨跌幅/幅度((最新价 - 昨结价) / 昨结价) *  100 %
+export function quoteAmplitude<T>(record: T, decimalplace = 2) {
+    type Key = keyof T;
+    const presettle = record['presettle' as Key];
+    const result = quoteChange(record, decimalplace);
+
+    if (typeof presettle === 'number' && result !== '--') {
+        const calc = Number(result) / presettle * 100;
+        if (!isNaN(calc)) {
+            return calc.toFixed(decimalplace) + '%';
+        }
+    }
+    return '--';
 }
 
 // 振幅 (最高价 - 最低价 ) / 最新价  * 100 %

+ 4 - 0
src/services/funcode/index.ts

@@ -233,4 +233,8 @@ export const funCode: Code = {
     HolderCloseReq: 196713,
     /// 按单平仓应答(196714)
     HolderCloseRsp: 196714,
+
+    // 期货交易
+    ChannelOrderReq: 196639, // 交易委托请求 0 3 31
+    ChannelOrderRsp: 196640, // 交易委托应答 0 3 32
 };

+ 14 - 2
src/services/go/ermcp/qhj/index.ts

@@ -21,8 +21,10 @@ import {
     QhjRSTriggerLog,
     QhjTradeGoodsPickup,
     QueryAccountInOutApplyReq, QueryAgreementChangeLogReq, QueryAgreementConfigReq,
+    QueryBrokerApplyRsp,
+    QueryBrokerApplyRsq,
     QueryContractLogReq,
-    QueryContractLogRsp, QueryCustomerSignStatusReq,
+    QueryContractLogRsp, QueryCustomerInfoReq, QueryCustomerSignStatusReq,
 
 
     QueryPayOrderReq,
@@ -111,6 +113,16 @@ export function queryParentAreaList(): Promise<QhjParentAreaList[]> {
         throw new Error(`查询所属机构列表: ${err}`);
     });
 }
+/**
+ * -- 铂金宝 - 查询经纪人申请(所属客户经理)
+ * 查询客户资料 /QhjMgr/QueryBrokerApply
+ * @param req
+ */
+export function QueryBrokerApply(param: QueryBrokerApplyRsq): Promise<QueryBrokerApplyRsp[]> {
+    return commonSearch_go('/QhjMgr/QueryBrokerApply', param).catch((err) => {
+        throw new Error(`查询所属机构列表: ${err}`);
+    });
+}
 
 /**
  * -- 铂金宝 - 查询待付款单据
@@ -179,7 +191,7 @@ export function queryContract(scfcontractid?: number): Promise<QhjContract[]> {
  * 查询客户资料 /QhjMgr/QueryCustomerInfo
  * @param req
  */
-export function queryCustomerInfo(req: QueryContractLogReq): Promise<QhjCustomer[]> {
+export function queryCustomerInfo(req: QueryCustomerInfoReq): Promise<QhjCustomer[]> {
     return commonSearch_go('/QhjMgr/QueryCustomerInfo', req).catch((err) => {
         throw new Error(`查询客户资料: ${err}`);
     });

+ 44 - 2
src/services/go/ermcp/qhj/interface.ts

@@ -311,6 +311,8 @@ export interface QueryCustomerInfoReq {
     userinfotype?: number//      客户类型 1-个人 2-企业
     customername?: string//      客户名称(模糊匹配)
     nickname?: string//          昵称(模糊匹配)
+    brokername?: string//          所属客户经理(模糊匹配)
+    birthday?: string//          生日查询(格式 mmdd 或 mm) 只填2位表示月份匹配(mm, 如05 - 5月), 4位表示查月日匹配(mmdd, 如0503 -5月3日)
     includesub?: number//        是否包含子级 1-包含
 }
 
@@ -321,6 +323,9 @@ export interface QhjCustomer {
     address: string;//通讯地址
     attachment1: string;//附件1
     audittime: string;//审核时间
+    birthday: string;//生日
+    brokerid: number;//所属客户经理id
+    brokername: string;//所属客户经理名称
     cardbackphotourl: string;//证件反面图片地址
     cardfrontphotourl: string;//证件正面图片地址
     cardnum: string;//证件号码
@@ -350,7 +355,9 @@ export interface QhjCustomer {
     proxystatementurl: string;//授权委托书
     querytype: number;//查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
     remark: string;//备注
-    status: number;//开户状态(网上开户表wskh_userinfo) - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 ; 账户状态(正式表useraccount) - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)
+    sex: number;//性别 number;
+    //-女 1-男
+    status: number;//开户状态(网上开户表wskh_userinfo) 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 ; 账户状态(正式表useraccount) 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)
     statusdesc: string;//账户状态中文描述
     taxpayernum: string;//纳税人识别号
     telphone: string;//联系电话
@@ -358,13 +365,48 @@ export interface QhjCustomer {
     userinfotype: number;//客户类型 1-个人 2-企业
     username: string;//用户名称
 }
-
 export interface QhjParentAreaList {
     accountname: string; // 账户名称(机构名称)
     userid: number; // 用户ID
     usertype: number; // 账户类型 - 1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)
 }
 
+export interface QueryBrokerApplyRsq {
+    userid?: number // 所属机构ID
+    filtername?: string // 名称(模糊匹配)
+    includesub?: number // 是否包含子级 1-包含
+    filterstatus?: number // 状态 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+}
+export interface QueryBrokerApplyRsp {
+    applicantid: number;//申请人
+    applysrc: number;//申请来源 - 1:管理端 2:终端
+    applystatus: number;//申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+    applytime: string;//申请时间
+    auditorid: number;//审核人
+    auditremark: string;//审核备注
+    auditsrc: number;//审核来源 - 1:管理端 2:终端
+    audittime: string;//审核时间
+    audittradedate: string;//审核交易日(yyyyMMdd)
+    brokerapplyid: number;//申请ID(SEQ_BROKERAPPLY)
+    cardbackphotourl: string;//证件背面图片地址
+    cardfrontphotourl: string;//证件正面图片地址
+    cardnum: string;//证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证
+    customername: string;//姓名
+    logincode: string;//登录代码
+    mobile: string;//手机号码
+    parentuserid: number;//所属机构id
+    parentusername: string;//所属机构名称
+    refereeuserid: number;//推荐人id(经纪人)
+    refernum: string;//推荐码
+    remark: string;//备注
+    subarealevelpath: string;//层级路径
+    tradedate: string;//交易日(yyyyMMdd)
+    userid: number;//申请人用户ID
+    userinfotype: number;//用户类型 1-个人 2-企业
+    username: string;//用户名称
+}
+
+
 export interface QhjPickGoods {
     imageaddress: string;//图片
     modifierid: number;//修改人

+ 3 - 0
src/services/proto/accountinfo/interface.ts

@@ -179,6 +179,9 @@ export interface CustomerInfoOperateReq {
     ipaddress: string; // string 详细地址
     remark: string // string 备注
     userstate: number // uint32 开户状态 1:保存草稿 2:提交审核
+    teammanageruserid?: number
+    sex?: number;
+    birthday?: string;
 }
 // 客户资料操作响应 0 29 188
 export interface CustomerInfoOperateRsp {

+ 12 - 0
src/services/proto/futures/index.ts

@@ -0,0 +1,12 @@
+import { getUserId } from "@/services/bus/user";
+import { geLoginID_number } from "@/services/bus/login";
+import { ChannelOrderReq, ChannelOrderRsp } from "./interface";
+import { protoMiddleware } from "@/services/socket/protobuf/buildReq";
+
+/**
+ * 期货交易委托请求
+ * @param param
+ */
+export const channelOrderReq = (param: ChannelOrderReq): Promise<ChannelOrderRsp> => {
+    return protoMiddleware<ChannelOrderReq>(param, 'ChannelOrderReq', 'ChannelOrderRsp', 2)
+}

+ 37 - 0
src/services/proto/futures/interface.ts

@@ -0,0 +1,37 @@
+// 交易委托请求 0 3 31
+export interface ChannelOrderReq {
+    ClientSerialNo: string; // string 客户端流水号
+    ClientOrderTime: string; // string 客户端委托时间
+    ClientType: number; // uint32 终端类型
+    LoginID: number; // uint64 登陆账号
+    AccountID: number; // uint64 交易账号
+    GoodsID: number; // uint32 商品ID
+    MarketID: number; // uint32 市场ID
+    ValidType: number; // int32 有效类型 - 1当日有效
+    ChannelOperateType: number; // uint32 操作类型:
+    ChannelOrderSrc: number; // uint32 单据来源委托来源 -  1:客户端 2:管理端 3:风控服务 
+    HedgeFlag: number; // uint32 投机套保标志 - 0:无 1:投机 2:套保 3:套利 4:套期保值 5:单边 6:移仓 7:错单处理 8:跨期套利
+    OperatorID: number; // uint64 操作员账号ID
+    OrderPrice: number; // double 委托价格
+    OrderQty: number; // uint64 委托数量
+    BuyOrSell: number; // uint32 买卖方向(买卖 - 0:买 1:卖 )
+    ChannelBuildType: number; // uint32 下单类型(开平标志 - 0:无 1:建仓 2:平仓)
+    CloseType: number; // uint32 平仓方式(平仓方式 - 0:无 1:平今 2:平昨)
+    PriceMode: number; // uint32 取价方式 - 1:市价 2: 限价
+    TimeValidType: number; // uint32 时间有效类型
+    RelatedID: number; // uint64 关联单号
+    ServiceTime: string; // string 服务端时间
+    validtime: string; // string 有效时间
+    CloseTodayQty: number; // uint64 平今仓数量
+    SpotContractID: number; // uint64 现货合同ID - 为4:套期保值时填写
+    SaleUserID: number; // uint64 业务员ID
+    BizSubjectID: number; // uint64 归属业务部门ID
+}
+
+// 交易委托应答 0 3 32
+export interface ChannelOrderRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    OrderID: number; // uint64 一级生成的订单号
+    OrderTime: string; // string 接收委托交易的时间
+}

+ 3 - 4
src/services/proto/manager/index.ts

@@ -1,14 +1,13 @@
 /**
  *****************     管理端接口  *******************
  */
-import {protoMiddleware, protoMiddleware_manager} from "@/services/socket/protobuf/buildReq";
 import {
     GoodsPickupConfirmReq, GoodsPickupConfirmRsp,
     GoodsPickupOperateReq, GoodsPickupOperateRsp, QHJAgreementConfigOperateReq, QHJAgreementConfigOperateRsp,
     t2bExchConfirmBusinessReq,
     t2bExchConfirmBusinessRsp
 } from "@/services/proto/manager/interface";
-import {IMessageHead} from "@/services/socket/protobuf/proto";
+import { protoMiddleware } from "@/services/socket/protobuf/buildReq";
 
 /**
  * 交易所审核结果通知请求
@@ -31,9 +30,9 @@ export const goodsPickupOperate = (param: GoodsPickupOperateReq): Promise<GoodsP
  * @param param MarketID市场id
  */
 export const goodsPickupConfirm = (param: GoodsPickupConfirmReq): Promise<GoodsPickupConfirmRsp> => {
-    var marketid = param.MarketID
+    const marketid = param.MarketID
     delete param.MarketID
-    return protoMiddleware_manager<GoodsPickupConfirmReq>(param, 'GoodsPickupConfirmReq', 'GoodsPickupConfirmRsp', {MarketID: marketid})
+    return protoMiddleware<GoodsPickupConfirmReq>(param, 'GoodsPickupConfirmReq', 'GoodsPickupConfirmRsp', { MarketID: marketid })
     // return protoMiddleware<GoodsPickupConfirmReq>(param, 'GoodsPickupConfirmReq', 'GoodsPickupConfirmRsp', 4)
 }
 

+ 11 - 37
src/services/socket/protobuf/buildReq.ts

@@ -1,6 +1,6 @@
 import APP from '@/services';
-import { getUserId } from '@/services/bus/user';
 import { getErrorInfoByCode } from '@/services/bus/error';
+import { getUserId } from '@/services/bus/user';
 import { funCode } from '@/services/funcode/index';
 import ProtobufCtr from '@/services/socket/protobuf/index';
 import { Callback } from '@/utils/websocket';
@@ -110,12 +110,13 @@ function buildMsgHead(funCodeName: string, params: IMessageHead) {
  * @param params SoleSearchParam
  */
 function buildSoleProtoReq50(params: SoleSearchParam): Package50 {
-    const { protobufName, funCodeName, reqParams, headerEnum, headParam } = params;
+    const { protobufName, funCodeName, reqParams, Header } = params;
     // // // 消息头
     // const messageHead = buildMsgHead(funCodeName, headParam);
     // proto头部参数,站在用户角度,参数数据可以通用获取,但站在管理端的角度,则需要不能通用获取,而是需用选中对应数据中传入进来
     // 登录报文
-    const header = headParam ? buildMsgHead(funCodeName, headParam) : getProtoHeadParam(funCodeName, headerEnum);
+
+    const header = typeof Header == 'object' ? buildMsgHead(funCodeName, Header) : getProtoHeadParam(funCodeName, Header);
     const Req = buildSoleProtoReq(protobufName, reqParams);
     Req.Header = header
     return setPackage50(funCodeName, Req);
@@ -256,22 +257,26 @@ export const noticeParseRsp = (rspPackage: any, funCodeName: string) => {
 function lower(value: string): string {
     return value.toLowerCase();
 }
+// 枚举 proto hader
+export function protoMiddleware<T>(param: T, reqName: string, rspName: string, headerEnum: HeadEnum): Promise<any>
+// 自定义 protp header
+export function protoMiddleware<T>(param: T, reqName: string, rspName: string, headerEnum: IMessageHead): Promise<any>
 
 /**
  * 此方法站在 用户角度
  * @param param proto除去head 剩下参数
- * @param headerEnum 自定义的proto参数枚举值,减小重复抒写 默认0
+ * @param headerEnumOrParam 自定义的proto参数枚举值,减小重复抒写 默认0,当枚举情况不满足,可以重新写一个 header 传入
  * @param reqFuncodeName proto 发送请求定义的头名字,特别需要注意,自已的funCodeName要与这个一致
  * @param rspFuncodeName proto 响应请求定义的头名字
  * @returns
  */
-export function protoMiddleware<T>(param: T, reqName: string, rspName: string, headerEnum: HeadEnum = 0): Promise<any> {
+export function protoMiddleware<T>(param: T, reqName: string, rspName: string, headerEnumOrParam: HeadEnum | IMessageHead = 0): Promise<any> {
     return new Promise((resolve, reject) => {
         const params = {
             protobufName: reqName,
             funCodeName: reqName,
             reqParams: param,
-            headerEnum,
+            Header: headerEnumOrParam,
         };
         const package50 = buildProtoReq50(params);
         const code = rspName ? funCode[rspName] : undefined
@@ -291,34 +296,3 @@ export function protoMiddleware<T>(param: T, reqName: string, rspName: string, h
         } as Callback);
     });
 }
-
-/**
- * 此方法站在 管理端角度
- * @param param proto除去head 剩下参数
- * @param headParam IMessageHead
- * @param reqFuncodeName proto 发送请求定义的头名字,特别需要注意,自已的funCodeName要与这个一致
- * @param rspFuncodeName proto 响应请求定义的头名字
- * @returns
- */
-export function protoMiddleware_manager<T>(param: T, reqName: string, rspName: string, headParam: IMessageHead): Promise<any> {
-    return new Promise((resolve, reject) => {
-        const params = {
-            protobufName: reqName,
-            funCodeName: reqName,
-            reqParams: param,
-            headParam,
-        };
-        const package50 = buildProtoReq50(params);
-        APP.sendTradingServer(package50, undefined, {
-            onSuccess: (res) => {
-                const { isSuccess, result } = parseProtoRsp50(res, rspName);
-                if (isSuccess) {
-                    resolve(result);
-                } else {
-                    reject(result);
-                }
-            },
-            onFail: (err) => reject(err.message),
-        } as Callback);
-    });
-}

+ 1 - 4
src/services/socket/protobuf/interface.ts

@@ -17,10 +17,7 @@ export interface SoleSearchParam {
     protobufName: string; // protobuf名
     funCodeName: string; // funCode名
     reqParams: ReqParams; // 传入后台报文中的各种参数
-    headerEnum?: HeadEnum, // messgeHead 参数枚举
-    headParam?: IMessageHead; // messgeHead 参数
-
-    Header?: IMessageHead; // messgeHead 参数
+    Header?: IMessageHead | HeadEnum; // messgeHead 参数
 }
 
 export interface ParseRsp {

+ 6 - 6
src/utils/objHandle/index.ts

@@ -21,9 +21,9 @@ export function mergeObj(a: ObjType, ...rest: ObjType[]): void {
 
 /**
  * 合并两个对象
- * @param a 
- * @param b 
- * @param callBack 
+ * @param a
+ * @param b
+ * @param callBack
  */
 export function mergeTwoObj(a: any, b: any, callBack?: Function) {
     if (b && typeof b === 'object') {
@@ -31,7 +31,7 @@ export function mergeTwoObj(a: any, b: any, callBack?: Function) {
         Object.keys(a).forEach((el) => {
             const key = el.toLocaleLowerCase();
             if (Reflect.has(b, key)) {
-                obj[el] = b[key];
+                obj[el] = b[key] === '--' ? '' : b[key];
             } else {
                 console.warn(`为找到对应的key:${key}`);
                 callBack && callBack(el)
@@ -43,8 +43,8 @@ export function mergeTwoObj(a: any, b: any, callBack?: Function) {
 
 /**
  * 对象转二进制数组
- * @param data 
- * @returns 
+ * @param data
+ * @returns
  */
 export function objectToUint8Array(data: object | string) {
     const rawData: string = JSON.stringify(data);

+ 135 - 13
src/views/information/custom/compoments/add/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 平安客户资料 -->
   <a-modal class="add-custom"
-           title="新增客户资料"
+           :title="isAdd() ? '新增客户资料' : '修改客户资料'"
            v-model:visible="visible"
            @cancel="cancel"
            centered
@@ -79,7 +79,7 @@
   <!-- 其他项目客户资料 -->
   <a-modal class="add-custom"
            v-else
-           title="新增客户资料"
+           :title="isAdd() ? '新增客户资料' : '修改客户资料'"
            v-model:visible="visible"
            @cancel="cancel"
            centered
@@ -103,7 +103,7 @@
             :rules="rules">
       <a-row :gutter="24">
         <template v-if="isQianHaiJin()">
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-item label="所属机构"
                          name="areaid">
               <a-select class="typeSelect"
@@ -118,6 +118,21 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
+            <a-form-item label="所属客户经理"
+                         name="teammanageruserid">
+              <a-select class="typeSelect"
+                        style="width: 200px"
+                        v-model:value="formState.teammanageruserid"
+                        placeholder="请选择所属客户经理">
+                <a-select-option v-for="item in brokerList"
+                                 :key="item.userid">
+                  {{ item.customername }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12"
+                 v-if="!isAdd()">
             <a-form-item label="登录账号"
                          name="logincode">
               <a-input class="dialogInput"
@@ -126,7 +141,8 @@
                        placeholder="请选择登录账号" />
             </a-form-item>
           </a-col>
-          <a-col :span="12">
+          <a-col :span="12"
+                 v-if="!isAdd()">
             <a-form-item label="登录密码"
                          name="loginpwd">
               <a-input class="dialogInput"
@@ -137,7 +153,6 @@
           </a-col>
         </template>
         <a-col :span="12">
-
           <a-form-item label="客户类型"
                        name="userinfotype">
             <a-select class="typeSelect"
@@ -213,6 +228,7 @@
           <a-col :span="12">
             <a-form-item label="营业执照">
               <UploadImg :visible="visible"
+                         :imgList="attachmentImgList"
                          @upload="attachmentUpLoad" />
             </a-form-item>
           </a-col>
@@ -243,6 +259,7 @@
                        placeholder="请输入联系电话" />
             </a-form-item>
           </a-col>
+
         </template>
         <template v-else>
           <a-col :span="12">
@@ -276,6 +293,7 @@
             <a-form-item label="身份证正面照"
                          name="cardbackphotourl">
               <UploadImg :visible="visible"
+                         :imgList="cardfrontImgList"
                          @upload="cardfrontphotourlUpLoad" />
             </a-form-item>
           </a-col>
@@ -288,10 +306,11 @@
                        placeholder="请输入邮箱" />
             </a-form-item>
           </a-col>
-          <a-col :span="24">
+          <a-col :span="12">
             <a-form-item label="身份证反面照"
                          name="cardfrontphotourl">
               <UploadImg :visible="visible"
+                         :imgList="cardbackImgList"
                          @upload="cardbackphotourlUpLoad" />
             </a-form-item>
           </a-col>
@@ -304,6 +323,42 @@
                        placeholder="请输入联系电话" />
             </a-form-item>
           </a-col>
+          <a-col :span="12"
+                 v-if="isQianHaiJin()">
+            <a-form-item label="性别"
+                         name="sex">
+              <a-select class="inlineFormSelect"
+                        v-model:value="formState.sex"
+                        style="width: 200px"
+                        placeholder="请选择性别">
+                <a-select-option :value="item.id"
+                                 v-for="item in sexList"
+                                 :key="item.id">
+                  {{ item.value }}
+                </a-select-option>
+              </a-select>
+              <!-- <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.sex"
+                       placeholder="请选择性别" /> -->
+            </a-form-item>
+          </a-col>
+          <a-col :span="12"
+                 v-if="isQianHaiJin()">
+
+            <a-form-item label="生日"
+                         name="birthday">
+              <a-date-picker v-model:value="formState.birthday"
+                             :allowClear="false"
+                             style="width: 200px"
+                             placeholder="请选择生日"
+                             class="commonDatePicker" />
+              <!-- <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.birthday"
+                       placeholder="请选择性别" /> -->
+            </a-form-item>
+          </a-col>
           <a-col :span="12">
             <a-form-item> &nbsp; </a-form-item>
           </a-col>
@@ -377,17 +432,26 @@ import { getUploadImg } from '@/common/setup/upload';
 import { getUserId } from '@/services/bus/user';
 import { getAddress } from '@/services/go/adress';
 import { AllEnums } from '@/services/go/commonService/interface';
+import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
 import { addCustomerInfoOperate } from '@/services/proto/accountinfo';
 import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
+import { mergeTwoObj } from '@/utils/objHandle';
 import { toBase64String } from '@/utils/storage/base64';
-import { defineComponent, ref } from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { FormState } from './interface';
-import { getCardType, handleForm, handleAreaList } from './setup';
+import { getCardType, handleAreaList, handleBrokerApplyt, handleForm } from './setup';
+import moment, { Moment } from 'moment';
 
 export default defineComponent({
     name: 'add-custom',
     emits: ['cancel', 'update'],
     components: { UploadImg },
+    props: {
+        selectedRow: {
+            default: {},
+            type: Object as PropType<QhjCustomer>,
+        },
+    },
     setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = _closeModal(context);
@@ -399,24 +463,67 @@ export default defineComponent({
         // 地址
         const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
         // 营业执照
-        const { getFirstImg: getAttachmentImg, uploadImgAction: attachmentUpLoad } = getUploadImg();
+        const { getFirstImg: getAttachmentImg, uploadImgAction: attachmentUpLoad, uploadImgList: attachmentImgList, handleImg: attachmentHandle } = getUploadImg();
         // 背面证件照地址
-        const { getFirstImg: getBackImg, uploadImgAction: cardbackphotourlUpLoad } = getUploadImg();
+        const { getFirstImg: getBackImg, uploadImgAction: cardbackphotourlUpLoad, uploadImgList: cardbackImgList, handleImg: cardbackHandle } = getUploadImg();
         // 正面证件照地址
-        const { getFirstImg: getFrontImg, uploadImgAction: cardfrontphotourlUpLoad } = getUploadImg();
+        const { getFirstImg: getFrontImg, uploadImgAction: cardfrontphotourlUpLoad, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
         //查询所属机构列表
         const { areaList, getAreaList } = handleAreaList();
+        // 查询客户经理
+        const { brokerList, getBrokerApply } = handleBrokerApplyt();
         if (isQianHaiJin()) {
-            getAreaList(loading);
+            Promise.all([getAreaList(loading), getBrokerApply(loading)]);
         }
+
+        // 性别
+        const sexList = [
+            { id: 0, value: '女' },
+            { id: 1, value: '男' },
+        ];
         function isPersonal(): boolean {
             return formState.userinfotype === '1';
         }
+        const isAdd = () => !props.selectedRow.userinfotype;
+        const isN = (value: string) => value === '--';
+        // 修改 客户资料的逻辑
+        if (!isAdd()) {
+            console.log('修改::::::::::::::::::::::::::');
+
+            mergeTwoObj(formState, props.selectedRow);
+            formState.userinfotype = formState.userinfotype.toString();
+            if (isPersonal()) {
+                formState.username = props.selectedRow.customername;
+            } else {
+                formState.username = props.selectedRow.username;
+            }
+            const { provinceid, cityid, address, mobile, memberuserid, brokerid, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
+            formState.cardaddress = isN(address) ? '' : address;
+            formState.mobilephone = mobile;
+            formState.areaid = memberuserid;
+            formState.teammanageruserid = brokerid ? brokerid : undefined;
+            provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
+            cityid ? getDistrictList(cityid) : ((formState.cityid = undefined), (formState.districtid = undefined));
+
+            if (cardfrontphotourl && !isN(cardfrontphotourl)) {
+                // 营业执照
+                attachmentImgList.value = attachmentHandle(cardfrontphotourl);
+            }
+            if (cardbackphotourl && !isN(cardbackphotourl)) {
+                // 背面证件照地址
+                cardbackImgList.value = cardbackHandle(cardbackphotourl);
+            }
+            if (cardbackphotourl && !isN(cardbackphotourl)) {
+                // 正面证件照地址
+                cardfrontImgList.value = cardfrontHandle(cardbackphotourl);
+            }
+        }
 
         function submit(OperateType: 1 | 2) {
             validateAction<FormState>(formRef, formState).then((param) => {
+                console.log(props.selectedRow);
                 const reqParam: CustomerInfoOperateReq = {
-                    operatetype: 1, // 1: 新增
+                    operatetype: isAdd() ? 1 : 2, // 1: 新增 2:修改
                     userid: getUserId(), // 必填
                     areaid: getUserId(),
                     userinfotype: Number(param.userinfotype),
@@ -443,11 +550,20 @@ export default defineComponent({
                     proxystatementurl: '',
                 };
                 if (isQianHaiJin()) {
+                    // 千海金
                     reqParam.areaid = param.areaid as number;
                     reqParam.logincode = param.logincode;
+                    reqParam.teammanageruserid = param.teammanageruserid ? param.teammanageruserid : 0;
+                    if (isPersonal()) {
+                        reqParam.sex = param.sex;
+                        if (param.birthday) {
+                            reqParam.birthday = moment(param.birthday).format('YYYY-MM-DD');
+                        }
+                    }
                     reqParam.loginpwd = toBase64String(toBase64String(param.loginpwd));
                     reqParam.userstate = 2;
                 }
+                debugger;
                 requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
                     cancel(true);
                 });
@@ -467,6 +583,11 @@ export default defineComponent({
             districtList,
             provinceList,
             areaList,
+            brokerList,
+            attachmentImgList,
+            cardbackImgList,
+            cardfrontImgList,
+            sexList,
             getCityList,
             getDistrictList,
             attachmentUpLoad,
@@ -474,6 +595,7 @@ export default defineComponent({
             cardfrontphotourlUpLoad,
             isPingAnOem,
             isQianHaiJin,
+            isAdd,
         };
     },
 });

+ 3 - 0
src/views/information/custom/compoments/add/interface.ts

@@ -28,4 +28,7 @@ export interface FormState {
     cardbackphotourl: string;//背面证件照地址
     cardfrontphotourl: string;//正面证件照地址
     email: string;//Email地址(加密存储)
+    birthday?: string;//客户生日(yyyy-mm-dd)
+    teammanageruserid?: number;//客户经理
+    sex?: 0 | 1 | undefined;//性别 0 女 1 男
 }

+ 25 - 2
src/views/information/custom/compoments/add/setup.ts

@@ -2,10 +2,11 @@
 import { getCardTypeEnumList } from '@/common/constants/enumsList';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { validateCommon } from '@/common/setup/validate';
+import { getUserId } from '@/services/bus/user';
 import { QueryAddUserInfoApply } from '@/services/go/ermcp/customInfo';
 import { AddUserInfoApplyReq } from '@/services/go/ermcp/customInfo/interface';
-import { queryParentAreaList } from '@/services/go/ermcp/qhj';
-import { QhjParentAreaList } from '@/services/go/ermcp/qhj/interface';
+import { QueryBrokerApply, queryParentAreaList } from '@/services/go/ermcp/qhj';
+import { QhjParentAreaList, QueryBrokerApplyRsp } from '@/services/go/ermcp/qhj/interface';
 import { message } from 'ant-design-vue';
 import { RuleObject } from 'ant-design-vue/lib/form/interface';
 import { reactive, Ref, ref, UnwrapRef } from 'vue';
@@ -29,6 +30,8 @@ export function handleForm() {
     }
     const rules = {
         userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
+        areaid: [{ required: true, message: '请选择所属机构' }],
+        // sex: [{ required: true, message: '请选择性别' }],
         customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
         mobilephone: [
             { required: true, message: '请输入联系人手机号', trigger: 'blur' },
@@ -74,6 +77,9 @@ export function initFormState(): FormState {
         cardbackphotourl: '',
         cardfrontphotourl: '',
         email: '',
+        birthday: '',
+        teammanageruserid: undefined,
+        sex: undefined,
     }
 }
 
@@ -98,4 +104,21 @@ export function handleAreaList() {
         })
     }
     return { areaList, getAreaList }
+}
+
+// 查询客户经理
+export function handleBrokerApplyt() {
+    const brokerList = ref<QueryBrokerApplyRsp[]>([])
+    function getBrokerApply(loading: Ref<boolean>) {
+        const param = {
+            userid: getUserId(),
+            filterstatus: 2,
+            includesub: 1,
+        }
+        queryResultLoadingAndInfo(QueryBrokerApply, loading, param).then(res => {
+            brokerList.value = res
+        })
+    }
+
+    return { brokerList, getBrokerApply }
 }

+ 42 - 2
src/views/information/custom/compoments/common-detail/index.vue

@@ -21,14 +21,16 @@ import { formatValue } from '@/common/methods';
 import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import { Des, DescriptionsList, handleDesList } from '@/common/components/commonDes';
 import { handlePreviewImg } from '@/common/setup/upload';
-import { isPingAnOem } from '@/common/config/projectName';
+import { isPingAnOem, isQianHaiJin } from '@/common/config/projectName';
+import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
+import { formatTime } from '@/common/methods';
 
 export default defineComponent({
     name: 'custom-detail-desc',
     components: { Des },
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<QhjCustomer>,
             default: {},
         },
     },
@@ -74,6 +76,44 @@ export default defineComponent({
                     { label: '状态', value: getStatusName(data.status), className: 'green' },
                 ];
                 getDesList(isPersonal() ? person : company);
+            } else if (isQianHaiJin()) {
+                // 个人
+                const person = [
+                    { label: '所属机构', value: formatValue(data.parentusername) },
+                    { label: '所属客户经理', value: formatValue(data.brokername) },
+                    { label: '客户类型', value: '个人' },
+                    { label: '姓名', value: formatValue(data.username) },
+                    { label: '性别', value: data.sex === 1 ? '男' : data.sex === 0 ? '女' : '--' },
+                    { label: '生日', value: formatValue(formatTime(data.birthday, 'd')) },
+                    { label: '身份证号码', value: formatValue(data.cardnum) },
+                    { label: '手机号码', value: formatValue(data.mobile) },
+                    { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+                    { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
+                    { label: '邮箱', value: formatValue(data.email) },
+                    { label: '联系电话', value: formatValue(data.telphone) },
+                    { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
+                    { label: '备注', value: formatValue(data.remark) },
+                ];
+                // 企业
+                const company = [
+                    { label: '所属机构', value: formatValue(data.parentusername) },
+                    { label: '所属客户经理', value: formatValue(data.brokername) },
+                    { label: '客户类型', value: '企业' },
+                    { label: '企业名称', value: data.customername },
+                    { label: '企业简称', value: formatValue(data.nickname) },
+                    { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
+                    { label: '法定代表人', value: formatValue(data.legalpersonname) },
+                    { label: '证件号码', value: formatValue(data.cardnum) },
+                    { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
+                    { label: '营业执照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+                    { label: '联系人', value: formatValue(data.contactname) },
+                    { label: '联系人手机号', value: formatValue(data.mobile) },
+                    { label: '联系电话', value: formatValue(data.telphone) },
+                    { label: '状态', value: getStatusName(data.status), className: 'green' },
+                    { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
+                    { label: '备注', value: formatValue(data.remark) },
+                ];
+                getDesList(isPersonal() ? person : company);
             } else {
                 // 个人
                 const person = [

+ 43 - 19
src/views/information/custom/index.vue

@@ -1,13 +1,27 @@
 <template>
   <!-- 客户资料 -->
-  <div class="plan_uncommitted" :loading="loading">
+  <div class="plan_uncommitted"
+       :loading="loading">
     <Filter @search="updateColumn">
-      <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
+      <mtp-table-button class="btn-list-sticky"
+                        :buttons="addButton"
+                        @click="openComponent" />
     </Filter>
-    <a-table :columns="getColumns(columns)" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
+    <a-table :columns="getColumns(columns)"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
       <!-- 额外的展开行 -->
       <template #expandedRowRender="{ record }">
-        <mtp-table-button class="btn-list-sticky" :buttons="handleBtnList(buttons,record)" :record="record" @click="openComponent" />
+        <mtp-table-button class="btn-list-sticky"
+                          :buttons="handleBtnList(buttons,record)"
+                          :record="record"
+                          @click="openComponent" />
       </template>
       <template #status="{ text }">
         <a>{{ getStatusName(text) }}</a>
@@ -15,6 +29,9 @@
       <template #customername="{record}">
         {{record.username}}
       </template>
+      <template #birthday="{text}">
+        {{text && text !== '--' ? formatTime(text, 'd') : '--'}}
+      </template>
       <template #nickname="{record}">
         {{record.username}}
       </template>
@@ -29,8 +46,13 @@
       </template>
     </a-table>
     <!-- 右键 -->
-    <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
-    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="buttons"> </contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"> </component>
   </div>
 </template>
 
@@ -43,10 +65,14 @@ import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { getUserInfoTypeName, getStatusName, getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import Filter from './compoments/filterTable/index.vue';
-import { pingan_custom_column } from './setup';
+import { pingan_custom_column, qian_hai_jin_custom_column } from './setup';
 import { ColumnType } from '@/common/methods/table';
 import { getTableColumns } from '@/common/setup/table';
 import { BtnListType } from '@/common/components/btnList/interface';
+import { queryCustomerInfo } from '@/services/go/ermcp/qhj';
+import { getUserId } from '@/services/bus/user';
+import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
+import { formatTime } from '@/common/methods';
 
 export default defineComponent({
     name: EnumRouterName.plan_audit,
@@ -58,7 +84,7 @@ export default defineComponent({
         add: defineAsyncComponent(() => import('./compoments/add/index.vue')), // 新增
         check: defineAsyncComponent(() => import('./compoments/check/index.vue')), // 审核
         delete: defineAsyncComponent(() => import('./compoments/delete/index.vue')), // 删除
-        modify: defineAsyncComponent(() => import('./compoments/modify/index.vue')), // 修改
+        modify: defineAsyncComponent(() => import('./compoments/add/index.vue')), // 修改
         recover: defineAsyncComponent(() => import('./compoments/recover/index.vue')), // 恢复
         disable: defineAsyncComponent(() => import('./compoments/disable/index.vue')), // 停用
         cancel: defineAsyncComponent(() => import('./compoments/cancel/index.vue')), // 撤销
@@ -70,24 +96,25 @@ export default defineComponent({
         // 表格权限按钮
         const buttons = getTableButton(['add'], true);
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryCustomInfoType>();
+        const { loading, tableList, queryTable } = queryTableList<QhjCustomer>();
 
         // 获取列表数据
         const queryTableAction = () => {
+            const userid = getUserId();
             if (isRouterName('custom_checkpending')) {
                 // 待审核
-                queryTable(QueryCustomInfo, 2);
+                queryTable(queryCustomerInfo, { userid, querytype: 2 });
             } else if (isRouterName('custom_normal')) {
                 // 正常
-                queryTable(QueryCustomInfo, 3);
+                queryTable(queryCustomerInfo, { userid, querytype: 3 });
             } else if (isRouterName('custom_disabled')) {
                 // 停用
-                queryTable(QueryCustomInfo, 4);
+                queryTable(queryCustomerInfo, { userid, querytype: 4 });
             }
         };
 
         // 处理根据状态显示对应按钮
-        const handleBtnList = (btnList: BtnListType[], item: QueryCustomInfoType) => {
+        const handleBtnList = (btnList: BtnListType[], item: QhjCustomer) => {
             switch (item.status) {
                 case 2: // 待审核
                     return btnList.filter((e) => e.code !== 'modify');
@@ -105,9 +132,7 @@ export default defineComponent({
                 return pingan_custom_column();
             } else if (isQianHaiJin()) {
                 // 千海金
-                const { columns: result, registerColumn } = getTableColumns();
-                registerColumn('table_pcweb_qhj_customer_info', []);
-                return result.value;
+                return qian_hai_jin_custom_column();
             } else {
                 return columns;
             }
@@ -122,18 +147,17 @@ export default defineComponent({
         };
 
         return {
-            ...handleComposeTable<QueryCustomInfoType>(param),
+            ...handleComposeTable<QhjCustomer>(param),
             loading,
             tableList,
             getStatusName,
             buttons,
             addButton,
-            pingan_custom_column,
-            isPingAnOem,
             getUserInfoTypeName,
             getCardTypeEnumItemName,
             getColumns,
             handleBtnList,
+            formatTime,
         };
     },
 });

+ 199 - 1
src/views/information/custom/setup.ts

@@ -1,3 +1,4 @@
+
 // 平安 客户资料 表头
 export function pingan_custom_column() {
     return [
@@ -62,4 +63,201 @@ export function pingan_custom_column() {
             width: 120
         },
     ]
-}
+}
+
+// 千海金 客户资料 表头
+export function qian_hai_jin_custom_column() {
+    return [
+        {
+            key: 'logincode',
+            dataIndex: 'logincode',
+            title: '登录账号',
+            align: 'center',
+            slots: {
+                customRender: 'logincode',
+            },
+            width: 120
+        },
+        {
+            key: 'parentusername',
+            dataIndex: 'parentusername',
+            title: '所属机构',
+            align: 'center',
+            slots: {
+                customRender: 'parentusername',
+            },
+            width: 120
+        },
+        {
+            key: 'brokername',
+            dataIndex: 'brokername',
+            title: '所属客户经理',
+            align: 'center',
+            slots: {
+                customRender: 'brokername',
+            },
+            width: 120
+        },
+        {
+            key: 'status',
+            dataIndex: 'status',
+            title: '状态',
+            align: 'center',
+            slots: {
+                customRender: 'status',
+            },
+            width: 120
+        },
+        {
+            key: 'userinfotype',
+            dataIndex: 'userinfotype',
+            title: '客户类型',
+            align: 'center',
+            slots: {
+                customRender: 'userinfotype',
+            },
+            width: 120
+        },
+        {
+            key: 'nickname',
+            dataIndex: 'nickname',
+            title: '客户简称',
+            align: 'center',
+            slots: {
+                customRender: 'nickname',
+            },
+            width: 120
+        },
+        {
+            key: 'customername',
+            dataIndex: 'customername',
+            title: '客户名称',
+            align: 'center',
+            slots: {
+                customRender: 'customername',
+            },
+            width: 120
+        },
+        {
+            key: 'cardtype',
+            dataIndex: 'cardtype',
+            title: '证件类型',
+            align: 'center',
+            slots: {
+                customRender: 'cardtype',
+            },
+            width: 120
+        },
+        {
+            key: 'cardnum',
+            dataIndex: 'cardnum',
+            title: '证件号码',
+            align: 'center',
+            slots: {
+                customRender: 'cardnum',
+            },
+            width: 120
+        },
+        {
+            key: 'contactname',
+            dataIndex: 'contactname',
+            title: '联系人',
+            align: 'center',
+            slots: {
+                customRender: 'contactname',
+            },
+            width: 120
+        },
+        {
+            key: 'mobile',
+            dataIndex: 'mobile',
+            title: '手机号码',
+            align: 'center',
+            slots: {
+                customRender: 'mobile',
+            },
+            width: 120
+        },
+        {
+            key: 'email',
+            dataIndex: 'email',
+            title: '邮箱',
+            align: 'center',
+            slots: {
+                customRender: 'email',
+            },
+            width: 120
+        },
+        {
+            key: 'legalpersonname',
+            dataIndex: 'legalpersonname',
+            title: '法定代表人',
+            align: 'center',
+            slots: {
+                customRender: 'legalpersonname',
+            },
+            width: 120
+        },
+        {
+            key: 'taxpayernum',
+            dataIndex: 'taxpayernum',
+            title: '纳税人识别号',
+            align: 'center',
+            slots: {
+                customRender: 'taxpayernum',
+            },
+            width: 120
+        },
+        {
+            key: 'taxpayernum',
+            dataIndex: 'taxpayernum',
+            title: '纳税人识别号',
+            align: 'center',
+            slots: {
+                customRender: 'taxpayernum',
+            },
+            width: 120
+        },
+        {
+            key: 'attachment1',
+            dataIndex: 'attachment1',
+            title: '证件照',
+            align: 'center',
+            slots: {
+                customRender: 'attachment1',
+            },
+            width: 120
+        },
+        {
+            key: 'address',
+            dataIndex: 'address',
+            title: '地址',
+            align: 'center',
+            slots: {
+                customRender: 'address',
+            },
+            width: 120
+        },
+        {
+            key: 'birthday',
+            dataIndex: 'birthday',
+            title: '生日',
+            align: 'center',
+            slots: {
+                customRender: 'birthday',
+            },
+            width: 120
+        },
+        {
+            key: 'remark',
+            dataIndex: 'remark',
+            title: '备注',
+            align: 'center',
+            slots: {
+                customRender: 'remark',
+            },
+            width: 120
+        },
+    ]
+}
+

+ 9 - 3
src/views/market/futures/compoments/futures-trade/index.vue

@@ -10,7 +10,9 @@
             </a-select>
           </a-form-item>
           <a-form-item label="合约">
-            <a-select class="inlineFormSelect" placeholder="请选择"></a-select>
+            <a-select class="inlineFormSelect" placeholder="请选择" v-model:value="formState.goodscode">
+              <a-select-option v-for="item in tableList" :value="item.goodscode" :key="item.goodscode">{{ item.goodsname }}</a-select-option>
+            </a-select>
           </a-form-item>
           <a-form-item label="交易价格">
             <a-input-number class="commonInput" />
@@ -78,7 +80,7 @@ import { getAccountTypeList } from '@/services/bus/account';
 import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
 import moment, { Moment } from 'moment';
 import { defineComponent, PropType, ref } from 'vue';
-import { TempWrOrderQuoteDetail } from './interface';
+import { TempTableQuoteDetail } from './interface';
 import { handleForm } from './setup';
 
 export default defineComponent({
@@ -87,9 +89,13 @@ export default defineComponent({
     components: { Des, Drawer, PlusOutlined, MinusOutlined },
     props: {
         selectedRow: {
-            type: Object as PropType<TempWrOrderQuoteDetail>,
+            type: Object as PropType<TempTableQuoteDetail>,
             default: {},
         },
+        tableList: {
+            type: Array as PropType<TempTableQuoteDetail[]>,
+            default: [],
+        },
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);

+ 3 - 2
src/views/market/futures/compoments/futures-trade/interface.ts

@@ -1,8 +1,9 @@
-import { WrOrderQuote } from "@/services/go/wrtrade/interface";
+import { TableQuote } from '@/common/setup/table/interface';
 import { Moment } from "moment";
 
 export interface FormParam {
     accountid: undefined | number,
+    goodscode: undefined | string,
     FixedPrice: number,
     OrderQty: number,
     PriceMove: number,
@@ -11,6 +12,6 @@ export interface FormParam {
 }
 
 
-export interface TempWrOrderQuoteDetail extends WrOrderQuote {
+export interface TempTableQuoteDetail extends TableQuote {
     wrResult: { dgfactoryitemtypeid: number; dgfactoryitemid: number }[]
 }

+ 8 - 6
src/views/market/futures/compoments/futures-trade/setup.ts

@@ -1,11 +1,12 @@
 import { useVerifyListingBasis, useVerifyListingNum } from '@/hooks/form/verify';
 import moment from "moment";
 import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
-import { FormParam, TempWrOrderQuoteDetail } from "./interface";
+import { FormParam, TempTableQuoteDetail } from "./interface";
 
 function initFormData(): FormParam {
     return {
         accountid: undefined,
+        goodscode: undefined,
         FixedPrice: 0,
         OrderQty: 0,
         PriceMove: 0,
@@ -14,12 +15,13 @@ function initFormData(): FormParam {
     }
 }
 const formState: UnwrapRef<FormParam> = reactive(initFormData())
-export function handleForm(selectedRow: TempWrOrderQuoteDetail) {
+export function handleForm(selectedRow: TempTableQuoteDetail) {
     const formRef = ref();
-    formState.OrderQty = selectedRow.minivalue
+    formState.OrderQty = selectedRow.decimalplace;
+    formState.goodscode = selectedRow.goodscode;
 
-    const { v_num } = useVerifyListingNum<FormParam, 'DelistMinQty'>(formState, 'DelistMinQty', selectedRow.minivalue);
-    const { v_basis } = useVerifyListingBasis(selectedRow, 'goodsid');
+    const { v_num } = useVerifyListingNum<FormParam, 'DelistMinQty'>(formState, 'DelistMinQty', selectedRow.decimalplace);
+    const { v_basis } = useVerifyListingBasis(selectedRow, 'goodscode');
 
     const rules = {
         FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', }],
@@ -28,7 +30,7 @@ export function handleForm(selectedRow: TempWrOrderQuoteDetail) {
         accountid: [{ required: true, message: '请输入交易账号' }],
     }
     onBeforeUnmount(() => {
-        Object.assign(formState, initFormData(), { OrderQty: selectedRow.minivalue })
+        Object.assign(formState, initFormData(), { OrderQty: selectedRow.decimalplace })
     })
     return { rules, formState, formRef }
 }

+ 7 - 80
src/views/market/futures/index.vue

@@ -1,50 +1,15 @@
 <template>
   <!--期货-->
   <div class="topTableHeight">
-    <a-table :columns="getColumnsList()" :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }" :pagination="false" :loading="loading" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-      <template #totalturnover="{ text }">
-        <span>{{changeUnit(text)}}</span>
-      </template>
-      <!-- 涨跌 -->
-      <template #change="{ record }">
-        <span>{{quoteChange(record, record.decimalplace)}}</span>
-      </template>
-      <!-- 幅度 -->
-      <template #amplitude="{ record }">
-        <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
-      </template>
-      <!-- 振幅 -->
-      <template #vibration="{ record }">
-        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
-      </template>
+    <a-table :columns="getColumnsList()" :class="['srcollYTable', isBottom ? 'condSecondTabTable' : 'condSecondTabTableNoBottom', tableList.length ? 'noPlaceHolder' : 'hasPlaceHolder']" :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 443px)' : 'calc(100vh - 196px)' }" :pagination="false" :loading="loading" :customRow="Rowclick" rowKey="goodscode" :data-source="tableList">
       <template #index="{ index }">
         <span>{{index + 1}}</span>
       </template>
-      <!-- 买价 -->
-      <template #bid="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 卖价 -->
-      <template #ask="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最新价 -->
-      <template #last="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最低价 -->
-      <template #lowest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
-      <!-- 最高价 -->
-      <template #highest="{ text, record }">
-        <span :class="handleQuotePriceColor(text, record.presettle)">{{text}}</span>
-      </template>
     </a-table>
     <ThridMenu :list="tabList" :selectedKey="index" @selectMenu="changeTab" />
     <!-- 右键 -->
     <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"></contextMenu>
-    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :tableList="tableList" :selectedRow="selectedRow" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -53,9 +18,8 @@ import { TabList } from '@/common/components/description/interface';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 import { handleModalComponent } from '@/common/setup/asyncComponent';
-import { handleQuotePriceColor, handleSubcriteOnDemandQuote, quoteAmplitude, quoteAmplituOfVibration, quoteChange } from '@/common/setup/table/tableQuote';
+import { handleSubcriteOnDemandQuote } from '@/common/setup/table/tableQuote';
 import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { ref, reactive, Ref, toRefs } from 'vue';
 import { getColumnsList, useExternalexchange } from './setup';
 import { getTableButton } from '@/common/setup/table/button';
 import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
@@ -64,9 +28,6 @@ import { TableEventCB } from '@/common/setup/table/interface';
 import { getTableEvent } from '@/common/export/table';
 import { ContextMenuTemp } from '@/common/components/contextMenu/interface';
 import { BtnListType } from '@/common/components/btnList/interface';
-import APP from '@/services';
-import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { getQuoteDayInfoByCode } from '@/services/bus/goods';
 
 export default defineComponent({
     name: 'spot_trade_order_transaction_swap',
@@ -76,36 +37,14 @@ export default defineComponent({
         trade: defineAsyncComponent(() => import('./compoments/futures-trade/index.vue')),
     },
     setup() {
-        interface Quote {
-            goodscode: string;
-            goodsname: string;
-            decimalplace: number;
-            last?: Ref;
-            presettle?: Ref;
-        }
-
-        const goodsList = APP.get('Goods') as Goods[];
-        const tableList = reactive<Quote[]>([]);
-        const quoteList = ref<QueryQuoteDayRsp[]>([]);
-
-        goodsList.forEach((el) => {
-            const quote = getQuoteDayInfoByCode(el.goodscode);
-            if (quote) {
-                quoteList.value.push(quote);
-            }
-            tableList.push({
-                goodscode: el.goodscode,
-                goodsname: el.goodsname,
-                decimalplace: el.decimalplace,
-            });
-        });
-
         const isBottom = getShowBottomValue();
         const buttons = getTableButton();
         console.log('buttons', buttons);
-        const { index, loading, tabList, hanldeQuoteData } = useExternalexchange();
+        const { index, loading, tabList, tableList, quoteList, hanldeQuoteData, hanldeTableData } = useExternalexchange();
         // 行情按需订阅
         let stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(quoteList);
+        hanldeTableData();
+
         function changeTab(index: number, current: TabList) {
             hanldeQuoteData(index);
             console.log(index, current);
@@ -113,17 +52,9 @@ export default defineComponent({
             stopSubcribe();
             // 重新发起订阅
             stopSubcribe = handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(quoteList);
+            hanldeTableData();
         }
 
-        quoteList.value.forEach((item) => {
-            const refs = toRefs(item);
-            const index = tableList.findIndex((e) => e.goodscode === item.goodscode);
-            if (index > -1) {
-                tableList[index].last = refs.last;
-                tableList[index].presettle = refs.presettle;
-            }
-        });
-
         // 右键逻辑
         const { contextMenu, closeContext: closeContextAction } = handleContextMenu();
         // 右键回调函数
@@ -152,10 +83,6 @@ export default defineComponent({
             changeTab,
             tableList,
             isBottom,
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
             getColumnsList,
             buttons,
             contextMenu,

+ 0 - 228
src/views/market/futures/setup.ts

@@ -1,228 +0,0 @@
-import { TabList } from '@/common/components/description/interface';
-import { initData } from '@/common/methods';
-import APP from '@/services';
-import { getQuoteDayInfoByCode } from '@/services/bus/goods';
-import { Ermcp3GoodsGroup, Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { Externalexchange } from '@/services/go/useInfo/interface';
-import { ref } from 'vue';
-
-
-export function getColumnsList() {
-    const columns = [
-        { title: '序号', key: 'index', width: 80 },
-        { title: '代码', key: 'goodscode' },
-        { title: '名称', key: 'goodsname' },
-
-        { title: '买价', key: 'bid' },
-        { title: '买量', key: 'bidvolume' },
-        { title: '卖价', key: 'ask' },
-        { title: '卖量', key: 'askvolume' },
-
-        { title: '当前价', key: 'last' },
-        { title: '涨跌', key: 'change' }, // 最新价 - 昨结价
-        { title: '幅度', key: 'amplitude' }, // (最新价 - 昨结价) / 100 %
-        { title: '开盘', key: 'opened' },
-        { title: '最高', key: 'highest' },
-        { title: '最低', key: 'lowest' },
-
-        { title: '结算', key: 'settle' },
-
-        { title: '昨结算', key: 'presettle' },
-
-        // { title: '振幅', key: 'vibration' }, // (最高价 - 最低价 ) / 最新价  * 100 %
-        // { title: '总量', key: 'totalvolume' },
-        // { title: '现量', key: 'lastvolume' },
-        // { title: '持仓量', key: 'holdvolume' },
-        // { title: '日增', key: 'holdincrement' },
-        // { title: '金额', key: 'totalturnover' },
-    ];
-
-    return columns.map(el => {
-        return { dataIndex: el.key, width: 100, align: 'center', slots: { customRender: el.key, }, ...el }
-    })
-}
-
-// 外部交易所
-export const useExternalexchange = () => {
-    const loading = ref<boolean>(false)
-    const index = ref<string>('0');
-    // 外部交易所 数据
-    const externalexchangeList = ref<Externalexchange[]>([])
-    const tabList = ref<TabList[]>([])
-    // 盘面数据
-    const tableList = ref<QueryQuoteDayRsp[]>([
-    ])
-    // 获取 商品数据
-    const useGoodsList = (exchareaid: number) => {
-        const goodsList = APP.get('Goods') as Goods[];
-        const goodsGroups = APP.get('goodsgroups') as Ermcp3GoodsGroup[]
-        // 商品组
-        const selectedGoodsGroups = goodsGroups.filter(e => e.exexchangeid === exchareaid).map(el => el.goodsgroupid)
-        return goodsList.filter(e => {
-            return e.goodsstatus === 3 && selectedGoodsGroups.includes(e.goodsgroupid)
-        })
-
-    }
-
-    initData(() => {
-        externalexchangeList.value = APP.get('externalexchange')
-        const list = externalexchangeList.value.map((e: Externalexchange) => {
-            return { lable: e.exexchangename, code: e.exexchangecode };
-        }) as TabList[]
-
-        tabList.value = list
-        if (list.length) {
-            hanldeQuoteData(0)
-        }
-    })
-    function hanldeQuoteData(index: number) {
-        const id = getExternalId(index)
-        // 找到 交易所 下的商品列表
-        const goodsList = useGoodsList(id)
-        // 找到 盘面数据
-        getQuoteData(goodsList)
-    }
-    function getQuoteData(goodsList: Goods[]) {
-        tableList.value.length = 0
-        // 找到盘面数据
-        goodsList.forEach(el => {
-            const quote = getQuoteDayInfoByCode(el.goodscode);
-            if (quote) {
-                tableList.value.push(quote)
-            } else {
-                tableList.value.push({
-                    ask: 0,
-                    ask1number: 0,
-                    ask2: 0,
-                    ask3: 0,
-                    ask4: 0,
-                    ask5: 0,
-                    ask6: 0,
-                    ask7: 0,
-                    ask8: 0,
-                    ask9: 0,
-                    askorderid: 0,
-                    askorderid2: 0,
-                    askorderid3: 0,
-                    askorderid4: 0,
-                    askorderid5: 0,
-                    askordervolume: 0,
-                    askordervolume1number: 0,
-                    askordervolume2: 0,
-                    askordervolume3: 0,
-                    askordervolume4: 0,
-                    askordervolume5: 0,
-                    askordervolume6: 0,
-                    askordervolume7: 0,
-                    askordervolume8: 0,
-                    askordervolume9: 0,
-                    askqueueinfo: '',
-                    askvolume: 0,
-                    askvolume1number: 0,
-                    askvolume2: 0,
-                    askvolume3: 0,
-                    askvolume4: 0,
-                    askvolume5: 0,
-                    askvolume6: 0,
-                    askvolume7: 0,
-                    askvolume8: 0,
-                    askvolume9: 0,
-                    averageprice: 0,
-                    bid: 0,
-                    bid1number: 0,
-                    bid2: 0,
-                    bid3: 0,
-                    bid4: 0,
-                    bid5: 0,
-                    bid6: 0,
-                    bid7: 0,
-                    bid8: 0,
-                    bid9: 0,
-                    bidorderid: 0,
-                    bidorderid2: 0,
-                    bidorderid3: 0,
-                    bidorderid4: 0,
-                    bidorderid5: 0,
-                    bidordervolume: 0,
-                    bidordervolume1number: 0,
-                    bidordervolume2: 0,
-                    bidordervolume3: 0,
-                    bidordervolume4: 0,
-                    bidordervolume5: 0,
-                    bidordervolume6: 0,
-                    bidordervolume7: 0,
-                    bidordervolume8: 0,
-                    bidordervolume9: 0,
-                    bidqueueinfo: '',
-                    bidvolume: 0,
-                    bidvolume1number: 0,
-                    bidvolume2: 0,
-                    bidvolume3: 0,
-                    bidvolume4: 0,
-                    bidvolume5: 0,
-                    bidvolume6: 0,
-                    bidvolume7: 0,
-                    bidvolume8: 0,
-                    bidvolume9: 0,
-                    calloptionpremiums: 0,
-                    calloptionpremiums2: 0,
-                    calloptionpremiums3: 0,
-                    calloptionpremiums4: 0,
-                    calloptionpremiums5: 0,
-                    cleartime: 0,
-                    exchangecode: 0,
-                    exchangedate: 0,
-                    goodscode: '',
-                    refgoodscode: '',
-                    grepmarketprice: 0,
-                    highest: 0,
-                    holdincrement: 0,
-                    holdvolume: 0,
-                    iep: 0,
-                    iev: 0,
-                    inventory: 0,
-                    iscleared: 0,
-                    issettled: 0,
-                    last: 0,
-                    lastlot: 0,
-                    lasttime: '',
-                    lastturnover: 0,
-                    lastvolume: 0,
-                    limitdown: 0,
-                    limitup: 0,
-                    lowest: 0,
-                    nontotalholdervolume: 0,
-                    nontotallot: 0,
-                    nontotalturnover: 0,
-                    nontotalvolume: 0,
-                    opened: 0,
-                    opentime: '',
-                    orderid: 0,
-                    preclose: 0,
-                    preholdvolume: 0,
-                    presettle: 0,
-                    publictradetype: '',
-                    putoptionpremiums: 0,
-                    putoptionpremiums2: 0,
-                    putoptionpremiums3: 0,
-                    putoptionpremiums4: 0,
-                    putoptionpremiums5: 0,
-                    settle: 0,
-                    strikeprice: 0,
-                    totalaskvolume: 0,
-                    totalbidvolume: 0,
-                    totallot: 0,
-                    totalturnover: 0,
-                    totalvolume: 0,
-                    utclasttime: '',
-                })
-            }
-        })
-    }
-    function getExternalId(index: number) {
-        return externalexchangeList.value[index].autoid
-    }
-
-    return { index, loading, tabList, tableList, hanldeQuoteData }
-}

+ 279 - 0
src/views/market/futures/setup.tsx

@@ -0,0 +1,279 @@
+import { TabList } from '@/common/components/description/interface';
+import { initData } from '@/common/methods';
+import APP from '@/services';
+import { getQuoteDayInfoByCode } from '@/services/bus/goods';
+import { Ermcp3GoodsGroup, Goods } from '@/services/go/ermcp/goodsInfo/interface';
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
+import { Externalexchange } from '@/services/go/useInfo/interface';
+import { ref, toRefs } from 'vue';
+import { quoteChange, quoteAmplitude } from '@/common/setup/table/tableQuote';
+import { TableQuote } from '@/common/setup/table/interface';
+
+/**
+ * 处理空数据
+ */
+function formatValue<Key extends keyof TableQuote>(value: TableQuote[Key]) {
+    return value > 0 ? value : '--';
+}
+
+/**
+ * 处理行情价格颜色
+ */
+function handleQuotePriceColor<T, Key extends keyof TableQuote>(text: T, value: TableQuote[Key], presettle: TableQuote['presettle']) {
+    let className = ''
+    if (presettle && value !== presettle) {
+        if (value > presettle) {
+            className = 'up-quote-color'
+        } else {
+            className = 'down-quote-color'
+        }
+    }
+    return <span class={className}>{text}</span>;
+}
+
+export function getColumnsList() {
+    const columns = [
+        {
+            title: '序号',
+            key: 'index',
+            width: 80
+        },
+        {
+            title: '代码',
+            key: 'goodscode',
+        },
+        {
+            title: '名称',
+            key: 'goodsname'
+        },
+        {
+            title: '最新价',
+            key: 'last',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.last);
+                return handleQuotePriceColor(text, record.last, record.presettle);
+            }
+        },
+        {
+            title: '涨跌幅%',
+            key: 'amplitude',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = quoteAmplitude(record);
+                return handleQuotePriceColor(text, record.last, record.presettle);
+            }
+        },
+        {
+            title: '涨跌额',
+            key: 'change',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = quoteChange(record, record.decimalplace);
+                return handleQuotePriceColor(text, record.last, record.presettle);
+            }
+        },
+        {
+            title: '买价',
+            key: 'bid',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.bid);
+                return handleQuotePriceColor(text, record.bid, record.presettle);
+            }
+        },
+        {
+            title: '卖价',
+            key: 'ask',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.ask);
+                return handleQuotePriceColor(text, record.ask, record.presettle);
+            }
+        },
+        {
+            title: '买量',
+            key: 'bidvolume',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.bidvolume);
+                return handleQuotePriceColor(text, record.bidvolume, record.presettle);
+            }
+        },
+        {
+            title: '卖量',
+            key: 'askvolume',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.askvolume);
+                return handleQuotePriceColor(text, record.askvolume, record.presettle);
+            }
+        },
+        {
+            title: '总量',
+            key: 'totalvolume',
+            customRender: ({ record }: { record: TableQuote }) => {
+                return formatValue(record.totalvolume);
+            }
+        },
+        {
+            title: '现量',
+            key: 'lastvolume',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.lastvolume);
+                return handleQuotePriceColor(text, record.lastvolume, record.presettle);
+            }
+        },
+        {
+            title: '持仓量',
+            key: 'holdvolume',
+            customRender: ({ record }: { record: TableQuote }) => {
+                return formatValue(record.holdvolume);
+            }
+        },
+        {
+            title: '日增',
+            key: 'holdincrement',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.holdincrement);
+                return handleQuotePriceColor(text, record.holdincrement, record.presettle);
+            }
+        },
+        {
+            title: '昨结价',
+            key: 'presettle',
+            customRender: ({ record }: { record: TableQuote }) => {
+                return formatValue(record.presettle);
+            }
+        },
+        {
+            title: '金额',
+            key: 'totalturnover',
+            customRender: ({ record }: { record: TableQuote }) => {
+                return formatValue(record.totalturnover);
+            }
+        },
+        {
+            title: '开盘',
+            key: 'opened',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.opened);
+                return handleQuotePriceColor(text, record.opened, record.presettle);
+            }
+        },
+        {
+            title: '最高',
+            key: 'highest',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.highest);
+                return handleQuotePriceColor(text, record.highest, record.presettle);
+            }
+        },
+        {
+            title: '最低',
+            key: 'lowest',
+            customRender: ({ record }: { record: TableQuote }) => {
+                const text = formatValue(record.lowest);
+                return handleQuotePriceColor(text, record.lowest, record.presettle);
+            }
+        },
+    ];
+
+    return columns.map(el => {
+        return {
+            dataIndex: el.key,
+            width: 100,
+            align: 'center',
+            slots: { customRender: el.key, },
+            ...el
+        }
+    })
+}
+
+// 外部交易所
+export const useExternalexchange = () => {
+    const loading = ref<boolean>(false)
+    const index = ref<string>('0');
+    // 盘面数据
+    const quoteList = ref<QueryQuoteDayRsp[]>([]);
+    // 表格数据
+    const tableList = ref<TableQuote[]>([]);
+    // 外部交易所 数据
+    const externalexchangeList = ref<Externalexchange[]>([])
+    const tabList = ref<TabList[]>([])
+
+    // 获取 商品数据
+    const useGoodsList = (exchareaid: number) => {
+        // 商品列表
+        const goodsList = APP.get('Goods') as Goods[];
+        const goodsGroups = APP.get('goodsgroups') as Ermcp3GoodsGroup[]
+        // 商品组
+        const selectedGoodsGroups = goodsGroups.filter(e => e.exexchangeid === exchareaid).map(el => el.goodsgroupid)
+        return goodsList.filter(e => {
+            return e.goodsstatus === 3 && selectedGoodsGroups.includes(e.goodsgroupid)
+        })
+    }
+
+    initData(() => {
+        externalexchangeList.value = APP.get('externalexchange')
+        const list = externalexchangeList.value.map((e: Externalexchange) => {
+            return { lable: e.exexchangename, code: e.exexchangecode };
+        }) as TabList[]
+
+        tabList.value = list
+        if (list.length) {
+            hanldeQuoteData(0)
+        }
+    })
+    function hanldeQuoteData(index: number) {
+        const id = getExternalId(index)
+        // 找到 交易所 下的商品列表
+        const goodsList = useGoodsList(id)
+
+        // 重置表格数据
+        tableList.value = goodsList.map((el) => {
+            return {
+                goodscode: el.goodscode,
+                goodsname: el.goodsname,
+                decimalplace: el.decimalplace,
+            }
+        })
+
+        // 找到 盘面数据
+        getQuoteData(goodsList)
+    }
+    function getQuoteData(goodsList: Goods[]) {
+        quoteList.value.length = 0
+        // 找到盘面数据
+        goodsList.forEach(el => {
+            const quote = getQuoteDayInfoByCode(el.goodscode);
+            if (quote) {
+                quoteList.value.push(quote)
+            }
+        })
+    }
+
+    // 处理表格行情数据
+    function hanldeTableData() {
+        quoteList.value.forEach((quote) => {
+            const refs = toRefs(quote);
+            const index = tableList.value.findIndex((e) => e.goodscode === quote.goodscode);
+            if (index > -1) {
+                const item = tableList.value[index];
+                item.last = refs.last; // 最新价
+                item.bid = refs.bid; // 买价
+                item.ask = refs.ask; // 卖价
+                item.bidvolume = refs.bidvolume; // 买量
+                item.askvolume = refs.askvolume; // 卖量
+                item.totalvolume = refs.totalvolume; // 总量
+                item.lastvolume = refs.lastvolume; // 现量
+                item.holdvolume = refs.holdvolume; // 持仓量
+                item.holdincrement = refs.holdincrement; // 日增
+                item.presettle = refs.presettle; // 昨结价
+                item.totalturnover = refs.totalturnover; // 金额
+                item.opened = refs.opened; // 开盘
+                item.highest = refs.highest; // 最高
+                item.lowest = refs.lowest; // 最低
+            }
+        });
+    }
+
+    function getExternalId(index: number) {
+        return externalexchangeList.value[index].autoid
+    }
+
+    return { index, loading, tabList, tableList, quoteList, hanldeQuoteData, hanldeTableData }
+}

+ 27 - 64
swagger-to-ts/swagger.ts

@@ -1,65 +1,28 @@
-export interface Name{
-    accountid	:number;//交易账号(资金账号)
-allfriendsflag	:number;//是否全好友可见 - number;
-//:否 1:是
-amount	:number;//挂牌金额 = 委托数量  固定价或升贴水
-buyorsell	:number;//买卖 - number;
-//:买 1:卖(挂牌类型 买为采购 卖为销售)
-canbargain	:number;//是否可议价 - number;
-//:不可 1:可
-cancelqty	:number;//撤销数量
-canpart	:number;//是否允许部份摘牌 - number;
-//:不允许(要求整单) 1:允许(可以不整单)
-delistminqty	:number;//起摘数量
-deliverygoodscode	:string;//品种代码
-deliverygoodsid	:number;//品种ID
-deliverygoodsname	:string;//品种名称
-deliverymonth	:string;//交收月
-enumdicname	:string;//单位名称
-fixedprice	:number;//固定价格 - [挂牌]
-freezemargin	:number;//冻结保证金(保证金)
-futupricemove	:number;//期货升贴水
-futushow	:string;//期货合约/升贴水
-goodscode	:string;//期货合约
-goodsid	:number;//期货商品id
-goodsname	:string;//商品名称
-haswr	:number;//是否有仓单-卖方 - number;
-//:无仓单 1:有仓单
-isspecified	:number;//是否指定对手 - number;
-//:不指定 1:指定 - [挂牌]
-ladingbillid	:string;//提单ID(2number;
-//8+Unix秒时间戳(1number;
-//位)+xxxxxx)
-marginvalue	:number;//保证金设置值(履约保证金)
-marketid	:number;//市场ID
-matchusername	:string;//对手方名称(当ISSPECIFIED=1时,有值,指定朋友的名称)
-minivalue	:number;//现货商品最小变动值
-optioncompare	:string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-orderqty	:number;//委托数量
-ordertime	:string;//委托时间(挂牌时间)
-performancetemplateid	:number;//履约模板id
-pricemove	:number;//升贴水(浮动价时填写) - [挂牌]
-taname	:string;//交易用户名称(资金账号名称)
-tradedate	:string;//交易日(yyyyMMdd)
-tradeprice	:number;//成交价格 - [摘牌] (浮动价 ((商品1价格商品1价格系数+升贴水) 商品1重量系数 + 商品2价格商品2价格系数+商品2升贴水) 商品2重量系数 …) 委托单价格系数 + 委托单升贴水)
-tradeqty	:number;//成交数量
-userid	:number;//用户ID
-validtime	:string;//挂牌有效期
-warehouseid	:number;//仓库ID
-warehousename	:string;//仓库名称
-wrfactortypeid	:string;//仓单要素类型ID(212+Unix秒时间戳(1number;
-//位)+xxxxxx)
-wrfactortypename	:string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-wrpricetype	:number;//价格方式 - 1:固定价 2-浮动价 - [挂牌]
-wrstandardcode	:string;//现货商品代码
-wrstandardid	:number;//现货商品ID
-wrstandardname	:string;//商品名称
-wrtradeorderid	:string;//仓单贸易委托单ID(32number;
-//+Unix秒时间戳(1number;
-//位)+xxxxxx)
-wrtradeorderstatus	:number;//委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:部成 8:已成 9:部成部撤 1number;
-//:成交失败 11:委托拒绝 12:经过摘牌(先摘后挂专用) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用) 17:冻结PD成功 18:冻结PD失败 19:冻结能量成功 2number;
-//:冻结能量失败 21:预约已报价 22:过期未付 23:优惠券处理中 24:仓单生成失败 25:首付扣款失败 26:履约失败 27:撤单解冻贷款失败
-wrtradetype	:number;//仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
-wrtypename	:string;//商品
+export interface Name {
+    applicantid: number;//申请人
+    applysrc: number;//申请来源 - 1:管理端 2:终端
+    applystatus: number;//申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+    applytime: string;//申请时间
+    auditorid: number;//审核人
+    auditremark: string;//审核备注
+    auditsrc: number;//审核来源 - 1:管理端 2:终端
+    audittime: string;//审核时间
+    audittradedate: string;//审核交易日(yyyyMMdd)
+    brokerapplyid: number;//申请ID(SEQ_BROKERAPPLY)
+    cardbackphotourl: string;//证件背面图片地址
+    cardfrontphotourl: string;//证件正面图片地址
+    cardnum: string;//证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证
+    customername: string;//姓名
+    logincode: string;//登录代码
+    mobile: string;//手机号码
+    parentuserid: number;//所属机构id
+    parentusername: string;//所属机构名称
+    refereeuserid: number;//推荐人id(经纪人)
+    refernum: string;//推荐码
+    remark: string;//备注
+    subarealevelpath: string;//层级路径
+    tradedate: string;//交易日(yyyyMMdd)
+    userid: number;//申请人用户ID
+    userinfotype: number;//用户类型 1-个人 2-企业
+    username: string;//用户名称
 }

+ 49 - 121
swagger-to-ts/swagger.txt

@@ -1,151 +1,79 @@
 {
-    accountid	integer
-交易账号(资金账号)
+    applicantid	integer
+申请人
 
-allfriendsflag	integer
-是否全好友可见 - 0:否 1:是
+applysrc	integer
+申请来源 - 1:管理端 2:终端
 
-amount	number
-挂牌金额 = 委托数量 * 固定价或升贴水
+applystatus	integer
+申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
 
-buyorsell	integer
-买卖 - 0:买 1:卖(挂牌类型 买为采购 卖为销售)
+applytime	string
+申请时间
 
-canbargain	integer
-是否可议价 - 0:不可 1:可
+auditorid	integer
+审核人
 
-cancelqty	number
-撤销数量
+auditremark	string
+审核备注
 
-canpart	integer
-是否允许部份摘牌 - 0:不允许(要求整单) 1:允许(可以不整单)
+auditsrc	integer
+审核来源 - 1:管理端 2:终端
 
-delistminqty	integer
-起摘数量
+audittime	string
+审核时间
 
-deliverygoodscode	string
-品种代码
+audittradedate	string
+审核交易日(yyyyMMdd)
 
-deliverygoodsid	integer
-品种ID
+brokerapplyid	integer
+申请ID(SEQ_BROKERAPPLY)
 
-deliverygoodsname	string
-品种名称
+cardbackphotourl	string
+证件背面图片地址
 
-deliverymonth	string
-交收月
+cardfrontphotourl	string
+证件正面图片地址
 
-enumdicname	string
-单位名称
+cardnum	string
+证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证
 
-fixedprice	number
-固定价格 - [挂牌]
+customername	string
+姓名
 
-freezemargin	number
-冻结保证金(保证金)
+logincode	string
+登录代码
 
-futupricemove	number
-期货升贴水
+mobile	string
+手机号码
 
-futushow	string
-期货合约/升贴水
+parentuserid	integer
+所属机构id
 
-goodscode	string
-期货合约
+parentusername	string
+所属机构名称
 
-goodsid	integer
-期货商品id
+refereeuserid	integer
+推荐人id(经纪人)
 
-goodsname	string
-商品名称
+refernum	string
+推荐码
 
-haswr	integer
-是否有仓单-卖方 - 0:无仓单 1:有仓单
+remark	string
+备注
 
-isspecified	integer
-是否指定对手 - 0:不指定 1:指定 - [挂牌]
-
-ladingbillid	string
-提单ID(208+Unix秒时间戳(10位)+xxxxxx)
-
-marginvalue	number
-保证金设置值(履约保证金)
-
-marketid	integer
-市场ID
-
-matchusername	string
-对手方名称(当ISSPECIFIED=1时,有值,指定朋友的名称)
-
-minivalue	integer
-现货商品最小变动值
-
-optioncompare	string
-选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-
-orderqty	number
-委托数量
-
-ordertime	string
-委托时间(挂牌时间)
-
-performancetemplateid	integer
-履约模板id
-
-pricemove	number
-升贴水(浮动价时填写) - [挂牌]
-
-taname	string
-交易用户名称(资金账号名称)
+subarealevelpath	string
+层级路径
 
 tradedate	string
 交易日(yyyyMMdd)
 
-tradeprice	number
-成交价格 - [摘牌] (浮动价 ((商品1价格商品1价格系数+升贴水) 商品1重量系数 + 商品2价格商品2价格系数+商品2升贴水) 商品2重量系数 …)* 委托单价格系数 + 委托单升贴水)
-
-tradeqty	number
-成交数量
-
 userid	integer
-用户ID
-
-validtime	string
-挂牌有效期
-
-warehouseid	integer
-仓库ID
-
-warehousename	string
-仓库名称
-
-wrfactortypeid	string
-仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-
-wrfactortypename	string
-仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-
-wrpricetype	integer
-价格方式 - 1:固定价 2-浮动价 - [挂牌]
-
-wrstandardcode	string
-现货商品代码
-
-wrstandardid	integer
-现货商品ID
-
-wrstandardname	string
-商品名称
-
-wrtradeorderid	string
-仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
-
-wrtradeorderstatus	integer
-委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:部成 8:已成 9:部成部撤 10:成交失败 11:委托拒绝 12:经过摘牌(先摘后挂专用) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用) 17:冻结PD成功 18:冻结PD失败 19:冻结能量成功 20:冻结能量失败 21:预约已报价 22:过期未付 23:优惠券处理中 24:仓单生成失败 25:首付扣款失败 26:履约失败 27:撤单解冻贷款失败
+申请人用户ID
 
-wrtradetype	integer
-仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
+userinfotype	integer
+用户类型 1-个人 2-企业
 
-wrtypename	string
-商品
+username	string
+用户名称
 }

+ 13 - 4
tsconfig.json

@@ -15,10 +15,19 @@
         "baseUrl": "./",
         "isolatedModules": true,
         "paths": {
-            "@/*": ["src/*"]
+            "@/*": [
+                "src/*"
+            ]
         },
         "strictPropertyInitialization": false
     },
-    "include": ["src/**/*.ts", "src/**/*.vue", "babel.config.js"],
-    "exclude": ["node_modules"]
-}
+    "include": [
+        "src/**/*.ts",
+        "src/**/*.tsx",
+        "src/**/*.vue",
+        "babel.config.js"
+    ],
+    "exclude": [
+        "node_modules"
+    ]
+}

+ 3 - 3
vue.config.js

@@ -64,7 +64,7 @@ module.exports = {
 								warnings: false,
 								drop_console: true, //console
 								drop_debugger: false,
-								pure_funcs: [ 'console.log' ] //移除console
+								pure_funcs: ['console.log'] //移除console
 							}
 						}
 					})
@@ -106,7 +106,7 @@ module.exports = {
 			//   'vuex': 'Vuex'
 			// } // 防止将某些 import 的包(package)打包到 bundle 中,而是在运行时(runtime)再去从外部获取这些扩展依赖(用于csdn引入)
 			resolve: {
-				extensions: [ '.js', '.vue', '.json', '.ts' ], //文件优先解析后缀名顺序
+				extensions: ['.js', '.vue', '.json', '.ts', '.tsx'], //文件优先解析后缀名顺序
 				alias: {
 					'@': path.resolve('./src')
 				}, // 别名配置
@@ -161,7 +161,7 @@ module.exports = {
 		port: 8888,
 		https: false,
 		hotOnly: false,
-		before: () => {}
+		before: () => { }
 	},
 	// 第三方插件配置
 	pluginOptions: {}