|
|
@@ -10,7 +10,7 @@
|
|
|
<template #footer>
|
|
|
<a-button key="submit"
|
|
|
class="cancelBtn"
|
|
|
- @click="cancel">审核拒绝</a-button>
|
|
|
+ @click="refuse">审核拒绝</a-button>
|
|
|
<a-button key="submit"
|
|
|
type="primary"
|
|
|
:loading="loading"
|
|
|
@@ -226,6 +226,8 @@ import {
|
|
|
} from "@/views/information/spot-contract/setup";
|
|
|
import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
|
|
|
import {formatTime, formatValue} from "@/common/methods";
|
|
|
+import {changeOrderContract, OrderContractControl} from "@/views/information/spot-contract/components/setup";
|
|
|
+import {Modal} from "ant-design-vue";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'spot-contract-detail',
|
|
|
@@ -236,16 +238,51 @@ export default defineComponent({
|
|
|
default: {},
|
|
|
},
|
|
|
},
|
|
|
- setup() {
|
|
|
+ setup(props, context) {
|
|
|
const { visible, cancel } = closeModal('spot_contract_btn_check');
|
|
|
- const loading = ref<boolean>(false);
|
|
|
+ const { loading, orderContractState } = changeOrderContract()
|
|
|
const maskClosableFlag = ref<boolean>(false);
|
|
|
function submit() {
|
|
|
- loading.value = true;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- cancel();
|
|
|
- }, 2000);
|
|
|
+ Modal.confirm({
|
|
|
+ title: '是否确认审核通过',
|
|
|
+ okText: '确认审核通过',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk() {
|
|
|
+ // 审核通过
|
|
|
+ orderContractState(props.selectedRow.spotcontractid, 4)
|
|
|
+ .then(res => {
|
|
|
+ cancel()
|
|
|
+ context.emit('refresh')
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ console.log('Cancel');
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function refuse(){
|
|
|
+ Modal.confirm({
|
|
|
+ title: '是否确认审核拒绝',
|
|
|
+ okText: '确认审核拒绝',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk() {
|
|
|
+ // 审核拒绝
|
|
|
+ OrderContractControl().orderContractState(props.selectedRow.spotcontractid, 4)
|
|
|
+ .then(res => {
|
|
|
+ cancel()
|
|
|
+ context.emit('refresh')
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ console.log('Cancel');
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
return {
|
|
|
visible,
|
|
|
@@ -259,6 +296,7 @@ export default defineComponent({
|
|
|
getContractStatusName,
|
|
|
formatTime,
|
|
|
getPriceTypeName,
|
|
|
+ refuse,
|
|
|
};
|
|
|
},
|
|
|
});
|