Ver código fonte

commit 接口修改

yu.jie 4 anos atrás
pai
commit
d97f50787a

+ 17 - 1
src/services/go/ermcp/spot-contract/index.ts

@@ -1,7 +1,12 @@
 /** ================================= 现货合同 ================================**/
 import APP from '@/services';
 import { commonSearch_go } from '@/services/go';
-import { Ermcp3ContractReq, Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
+import {
+    Ermcp3ContractReq,
+    Ermcp3ContractRsp,
+    ErmcpOPLogModel,
+    QueryChangeLogReq
+} from '@/services/go/ermcp/spot-contract/interface';
 import {getUserId} from "@/services/bus/account";
 
 /**
@@ -20,3 +25,14 @@ export function QuerySpotContract(req: Ermcp3ContractReq): Promise<Ermcp3Contrac
     });
 }
 
+/**
+ * 查询变更记录 /Ermcp/QueryChangeLog
+ * @param req
+ * @constructor
+ */
+export function QueryChangeLog(req: QueryChangeLogReq): Promise<ErmcpOPLogModel[]> {
+    return commonSearch_go('/Ermcp/QueryChangeLog', req).catch((err) => {
+        throw new Error(`查询变更记录: ${err.message}`);
+    });
+}
+

+ 24 - 0
src/services/go/ermcp/spot-contract/interface.ts

@@ -71,3 +71,27 @@ export interface Ermcp3ContractRsp {
     wrstandardid	:number;//品类ID
     wrstandardname	:string;//品类名称
 }
+
+/**
+ * 查询变更记录 请求
+ */
+export interface QueryChangeLogReq {
+    RelatedId: string
+}
+
+/**
+ * 查询变更记录 返回
+ */
+export interface ErmcpOPLogModel{
+    aftervalue	:number;//变更后
+    applyid	:string;//操作人ID
+    applyname	:string;//操作人名称
+    beforevalue	:number;//变更前
+    biztype	:number;//业务类型 - 1:套保计划 2:现货合同
+    contracttype	:number;//现货合同类型 - 1:采购 -1:销售
+    logvalue	:number;//数值
+    operatelogtype	:number;//操作流水类型
+    operatelogtypedesc	:string;//操作流水类型名称
+    relatedid	:string;//现货合同ID\套保计划
+    updatetime	:string;//更新时间
+}

+ 79 - 4
src/views/information/spot-contract/components/detail/index.vue

@@ -204,11 +204,21 @@
 import { defineComponent, PropType, reactive, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
+import {Ermcp3ContractRsp, QueryChangeLogReq} from '@/services/go/ermcp/spot-contract/interface';
 import { getStatusName } from '@/common/constants/enumsName';
 import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 import { formatValue, formatTime } from '@/common/methods/format';
 import { v4 as uuidv4 } from 'uuid';
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
+import {QueryAddUserInfoApply} from "@/services/go/ermcp/customInfo";
+import {QueryBusinessFp, QueryBusinessKx} from "@/services/go/ermcp/finance-review";
+import {QueryBusinessFpReq, QueryBusinessKxReq} from "@/services/go/ermcp/finance-review/interface";
+import {QueryBusinessDj, QueryBusinessJs} from "@/services/go/ermcp/business-review";
+import {QueryBusinessDjReq, QueryBusinessJsReq} from "@/services/go/ermcp/business-review/interface";
+import {QueryAreaStockApply} from "@/services/go/ermcp/inventory-review";
+import {QueryAreaStockApplyReq} from "@/services/go/ermcp/inventory-review/interface";
+import {QueryChangeLog} from "@/services/go/ermcp/spot-contract";
+import * as Long from "long";
 
 export default defineComponent({
     name: 'spot-contract-detail',
@@ -219,13 +229,78 @@ export default defineComponent({
             default: {},
         },
     },
-    setup() {
-        const { visible, cancel } = closeModal('detail');
+    setup: function (props, context) {
+        const {visible, cancel} = closeModal('detail');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
+
         function submit() {
             cancel();
+
+            let kxParam: QueryBusinessKxReq = {
+                relatedid: props.selectedRow.spotcontractid
+            }
+            requestResultLoadingAndInfo(QueryBusinessKx, kxParam, loading, ['款项记录请求成功', '款项记录请求失败:']).then((res) => {
+                console.log("款项记录请求成功:  \n")
+                console.log(res)
+                cancel();
+                context.emit('refresh');
+            });
+
+            let jsParam: QueryBusinessJsReq = {
+                relatedid: props.selectedRow.spotcontractid
+            }
+            requestResultLoadingAndInfo(QueryBusinessJs, jsParam, loading, ['交收记录请求成功', '交收记录请求失败:']).then((res) => {
+                console.log("交收记录请求成功:  \n")
+                console.log(res)
+                cancel();
+                context.emit('refresh');
+            });
+
+            let fpParam: QueryBusinessFpReq = {
+                relatedid: props.selectedRow.spotcontractid
+            }
+            requestResultLoadingAndInfo(QueryBusinessFp, fpParam, loading, ['发票记录请求成功', '发票记录请求失败:']).then((res) => {
+                console.log("发票记录请求成功:  \n")
+                console.log(res)
+                cancel();
+                context.emit('refresh');
+            });
+
+            let djParam: QueryBusinessDjReq = {
+                relatedid: props.selectedRow.spotcontractid
+            }
+            requestResultLoadingAndInfo(QueryBusinessDj, djParam, loading, ['点价记录请求成功', '点价记录请求失败:']).then((res) => {
+                console.log("点价记录请求成功:  \n")
+                console.log(res)
+                cancel();
+                context.emit('refresh');
+            });
+
+            let StockParam: QueryAreaStockApplyReq = {
+                spotcontractid: Number(props.selectedRow.spotcontractid),
+                inouttype: '1,3'
+            }
+            debugger
+            requestResultLoadingAndInfo(QueryAreaStockApply, StockParam, loading, ['入库记录请求成功', '入库记录请求失败:']).then((res) => {
+                console.log("入库记录请求成功:  \n")
+                console.log(res)
+                cancel();
+                context.emit('refresh');
+            });
+
+            let changParam: QueryChangeLogReq = {
+                RelatedId: props.selectedRow.spotcontractid
+            }
+            requestResultLoadingAndInfo(QueryChangeLog, changParam, loading, ['变更记录请求成功', '变更记录请求失败:']).then((res) => {
+                console.log("变更记录请求成功:  /n")
+                console.log(res)
+                cancel();
+                context.emit('refresh');
+            });
+
         }
+
         const columns = [
             {
                 title: '序号',
@@ -286,7 +361,7 @@ export default defineComponent({
                 dataIndex: 'status',
                 key: 'status',
                 align: 'center',
-                slots: { customRender: 'status' },
+                slots: {customRender: 'status'},
             },
         ];