Przeglądaj źródła

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

zhou.xiaoning 4 lat temu
rodzic
commit
c70cfc1daa
42 zmienionych plików z 1183 dodań i 613 usunięć
  1. 5 0
      public/config/readMe.txt
  2. 26 0
      public/proto/mtp.proto
  3. 82 0
      src/assets/styles/mixin.less
  4. 1 0
      src/assets/styles/variables.less
  5. 1 1
      src/common/components/buttonList/interface.ts
  6. 87 75
      src/common/components/thirdMenu/index.vue
  7. 2 0
      src/common/setup/contextMenu/index.ts
  8. 42 0
      src/common/setup/customModule/index.ts
  9. 2 1
      src/common/setup/event/index.ts
  10. 2 1
      src/layout/components/main.vue
  11. 5 1
      src/services/funcode/index.ts
  12. 1 1
      src/services/go/ermcp/customInfo/index.ts
  13. 1 1
      src/services/go/ermcp/exposure-report/index.ts
  14. 2 2
      src/services/go/ermcp/exposure/index.ts
  15. 123 123
      src/services/go/ermcp/exposure/interface.ts
  16. 1 1
      src/services/go/ermcp/finance-report/index.ts
  17. 1 1
      src/services/go/ermcp/finance-review/index.ts
  18. 1 1
      src/services/go/ermcp/goodsInfo/index.ts
  19. 1 1
      src/services/go/ermcp/inventory-report/index.ts
  20. 3 4
      src/services/go/ermcp/inventory-review/index.ts
  21. 0 2
      src/services/go/ermcp/inventory-review/interface.ts
  22. 1 1
      src/services/go/ermcp/plan/index.ts
  23. 1 1
      src/services/go/ermcp/plan/interface.ts
  24. 2 0
      src/services/go/ermcp/purchase/index.ts
  25. 19 4
      src/services/go/ermcp/search-inventory/index.ts
  26. 63 2
      src/services/go/ermcp/search-inventory/interface.ts
  27. 1 0
      src/services/proto/accountinfo/index.ts
  28. 37 0
      src/services/proto/hedgeplan/index.ts
  29. 25 0
      src/services/proto/hedgeplan/interface.ts
  30. 4 0
      src/services/proto/warehouse/interface.ts
  31. 2 2
      src/services/socket/quota/adapter/index.ts
  32. 1 1
      src/utils/objHandle/index.ts
  33. 120 70
      src/views/business/exposure/list/futures/index.vue
  34. 100 18
      src/views/business/exposure/list/realTime/index.vue
  35. 79 0
      src/views/business/purchase/setup.ts
  36. 44 16
      src/views/information/custom/compoments/detail/index.vue
  37. 0 27
      src/views/information/custom/compoments/filterTable/index.vue
  38. 54 8
      src/views/information/custom/list/normal-use/index.vue
  39. 0 74
      src/views/information/custom/list/setup.ts
  40. 106 69
      src/views/information/custom/list/stop-use/index.vue
  41. 28 0
      src/views/information/custom/setup.ts
  42. 107 104
      src/views/setting/notice/components/noticeContent.vue

+ 5 - 0
public/config/readMe.txt

@@ -8,6 +8,11 @@ http://192.168.31.114:8080/cfg?key=test_114
 http://192.168.30.211:8080/cfg?key=test_211
 
 透传  "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175"
+
+"apiUrl": "http://218.17.158.45:21001/cfg?key=test_175"
+
+"apiUrl": "http://192.168.30.211:8080/cfg?key=test_211"
+
 账号 110000000001
     199990000012
     199990000013

+ 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 描述信息
+}
+
 
 
 

+ 82 - 0
src/assets/styles/mixin.less

@@ -543,4 +543,86 @@
 }
 .grey {
     color: @m-grey2;
+}
+.selectBtn.ant-btn {
+    margin-left: 10px;
+    width: 80px;
+    height: 30px;
+    line-height: 31px;
+    text-align: center;
+    background: linear-gradient(0deg, @m-grey15 0%, @m-grey16 98%);
+    border: 0;
+    color: @m-white0;
+    font-size: 14px;
+    .rounded-corners(3px);
+    &:hover,
+    &:focus {
+        background: linear-gradient(0deg, @m-grey15-hover 0%, @m-grey16-hover 98%);
+        color: rgba(@m-white0, 0.8);
+        border: 0;
+    }
+}
+.btnPrimary.ant-btn,.operBtn.ant-btn {
+    margin-left: 10px;
+    width: 80px;
+    height: 30px;
+    line-height: 31px;
+    text-align: center;
+    background: linear-gradient(0deg, @m-blue6 0%, @m-blue7 99%);
+    border: 0;
+    color: @m-white0;
+    font-size: 14px;
+    .rounded-corners(3px);
+    &:hover,
+    &:focus {
+        background: linear-gradient(0deg, @m-blue6-hover 0%, @m-blue7-hover 99%);
+        color: rgba(@m-white0, 0.8);
+        border: 0;
+    }
+}
+.ant-table-expanded-row {
+    .btn-list {
+        padding-right: 10px;
+        text-align: right;
+    }
+    .btnPrimary.ant-btn {
+        width: 80px;
+        height: 26px;
+        line-height: 27px;
+        border: 0;
+        background: linear-gradient(0deg, @m-blue2, @m-blue0);
+        box-shadow: -1px 0px 0px 0px @m-black10;
+        .rounded-corners(3px);
+        &:hover,
+    &:focus {
+        background: linear-gradient(0deg, @m-blue2-hover 0%, @m-blue0-hover 99%);
+        color: rgba(@m-white0, 0.8);
+        border: 0;
+    }
+    }
+    .btnDanger.ant-btn:extend(.ant-table-expanded-row .btnPrimary.ant-btn) {
+        background: linear-gradient(0deg, @m-red0, @m-red1);
+        color: @m-white0;
+        font-size: 14px;
+        &:hover,
+        &:focus {
+            background: linear-gradient(0deg, @m-red0-hover 0%, @m-red1-hover 99%);
+            color: rgba(@m-white0, 0.8);
+            border: 0;
+        }
+    }
+    .btnDeafault.ant-btn:extend(.ant-table-expanded-row .btnPrimary.ant-btn) {
+        background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%);
+        color: @m-white0;
+        font-size: 14px;
+        &:hover,
+        &:focus {
+            background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 99%);
+            color: rgba(@m-white0, 0.8);
+            border: 0;
+        }
+    }
+    .ant-btn+.ant-btn {
+        margin-left: 10px;
+    }
 }

+ 1 - 0
src/assets/styles/variables.less

@@ -42,6 +42,7 @@
 @m-black7: #15293A;
 @m-black8: #212629;
 @m-black9: #161A1C;
+@m-black10: #121618;
 @m-blue0: #3a87f7;
 @m-blue0-hover: rgba(@m-blue0, .8);
 @m-blue1: #4885eb;

+ 1 - 1
src/common/components/buttonList/interface.ts

@@ -1,4 +1,4 @@
-export type BtnClassName = 'btnDeafault' | 'btnPrimary' | 'btnDanger'
+export type BtnClassName = 'btnDeafault' | 'btnPrimary' | 'btnDanger' | 'operBtn'
 export interface BtnList {
     lable: string;  // 按钮名字
     callback: Function;

+ 87 - 75
src/common/components/thirdMenu/index.vue

@@ -1,95 +1,107 @@
 <template>
-    <div class="thirdMenu">
-        <a-tabs default-active-key="1" @change="callback">
-            <a-tab-pane key="1" tab="一口价挂牌"> </a-tab-pane>
-            <a-tab-pane key="2" tab="浮动价挂牌"> </a-tab-pane>
-        </a-tabs>
-    </div>
+  <div class="thirdMenu">
+    <a-tabs :default-active-key="current"
+            @change="menuClick">
+      <a-tab-pane :key="String(index)"
+                  v-for="(item, index) in list"
+                  :tab="item[value]"> </a-tab-pane>
+    </a-tabs>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref, PropType } from 'vue';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
 
-    interface Key {
-        [propName: string]: string;
-    }
+interface Key {
+    [propName: string]: string;
+}
 
-    export default defineComponent({
-        name: 'third-menu',
-        props: {
-            list: {
-                default: [],
-                type: Object as PropType<Key[]>,
-            },
-            value: {
-                // 需要绑定的值得 key
-                default: '',
-                type: String,
-            },
+export default defineComponent({
+    name: 'third-menu',
+    props: {
+        list: {
+            default: [],
+            type: Object as PropType<Key[]>,
         },
-        components: {},
-        setup(props, context) {
-            function callback(key: any) {
-                console.log(key);
-            }
-            return {
-                callback,
-            };
+        value: {
+            // 需要绑定的值得 key
+            default: 'lable',
+            type: String,
+        },
+        selectedKey: {
+            default: '0',
+            type: Array as PropType<string[]>,
         },
-    });
+    },
+    components: {},
+    setup(props, context) {
+        const current = ref<string[]>(['0']);
+        watchEffect(() => {
+            current.value = props.selectedKey;
+        });
+        function menuClick(value: string) {
+            context.emit('selectMenu', +value);
+        }
+        return {
+            current,
+            menuClick,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .noBorderBottom {
-        border-bottom: none;
-    }
-    .thirdMenu {
-        width: 100%;
-        height: 28px;
-        padding-bottom: 2px;
-        background-color: @m-black5;
-        z-index: 2;
-        .ant-tabs {
-            line-height: 26px;
-            .flex;
-            .ant-tabs-bar {
+.noBorderBottom {
+    border-bottom: none;
+}
+.thirdMenu {
+    width: 100%;
+    height: 28px;
+    padding-bottom: 2px;
+    background-color: @m-black5;
+    z-index: 2;
+    .ant-tabs {
+        line-height: 26px;
+        .flex;
+        .ant-tabs-bar {
+            margin-bottom: 0;
+            border-bottom: 0;
+            .ant-tabs-nav-container {
                 margin-bottom: 0;
-                border-bottom: 0;
-                .ant-tabs-nav-container {
+                line-height: 100%;
+                .ant-tabs-nav-wrap {
                     margin-bottom: 0;
-                    line-height: 100%;
-                    .ant-tabs-nav-wrap {
-                        margin-bottom: 0;
-                        .ant-tabs-nav-scroll {
-                            .ant-tabs-nav {
-                                .ant-tabs-tab {
-                                    width: 121px;
-                                    height: 26px;
-                                    line-height: 26px;
-                                    text-align: center;
-                                    color: @m-grey1;
-                                    padding: 0;
-                                    margin: 0;
-                                    background: url(../../../assets/images/tabbg.png) center center no-repeat;
-                                    background-size: cover;
-                                }
-                                .ant-tabs-tab-active.ant-tabs-tab {
-                                    color: @m-white0;
-                                    background: url(../../../assets/images/tabbgActive.png) center center no-repeat;
-                                    background-size: cover;
-                                    z-index: 2;
-                                }
-                                .ant-tabs-tab + .ant-tabs-tab {
-                                    margin-left: -14px;
-                                }
-                                .ant-tabs-ink-bar {
-                                    width: 0px !important;
-                                }
+                    .ant-tabs-nav-scroll {
+                        .ant-tabs-nav {
+                            .ant-tabs-tab {
+                                width: 121px;
+                                height: 26px;
+                                line-height: 26px;
+                                text-align: center;
+                                color: @m-grey1;
+                                padding: 0;
+                                margin: 0;
+                                background: url(../../../assets/images/tabbg.png) center center no-repeat;
+                                background-size: cover;
+                            }
+                            .ant-tabs-tab-active.ant-tabs-tab {
+                                color: @m-white0;
+                                background: url(../../../assets/images/tabbgActive.png) center center no-repeat;
+                                background-size: cover;
+                                z-index: 2;
+                            }
+                            .ant-tabs-tab + .ant-tabs-tab {
+                                margin-left: -14px;
+                            }
+                            .ant-tabs-ink-bar {
+                                width: 0px !important;
                             }
                         }
                     }
                 }
             }
         }
-    }</style
+    }
+}
+</style
 >;

+ 2 - 0
src/common/setup/contextMenu/index.ts

@@ -17,6 +17,8 @@ function getClassName(val: string): BtnClassName {
         result = 'btnDanger'
     } else if (val === '') {
         result = 'btnDeafault'
+    } else if (val.includes('add')) {
+        result = 'operBtn'
     } else {
         result = 'btnPrimary'
     }

+ 42 - 0
src/common/setup/customModule/index.ts

@@ -0,0 +1,42 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { TableKey } from '@/common/methods/table/interface';
+import { ref } from 'vue';
+
+// 表格数据模型
+export function getCustomModule<T>() {
+    // 表头数据
+    const columns = ref<ColumnType[]>([]);
+    // 表格数据
+    const customList = ref<T[]>([]);
+    // 过滤信息
+    const filteredInfo = ref();
+    // 加载状态
+    const loading = ref<boolean>(false);
+    // 表头数据更新
+    let columnsListToUpdate: Function = (): void => {};
+    // 注册表头
+    function getColumns(tableName: keyof TableKey, cb: Function) {
+        const list = getTableHead(tableName);
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield, // 表格数据对应的key
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            cb(e, item, filtered);
+            columns.value.push(item);
+        });
+    }
+    // 获取表格列表数据
+    function getColumnsList(cb: Function) {
+        columnsListToUpdate = () => cb();
+        columnsListToUpdate();
+    }
+
+    return { columns, customList, filteredInfo, loading, getColumns, getColumnsList, columnsListToUpdate };
+}

+ 2 - 1
src/common/setup/event/index.ts

@@ -1,6 +1,6 @@
 import { ref } from 'vue';
 
-export function handleTableEvent<T>() {
+export function handleTableEvent<T>(clickCB?: Function) {
     const expandedRowKeys = ref<string[]>([]); // 表格展开行
     const selectedRow = ref<T>()
     function Rowclick(record: T, index: number) {
@@ -9,6 +9,7 @@ export function handleTableEvent<T>() {
                 selectedRow.value = record;
                 const value = expandedRowKeys.value;
                 expandedRowKeys.value = value.length ? [] : [`${index}`];
+                clickCB && clickCB()
             },
             // onDblclick: () => { // 双击
             //     console.log('onDblclick');

+ 2 - 1
src/layout/components/main.vue

@@ -42,7 +42,8 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-.sexposure {
+.exposure {
+    height: 100%;
 }
 .noBorderBottom {
     border-bottom: none;

+ 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';

+ 2 - 2
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
@@ -34,7 +34,7 @@ export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp
  */
 export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promise<ErmcpExposurePostion[]> {
     const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
-    return commonSearch_go('/Ermcp3/QueryExposureDetail', { areaUserId, ...req }).catch((err) => {
+    return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', { areaUserId, ...req }).catch((err) => {
         throw new Error(`查询敞口 ->实时敞口 -> 期货明细: ${err.message}`);
     });
 }

+ 123 - 123
src/services/go/ermcp/exposure/interface.ts

@@ -1,184 +1,184 @@
 /**
  * 实时敞口信息返回
  */
-export interface ErmcpRealExposureModel{
-    AreaUserID	:number;//所属机构
-    BuyFutureQty	:number;//买入期货数量
-    BuyPlanQty	:number;//采购计划数量
-    BuyPricedQty	:number;//采购合同已定价数量
-    MiddleGoodsCode	:string;//套保品种代码
-    MiddleGoodsHedgeRatio	:number;//应套保比例
-    MiddleGoodsID	:number;//套保品种
-    MiddleGoodsName	:string;//套保品种名称
-    NeedHedgeExposoure	:number;//应套保敞口
-    NeedHedgeRatio	:number;//应套保敞口比例
-    OriBuyFutureQty	:number;//期初买入期货数量
-    OriBuyPlanQty	:number;//期初采购计划数量
-    OriBuyPricedQty	:number;//期初采购合同已定价数量
-    OriSellFutureQty	:number;//期初卖出期货数量
-    OriSellPlanQty	:number;//期初销售计划数量
-    OriSellPricedQty	:number;//期初销售合同已定价数量
-    SellFutureQty	:number;//卖出期货数量
-    SellPlanQty	:number;//销售计划数量
-    SellPricedQty	:number;//销售合同已定价数量
-    TotalExposure	:number;//总敞口
-    TotalFutureQty	:number;//期货数量
-    TotalHedgeRatio	:number;//敞口比例
-    TotalNeedHedgeQty	:number;//期货应套保量
-    TotalSpotQty	:number;//现货数量
-    diffFutuQty	:number;//今日变动量(期货) = (买入 - 买入期初) - (卖出 - 卖出期初)
-    diffSpotQty	:number;//今日变动量(现货) = 现货数量 - 期初现货数量
-    enumdicname	:string;//单位名称
-    oriTotalFutuQty	:number;//期初期货数量=期初买入期货数量-期初卖出期货数量
-    oriTotalSpotQty	:number;//期初现货数量=(期初销售计划数量-期初销售合同已定价数量)-(期初采购计划数量-期初采购合同已定价数量)
+export interface ErmcpRealExposureModel {
+    AreaUserID: number;//所属机构
+    BuyFutureQty: number;//买入期货数量
+    BuyPlanQty: number;//采购计划数量
+    BuyPricedQty: number;//采购合同已定价数量
+    MiddleGoodsCode: string;//套保品种代码
+    MiddleGoodsHedgeRatio: number;//应套保比例
+    MiddleGoodsID: number;//套保品种
+    MiddleGoodsName: string;//套保品种名称
+    NeedHedgeExposoure: number;//应套保敞口
+    NeedHedgeRatio: number;//应套保敞口比例
+    OriBuyFutureQty: number;//期初买入期货数量
+    OriBuyPlanQty: number;//期初采购计划数量
+    OriBuyPricedQty: number;//期初采购合同已定价数量
+    OriSellFutureQty: number;//期初卖出期货数量
+    OriSellPlanQty: number;//期初销售计划数量
+    OriSellPricedQty: number;//期初销售合同已定价数量
+    SellFutureQty: number;//卖出期货数量
+    SellPlanQty: number;//销售计划数量
+    SellPricedQty: number;//销售合同已定价数量
+    TotalExposure: number;//总敞口
+    TotalFutureQty: number;//期货数量
+    TotalHedgeRatio: number;//敞口比例
+    TotalNeedHedgeQty: number;//期货应套保量
+    TotalSpotQty: number;//现货数量
+    diffFutuQty: number;//今日变动量(期货) = (买入 - 买入期初) - (卖出 - 卖出期初)
+    diffSpotQty: number;//今日变动量(现货) = 现货数量 - 期初现货数量
+    enumdicname: string;//单位名称
+    oriTotalFutuQty: number;//期初期货数量=期初买入期货数量-期初卖出期货数量
+    oriTotalSpotQty: number;//期初现货数量=(期初销售计划数量-期初销售合同已定价数量)-(期初采购计划数量-期初采购合同已定价数量)
 }
 
 /**
  * 查询实时敞口现货明细请求
  */
-export interface Ermcp3ExposureReq{
+export interface Ermcp3ExposureReq {
     middlegoodsid: number  //    套保商品
 }
 
 /**
  * 实时敞口现货明细返回
  */
-export interface Ermcp3ExposureDetail{
-    areauserid	:number;//机构ID
-    changeQty	:number;//套保变动量
-    contracttype	:number;//现货合同类型 - 1:采购 -1:销售
-    convertfactor	:number;//标仓系数
-    convertratio	:number;//套保系数
-    createtime	:string;//时间
-    deliverygoodscode	:string;//现货品种代码
-    deliverygoodsid	:number;//现货品种id
-    deliverygoodsname	:string;//现货品种名称
-    enumdicname	:string;//现货商品单位名称
-    logtype	:number;//类型 - 1:套保计划 2:现货合同
-    middlegoodsId	:number;//套保商品id
-    middlegoodscode	:string;//套保商品代码
-    middlegoodsname	:string;//套保商品名称
-    qty	:number;//数量
-    relateNo	:string;//现货合同/套保计划编号
+export interface Ermcp3ExposureDetail {
+    areauserid: number;//机构ID
+    changeQty: number;//套保变动量
+    contracttype: number;//现货合同类型 - 1:采购 -1:销售
+    convertfactor: number;//标仓系数
+    convertratio: number;//套保系数
+    createtime: string;//时间
+    deliverygoodscode: string;//现货品种代码
+    deliverygoodsid: number;//现货品种id
+    deliverygoodsname: string;//现货品种名称
+    enumdicname: string;//现货商品单位名称
+    logtype: number;//类型 - 1:套保计划 2:现货合同
+    middlegoodsId: number;//套保商品id
+    middlegoodscode: string;//套保商品代码
+    middlegoodsname: string;//套保商品名称
+    qty: number;//数量
+    relateNo: string;//现货合同/套保计划编号
 }
 
 /**
  * 实时敞口期货明细请求
  */
-export interface ErmcpExposurePostionReq{
+export interface ErmcpExposurePostionReq {
     middleGoodsId: number //套保商品ID
 }
 
 /**
  * 实时敞口期货明细返回
  */
-export interface ErmcpExposurePostion{
-    agreeunit	:string;//合约单位
-    areauserid	:number;//所属机构id
-    convertratio	:number;//期货品种系数(折算系数)
-    curqty	:number;//当前持仓
-    diffhedgeqty	:number;//套保品种变动量=持仓变动量期货合约单位期货品种系数
-    diffqty	:number;//持仓变动量=当前持仓-昨日持仓
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品id
-    goodsname	:string;//商品名称
-    middlegoodsid	:number;//套保商品id
-    ydqty	:number;//昨日持仓
+export interface ErmcpExposurePostion {
+    agreeunit: string;//合约单位
+    areauserid: number;//所属机构id
+    convertratio: number;//期货品种系数(折算系数)
+    curqty: number;//当前持仓
+    diffhedgeqty: number;//套保品种变动量=持仓变动量期货合约单位期货品种系数
+    diffqty: number;//持仓变动量=当前持仓-昨日持仓
+    goodscode: string;//商品代码
+    goodsid: number;//商品id
+    goodsname: string;//商品名称
+    middlegoodsid: number;//套保商品id
+    ydqty: number;//昨日持仓
 }
 
 
 /**
  * 敞口现货头寸返回
  */
-export interface Ermcp3AreaSpot{
-    areauserid	:number;//所属机构
-    decreaseqty	:number;//减少数量=-(销售已定价数量+采购计划数量)
-    deliverygoodscode	:string;//现货品种代码
-    deliverygoodsid	:number;//现货品种id
-    deliverygoodsname	:string;//现货品种名称
-    enumdicname	:string;//单位名称
-    goodsunitid	:number;//现货品种单位id
-    increaseqty	:number;//增加数量=销售计划数量+采购已定价数量
-    oritoalspotqty	:number;//昨日数量
-    totalspotqty	:number;//当前数量(现货头寸总量) = (销售计划数量 - 销售已定价数量) - (采购计划数量 - 采购已定价数量)
-    updatetime	:string;//更新时间
+export interface Ermcp3AreaSpot {
+    areauserid: number;//所属机构
+    decreaseqty: number;//减少数量=-(销售已定价数量+采购计划数量)
+    deliverygoodscode: string;//现货品种代码
+    deliverygoodsid: number;//现货品种id
+    deliverygoodsname: string;//现货品种名称
+    enumdicname: string;//单位名称
+    goodsunitid: number;//现货品种单位id
+    increaseqty: number;//增加数量=销售计划数量+采购已定价数量
+    oritoalspotqty: number;//昨日数量
+    totalspotqty: number;//当前数量(现货头寸总量) = (销售计划数量 - 销售已定价数量) - (采购计划数量 - 采购已定价数量)
+    updatetime: string;//更新时间
 }
 
 /**
  * 敞口现货头寸明细请求
  */
-export interface Ermcp3AreaSpotDetailReq{
+export interface Ermcp3AreaSpotDetailReq {
     deliverygoodsid: number  // 现货品种ID
 }
 
 /**
  * 敞口现货头寸明细(敞口 -> 现货头寸 ->现货明细)
  */
-export interface Ermcp3AreaSpotDetail{
-    contracttype	:number;//合同类型 1-采购 -1-销售
-    createtime	:string;//创建时间
-    deliverygoodscode	:string;//现货品种代码
-    deliverygoodsid	:number;//现货品种id
-    deliverygoodsname	:string;//现货品种名称
-    enumdicname	:string;//现货商品单位名称
-    logtype	:number;//记录类型 1-套保 2-现货合同
-    qty	:number;//数量
-    recordname	:string;//类型名称
-    relatedid	:string;//套保计划ID/现货合同ID
-    relatedno	:string;//编号
-    strtime	:string;//时间
+export interface Ermcp3AreaSpotDetail {
+    contracttype: number;//合同类型 1-采购 -1-销售
+    createtime: string;//创建时间
+    deliverygoodscode: string;//现货品种代码
+    deliverygoodsid: number;//现货品种id
+    deliverygoodsname: string;//现货品种名称
+    enumdicname: string;//现货商品单位名称
+    logtype: number;//记录类型 1-套保 2-现货合同
+    qty: number;//数量
+    recordname: string;//类型名称
+    relatedid: string;//套保计划ID/现货合同ID
+    relatedno: string;//编号
+    strtime: string;//时间
 }
 
 /**
  * 敞口 -> 期货头寸 敞口期货头寸返回
  */
-export interface ErmcpHedgePosition{
-    accountid	:number;//资金账号[外部母账户]
-    curbuyposition	:number;//期末买头寸
-    cursellposition	:number;//期末卖头寸
-    curtdbuyposition	:number;//期末今日买头寸
-    curtdsellposition	:number;//期末今日卖头寸
-    curydbuyposition	:number;//期末上日买头寸
-    curydsellposition	:number;//期末上日卖头寸
-    decreaseqty	:number;//减少数量 = (期末卖头寸 - 期初卖头寸)-1
-    fretdbuyposition	:number;//冻结今日买头寸
-    fretdsellposition	:number;//冻结今日卖头寸
-    freydbuyposition	:number;//冻结上日买头寸
-    freydsellposition	:number;//冻结上日卖头寸
-    goodscode	:string;//商品代码
-    goodsid	:number;//商品id
-    goodsname	:string;//商品名称
-    hedgeaccountcode	:string;//对冲账号
-    hedgegoodsid	:number;//对冲合约ID
-    increaseqty	:number;//增加数量 = 期末买头寸 - 期初买头寸
-    marketid	:number;//市场ID
-    relateduserid	:number;//关联用户id
-    totalcurqty	:number;//当前数量(净头寸) = 期末买头寸 - 期末卖头寸
-    totalydqty	:number;//昨日数量(净头寸) = 期初买头寸 - 期初卖头寸
-    tradedate	:string;//交易日(yyyyMMdd)
-    ydbuyposition	:number;//期初买头寸
-    ydsellposition	:number;//期初卖头寸
+export interface ErmcpHedgePosition {
+    accountid: number;//资金账号[外部母账户]
+    curbuyposition: number;//期末买头寸
+    cursellposition: number;//期末卖头寸
+    curtdbuyposition: number;//期末今日买头寸
+    curtdsellposition: number;//期末今日卖头寸
+    curydbuyposition: number;//期末上日买头寸
+    curydsellposition: number;//期末上日卖头寸
+    decreaseqty: number;//减少数量 = (期末卖头寸 - 期初卖头寸)-1
+    fretdbuyposition: number;//冻结今日买头寸
+    fretdsellposition: number;//冻结今日卖头寸
+    freydbuyposition: number;//冻结上日买头寸
+    freydsellposition: number;//冻结上日卖头寸
+    goodscode: string;//商品代码
+    goodsid: number;//商品id
+    goodsname: string;//商品名称
+    hedgeaccountcode: string;//对冲账号
+    hedgegoodsid: number;//对冲合约ID
+    increaseqty: number;//增加数量 = 期末买头寸 - 期初买头寸
+    marketid: number;//市场ID
+    relateduserid: number;//关联用户id
+    totalcurqty: number;//当前数量(净头寸) = 期末买头寸 - 期末卖头寸
+    totalydqty: number;//昨日数量(净头寸) = 期初买头寸 - 期初卖头寸
+    tradedate: string;//交易日(yyyyMMdd)
+    ydbuyposition: number;//期初买头寸
+    ydsellposition: number;//期初卖头寸
 }
 
 /**
  * 查询敞口期货头寸期货明细 请求
  */
-export interface ErmcpHedgePositionDetailReq{
+export interface ErmcpHedgePositionDetailReq {
     goodsId: number // 商品id
 }
 
 /**
  * 查询敞口期货头寸期货明细  敞口 -> 期货头寸 -> 期货明细
  */
-export interface ErmcpHedgePositionDetail{
-    buyorsell	:number;//买卖方向 number;
-//-买 1-卖
-    channelbuildtype	:number;//开平方向 1-建仓 2-平仓
-    goodscode	:string;//商品代码
-    goodsname	:string;//商品名称
-    hedgegoodsid	:number;//商品id
-    tradeqty	:number;//数量(成交数量)
-    tradetime	:string;//时间(成交时间)
+export interface ErmcpHedgePositionDetail {
+    buyorsell: number;//买卖方向 number;
+    //-买 1-卖
+    channelbuildtype: number;//开平方向 1-建仓 2-平仓
+    goodscode: string;//商品代码
+    goodsname: string;//商品名称
+    hedgegoodsid: number;//商品id
+    tradeqty: number;//数量(成交数量)
+    tradetime: string;//时间(成交时间)
 }
 
 

+ 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 {
+
 }

+ 2 - 2
src/services/socket/quota/adapter/index.ts

@@ -3,7 +3,7 @@ import { getLongTypeLoginID, isLogin } from '@/services/bus/login';
 import { getToken } from '@/services/bus/token';
 import { funCode } from '@/services/funcode/index';
 import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
-import { mergeObjSameProperty } from '@/utils/objHandle';
+import { mergeObj } from '@/utils/objHandle';
 import { Package40 } from '@/utils/websocket/package';
 import Long from 'long';
 import { subscribeInfoType } from '../interface';
@@ -122,7 +122,7 @@ export function parseReceivePush(quotationData: any) {
         if (itemQuote) {
             // 注意:此处已 go 服务查询出来的盘面数据为基准,查询盘面 先修改成go 服务,第一次进入项目时候回查询一次所有盘面
             // 之前是 通过 websocket 查询的,故 可能存在字段发生变化问题,如遇到,则进行优化处理
-            mergeObjSameProperty(itemQuote, goodsQuoteTik);
+            mergeObj(itemQuote, goodsQuoteTik);
         } else {
             // 此处 待优化(存在字段变化问题)
             quoteDayInfo.push(itemQuote);

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

@@ -9,7 +9,7 @@ interface ObjType {
  * @param a 合并之后的对象
  * @param b 把相同的属性的value 值赋值给a对象
  */
-export function mergeObjSameProperty(a: ObjType, ...rest: ObjType[]): void {
+export function mergeObj(a: ObjType, ...rest: ObjType[]): void {
     Object.keys(a).forEach((key) => {
         rest.forEach((param) => {
             if (Reflect.has(param, key)) {

+ 120 - 70
src/views/business/exposure/list/futures/index.vue

@@ -1,83 +1,133 @@
 <template>
-    <!-- 采购: 现货头寸-->
-    <div class="spot-contract-peddding">
-        采购: 现货头寸
-    </div>
+  <!-- 采购: 现货头寸-->
+  <div class="spot-contract-peddding table-height"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+      </a-table>
+    </contextMenu>
+    <a-drawer placement="bottom"
+              :closable="false"
+              :visible="visible"
+              :get-container="false"
+              :wrap-style="{ position: 'absolute' }"
+              @close="closeDrawer">
+      <div>
+        <a-table :columns="detailColumns"
+                 class="topTable"
+                 :pagination="false"
+                 rowKey="key"
+                 :data-source="detailTableList">
+        </a-table>
+        <ThridMenu :list="tabList"
+                   @selectMenu="selectMenu" />
+      </div>
+    </a-drawer>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent, Ref, ref } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '../../components/filterTable/index.vue';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import { getColumsAndSearch } from '../setup';
+import { QuerySpotPosition, QuerySpotPositionDetail } from '@/services/go/ermcp/exposure/index';
+import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail } from '@/services/go/ermcp/exposure/interface';
+import { message } from 'ant-design-vue';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
+import ThridMenu from '@/common/components/thirdMenu/index.vue';
+import { ColumnType } from '@/common/methods/table';
+import { TableKey } from '@/common/methods/table/interface';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+// 获取表格数据
+function getExposure() {
+    const loading = ref<boolean>(false);
+    const tableList = ref<Ermcp3AreaSpot[]>([]);
+    function queryList() {
+        QuerySpotPosition()
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('获取表格数据', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+
+    return { loading, tableList, queryList };
+}
 
-        return { customList, actionQuery };
+// 明细
+function handleDrawer(loading: Ref<boolean>, selectedRow: Ermcp3AreaSpot) {
+    const visible = ref<boolean>(true);
+    const tabList = [{ lable: '期货明细' }];
+    const detailTableList = ref<Ermcp3AreaSpotDetail[]>([]);
+    const detailColumns = ref<ColumnType[]>([]);
+    function closeDrawer() {
+        visible.value = false;
+    }
+    // 切换明细
+    function selectMenu(index: number) {
+        ActualExposureDetail();
+        const { columns, getColumns } = getColumsAndSearch('table_pcweb_exposure_spotposition', false);
+        getColumns();
+        detailColumns.value = columns.value;
     }
 
-    export default defineComponent({
-        name: 'spot-contract-peddding',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
+    // 现货明细信息
+    function ActualExposureDetail() {
+        loading.value = true;
+        const param = { deliverygoodsid: selectedRow.deliverygoodsid };
+        QuerySpotPositionDetail(param)
+            .then((res) => {
+                detailTableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('现货明细信息', detailTableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
             });
-            return { customList };
-        },
-    });
+    }
+    return { visible, closeDrawer, tabList, selectMenu, detailTableList, detailColumns };
+}
+
+export default defineComponent({
+    name: 'spot-contract-peddding',
+    components: {},
+    setup() {
+        const { columns, search, getColumns } = getColumsAndSearch('table_pcweb_exposure_spotposition', true);
+        const { expandedRowKeys, selectedRow, Rowclick } = handleTableEvent<Ermcp3AreaSpot>();
+        const { loading, tableList, queryList } = getExposure();
+        initData(() => {
+            queryList();
+            getColumns();
+        });
+        return { columns, search, expandedRowKeys, selectedRow, Rowclick, ...getBtnList('exposure_spot', false), loading, tableList };
+    },
+});
 </script>
 
 <style lang="less">
-    .spot-contract-peddding {
-    }</style
+.spot-contract-peddding {
+}
+</style
 >;

+ 100 - 18
src/views/business/exposure/list/realTime/index.vue

@@ -1,6 +1,7 @@
 <template>
   <!-- 实时敞口-->
-  <div class="purchase-real-time table-height">
+  <div class="purchase-real-time table-height"
+       :loading="loading">
     <filterCustomTable @search="search">
       <BtnList :btnList="commonBtn" />
     </filterCustomTable>
@@ -12,32 +13,42 @@
                :pagination="false"
                rowKey="key"
                :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <!-- <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template> -->
-        <!-- <template #warehousetype="{ text }">
-          <span>{{ getWareHouseType(text) }}</span>
-        </template>
-        <template #warehousestatus="{ text }">
-          <span>{{ getWareHouseStatus(text) }}</span>
-        </template> -->
       </a-table>
     </contextMenu>
+    <a-drawer placement="bottom"
+              :closable="false"
+              :visible="visible"
+              :get-container="false"
+              :wrap-style="{ position: 'absolute' }"
+              @close="closeDrawer">
+      <div>
+        <a-table :columns="detailColumns"
+                 class="topTable"
+                 :pagination="false"
+                 rowKey="key"
+                 :data-source="detailTableList">
+        </a-table>
+        <ThridMenu :list="tabList"
+                   @selectMenu="selectMenu" />
+      </div>
+    </a-drawer>
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import { defineComponent, Ref, ref, unref } from 'vue';
 import { initData } from '@/common/methods';
 import filterCustomTable from '../../components/filterTable/index.vue';
 import { getBtnList } from '@/common/setup/contextMenu/index';
 import contextMenu from '@/common/components/contextMenu/index.vue';
 import { getColumsAndSearch } from '../setup';
-import { QueryActualExposure } from '@/services/go/ermcp/exposure/index';
-import { ErmcpRealExposureModel } from '@/services/go/ermcp/exposure/interface';
+import { QueryActualExposure, QueryActualExposureDetail, QueryAutualExposurePosition } from '@/services/go/ermcp/exposure/index';
+import { ErmcpRealExposureModel, Ermcp3ExposureDetail, ErmcpExposurePostion } from '@/services/go/ermcp/exposure/interface';
 import { message } from 'ant-design-vue';
 import { handleTableEvent } from '@/common/setup/event/index';
+import ThridMenu from '@/common/components/thirdMenu/index.vue';
+import { ColumnType } from '@/common/methods/table';
+import { TableKey } from '@/common/methods/table/interface';
 import BtnList from '@/common/components/buttonList/index.vue';
 
 // 获取表格数据
@@ -51,7 +62,7 @@ function getExposure() {
                     return { ...e, key: String(i) };
                 });
                 loading.value = false;
-                console.log('查询列表', tableList);
+                console.log('获取表格数据', tableList);
             })
             .catch((err) => {
                 message.error(err);
@@ -62,14 +73,84 @@ function getExposure() {
     return { loading, tableList, queryList };
 }
 
+// 控制是否打开明细
+function handleDrawer() {
+    const visible = ref<boolean>(false);
+    function closeDrawer() {
+        visible.value = !visible.value;
+    }
+    return { visible, closeDrawer };
+}
+
+// 明细
+function handleDeatil(loading: Ref<boolean>, selectedRow: ErmcpRealExposureModel) {
+    const tabList = [{ lable: '现货明细' }, { lable: '期货明细' }];
+    const detailTableList = ref<Ermcp3ExposureDetail[] | ErmcpExposurePostion[]>([]);
+    const detailColumns = ref<ColumnType[]>([]);
+    // 切换明细
+    function selectMenu(index: number) {
+        let tableKey: keyof TableKey = 'table_pcweb_exposure_spotposition';
+        if (index) {
+            AutualExposurePosition();
+        } else {
+            ActualExposureDetail();
+            tableKey = 'table_pcweb_exposure_futures_detail';
+        }
+        const { columns, getColumns } = getColumsAndSearch(tableKey, false);
+        getColumns();
+        detailColumns.value = columns.value;
+    }
+
+    // 现货明细信息
+    function ActualExposureDetail() {
+        loading.value = true;
+        const param = { middlegoodsid: unref(selectedRow).MiddleGoodsID };
+        QueryActualExposureDetail(param)
+            .then((res) => {
+                detailTableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', detailTableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 期货头寸明细
+    function AutualExposurePosition() {
+        loading.value = true;
+        const param = { middleGoodsId: unref(selectedRow).MiddleGoodsID };
+        QueryAutualExposurePosition(param)
+            .then((res) => {
+                detailTableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', detailTableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    return { tabList, selectMenu, detailTableList, detailColumns };
+}
+
 export default defineComponent({
     name: 'purchase-real-time',
     components: {
         contextMenu,
         filterCustomTable,
+        ThridMenu,
+        BtnList,
     },
     setup() {
+        const { visible, closeDrawer } = handleDrawer();
         const { columns, search, getColumns } = getColumsAndSearch('table_pcweb_exposure', true);
+
+        const { expandedRowKeys, selectedRow, Rowclick } = handleTableEvent<ErmcpRealExposureModel>(closeDrawer);
         const { loading, tableList, queryList } = getExposure();
         const { commonBtn, forDataBtn } = getBtnList('exposure_realtime', false);
 
@@ -77,13 +158,14 @@ export default defineComponent({
             queryList();
             getColumns();
         });
-        return { commonBtn, forDataBtn, loading, tableList, columns, search, ...handleTableEvent() };
+        return { commonBtn, forDataBtn, loading, tableList, visible, closeDrawer, columns, search, expandedRowKeys, selectedRow, Rowclick, ...handleDeatil(loading, (selectedRow as unknown) as ErmcpRealExposureModel) };
     },
 });
 </script>
 
 <style lang="less">
 .purchase-real-time {
+    position: relative;
+    overflow: hidden;
 }
-</style
->;
+</style>;

+ 79 - 0
src/views/business/purchase/setup.ts

@@ -0,0 +1,79 @@
+import { QueryPurchase } from '@/services/go/ermcp/purchase';
+import { Ermcp3SellBuyContract, SellBuyContractReq } from '@/services/go/ermcp/purchase/interface';
+import APP from '@/services';
+import { getUserId } from '@/services/bus/account';
+import { initData } from '@/common/methods';
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
+import { MenuItem } from '@/common/components/contextMenu/interface';
+import { openModal } from '@/common/setup/modal/index';
+import { watchEffect, ref } from 'vue';
+// 采购数据获取和表头数据整理
+export function handlePurchase() {
+    // ========================loading========================
+    const loading = ref<boolean>(false);
+    // ========================获取列表数据========================
+    let customList = ref<Ermcp3SellBuyContract[] | []>([]);
+    function queryPurchase() {
+        const AreaUserID = APP.get('userAccount').memberuserid; // 所属机构id
+        const req: SellBuyContractReq = {
+            areauserid: AreaUserID, //  所属机构ID
+            contracttype: 1, // 合同类型 1-采购, -1-销售
+            querytype: 1, // 查询类型 1-全部 2-待点价 3-履约结算 4-已完成
+            userid: getUserId(), // 用户ID
+        };
+        QueryPurchase(req).then((res) => {
+            customList.value = res;
+        });
+    }
+
+    // ========================获取表头========================
+    const columns = ref<ColumnType[]>([]);
+    function getColumns() {
+        const list = getTableHead('table_pcweb_purchase');
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield,
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            columns.value.push(item);
+        });
+    }
+
+    // ========================数据初始化========================
+    initData((): void => {
+        queryPurchase();
+        getColumns();
+    });
+    return { loading, customList, columns };
+}
+
+// 按钮权限与功能组件
+export function btnAndComp() {
+    // 传入父及的code 得到当前1234级的整个权限
+    const { hasPermission } = handlePermission('purchase_pending');
+    // 配置右键菜单列表
+    const contextMenuList = ref<MenuItem[]>([]);
+    // 打开新增页的弹窗 返回打开弹窗的方法
+    const { openAction: addAction } = openModal('addCustomInfo');
+    // 创建详情页并写入右键菜单列表(每个页面都有,写死)
+    detailButton('customDetail', contextMenuList);
+    // 通过code跟弹窗建立联系 返回写入右键的方法
+    const { action: deleteAction } = permissionButton('purchase_pending_someprice', '点价登记', contextMenuList);
+
+    const stop = watchEffect(() => {
+        // 判断是否有权限 有就写入
+        hasPermission('custom_info_btn_delete') && deleteAction();
+    });
+    return {
+        stop,
+        addAction,
+        hasPermission,
+        contextMenuList,
+    };
+}

+ 44 - 16
src/views/information/custom/compoments/detail/index.vue

@@ -17,49 +17,49 @@
       <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>
@@ -67,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>
@@ -107,14 +107,38 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+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',
     components: {},
-    setup() {
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props) {
         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() {
             loading.value = true;
@@ -128,9 +152,13 @@ export default defineComponent({
             cancel,
             submit,
             loading,
+            detail,
         };
     },
+
 });
+
+
 </script>
 
 <style lang="less">

+ 0 - 27
src/views/information/custom/compoments/filterTable/index.vue

@@ -106,31 +106,4 @@ export default defineComponent({
     }
     
 }
-.selectBtn.ant-btn {
-    margin-left: 10px;
-    width: 80px;
-    height: 30px;
-    line-height: 31px;
-    text-align: center;
-    background: linear-gradient(0deg, @m-grey15 0%, @m-grey16 98%);
-    border: 0;
-    color: @m-white0;
-    font-size: 14px;
-    .rounded-corners(3px);
-    &:hover,
-    &:focus {
-        background: linear-gradient(0deg, @m-grey15-hover 0%, @m-grey16-hover 98%);
-        color: rgba(@m-white0, 0.8);
-        border: 0;
-    }
-}
-.operBtn.ant-btn:extend(.selectBtn.ant-btn) {
-    background: linear-gradient(0deg, @m-blue6 0%, @m-blue7 99%);
-    &:hover,
-    &:focus {
-        background: linear-gradient(0deg, @m-blue6-hover 0%, @m-blue7-hover 99%);
-        color: rgba(@m-white0, 0.8);
-        border: 0;
-    }
-}
 </style>;

+ 54 - 8
src/views/information/custom/list/normal-use/index.vue

@@ -25,7 +25,7 @@
     <!-- 新增 -->
     <AddCustom />
     <!-- 详情 -->
-    <CustomDetail />
+    <CustomDetail :selectedRow="selectedRow" />
     <!-- 修改 -->
     <ModifyCustom :selectedRow="selectedRow" />
     <!-- 停用 -->
@@ -38,7 +38,6 @@ import { defineComponent } from 'vue';
 import { initData } from '@/common/methods/index';
 import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
 import contextMenu from '@/common/components/contextMenu/index.vue';
-import { getCustomList } from '../setup';
 import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
 import ModifyCustom from '@/views/information/custom/compoments/modify/index.vue';
 import DisableCustom from '@/views/information/custom/compoments/disable/index.vue';
@@ -46,7 +45,14 @@ import AddCustom from '@/views/information/custom/compoments/add/index.vue';
 import { getBtnList } from '@/common/setup/contextMenu/index';
 import { handleTableEvent } from '@/common/setup/event/index';
 import BtnList from '@/common/components/buttonList/index.vue';
-
+import { getCustomModule } from '@/common/setup/customModule';
+import DeleteCustom from '@/views/information/custom/compoments/delete/index.vue';
+import RecoverCustom from '@/views/information/custom/compoments/recover/index.vue';
+import { Column } from '@/services/go/commonService/interface';
+import { ColumnType } from '@/common/methods/table';
+import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
+import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
 export default defineComponent({
     name: 'custom-normal',
     components: {
@@ -59,12 +65,52 @@ export default defineComponent({
         BtnList,
     },
     setup() {
-        const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-
+        const { columns, customList, filteredInfo, loading, getColumns, getColumnsList, columnsListToUpdate } = getCustomModule<QueryCustomInfoType>();
         initData(() => {
-            actionQuery(3);
-            getColumns();
+            // 获取列表数据
+            getColumnsList(() => {
+                loading.value = true;
+                customList.value.length = 0;
+                QueryCustomInfo(3)
+                    .then((res) => {
+                        customList.value = res.map((e, i) => {
+                            return { ...e, key: String(i) };
+                        });
+                        loading.value = false;
+                        console.log('查询列表', customList);
+                    })
+                    .catch((err) => {
+                        message.error(err);
+                        loading.value = false;
+                    });
+            });
+            // 注册表头信息
+            getColumns('table_pcweb_userinfo', (e: Column, item: ColumnType, filtered: any) => {
+                // 以下添加过滤数据对应的方法
+                if (e.columntitle === '客户类型') {
+                    item.onFilter = (value: string, record: QueryCustomInfoType) => record.userinfotype.includes(String(value));
+                    item.filteredValue = filtered.userinfotype || null;
+                }
+                if (e.columntitle === '客户简称') {
+                    item.onFilter = (value: string, record: QueryCustomInfoType) => record.nickname.includes(value);
+                    item.filteredValue = filtered.nickname || null;
+                }
+                if (e.columntitle === '客户名称') {
+                    item.onFilter = (value: string, record: QueryCustomInfoType) => record.contactname.includes(value);
+                    item.filteredValue = filtered.contactname || null;
+                }
+                if (e.columntitle === '手机号码') {
+                    item.onFilter = (value: string, record: QueryCustomInfoType) => record.mobile.includes(value);
+                    item.filteredValue = filtered.mobile || null;
+                }
+            });
         });
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            columnsListToUpdate();
+        }
         return { customList, columns, search, loading, ...getBtnList('custom_info_normal', true), ...handleTableEvent() };
     },
 });
@@ -73,4 +119,4 @@ export default defineComponent({
 <style lang="less">
 .custom-normal {
 }
-</style>
+</style>

+ 0 - 74
src/views/information/custom/list/setup.ts

@@ -1,74 +0,0 @@
-import { ColumnType, getTableHead } from '@/common/methods/table';
-import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { QueryCustomInfoEnum } from '@/services/go/ermcp/customInfo/type';
-import { message } from 'ant-design-vue';
-import { ref } from 'vue';
-
-// 客户资料列表
-export function getCustomList() {
-    // 表格数据
-    const customList = ref<QueryCustomInfoType[]>([]);
-    // 表头数据
-    const columns = ref<ColumnType[]>([]);
-    // 过滤项
-    const filteredInfo = ref();
-    const loading = ref<boolean>(false);
-    // 获取表头
-    function getColumns() {
-        const list = getTableHead('table_pcweb_userinfo');
-        const filtered = filteredInfo.value || {};
-        columns.value.length = 0;
-        list.forEach((e, i) => {
-            const { columnfield, columntitle, aligntype } = e;
-            const item: ColumnType = {
-                key: String(i),
-                dataIndex: columnfield, // 表格数据对应的key
-                title: columntitle,
-                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
-                slots: { customRender: columnfield },
-            };
-            // 以下添加过滤数据对应的方法
-            if (e.columntitle === '客户类型') {
-                item.onFilter = (value: string, record: QueryCustomInfoType) => record.userinfotype.includes(String(value));
-                item.filteredValue = filtered.userinfotype || null;
-            }
-            if (e.columntitle === '客户简称') {
-                item.onFilter = (value: string, record: QueryCustomInfoType) => record.nickname.includes(value);
-                item.filteredValue = filtered.nickname || null;
-            }
-            if (e.columntitle === '客户名称') {
-                item.onFilter = (value: string, record: QueryCustomInfoType) => record.contactname.includes(value);
-                item.filteredValue = filtered.contactname || null;
-            }
-            if (e.columntitle === '手机号码') {
-                item.onFilter = (value: string, record: QueryCustomInfoType) => record.mobile.includes(value);
-                item.filteredValue = filtered.mobile || null;
-            }
-            columns.value.push(item);
-        });
-    }
-    // 查询列表
-    function actionQuery(type: QueryCustomInfoEnum) {
-        loading.value = true;
-        QueryCustomInfo(type)
-            .then((res) => {
-                customList.value = res.map((e, i) => {
-                    return { ...e, key: String(i) };
-                });
-                loading.value = false;
-                console.log('查询列表', customList);
-            })
-            .catch((err) => {
-                message.error(err);
-                loading.value = false;
-            });
-    }
-    // 查询
-    function search(value: any) {
-        filteredInfo.value = value;
-        getColumns();
-    }
-
-    return { customList, actionQuery, columns, filteredInfo, getColumns, search, loading, };
-}

+ 106 - 69
src/views/information/custom/list/stop-use/index.vue

@@ -1,76 +1,113 @@
 <template>
-  <!-- 客户信息: 停用 -->
-  <div class="custom-normal"
-       :loading="loading">
-    <filterCustomTable @search="search">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               :pagination="false"
-               rowKey="key"
-               :data-source="customList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人' }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <!-- 新增 -->
-    <AddCustom />
-    <!-- 详情 -->
-    <CustomDetail />
-    <!-- 删除 -->
-    <DeleteCustom />
-    <!-- 恢复客户资料 -->
-    <RecoverCustom />
-  </div>
+    <!-- 客户信息: 停用 -->
+    <div class="custom-normal" :loading="loading">
+        <filterCustomTable @search="search">
+            <BtnList :btnList="commonBtn" />
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns" class="topTable" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="customList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn" />
+                </template>
+                <template #userinfotype="{ text }">
+                    <a>{{ text === '2' ? '企业' : '个人' }}</a>
+                </template>
+            </a-table>
+        </contextMenu>
+        <!-- 新增 -->
+        <AddCustom />
+        <!-- 详情 -->
+        <CustomDetail />
+        <!-- 删除 -->
+        <DeleteCustom />
+        <!-- 恢复客户资料 -->
+        <RecoverCustom />
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
-import { initData } from '@/common/methods/index';
-import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
-import contextMenu from '@/common/components/contextMenu/index.vue';
-import { getCustomList } from '../setup';
-import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
-import DeleteCustom from '@/views/information/custom/compoments/delete/index.vue';
-import RecoverCustom from '@/views/information/custom/compoments/recover/index.vue';
-import AddCustom from '@/views/information/custom/compoments/add/index.vue';
-import { getBtnList } from '@/common/setup/contextMenu/index';
-import { handleTableEvent } from '@/common/setup/event/index';
-import BtnList from '@/common/components/buttonList/index.vue';
-
-export default defineComponent({
-    name: 'custom-normal',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        CustomDetail,
-        DeleteCustom,
-        RecoverCustom,
-        AddCustom,
-        BtnList,
-    },
-    setup() {
-        const { customList, actionQuery, columns, getColumns, search, loading } = getCustomList();
-
-        initData(() => {
-            actionQuery(4);
-            getColumns();
-        });
-        return { customList, columns, search, loading, ...getBtnList('custom_info_disabled', true), ...handleTableEvent() };
-    },
-});
+    import { defineComponent, Ref } from 'vue';
+    import { initData } from '@/common/methods/index';
+    import filterCustomTable from '@/views/information/custom/compoments/filterTable/index.vue';
+    import contextMenu from '@/common/components/contextMenu/index.vue';
+    import { getCustomModule } from '@/common/setup/customModule';
+    import CustomDetail from '@/views/information/custom/compoments/detail/index.vue';
+    import DeleteCustom from '@/views/information/custom/compoments/delete/index.vue';
+    import RecoverCustom from '@/views/information/custom/compoments/recover/index.vue';
+    import AddCustom from '@/views/information/custom/compoments/add/index.vue';
+    import { getBtnList } from '@/common/setup/contextMenu/index';
+    import { handleTableEvent } from '@/common/setup/event/index';
+    import BtnList from '@/common/components/buttonList/index.vue';
+    import { Column } from '@/services/go/commonService/interface';
+    import { ColumnType } from '@/common/methods/table';
+    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+    import { message } from 'ant-design-vue';
+    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
+    export default defineComponent({
+        name: 'custom-normal',
+        components: {
+            filterCustomTable,
+            contextMenu,
+            CustomDetail,
+            DeleteCustom,
+            RecoverCustom,
+            AddCustom,
+            BtnList,
+        },
+        setup() {
+            const { columns, customList, filteredInfo, loading, getColumns, getColumnsList, columnsListToUpdate } = getCustomModule<QueryCustomInfoType>();
+            initData(() => {
+                // 获取列表数据
+                getColumnsList(() => {
+                    loading.value = true;
+                    customList.value.length = 0;
+                    QueryCustomInfo(4)
+                        .then((res) => {
+                            customList.value = res.map((e, i) => {
+                                return { ...e, key: String(i) };
+                            });
+                            loading.value = false;
+                            console.log('查询列表', customList);
+                        })
+                        .catch((err) => {
+                            message.error(err);
+                            loading.value = false;
+                        });
+                });
+                // 注册表头信息
+                getColumns('table_pcweb_userinfo', (e: Column, item: ColumnType, filtered: any) => {
+                    // 以下添加过滤数据对应的方法
+                    if (e.columntitle === '客户类型') {
+                        item.onFilter = (value: string, record: QueryCustomInfoType) => record.userinfotype.includes(String(value));
+                        item.filteredValue = filtered.userinfotype || null;
+                    }
+                    if (e.columntitle === '客户简称') {
+                        item.onFilter = (value: string, record: QueryCustomInfoType) => record.nickname.includes(value);
+                        item.filteredValue = filtered.nickname || null;
+                    }
+                    if (e.columntitle === '客户名称') {
+                        item.onFilter = (value: string, record: QueryCustomInfoType) => record.contactname.includes(value);
+                        item.filteredValue = filtered.contactname || null;
+                    }
+                    if (e.columntitle === '手机号码') {
+                        item.onFilter = (value: string, record: QueryCustomInfoType) => record.mobile.includes(value);
+                        item.filteredValue = filtered.mobile || null;
+                    }
+                });
+            });
+            // 查询
+            function search(value: any) {
+                filteredInfo.value = value;
+                // 更新表信息
+                columnsListToUpdate();
+            }
+            return { customList, columns, search, loading, ...getBtnList('custom_info_disabled', true), ...handleTableEvent() };
+        },
+    });
 </script>
 
 <style lang="less">
-.custom-normal {
-}
-</style>;
+    .custom-normal {
+    }</style
+>;

+ 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
+}

+ 107 - 104
src/views/setting/notice/components/noticeContent.vue

@@ -1,121 +1,124 @@
 <template>
-    <div class="notice-content">
-        <aside>
-            <a-list item-layout="horizontal" :data-source="noticeList">
-                <template #renderItem="{ item }">
-                    <a-list-item @click="choose(item)">
-                        <a-list-item-meta :description="item.createtime">
-                            <template #title>
-                                <a :style="{ color: item.readed ? '#88A0AE' : '#E5E5E5' }" href="javascript:;">{{ item.title }}</a>
-                            </template>
-                            <template #avatar>
-                                <a-badge :color="item.readed ? '#88A0AE' : 'orange'" />
-                            </template>
-                        </a-list-item-meta>
-                    </a-list-item>
-                </template>
-            </a-list>
-        </aside>
-        <main>
-            <h4>{{ chooseItemNotice.title }}</h4>
-            <p>{{ chooseItemNotice.createtime }}</p>
-            <div>
-                {{ chooseItemNotice.content }}
-            </div>
-        </main>
-    </div>
+  <div class="notice-content">
+    <aside>
+      <a-list item-layout="horizontal"
+              :data-source="noticeList">
+        <template #renderItem="{ item }">
+          <a-list-item @click="choose(item)">
+            <a-list-item-meta :description="item.createtime">
+              <template #title>
+                <a :style="{ color: item.readed ? '#88A0AE' : '#E5E5E5' }"
+                   href="javascript:;">{{ item.title }}</a>
+              </template>
+              <template #avatar>
+                <a-badge :color="item.readed ? '#88A0AE' : 'orange'" />
+              </template>
+            </a-list-item-meta>
+          </a-list-item>
+        </template>
+      </a-list>
+    </aside>
+    <main>
+      <h4>{{ chooseItemNotice.title }}</h4>
+      <p>{{ chooseItemNotice.createtime }}</p>
+      <div>
+        {{ chooseItemNotice.content }}
+      </div>
+    </main>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, PropType, reactive, computed } from 'vue';
-    import { QueryNoticeRsp } from '@/services/go/commonService/interface';
-    import { mergeObjSameProperty } from '@/utils/objHandle';
+import { defineComponent, PropType, reactive, computed } from 'vue';
+import { QueryNoticeRsp } from '@/services/go/commonService/interface';
+import { mergeObj } from '@/utils/objHandle';
 
-    function chooseNotice() {
-        interface ItemNotice {
-            title: string;
-            content: string; //内容
-            createtime: string; //创建时间
-        }
-        const chooseItemNotice = reactive<ItemNotice>({
-            title: '',
-            content: '',
-            createtime: '',
-        });
-        function choose(item: QueryNoticeRsp) {
-            mergeObjSameProperty(chooseItemNotice, item);
-        }
-        return { chooseItemNotice, choose };
+function chooseNotice() {
+    interface ItemNotice {
+        title: string;
+        content: string; //内容
+        createtime: string; //创建时间
     }
+    const chooseItemNotice = reactive<ItemNotice>({
+        title: '',
+        content: '',
+        createtime: '',
+    });
+    function choose(item: QueryNoticeRsp) {
+        mergeObj(chooseItemNotice, item);
+    }
+    return { chooseItemNotice, choose };
+}
 
-    export default defineComponent({
-        name: 'notice',
-        props: {
-            noticeList: {
-                type: Object as PropType<QueryNoticeRsp[]>,
-                default: [],
-            },
-        },
-        setup(props) {
-            const { chooseItemNotice, choose } = chooseNotice();
-            computed(() => {
-                props.noticeList.length && mergeObjSameProperty(chooseItemNotice, props.noticeList[0]);
-            });
-            return {
-                choose,
-                chooseItemNotice,
-            };
+export default defineComponent({
+    name: 'notice',
+    props: {
+        noticeList: {
+            type: Object as PropType<QueryNoticeRsp[]>,
+            default: [],
         },
-    });
+    },
+    setup(props) {
+        const { chooseItemNotice, choose } = chooseNotice();
+        computed(() => {
+            props.noticeList.length && mergeObj(chooseItemNotice, props.noticeList[0]);
+        });
+        return {
+            choose,
+            chooseItemNotice,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .notice-content {
-        .flex;
-        aside {
-            cursor: pointer;
-            padding: 10px;
-            width: 202px;
-            height: 619px;
-            .ant-list-split {
-                .ant-list-item-meta-description {
-                    text-align: right;
-                    font-size: 13px;
-                    color: #3b444a;
-                }
-                .ant-list-item-meta-avatar {
-                    margin-right: 0;
-                }
-                .ant-list-item {
-                    padding: 5px 0;
-                    border-bottom: none;
-                    a {
-                        width: 160px;
-                        // color: #88A0AE;
-                        font-size: 15px;
-                        display: inline-block;
-                        .ellipse;
-                    }
-                }
-            }
-        }
-        main {
-            flex: 1;
-            background: #1d2327;
-            padding: 20px;
-            h4 {
-                font-size: 17px;
-                color: #e5e5e5;
-            }
-            p {
+.notice-content {
+    .flex;
+    aside {
+        cursor: pointer;
+        padding: 10px;
+        width: 202px;
+        height: 619px;
+        .ant-list-split {
+            .ant-list-item-meta-description {
+                text-align: right;
                 font-size: 13px;
                 color: #3b444a;
             }
-            div {
-                font-size: 15px;
-                color: #88a0ae;
-                text-indent: 2em;
+            .ant-list-item-meta-avatar {
+                margin-right: 0;
+            }
+            .ant-list-item {
+                padding: 5px 0;
+                border-bottom: none;
+                a {
+                    width: 160px;
+                    // color: #88A0AE;
+                    font-size: 15px;
+                    display: inline-block;
+                    .ellipse;
+                }
             }
         }
-    }</style
+    }
+    main {
+        flex: 1;
+        background: #1d2327;
+        padding: 20px;
+        h4 {
+            font-size: 17px;
+            color: #e5e5e5;
+        }
+        p {
+            font-size: 13px;
+            color: #3b444a;
+        }
+        div {
+            font-size: 15px;
+            color: #88a0ae;
+            text-indent: 2em;
+        }
+    }
+}
+</style
 >;