|
|
@@ -6,6 +6,8 @@
|
|
|
*
|
|
|
*/
|
|
|
|
|
|
+import { commonResultInfo, getRequestResultInfo } from "@/common/methods/request";
|
|
|
+import { operationContractReq } from "@/services/proto/contract";
|
|
|
import {
|
|
|
ErmcpContractOperateApplyReq,
|
|
|
FundsReq,
|
|
|
@@ -13,15 +15,10 @@ import {
|
|
|
SettlementReq,
|
|
|
SomePriceReq
|
|
|
} from "@/services/proto/contract/interface";
|
|
|
-import {operationContractReq} from "@/services/proto/contract";
|
|
|
+import { objectToUint8Array } from "@/utils/objHandle";
|
|
|
+import { purchaseStateSign } from "@/views/business/purchase/setup";
|
|
|
import Long from "long";
|
|
|
-import {commonResultInfo, getRequestResultInfo} from "@/common/methods/request";
|
|
|
-import {purchaseStateSign} from "@/views/business/purchase/setup";
|
|
|
-import {hedgePlanReq} from "@/services/proto/hedgeplan";
|
|
|
-import {Ref} from "vue";
|
|
|
-import {objectToUint8Array} from "@/utils/objHandle";
|
|
|
-import {ermcpInOutStockApplyReq} from "@/services/proto/warehouse";
|
|
|
-import {ERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
|
|
|
+import { Ref } from "vue";
|
|
|
|
|
|
/**
|
|
|
* 这里负责 点价登记, 交收登记, 款项登记, 发票登记, 入库登记
|
|
|
@@ -50,7 +47,7 @@ export function settlementReq(spotcontractid: string, req: SettlementReq, loadin
|
|
|
/**
|
|
|
* 款项登记
|
|
|
*/
|
|
|
-export function fundsReq(spotcontractid: string, req: FundsReq, loading: Ref<boolean>,Remark:String): Promise<string> {
|
|
|
+export function fundsReq(spotcontractid: string, req: FundsReq, loading: Ref<boolean>, Remark: String): Promise<string> {
|
|
|
return operationContractRsp(3,
|
|
|
operationContractReqBuilder(req, spotcontractid, 3),
|
|
|
loading)
|
|
|
@@ -65,15 +62,6 @@ export function invoiceReq(spotcontractid: string, req: InvoiceReq, loading: Ref
|
|
|
loading)
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 入库登记
|
|
|
- */
|
|
|
-export function storageReq(req: ERMCPAreaInOutStockApplyReq, loading: Ref<boolean>): Promise<string>{
|
|
|
- const sign = getRequestResultInfo(purchaseStateSign, 5) // 接口请求后的返回提示 这里统一进行管理
|
|
|
- const result = ermcpInOutStockApplyReq(req)
|
|
|
- return commonResultInfo(result, sign, loading)
|
|
|
-}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 请求报文组装
|
|
|
@@ -81,10 +69,10 @@ export function storageReq(req: ERMCPAreaInOutStockApplyReq, loading: Ref<boolea
|
|
|
* @param id 操作的合同id
|
|
|
* @param type 操作类型
|
|
|
*/
|
|
|
-export function operationContractReqBuilder(req: Object, id: string, type: number,Remark?:String): ErmcpContractOperateApplyReq {
|
|
|
+export function operationContractReqBuilder(req: Object, id: string, type: number, Remark?: String): ErmcpContractOperateApplyReq {
|
|
|
return {
|
|
|
OperateType: 1, // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
|
|
|
- Remark:'',
|
|
|
+ Remark: '',
|
|
|
Info: {
|
|
|
OperateApplyType: type, // uint32 操作申请类型-1:点价2:结算3:款项4:发票
|
|
|
RelatedID: Long.fromString(id), // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
|