|
|
@@ -5,13 +5,18 @@ import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
|
|
|
import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
|
|
|
import { QueryDeliveryGoods, QueryDeliveryGoodsDetail } from '@/services/go/ermcp/goodsInfo';
|
|
|
import { Ermcp3Brand, Ermcp3Wrstandard, ErmcpDeliveryGoodsRsp } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
-import { GldSpotContractInfo } from "@/services/proto/spotcontract/interface";
|
|
|
-import { changeOrderContract } from "@/views/information/spot-contract/components/setup";
|
|
|
+import {
|
|
|
+ GldErmcpSpotContractOperateReq,
|
|
|
+ GldSpotContractInfo,
|
|
|
+ SpotContractOperateReq
|
|
|
+} from "@/services/proto/spotcontract/interface";
|
|
|
+import { orderContractControl } from "@/views/information/spot-contract/components/setup";
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import { RuleObject } from 'ant-design-vue/lib/form/interface';
|
|
|
import moment, { Moment } from 'moment';
|
|
|
-import { reactive, ref, UnwrapRef } from 'vue';
|
|
|
+import {reactive, Ref, ref, UnwrapRef} from 'vue';
|
|
|
import { FormState } from "./interface";
|
|
|
+import Long from "long";
|
|
|
|
|
|
export function handleFromState() {
|
|
|
const formState: UnwrapRef<FormState> = reactive({
|
|
|
@@ -56,12 +61,12 @@ export function handleFromState() {
|
|
|
* 新增现货合同 表单提交
|
|
|
*/
|
|
|
export function addContractReq() {
|
|
|
- const { loading, orderContractState } = changeOrderContract()
|
|
|
/**
|
|
|
* @param form 表单信息
|
|
|
* @Param type 1: 保存草稿 2: 提交申请
|
|
|
*/
|
|
|
- function sendReq(form: FormState, type: number): Promise<string> {
|
|
|
+ function sendReq(form: FormState, loading: Ref<boolean>): Promise<string> {
|
|
|
+ loading.value = true
|
|
|
const info: GldSpotContractInfo = {
|
|
|
UserID: APP.get('userAccount').memberuserid,// 机构ID
|
|
|
ProductType: 1, // 产品类型 产品类型-1:标准仓单2:等标3:非标
|
|
|
@@ -101,7 +106,13 @@ export function addContractReq() {
|
|
|
// TradeUserID: form.TradeUserID, // 交易员ID
|
|
|
// SaleUserID: form.SaleUserID,// 业务员id
|
|
|
}
|
|
|
- return orderContractState('0', type, info)
|
|
|
+ const params : GldErmcpSpotContractOperateReq = {
|
|
|
+ SpotContractID: 0,
|
|
|
+ OperateType: 1,
|
|
|
+ Remark: '',
|
|
|
+ Info: info,
|
|
|
+ }
|
|
|
+ return orderContractControl(params, loading)
|
|
|
.then(res => {
|
|
|
return Promise.resolve(res);
|
|
|
})
|
|
|
@@ -110,7 +121,7 @@ export function addContractReq() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- return { loading, sendReq }
|
|
|
+ return { sendReq }
|
|
|
}
|
|
|
|
|
|
/**
|