confirm.vue 1.35 KB
<template>
    <Modal
        v-model="modal"
        title="是否确认对账?"
        @on-ok="onOk(data)"
        @on-cancel="onCancel(data)">
        <Alert type="warning" show-icon>温馨提示:结算金额以结算单为准</Alert>
        <Form :label-width="80">
            <FormItem label="支付金额:" style="margin-bottom: 0">
                <span>{{data.lastPaymentAmount}}</span>
            </FormItem>
            <FormItem label="结算比例:" style="margin-bottom: 0">
                <span>{{data.clearingPercent * 100}}%</span>
            </FormItem>
            <FormItem label="结算金额:" style="margin-bottom: 0">
                <span>{{data.clearingAmount}}</span>
            </FormItem>
        </Form>
    </Modal>
</template>

<script>
export default {
    name: 'reconciliation-confirm',
    props: {
        onOk: {
            type: Function,
            default() {
                return {};
            }
        },
        onCancel: {
            type: Function,
            default() {
                return {};
            }
        }
    },
    data() {
        return {
            modal: this.value,
            data: {}
        };
    },
    methods: {
        show(row) {
            this.data = row;
            this.modal = true;
        },
        hide() {
            this.modal = false;
        }
    }
};
</script>