Explorar el Código

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

huangbin hace 4 años
padre
commit
816bc388b9

+ 1 - 1
src/goServiceAPI/ermcp/exposure-report/index.ts

@@ -13,7 +13,7 @@ import {QueryExposureDayReportReq} from "./interface";
 export async function QueryExposureDayReport(queryInfo:QueryExposureDayReportReq):Promise<type.QueryExposureDayReportRsp[]>
 {
     try {
-        return commonSearch_go('/Ermcp/QryReportDayExposure', { queryInfo });
+        return commonSearch_go('/Ermcp/QryReportDayExposure',  queryInfo );
     } catch (err) {
         throw new Error(err.message);
     }

+ 55 - 1
src/goServiceAPI/ermcp/exposure/index.ts

@@ -1 +1,55 @@
-/** ================================= 敞口 ================================**/
+import APP from "@/services";
+import {commonSearch_go} from "@/goServiceAPI";
+import {
+    Ermcp3AreaSpot, Ermcp3AreaSpotDetail,
+    Ermcp3ExposureDetail,
+    Ermcp3ExposureReq,
+    ErmcpRealExposureModel
+} from "@/goServiceAPI/ermcp/exposure/interface";
+
+/** ================================= 敞口 ================================**/
+
+/**
+ * 请求实时敞口 /Ermcp/QueryRealtimeExposure
+ * @constructor
+ */
+export function QueryActualExposure() : Promise<ErmcpRealExposureModel[]>{
+    const AreaUserID = APP.get('userAccount').memberuserid; // 所属机构id
+    return commonSearch_go('/Ermcp/QueryRealtimeExposure', {AreaUserID})
+        .catch(err => {
+            throw new Error(`查询实时敞口: ${err.message}`);
+        })
+}
+
+/**
+ * 请求实时敞口现货明细信息 /Ermcp3/QueryExposureDetail
+ * @param req
+ * @constructor
+ */
+export function QueryActualExposureDetail(req: Ermcp3ExposureReq) : Promise<Ermcp3ExposureDetail[]>{
+    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
+    return commonSearch_go('/Ermcp3/QueryExposureDetail', {areauserid, ...req})
+        .catch(err => {
+            throw new Error(`查询实时敞口现货明细: ${err.message}`);
+        })
+}
+
+/**
+ * 请求敞口现货头寸 /Ermcp3/QueryExposureSpot
+ * @constructor
+ */
+export function QuerySpotPosition() : Promise<Ermcp3AreaSpot[]>{
+    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
+    return commonSearch_go('/Ermcp/QueryExposureSpot', {areauserid})
+        .catch(err => {
+            throw new Error(`查询敞口现货头寸: ${err.message}`);
+        })
+}
+
+export function QuerySpotPositionDetail() : Promise<Ermcp3AreaSpotDetail[]>{
+    const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
+    return commonSearch_go('/Ermcp/QueryExposureSpot', {areauserid})
+        .catch(err => {
+            throw new Error(`查询敞口现货头寸: ${err.message}`);
+        })
+}

+ 104 - 0
src/goServiceAPI/ermcp/exposure/interface.ts

@@ -0,0 +1,104 @@
+/**
+ * 实时敞口信息返回
+ */
+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{
+    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 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 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;//时间
+}
+
+

+ 2 - 2
src/goServiceAPI/ermcp/finance-report/index.ts

@@ -14,7 +14,7 @@ import {QueryFinanceMonthReportReq} from "./interface";
 export async function QueryFinanceDayReport(queryInfo:QueryFinanceDayReportReq):Promise<type.QueryFinanceDayReportRsp[]>
 {
     try {
-        return commonSearch_go('/Ermcp/QryReportDayFinance', { queryInfo });
+        return commonSearch_go('/Ermcp/QryReportDayFinance',  queryInfo );
     } catch (err) {
         throw new Error(err.message);
     }
@@ -28,7 +28,7 @@ export async function QueryFinanceDayReport(queryInfo:QueryFinanceDayReportReq):
 export async function QueryFinanceInvoiceDayReport(queryInfo:QueryFinanceDayReportReq):Promise<type.QueryFinanceInvoiceDayReportRsp[]>
 {
     try {
-        return commonSearch_go('/Ermcp/QryReportDayFinanceFp', { queryInfo });
+        return commonSearch_go('/Ermcp/QryReportDayFinanceFp', queryInfo );
     } catch (err) {
         throw new Error(err.message);
     }

+ 2 - 2
src/goServiceAPI/ermcp/inventory-report/index.ts

@@ -12,7 +12,7 @@ import {QueryAreaStockReportDetailReq} from "./interface";
 export async function QueryAreaStockReport(queryInfo:QueryAreaStockReportReq):Promise<type.QueryAreaStockReportRsp[]>
 {
     try {
-        return commonSearch_go('/Ermcp3/QueryAreaStockReport', { queryInfo });
+        return commonSearch_go('/Ermcp3/QueryAreaStockReport',  queryInfo );
     } catch (err) {
         throw new Error(err.message);
     }
@@ -26,7 +26,7 @@ export async function QueryAreaStockReport(queryInfo:QueryAreaStockReportReq):Pr
 export async function QueryAreaStockReportDetail(queryInfo:QueryAreaStockReportDetailReq):Promise<type.QueryAreaStockReportDetailRsp[]>
 {
     try {
-        return commonSearch_go('/Ermcp3/QueryAreaStockReportDetail', { queryInfo });
+        return commonSearch_go('/Ermcp3/QueryAreaStockReportDetail',  queryInfo );
     } catch (err) {
         throw new Error(err.message);
     }

+ 1 - 1
src/goServiceAPI/ermcp/purchase/index.ts

@@ -13,7 +13,7 @@ import {Ermcp3SellBuyContract, SellBuyContractReq} from "@/goServiceAPI/ermcp/pu
  * @constructor
  */
 export function QueryPurchase( req : SellBuyContractReq) : Promise<Ermcp3SellBuyContract[]>{
-    return commonSearch_go('/Ermcp3/QuerySpotContractBS', {req})
+    return commonSearch_go('/Ermcp3/QuerySpotContractBS', req)
         .catch(err => {
             throw new Error(`查询采购信息: ${err.message}`);
         })

+ 1 - 1
src/goServiceAPI/ermcp/sell/index.ts

@@ -13,7 +13,7 @@ import {commonSearch_go} from "@/goServiceAPI";
  * @constructor
  */
 export function QueryWareHouse(req : SellBuyContractReq) : Promise<Ermcp3SellBuyContract[]>{
-    return commonSearch_go('/Ermcp3/QuerySpotContractBS', {req})
+    return commonSearch_go('/Ermcp3/QuerySpotContractBS', req)
         .catch(err => {
             throw new Error(`查询销售信息: ${err.message}`);
         })

+ 2 - 2
src/goServiceAPI/ermcp/spot-report/index.ts

@@ -14,7 +14,7 @@ import {QuerySpotMonthReportDetailReq} from "./interface";
  export async function QuerySpotDayReport(queryInfo:QuerySpotDayReportReq):Promise<type.QuerySpotDayReportRsp[]>
  {
      try {
-         return commonSearch_go('/Ermcp/QryReportDaySpot', { queryInfo });
+         return commonSearch_go('/Ermcp/QryReportDaySpot',  queryInfo );
      } catch (err) {
          throw new Error(err.message);
      }
@@ -28,7 +28,7 @@ import {QuerySpotMonthReportDetailReq} from "./interface";
  export async function QuerySpotDayReportDetail(queryInfo:QuerySpotDayReportDetailReq):Promise<type.QuerySpotDayReportDetailRsp[]>
  {
      try {
-         return commonSearch_go('/Ermcp/QryReportDaySpotDetail', { queryInfo });
+         return commonSearch_go('/Ermcp/QryReportDaySpotDetail',  queryInfo );
      } catch (err) {
          throw new Error(err.message);
      }

+ 1 - 1
src/goServiceAPI/ermcp/warehouse-info/index.ts

@@ -9,7 +9,7 @@ import {ErmcpWareHouseInfo, WareHouseInfoReq} from "@/goServiceAPI/ermcp/warehou
  * @constructor
  */
 export function QueryWareHouse( req : WareHouseInfoReq) : Promise<ErmcpWareHouseInfo[]>{
-    return commonSearch_go('/Ermcp/QueryWarehouseInfo', {req})
+    return commonSearch_go('/Ermcp/QueryWarehouseInfo', req)
         .catch(err => {
             throw new Error(`查询仓库信息: ${err.message}`);
         })

+ 1 - 2
src/goServiceAPI/ermcp/warehouse-info/interface.ts

@@ -18,8 +18,7 @@ export interface ErmcpWareHouseInfo{
     countryid	:number;//国家
     createtime	:string;//创建时间
     districtid	:number;//区
-    hasvideo	:number;//是否有视频 - number;
-//:无 1:有
+    hasvideo	:number;//是否有视频 - number; //:无 1:有
     provinceid	:number;//省
     remark	:string;//审核备注
     videourl	:string;//视频地址

+ 1 - 0
src/services/bus/table.ts

@@ -18,6 +18,7 @@ export interface ColumnType {
 interface TableKey {
     table_pcweb_delivery: string; // 现货合同
     table_pcweb_userinfo: string; // 客户资料
+    table_pcweb_warehouse: string; // 仓库信息
 }
 
 /**

+ 13 - 11
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -7,9 +7,10 @@
       <a-button>重置</a-button>
       <a-button>新增</a-button>
     </div>
-    <!-- <a-table :columns="columns"
-             :data-source="data"
-             @change="handleChange" /> -->
+    <a-table :columns="columns"
+             :pagination="false"
+             rowKey="key"
+             :data-source="wareHouseInfoList" />
   </div>
 </template>
 
@@ -17,12 +18,12 @@
 import { computed, defineComponent, ref } from 'vue';
 
 import { initData } from '@/setup/methods/index';
-import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
-import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { QueryWareHouse } from '@/goServiceAPI/ermcp/warehouse-info/index';
+import { ErmcpWareHouseInfo } from '@/goServiceAPI/ermcp/warehouse-info/interface';
 import { message } from 'ant-design-vue';
 
 // 查询客户资料列表
-function getCustomList() {
+function getWarehouseInfoList() {
     // const filteredInfo = ref();
     // const sortedInfo = ref();
     // const columns = computed(() => {
@@ -60,28 +61,29 @@ function getCustomList() {
     //         },
     //     ];
     // });
-    const customList = ref<QueryCustomInfoType[]>([]);
+    const wareHouseInfoList = ref<ErmcpWareHouseInfo[]>([]);
     function actionQuery() {
-        QueryCustomInfo(3)
+        const reqParam = { userid: 0,  status: "1"};
+        QueryWareHouse(reqParam)
             .then((res) => {
                 console.log('L', res);
             })
             .catch((err) => message.error(err));
     }
 
-    return { customList, actionQuery };
+    return { wareHouseInfoList, actionQuery };
 }
 
 export default defineComponent({
     name: 'warehouse-info-normal',
     components: {},
     setup() {
-        const { customList, actionQuery } = getCustomList();
+        const { wareHouseInfoList, actionQuery } = getWarehouseInfoList();
         initData(() => {
             actionQuery();
             // 加载数据在这里
         });
-        return { customList };
+        return { wareHouseInfoList };
     },
 });
 </script>