瀏覽代碼

commit 账户详细以及接口说明

xkwg 4 年之前
父節點
當前提交
7731ddaf2b

+ 26 - 0
public/proto/mtp.proto

@@ -870,6 +870,32 @@ message ErmcpContractOperateApplyInfo {
 	optional bytes DetailJson = 3; // bytes 明细JSON
 	optional bytes AttachUrl = 4; // bytes 附件
 }
+// 套保计划请求 0 29 164
+message ErmcpHedgePlanReq {
+	optional MessageHead Header = 1; // MessageHead
+	optional uint64 HedgePlanID = 2; // uint64 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
+		optional string HedgePlanNo = 3; // string 套保计划名称
+		optional int32 ContractType = 4; // int32 计划类型-1:采购-1:销售
+		optional uint64 AreaUserID = 5; // uint64 机构ID
+		optional uint64 DeliveryGoodsID = 6; // uint64 现货品种ID
+		optional int32 ProductType = 7; // int32 产品类型-1:标准仓单2:等标3:非标
+		optional string SpotGoodsDesc = 8; // string 商品型号
+		optional double PlanQty = 9; // double 计划数量
+		optional double ConvertFactor = 10; // double 标仓系数
+		optional string PlanTime = 11; // string 计划时间
+		optional string TradeDate = 12; // string 交易日(yyyyMMdd)
+		optional int32 ApplySrc = 13; // int32 申请来源 - 1:管理端 2:终端
+		optional uint64 ApplyId = 14; // uint64 申请人
+		optional string Remark = 15; // string 计划备注
+	optional int32 OperateType = 16; // int32 操作类型-1:保存草稿2:提交申请
+}
+// 套保计划响应 0 29 165
+message ErmcpHedgePlanRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+}
+
 
 
 

+ 5 - 1
src/services/funcode/index.ts

@@ -74,10 +74,14 @@ export const funCode: Code = {
     WareHouseStateChangeReq: 1900687,    /// 仓库状态修改请求
     WareHouseStateChangeRsp: 1900688,    /// 仓库状态修改响应
 
-
+    // 现货合同 -- 新增现货合同
     GldErmcpSpotContractOperateReq: 1900711,    /// 现货合同操作请求(1179653)
     GldErmcpSpotContractOperateRsp: 1900712,    /// 现货合同操作响应(1179654)
 
     ContractOperateApplyReq: 1179656, // 合同操作请求(1179656)
     ContractOperateApplyRsp: 1179657, // 合同操作响应(1179657)
+
+    // 套保计划 -- 新增套保计划
+    ErmcpHedgePlanReq: 1900708,  /// 套保计划操作请求(1179650)
+    ErmcpHedgePlanRsp: 1900709,  /// 套保计划操作响应(1179651)
 };

+ 1 - 1
src/services/go/ermcp/customInfo/index.ts

@@ -4,7 +4,7 @@ import { BaseResponse, commonSearch_go, commonUpdate_go } from '@/services/go/in
 import APP from '@/services';
 import { QueryCustomInfoEnum } from './type';
 import { AddUserInfoApplyReq, ModifyUserInfoApplyReq, QueryCustomInfoType } from './interface';
-
+/** ================================= 信息 客户资料 ================================**/
 /**
  * 查询客户资料
  * @param MemberUserID  所属机构用户ID

+ 1 - 1
src/services/go/ermcp/exposure-report/index.ts

@@ -1,4 +1,4 @@
-/** ================================= 敞口报表 ================================**/
+/** ================================= 报表 - 敞口报表 ================================**/
 
 import APP from '@/services';
 import * as type from './interface';

+ 1 - 1
src/services/go/ermcp/exposure/index.ts

@@ -2,7 +2,7 @@ import APP from '@/services';
 import { commonSearch_go } from '@/services/go';
 import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail, Ermcp3AreaSpotDetailReq, Ermcp3ExposureDetail, Ermcp3ExposureReq, ErmcpExposurePostion, ErmcpExposurePostionReq, ErmcpHedgePosition, ErmcpHedgePositionDetail, ErmcpHedgePositionDetailReq, ErmcpRealExposureModel } from '@/services/go/ermcp/exposure/interface';
 
-/** ================================= 敞口 ================================**/
+/** ================================= 业务 - 敞口 ================================**/
 
 /**
  * 请求实时敞口 (敞口 -> 实时敞口) /Ermcp/QueryRealtimeExposure

+ 1 - 1
src/services/go/ermcp/finance-report/index.ts

@@ -1,4 +1,4 @@
-/** ================================= 财务报表 ================================**/
+/** ================================= 报表 - 财务报表 ================================**/
 
 import APP from '@/services';
 import * as type from './interface';

+ 1 - 1
src/services/go/ermcp/finance-review/index.ts

@@ -1,4 +1,4 @@
-/** ================================= 财务审核 ================================**/
+/** ================================= 管理 - 财务审核 ================================**/
 import {
     QryBussinessFpRsp,
     QryBussinessKxRsp,

+ 1 - 1
src/services/go/ermcp/goodsInfo/index.ts

@@ -1,4 +1,4 @@
-/** ================================= 现货商品信息 ================================**/
+/** ================================= 信息 - 现货商品信息 ================================**/
 
 import APP from '@/services';
 import { commonSearch_go } from '@/services/go/index';

+ 1 - 1
src/services/go/ermcp/inventory-report/index.ts

@@ -1,4 +1,4 @@
-/** ================================= 库存报表 ================================**/
+/** ================================= 报表 - 库存报表 ================================**/
 import APP from '@/services';
 import * as type from './interface';
 import { commonSearch_go } from '@/services/go/index';

+ 3 - 4
src/services/go/ermcp/inventory-review/index.ts

@@ -1,14 +1,13 @@
 import { commonSearch_go } from '@/services/go';
 import { Ermcp3AreaStockApply, QueryAreaStockApplyReq } from '@/services/go/ermcp/inventory-review/interface';
 
-/** ================================= 库存审核 ================================**/
-
+/** ================================= 管理 - 库存审核 ================================**/
 /**
- * 查询库存申请(出入库记录|库存审核)  /Ermcp3/QueryAreaStockApply
+ * 查询库存申请(出入库记录|库存审核)  /Ermcp3/QueryAreaStockApply  (这个审核和库存管理 - 申请记录) 调用的是同一个接口
  * @param req.userid 用户ID(必填)
  * @constructor
  */
-export function QueryAreaStock(req: QueryAreaStockApplyReq): Promise<Ermcp3AreaStockApply[]> {
+export function QueryAreaStockApply(req: QueryAreaStockApplyReq): Promise<Ermcp3AreaStockApply[]> {
     return commonSearch_go('/Ermcp3/QueryAreaStockApply', req).catch((err) => {
         throw new Error(`查询库存申请: ${err.message}`);
     });

+ 0 - 2
src/services/go/ermcp/inventory-review/interface.ts

@@ -9,8 +9,6 @@ export interface QueryAreaStockApplyReq{
     warehouseinfoid?: number // 仓库ID
     applystatus?: string // 申请状态(可多项,逗号隔开)1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
 }
-
-
 // 查询库存返回
 export interface Ermcp3AreaStockApply{
     applyid	:number;//申请人

+ 1 - 1
src/services/go/ermcp/plan/index.ts

@@ -1,7 +1,7 @@
 import { commonSearch_go } from '@/services/go';
 import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
 
-/** ================================= 计划 ================================**/
+/** ================================= 业务 - 计划 ================================**/
 
 /**
  * 查询套保计划 /Ermcp3/QueryHedgePlan

+ 1 - 1
src/services/go/ermcp/plan/interface.ts

@@ -6,7 +6,7 @@ export interface Ermcp3HedgePlan{
     createtime	:string;//创建时间
     deliverygoodscode	:string;//现货品种代码
     deliverygoodsid	:number;//现货品种ID
-    deliverygoodsname	:string;//现货品种名称
+    deliverygoodsname	:string;//现货品种名称8
     enumdicname	:string;//单位名称
     hedgeplanid	:string;//套保计划ID(6number;
 //1+Unix秒时间戳(1number;

+ 2 - 0
src/services/go/ermcp/purchase/index.ts

@@ -22,3 +22,5 @@ export function QueryPurchase(req: SellBuyContractReq): Promise<Ermcp3SellBuyCon
         throw new Error(`查询采购信息: ${err.message}`);
     });
 }
+
+

+ 19 - 4
src/services/go/ermcp/search-inventory/index.ts

@@ -1,14 +1,29 @@
 import {commonSearch_go} from "@/services/go";
-import {Ermcp3AreaStock} from "@/services/go/ermcp/search-inventory/interface";
+import {
+    Ermcp3AreaStock,
+    Ermcp3AreaStockApply,
+    QueryAreaStockApplyReq
+} from "@/services/go/ermcp/search-inventory/interface";
 
 /** ================================= 库存查询 ================================**/
 /**
- * 查询机构库存(库存管理/当前库存) /Ermcp3/QueryAreaStock
+ * 查询机构库存(库存查询/当前库存) /Ermcp3/QueryAreaStock
  * @param userid
  * @constructor
  */
 export function QueryAreaStock(userid: number): Promise<Ermcp3AreaStock[]>{
-    return commonSearch_go('/Ermcp3/QuerySpotContractBS', {userid}).catch((err) => {
+    return commonSearch_go('/Ermcp3/QueryAreaStock', {userid}).catch((err) => {
         throw new Error(`查询机构库存(库存管理/当前库存): ${err.message}`);
     });
-}
+}
+
+/**
+ * 查询库存申请(库存查询|库存审核)  /Ermcp3/QueryAreaStockApply  (管理 - 库存审核) 调用的是同一个接口
+ * @param req
+ * @constructor
+ */
+export function QueryAreaStockApply(req: QueryAreaStockApplyReq): Promise<Ermcp3AreaStockApply[]> {
+    return commonSearch_go('/Ermcp3/QueryAreaStockApply', req).catch((err) => {
+        throw new Error(`查询库存申请: ${err.message}`);
+    });
+}

+ 63 - 2
src/services/go/ermcp/search-inventory/interface.ts

@@ -1,5 +1,3 @@
-
-
 // 查询机构库存(库存管理/当前库存)
 export interface Ermcp3AreaStock{
     brandname	:string;//品牌名称
@@ -27,3 +25,66 @@ export interface Ermcp3AreaStock{
     wrstandardid	:string;//品类ID
     wrstandardname	:string;//品类名称
 }
+
+/**
+ * 查询库存申请请求
+ */
+export interface QueryAreaStockApplyReq{
+    userid: number  // 用户ID
+    deliverygoodsid?: number  // 现货商品ID
+    inouttype?: string  // 出入库类型(可多项,逗号隔开) 1:采购入库 2:销售出库 3:生产入库 4:生产出库
+    spotcontractid?: number // 合同ID
+    wrstandardid?: number  // 品类ID
+    spotgoodsbrandid?: number // 品牌ID
+    warehouseinfoid?: number // 仓库ID
+    applystatus?: number  // 申请状态(可多项,逗号隔开)1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+}
+
+
+// 查询库存申请(出入库记录|库存审核)
+export interface Ermcp3AreaStockApply{
+    applyid	:number;//申请人
+    applyname	:string;//申请人名称
+    applyremark	:string;//申请备注
+    applysrc	:number;//申请来源 - 1:管理端 2:终端
+    applystatus	:number;//申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+    applytime	:string;//申请时间
+    auditid	:number;//审核人
+    auditname	:string;//审核人名称
+    auditremark	:string;//审核备注
+    auditsrc	:number;//审核来源 - 1:管理端 2:终端
+    audittime	:string;//审核时间
+    audittradedate	:string;//审核交易日(yyyyMMdd)
+    brandname	:string;//品牌名称
+    buynickname	:string;//采购方昵称
+    buyuserid	:number;//采购方userid
+    buyusername	:string;//采购方名称
+    contractno	:string;//合同编号
+    contractqty	:number;//合同量
+    contracttype	:number;//现货合同类型 - 1:采购 -1:销售
+    deliverygoodscode	:string;//现货品种代码
+    deliverygoodsid	:number;//现货品种id
+    deliverygoodsname	:string;//现货品种名称
+    enumdicname	:string;//现货商品单位名称
+    inoutapplyid	:string;//申请ID(6number;
+//7+Unix秒时间戳(1number;
+//位)+xxxxxx)
+    inouttype	:number;//出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库
+    pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
+    qty	:number;//数量
+    sellnickname	:string;//销售方昵称
+    selluserid	:number;//销售方userid
+    sellusername	:string;//销售方名称
+    spotcontractid	:string;//关联现货合同ID
+    spotgoodsbrandid	:number;//现货品牌ID
+    unitid	:number;//单位id
+    userid	:number;//机构ID
+    warehousecode	:string;//仓库代码
+    warehouseinfoid	:string;//现货仓库ID
+    warehousename	:string;//仓库名称
+    warehousetype	:number;//仓库类型 - 1 厂库 2 自有库 3 合作库
+    wrstandardcode	:string;//品类代码
+    wrstandardid	:number;//品类ID
+    wrstandardname	:string;//品类名称
+}
+

+ 1 - 0
src/services/proto/accountinfo/index.ts

@@ -0,0 +1 @@
+//

+ 37 - 0
src/services/proto/hedgeplan/index.ts

@@ -0,0 +1,37 @@
+// 套保计划
+import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
+import APP from "@/services";
+import {Callback} from "@/utils/websocket";
+import {ErmcpHedgePlanReq} from "@/services/proto/hedgeplan/interface";
+
+/**
+ * 套保计划操作请求
+ * @param param.hedgePlanID Long 套保计划id
+ * @param param.OperateType Int 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回
+ */
+export const operationContractReq = (param: ErmcpHedgePlanReq): Promise<any> => {
+    return new Promise((resolve, reject) => {
+        const params = {
+            protobufName: 'ErmcpHedgePlanReq',
+            funCodeName: 'ErmcpHedgePlanReq',
+            reqParams:  param,
+            msgHeadParams: {
+                AccountID: param.accountid,
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'ErmcpHedgePlanRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}

+ 25 - 0
src/services/proto/hedgeplan/interface.ts

@@ -0,0 +1,25 @@
+// 套保计划请求 0 29 164
+export interface ErmcpHedgePlanReq {
+    accountid: string  // header 需要用到
+    HedgePlanID: number // uint64 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
+    HedgePlanNo: string // string 套保计划名称
+    ContractType: number // int32 计划类型-1:采购-1:销售
+    AreaUserID: number// uint64 机构ID
+    DeliveryGoodsID: number// uint64 现货品种ID
+    ProductType: number // int32 产品类型-1:标准仓单2:等标3:非标
+    SpotGoodsDesc: string // string 商品型号
+    PlanQty: number // double 计划数量
+    ConvertFactor: number // double 标仓系数
+    PlanTime: string // string 计划时间
+    TradeDate: string // string 交易日(yyyyMMdd)
+    ApplySrc: number // int32 申请来源 - 1:管理端 2:终端
+    ApplyId: number // uint64 申请人
+    Remark: string // string 计划备注
+    OperateType: number // int32 操作类型-1:保存草稿2:提交申请
+}
+
+// 套保计划响应 0 29 165
+export interface  ErmcpHedgePlanRsp {
+    RetCode: number // int32 返回码
+    RetDesc: string // string 描述信息
+}

+ 4 - 0
src/services/proto/warehouse/interface.ts

@@ -20,4 +20,8 @@ export interface WarehouseStateChangeReq {
     accountid: number
     warehouseid: number // uint64 仓库ID
     warehousestatus: number // int32 仓库状态 - 1:正常 2:注销 3:待审核 4:审核拒绝
+}
+
+export interface Ermcp3AreaStockApply {
+
 }

+ 30 - 15
src/views/information/custom/compoments/detail/index.vue

@@ -11,56 +11,55 @@
                 :loading="loading"
                 @click="submit">关闭</a-button>
     </template>
-    <div>{{detail.nickname}}</div>
     <a-form class="inlineForm"
             :form="form"
             @submit="handleSearch">
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="客户类型">
-            <span class="white">企业</span>
+            <span class="white">{{ detail.userinfotype === '2' ? '企业' : '个人' }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="企业名称">
-            <span class="white">深圳市前海矿业有限公司</span>
+            <span class="white">{{ detail.customername }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="企业简称">
-            <span class="white">前海矿业</span>
+            <span class="white">{{ detail.nickname }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="证件类型">
-            <span class="white">营业执照</span>
+            <span class="white">{{ detail.cardtypename }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="法定代表人">
-            <span class="white">李顺利</span>
+            <span class="white">{{ detail.legalpersonname }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="证件号码">
-            <span class="white">4328648236492432</span>
+            <span class="white">{{ detail.cardnum }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="纳税人识别号">
-            <span class="white">57465736DR46456</span>
+            <span class="white">{{ detail.taxpayernum }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="营业执照">
             <div class="upload">
-              <a class="blue">查看附件</a>
+                <div class="look">查看附件</div>
             </div>
           </a-form-item>
         </a-col>
@@ -68,38 +67,38 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="联系人">
-            <span class="white">王平</span>
+            <span class="white">{{ detail.contactname }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="联系人手机号">
-            <span class="white">13745653421</span>
+            <span class="white">{{ detail.mobile }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="联系电话">
-            <span class="white">0755-34342544</span>
+            <span class="white">{{ detail.telphone }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="状态">
-            <span class="green">正常</span>
+            <span class="green">{{ detail.status }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="24">
           <a-form-item label="通讯地址">
-            <span class="white">广东省深圳市南山区前海街道路平路1324号</span>
+            <span class="white">{{ detail.address }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="24">
           <a-form-item label="备注">
-            <span class="white">深圳市前海矿业有限公司</span>
+            <span class="white">{{ detail.remark }}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -112,6 +111,7 @@ import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
+import {getStatusName} from "@/views/information/custom/setup";
 
 export default defineComponent({
     name: 'custom-detail',
@@ -126,6 +126,18 @@ export default defineComponent({
         const { visible, cancel } = closeModal('detail');
         const detail = reactive({
             nickname: props.selectedRow.nickname || '--',
+            userinfotype: props.selectedRow.userinfotype || '--',
+            customername: props.selectedRow.customername || '--',
+            cardtypename: props.selectedRow.cardtypename || '--',
+            legalpersonname: props.selectedRow.legalpersonname || '--',
+            cardnum: props.selectedRow.cardnum || '--',
+            taxpayernum: props.selectedRow.taxpayernum || '--',
+            contactname: props.selectedRow.contactname || '--',
+            mobile: props.selectedRow.mobile || '--',
+            telphone: props.selectedRow.telphone || '--',
+            status: getStatusName(props.selectedRow.status) || '--',
+            address: props.selectedRow.address || '--',
+            remark: props.selectedRow.remark || '--'
         });
         const loading = ref<boolean>(false);
         function submit() {
@@ -143,7 +155,10 @@ export default defineComponent({
             detail,
         };
     },
+
 });
+
+
 </script>
 
 <style lang="less">

+ 28 - 0
src/views/information/custom/setup.ts

@@ -0,0 +1,28 @@
+/**
+ * 获取客户资料状态
+ * @param state
+ */
+export function getStatusName(state: number) : string{
+    let result : string = "--";
+    switch (state){
+        case 1:
+            result = "待激活";
+            break
+        case 2:
+            result = "待审核";
+            break
+        case 3:
+            result = "待复审";
+            break
+        case 4:
+            result = "正常";
+            break
+        case 5:
+            result = "审核拒绝";
+            break
+        case 6:
+            result = "注销";
+            break
+    }
+    return result
+}