<template>
    <div class="app-container">
        <div class="flexBet searchTop">
            <!-- <div class="title flex m20">
                <div class="bar"></div>
                <div class="text">代付子单</div>
            </div> -->

        </div>

        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="106px"
            class="flex form" style="position: relative">
            <el-form-item label="总订单号" prop="mainOrderNo">
                <el-input size="medium" v-model="queryParams.mainOrderNo" placeholder="请输入总订单号"
                    @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
            </el-form-item>
            <el-form-item label="子订单号" prop="orderNo">
                <el-input size="medium" v-model="queryParams.orderNo" placeholder="请输入子订单号"
                    @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
            </el-form-item>
            <el-form-item label="商户订单号" prop="merchantOrderNo">
                <el-input size="medium" v-model="queryParams.merchantOrderNo" placeholder="请输入商户订单号"
                    @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
            </el-form-item>

            <el-form-item label="商户名称" prop="merchantName">
                <el-input size="medium" v-model="queryParams.merchantName" placeholder="请输入商户名称"
                    @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
            </el-form-item>




            <el-form-item label="卡商" prop="carddealerId">
                <el-select v-model="queryParams.carddealerId" placeholder="请选择卡商" clearable size="medium">
                    <el-option v-for="(item, i) in carddealerChannelAll" :key="i" :label="item.username"
                        :value="item.id"></el-option>
                </el-select>
            </el-form-item>



            <el-form-item label="收款卡号" prop="cardNumber">
                <el-input size="medium" v-model="queryParams.cardNumber" placeholder="请输入收款卡号"
                    @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
            </el-form-item>

            <el-collapse>
                <el-collapse-item name="1">
                    <el-form-item label="持卡人姓名" prop="accountName">
                        <el-input size="medium" v-model="queryParams.accountName" placeholder="请输入持卡人姓名"
                            @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
                    </el-form-item>

                    <el-form-item label="订单金额" prop="amount">
                        <el-input size="medium" v-model="queryParams.amount" placeholder="请输入订单金额"
                            @keyup.enter.native="handleQuery" style="width: 180px; border-color: #e6f1ff" />
                    </el-form-item>

                    <el-form-item label="状态" prop="orderStatus">
                        <el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable size="medium">
                            <el-option v-for="(item, i) in showAll" :key="i" :label="item.label"
                                :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>

                    <el-form-item label="通道" prop="platformChannelId">
                        <el-select v-model="queryParams.platformChannelId" placeholder="请选择通道" clearable size="medium">
                            <el-option v-for="(item, i) in channelAll" :key="i" :label="item.channelName"
                                :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>

                    <el-form-item label="创建时间">
                        <el-date-picker v-model="dateRange[0]" size="small" style="width: 340px"
                            value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-"
                            start-placeholder="开始日期" end-placeholder="结束日期" :unlink-panels="true"
                            :default-time="['00:00:00', '23:59:59']"></el-date-picker>
                    </el-form-item>

                    <el-form-item label="更新时间">
                        <el-date-picker v-model="dateRange[1]" size="small" style="width: 340px"
                            value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-"
                            start-placeholder="开始日期" end-placeholder="结束日期" :unlink-panels="true"
                            :default-time="['00:00:00', '23:59:59']"></el-date-picker>
                    </el-form-item>
                </el-collapse-item>
            </el-collapse>
            <el-form-item style="margin-left:10px">

                <div class="searchTop flexBet" style="align-items: center">
                    <el-row :gutter="10" class="mb8">
                        <el-button type="primary" icon="" size="medium" @click="handleQuery">搜索</el-button>
                        <el-button icon="el-icon-refresh" size="medium" @click="resetQuery">重置</el-button>
                    </el-row>

                    <el-row :gutter="10" class="mb8" style="margin-left:8px">
                        <el-col :span="1.5">
                            <el-button type="primary" plain icon="" size="medium" @click="handleExport()">导出</el-button>
                        </el-col>
                    </el-row>

                    <!-- <el-row :gutter="10" class="mb8">
                <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
            </el-row> -->
                </div>
            </el-form-item>
        </el-form>

        <div class="searchTop flexBet">

        </div>

        <div class="bg">


            <el-table stripe :data="infoList" v-loading="loading" :row-class-name="tableRowClassName">
                <el-table-column label="总订单号" align="center" prop="mainOrderNo" />
                <el-table-column label="子订单号" align="center" prop="orderNo" />
                <el-table-column label="商户订单号" align="center" prop="merchantOrderNo" />
                <el-table-column label="商户" align="center" prop="merchantName" />


                <el-table-column :label="'订单金额'" align="center" prop="amount">
                    <template slot-scope="scope">
                        {{ parseFloat(NumberDiv(scope.row.amount, 100)).toFixed(2) }}
                    </template>
                </el-table-column>


                <el-table-column label="银行名称" align="center" prop="bankName" />
                <el-table-column label="卡号" align="center" prop="cardNumber" />
                <el-table-column label="姓名" align="center" prop="accountName" />
                <el-table-column label="开户行" align="center" prop="branchName" />
                <el-table-column :label="'状态'" align="center" prop="payeeRealAmount">
                    <template slot-scope="scope">
                        {{ scope.row.orderStatus == 1 ? '处理中' : scope.row.orderStatus == 2 ? '审核中' : scope.row.orderStatus
                            == 3 ? '成功'
                            : scope.row.orderStatus == 4 ? '驳回' : scope.row.orderStatus == 5 ? '已撤销' : '已关闭' }}
                    </template>
                </el-table-column>

                <el-table-column label="码商" align="center" prop="carddealerName" />

                <el-table-column :label="'付款人'" align="center" prop="payeeRealAmount" min-width="180">
                    <template slot-scope="scope">
                        <span v-if="scope.row.payCarddealerCard">{{ scope.row.payCarddealerCard.cardHolder }}</span>
                    </template>
                </el-table-column>

                <el-table-column :label="'付款卡(必须一致)'" align="center" prop="payeeRealAmount" min-width="180">
                    <template slot-scope="scope">
                        <span v-if="scope.row.payCarddealerCard">{{ scope.row.payCarddealerCard.cardHolder }}（{{
                            scope.row.payCarddealerCard.bankName }}）（{{ scope.row.payCarddealerCard.cardNumber }}）</span>
                    </template>
                </el-table-column>

                <!-- <el-table-column :label="'上传凭证'" align="center" prop="amount">
                    <template slot-scope="scope">
                        <el-button size="small" type="text" @click="handleCertificate(scope.row)" style="color: #006eff">
                            查看
                        </el-button>
                    </template>
                </el-table-column> -->
                <el-table-column label="创建时间" align="center" prop="createTime" min-width="180" />
                <el-table-column label="更新时间" align="center" prop="updateTime" min-width="180" />

                <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"
                    min-width="100">
                    <template slot-scope="scope">
                        <el-button size="small" type="text" @click="handleView(scope.row)"
                            style="color: #006eff">详情</el-button>
                        <el-button size="small" type="text" @click="handleClose(scope.row)" style="color: #006eff"
                            v-if="scope.row.orderStatus == 1">
                            关闭
                        </el-button>
                        <el-button size="small" type="text" @click="handlePay(scope.row)" style="color: #006eff"
                            v-if="scope.row.orderStatus == 2">
                            确认付款
                        </el-button>
                        <el-button size="small" type="text" @click="handleReject(scope.row)" style="color: #006eff"
                            v-if="scope.row.orderStatus == 2">
                            驳回
                        </el-button>
                        <el-button v-if="scope.row.orderStatus != 1" size="small" type="text"
                            @click="handleCertificate(scope.row)" style="color: #006eff">查看凭证</el-button>

                        <el-button size="small" type="text" v-clipboard:copy="getReadableText(scope.row)"
                            v-clipboard:success="handleClipboardSuccess" style="color: #006eff">复制</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize" @pagination="getList">
            </pagination>
        </div>

        <!-- 详情 -->
        <el-dialog v-dialogDrag :close-on-click-modal="false" :title="detailTitle" :visible.sync="isShowDetail" width="40%"
            append-to-body>
            <el-form label-width="142px" :label-suffix="':'">
                <div style="display: flex;justify-content: space-around;">
                    <div class="card-detail">
                        <el-form-item label="总单号">
                            {{ detailInfoList.mainOrderNo }}
                        </el-form-item>
                        <el-form-item label="子单号">
                            {{ detailInfoList.orderNo }}
                        </el-form-item>
                        <el-form-item label="商户名称">
                            {{ detailInfoList.merchantName }}
                        </el-form-item>
                        <el-form-item label="商户编号">
                            {{ detailInfoList.merchantNo }}
                        </el-form-item>
                        <el-form-item label="订单金额">
                            {{ parseFloat(NumberDiv(detailInfoList.amount, 100)).toFixed(2) }}
                        </el-form-item>
                        <el-form-item label="手续费">
                            {{ parseFloat(NumberDiv(detailInfoList.carddealerSingleFee, 100)).toFixed(2) }}
                        </el-form-item>
                        <el-form-item label="到账金额">
                            {{ parseFloat(NumberDiv(detailInfoList.commissionFee, 100)).toFixed(2) }}
                        </el-form-item>
                        <el-form-item label="创建时间">
                            {{ detailInfoList.createTime }}
                        </el-form-item>

                        <el-form-item label="更新时间">
                            {{ detailInfoList.updateTime }}
                        </el-form-item>
                    </div>
                    <div class="card-detail">
                        <el-form-item label="收款卡号">
                            {{ detailInfoList.cardNumber }}
                        </el-form-item>
                        <el-form-item label="币种">
                            {{ detailInfoList.currency }}
                        </el-form-item>
                        <el-form-item label="订单状态">
                            {{ detailInfoList.orderStatus == 1 ? '处理中' : detailInfoList.orderStatus == 2 ? '审核中' :
                                detailInfoList.orderStatus
                                    == 3 ? '成功'
                                    : detailInfoList.orderStatus == 4 ? '驳回' : detailInfoList.orderStatus == 5 ? '已撤销' : '已关闭' }}
                        </el-form-item>
                        <el-form-item label="开户行">
                            {{ detailInfoList.branchName }}
                        </el-form-item>
                        <el-form-item label="银行名称">
                            {{ detailInfoList.bankName }}
                        </el-form-item>
                        <el-form-item label="收款人">
                            {{ detailInfoList.accountName }}
                        </el-form-item>
                        <el-form-item label="备注">
                            {{ detailInfoList.remark }}
                        </el-form-item>
                    </div>
                </div>

            </el-form>
        </el-dialog>

        <!-- 关闭 -->
        <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
            <el-form ref="form" :model="form" :rules="rules" label-width="110px">
                <el-form-item label="备注" prop="remarks">
                    <el-input v-model="form.remarks" placeholder="请输入原因" style="width:300px" type="textarea" />
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitForm('form')">保 存</el-button>
                <el-button @click="cancel">取 消</el-button>
            </div>
        </el-dialog>


        <!-- 驳回 -->
        <el-dialog :title="title" :visible.sync="openReject" width="500px" append-to-body>
            <el-form ref="formReject" :model="form" :rules="rules" label-width="110px">
                <el-form-item label="备注" prop="remarks">
                    <el-input v-model="form.remarks" placeholder="请输入原因" style="width:300px" type="textarea" />
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitForm('formReject')">保 存</el-button>
                <el-button @click="cancel">取 消</el-button>
            </div>
        </el-dialog>



        <!-- 凭证 -->
        <el-dialog v-dialogDrag :close-on-click-modal="false" title="凭证" :visible.sync="isShowDetailImg" width="40%"
            append-to-body>
            <el-form label-width="142px" :label-suffix="':'">
                <el-form-item label="凭证图片">
                    <div style="display: flex;justify-content: space-around;flex-wrap: wrap;" v-if="imgCon">
                        <div>
                            <el-image style="width: 300px; height: 200px" :src="imgCon" @click="previewImage(imgCon)"
                                :preview-src-list="srcList">
                                <div slot="placeholder">
                                    <div style="margin-top: 40px">
                                        加载中<i class="el-icon-loading" />
                                    </div>
                                </div>
                            </el-image>
                        </div>
                    </div>
                    <div v-else>
                        无
                    </div>
                </el-form-item>
            </el-form>
        </el-dialog>

    </div>
</template>
  
<script>
import { listTransferOrderSub, getTransferOrderSub, delTransferOrderSub, addTransferOrderSub, updateTransferOrderSub, exportTransferOrderSub } from "@/api/order/TransferOrderSub";
import { payOutOrder, payMerchant } from "@/api/form";
import { common_api } from "@/api/form";
import cardMerchantOrderRefreshMixin from "@/api/cardMerchantOrderRefresh.mixin";



export default {
    name: "TransferOrder",
    dicts: ['collection_order_status'],
    mixins: [cardMerchantOrderRefreshMixin],
    data() {
        return {
            amount: null,

            // 所有通道
            channelAll: [],
            imgCon: '',

            // 预览
            srcList: ['https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg'],
            // 显示凭证
            isShowDetailImg: false,
            // 所有码商
            carddealerChannelAll: [],
            // 显示详情
            isShowDetail: false,
            // 详情
            detailTitle: "",
            // 详情的数据
            detailInfoList: {},
            dateRange: [],
            // 遮罩层
            loading: true,
            // 选中数组
            ids: [],
            // 非单个禁用
            single: true,
            // 非多个禁用
            multiple: true,
            // 显示搜索条件
            showSearch: true,
            // 总条数
            total: 0,
            // 代付订单表格数据
            infoList: [],
            // 弹出层标题
            title: "",
            // 是否显示弹出层
            open: false,
            openReject: false,

            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                orderStatus: null,
                amount: null,
                accountName: null,
                cardNumber: null,
                carddealerId: null,
                merchantName: null,
                merchantOrderNo: null,
                orderNo: null,
                mainOrderNo: null,
                platformChannelId: null,
            },
            showAll: [
                {
                    label: '全部',
                    value: null,
                },
                {
                    label: '处理中',
                    value: 1,
                },
                {
                    label: '审核中',
                    value: 2,
                },
                {
                    label: '成功',
                    value: 3,
                },
                {
                    label: '驳回',
                    value: 4,
                },
                {
                    label: '已撤销',
                    value: 5,
                },
                {
                    label: '已关闭',
                    value: 6,
                },
            ],
            // 表单参数
            form: {},
            // 表单校验
            rules: {
                remarks: [{ required: true, message: "请输入原因", trigger: "blur" }],

            },
            ceshi: {},
        };
    },
    created() {
        this.getList();
        this.init();
    },
    $autoRefresh: {
    // 刷新间隔时间
    interval: 3000 * 10,
    // 立即执行一次
    immediate: false,
    // 被回调的函数, 不保证顺序执行
    handles: ["getList"],
    /**
     * 调用 handles 后的回调函数
     * 这个字段为数组类型, 数组中的每个元素都是一个函数, 在对应索引的 handle 执行后被调用
     */
    callbacks: [],
    // 是否启用调试模式
    debug: true,
  },
    methods: {
        getReadableText(data) {
            return `${this.NumberDiv(data.amount, 100)}\n${data.cardNumber}\n${data.accountName}\n${data.bankName}`
        },
        /** 复制代码成功 */
        handleClipboardSuccess() {
            this.$modal.msgSuccess("复制成功");
        },
        tableRowClassName({ row, rowIndex }) {
            if (row.orderStatus == 4) {
                return "redOrder";
            }
            if (row.orderStatus == 1) {
                return "yellowOrder";
            }
            if (row.orderStatus == 2) {
                return "blueOrder";
            }
            if (row.orderStatus == 3) {
                return "greenOrder";
            }
            if (row.orderStatus == 5) {
                return "greyOrder";
            }
            if (row.orderStatus == 6) {
                return "whiteOrder";

            }
        },
        // 预览图片
        previewImage(abUrl) {
            this.srcList[0] = abUrl;
        },
        // 凭证图片
        handleCertificate(row) {
            // payMerchant.getCertificate({
            //   orderNo: row.orderNo
            // })
            //   .then((response) => {

            //   });

            this.isShowDetailImg = true;
            this.imgCon = row.proofImg
            this.$forceUpdate()
        },
        /** 驳回按钮操作 */
        handleReject(row) {
            this.reset();
            this.openReject = true;
            this.form.orderSubNo = row.orderNo
            this.title = "驳回";
        },
        /** 确认付款操作 */
        handlePay(row) {
            const ids = row.orderNo || this.ids;
            this.$confirm(
                '是否确认付款',
                "警告",
                {
                    confirmButtonText: "确定",
                    cancelButtonText: "取消",
                    type: "warning",
                }
            )
                .then(function () {
                    return payMerchant.confirmPayment({
                        orderSubNo: ids
                    });
                })
                .then(() => {
                    this.getList();
                    this.msgSuccess("操作成功");
                })
                .catch(() => { });
        },
        /** 关闭按钮操作 */
        handleClose(row) {
            this.reset();
            this.open = true;
            this.form.orderSubNo = row.orderNo
            this.title = "关闭";
        },
        init() {
            common_api.platformChannelAll().then(response => {
                for (var i = 0; i < response.data.length; i++) {
                    if (response.data[i].channelType == 2) {
                        this.channelAll.push(response.data[i])
                    }
                }
            });
            // 所有码商
            common_api.carddealerChannelAll().then(response => {
                this.carddealerChannelAll = response.data;
            });
        },

        timerHandler() {
            let queryParams = {
                pageNum: this.queryParams.pageNum,
                pageSize: this.queryParams.pageSize,
                orderStatus: this.queryParams.orderStatus,
                amount: typeof (this.amount) == 'object' ? null : !this.amount ? null : parseFloat(this.amount),
                accountName: this.queryParams.accountName,
                cardNumber: this.queryParams.cardNumber,
                carddealerId: this.queryParams.carddealerId,
                merchantName: this.queryParams.merchantName,
                merchantOrderNo: this.queryParams.merchantOrderNo,
                orderNo: this.queryParams.orderNo,
                mainOrderNo: this.queryParams.mainOrderNo,
                platformChannelId: this.queryParams.platformChannelId,
            }
            listTransferOrderSub(this.addSESDateRange(queryParams, this.dateRange, 'type')).then(response => {
                this.infoList = response.rows;
                this.total = Number(response.total);
            });
        },

        /** 查询代付订单列表 */
        getList(amount) {
            this.loading = true;
            let queryParams = {
                pageNum: this.queryParams.pageNum,
                pageSize: this.queryParams.pageSize,
                orderStatus: this.queryParams.orderStatus,
                amount: typeof (amount) == 'object' ? null : !amount ? null : parseFloat(amount),
                accountName: this.queryParams.accountName,
                cardNumber: this.queryParams.cardNumber,
                carddealerId: this.queryParams.carddealerId,
                merchantName: this.queryParams.merchantName,
                merchantOrderNo: this.queryParams.merchantOrderNo,
                orderNo: this.queryParams.orderNo,
                mainOrderNo: this.queryParams.mainOrderNo,
                platformChannelId: this.queryParams.platformChannelId,
            }
            listTransferOrderSub(this.addSESDateRange(queryParams, this.dateRange, 'type')).then(response => {
                this.infoList = response.rows;
                this.total = Number(response.total);
                this.loading = false;
                this.startTimer(queryParams)
            });
        },
        // 取消按钮
        cancel() {
            this.open = false;
            this.openReject = false
            this.reset();
        },
        // 表单重置
        reset() {
            this.form = {

            };
            this.resetForm("form");
        },
        /** 搜索按钮操作 */
        handleQuery() {
            var amount;
            this.queryParams.amount ? amount = this.NumberMul(this.queryParams.amount, 100) : this.queryParams.amount
            amount = parseFloat(amount)
            this.queryParams.pageNum = 1;
            amount ? this.amount = amount : this.amount = null
            amount ? this.getList(amount) : this.getList(null)
        },

        /** 重置按钮操作 */
        resetQuery() {
            this.dateRange = []
            this.resetForm("queryForm");
            this.handleQuery();
        },
        // 多选框选中数据
        handleSelectionChange(selection) {
            this.ids = selection.map(item => item.id)
            this.single = selection.length !== 1
            this.multiple = !selection.length
        },
        /** 新增按钮操作 */
        handleAdd() {
            this.reset();
            this.open = true;
            this.title = "添加代付订单";
        },
        // 查看详情
        handleView(row) {
            const id = row.orderNo;
            getTransferOrderSub(id).then((response) => {
                this.detailInfoList = response.data;
                this.isShowDetail = true;
                this.detailTitle = "详情";
            });
        },
        /** 修改按钮操作 */
        handleUpdate(row) {
            this.reset();
            const id = row.id || this.ids
            getTransferOrder(id).then(response => {
                this.form = response.data;
                this.open = true;
                this.title = "修改代付订单";
            });
        },
        /** 提交按钮 */
        submitForm(type) {
            this.$refs[type].validate((valid) => {
                if (valid) {
                    const loading = this.$loading({
                        lock: true,
                        text: `正在操作`,
                        spinner: "el-icon-loading",
                        background: "rgba(0, 0, 0, 0.7)",
                    });

                    if (type == 'form') {
                        payMerchant.closeOrderSub({
                            orderSubNo: this.form.orderSubNo,
                            remarks: this.form.remarks
                        }).then((response) => {
                            loading.close();
                            this.open = false;
                            this.msgSuccess("操作成功");
                            this.getList();
                        }).catch(() => {
                            loading.close();
                        });
                    }
                    if (type == 'formReject') {
                        payMerchant.orderRejection({
                            orderSubNo: this.form.orderSubNo,
                            remarks: this.form.remarks
                        }).then((response) => {
                            loading.close();
                            this.openReject = false;
                            this.msgSuccess("操作成功");
                            this.getList();
                        }).catch(() => {
                            loading.close();
                        });
                    }
                }
            });
        },
        /** 删除按钮操作 */
        handleDelete(row) {
            const ids = row.id || this.ids;
            this.$confirm('是否确认删除代付订单编号为"' + ids + '"的数据项?', "警告", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(function () {
                return delTransferOrder(ids);
            }).then(() => {
                this.getList();
                this.msgSuccess("删除成功");
            })
        },
        /** 导出按钮操作 */
        handleExport() {
            if (this.dateRange.length) {
                if (this.dateRange[0]) {
                    this.queryParams.beginTime = this.dateRange[0][0]
                    this.queryParams.endTime = this.dateRange[0][1]
                }else{
                    this.queryParams.beginTime = null
                    this.queryParams.endTime = null
                }
                if (this.dateRange[1]) {
                    this.queryParams.updateBeginTime = this.dateRange[1][0]
                    this.queryParams.updateEndTime = this.dateRange[1][1]
                }else{
                    this.queryParams.updateBeginTime = null
                    this.queryParams.updateEndTime = null
                }
            } else {
                this.queryParams.beginTime = null
                this.queryParams.endTime = null
                this.queryParams.updateBeginTime = null
                this.queryParams.updateEndTime = null
            }
            const queryParams = this.queryParams;
            this.$confirm('是否确认导出所有代付订单数据项?', "警告", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(function () {
                return exportTransferOrderSub(queryParams);
            }).then(response => {
                this.download(response.msg);
            })
        }
    }
};
</script>
<style>
.whiteOrder {
    background: #fff !important;
}

.greyOrder {
    background: #F4F4F5 !important;
}

.blueOrder {
    background: #c8e5f8 !important;
}

.yellowOrder {
    background: #FEFEE5 !important;
}

.greenOrder {
    background: #E9FEEA !important;
}

.redOrder {
    background: #FDF2F2 !important;
}
</style>
<style scoped>
::v-deep .el-table tbody tr:hover>td {
    background-color: rgba(0, 0, 0, 0) !important
}

::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
    background: none !important;
}
</style>