<template>
  <!-- 确认提货-->
  <div>
  </div>
</template>

<script lang="ts">
import { defineComponent, PropType, ref } from 'vue';
import Drawer from '@/common/components/drawer/index.vue';
import { WrFinanceBuyApply } from '@/services/go/wrtrade/interface';
import { ModalEnum } from '@/common/constants/modalNameEnum';
import { _closeModal } from '@/common/setup/modal/modal';
import { Modal } from 'ant-design-vue';
import { WRTradeFinanceBuyCancel } from '@/services/proto/warehousetrade';
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
import { WRTradeFinanceBuyCancelReq } from '@/services/proto/warehousetrade/interface';
import { getSelectedAccountId } from '@/services/bus/account';
import { v4 as uuidv4 } from 'uuid';
import Long from 'long';

export default defineComponent({
    name: ModalEnum.financing_manager_apply_cancel,
    components: { Drawer },
    emits: ['cancel', 'update'],
    props: {
        selectedRow: {
            type: Object as PropType<WrFinanceBuyApply>,
            default: {},
        },
    },
    setup(props, context) {
        const { visible, cancel } = _closeModal(context);
        const loading = ref<boolean>(false);
        Modal.confirm({
            title: '确认提货',
            content: '是否确认提货！',
            onOk: submit,
            onCancel: cancel,
        });
        function submit() {
            // 挂牌撤单请求
            // const paramReq: WRTradeFinanceBuyCancelReq = {
            //     AccountID: getSelectedAccountId(), // uint64 资金账号
            //     FinanceApplyID : Long.fromString(props.selectedRow.financeapplyid), // uint64 融资申请单ID
            //     ClientSerialNo: uuidv4(), // 客户端流水号 // string 客户端流水号
            // };
            // requestResultLoadingAndInfo(WRTradeFinanceBuyCancel, paramReq, loading, ['撤销成功', '撤销失败:']).then(() => {
            //     cancel(true);
            // });
        }
        return {
            visible,
            cancel,
            submit,
            loading,
        };
    },
});
</script>

<style lang="less" scoped>
</style>;
