Przeglądaj źródła

commit 现货合同

xkwg 4 lat temu
rodzic
commit
940532aef3

+ 11 - 4
src/views/information/spot-contract/components/setup.ts

@@ -1,15 +1,21 @@
 import {GldErmcpSpotContractOperateReq} from "@/services/proto/spotcontract/interface";
 import {orderContract} from "@/services/proto/spotcontract";
 import {ref} from "vue";
+import {getSelectedAccountId} from "@/services/bus/account";
 
 /**
- * 删除未提交合同
+ * 删除未提交合同 // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
  */
 export function deleteOrderContract(){
     const loading = ref<boolean>(false);
 
-    function orderContractState(req: GldErmcpSpotContractOperateReq): Promise<string>{
-       return orderContract(req)
+    function orderContractState(id: string): Promise<string>{
+        const reqs : GldErmcpSpotContractOperateReq = {
+            SpotContractID: Number(id),
+            OperateType: 5,
+            Remark: '',
+        }
+       return orderContract(reqs)
             .then(res => {
                 return Promise.reject("删除成功")
             })
@@ -21,4 +27,5 @@ export function deleteOrderContract(){
     }
 
     return {loading, orderContractState}
-}
+}
+