<template>
  <div class="content-box">
    <div class="left">
      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
      <span class="cameratxt">支付成功订单</span>
    </div>

    <div class="middle">
      <div class="filter">
        <div class="condition">
          <span>关键字 : </span>
          <el-input clearable v-model="searchInput.keyWord" @clear="getList" class="w-50 m-2" placeholder="请输入名字或工单号"
            style="width: 210px" />
        </div>
        <div class="condition">
          <span>交易时间 : </span>
          <el-date-picker v-model="searchInput.createTime" type="daterange" range-separator="-" start-placeholder="起始时间"
            end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
            placeholder="请选择日期" />
        </div>

        <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
          @click="searchBtn"><el-icon>
            <Search />
          </el-icon> <span>查询</span></el-button>
      </div>
      <!-- 按钮列表 -->
      <div class="gongneng">
        <el-button color="rgba(111, 182, 184, 1)" class="import" type="primary" @click="importExcel"><img
            src="@/assets/import.png" style="width: 14px; height: 14px; margin-right: 4px" alt="" />
          <span>导出表单</span></el-button>
      </div>
    </div>
    <div class="footer">
      <el-table :row-class-name="tableRowClassName" :data="tableData.list" style="width: 100%" :header-cell-style="{
        background: 'rgba(240, 243, 247, 1)',
        height: '50px',
        border: 0,
      }">
        <!-- <el-table-column align="center" type="selection" width="80" /> -->
        <el-table-column align="center " type="index" label="序号" />
        <el-table-column align="center" prop="payTime" width="200" label="交易时间" />
        <el-table-column align="center" prop="recordNo" width="200" label="工单号" />
        <el-table-column align="center" prop="payNo" width="330" label="交易流水号" />
        <el-table-column align="center" prop="userName" label="报修人" />
        <el-table-column align="center" prop="payPrice" label="交易总金额" />
        <el-table-column align="center" prop="refundTotalPrice" label="实退" />
        <el-table-column align="center" prop="officialPrice" label="实收" />
        <el-table-column align="center" label="状态">
          <template #default="{ row }">
            <span v-if="row.state == 0">已支付</span>
            <span v-if="row.state == 1">部分退款</span>
            <span v-if="row.state == 2">已退款</span>
            <span v-if="row.state == 3">退款申请中</span>
            <span v-if="row.state == 4">退款中</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="操作" width="220">
          <template #default="scope">
            <div class="edit">
              <div class="look" @click="refundInfo(scope.row)">详情</div>
              <div class="look" @click="refund(scope.row)">申请退款</div>
              <div class="look" @click=applyRefund(scope.row) v-if="scope.row.isApprove == 1">审核</div>
              <!-- <div class="look" @click="refund(scope.row)" v-if="schoolId == 0">退款</div> -->
            </div>
          </template>
        </el-table-column>
      </el-table>
      <!-- 详情弹窗 -->
      <el-dialog class="refundInfo" v-model="refundInfoVisible" :close-on-click-modal="false"
        :close-on-press-escape="false" title="支付订单信息" align-center width="760" :before-close="cancelRefundInfo">
        <div class="order_info">
          <!-- 工单详情 工单信息 -->
          <div class="title">
            <img src="@/assets/orderInfo.png" alt="" />
            <span>订单信息</span>
          </div>
          <div class="workNum">
            <span class="titles">工单号 :</span><span>{{ refundInfolist.list.recordId }}</span>
          </div>
          <div class="workNum">
            <span class="titles">报修人 :</span><span>{{ refundInfolist.list.userName }}</span>
          </div>
          <div class="workNum">
            <span class="titles">流水账号 :</span><span>{{ refundInfolist.list.payNo }}</span>
          </div>
          <div class="workNum">
            <span class="titles">支付时间 :</span><span>{{ refundInfolist.list.payTime }}</span>
          </div>
          <div class="workNum">
            <span class="titles" style="width: 100px">交易总金额 :</span><span>{{ refundInfolist.list.payPrice }} 元</span>
          </div>
          <div class="workNum">
            <span class="titles">实退 :</span><span>{{ refundInfolist.list.refundTotalPrice }} 元</span>
          </div>
          <div class="workNum">
            <span class="titles">实收 :</span><span>{{ refundInfolist.list.officialPrice }} 元</span>
          </div>
          <div class="workNum">
            <span class="titles">状态 :</span>
            <span v-if="refundInfolist.list.state == 0">已支付</span>
            <span v-if="refundInfolist.list.state == 1">部分退款</span>
            <span v-if="refundInfolist.list.state == 2">已退款</span>
          </div>

          <!-- 工单详情 报修进度 -->
          <div class="title">
            <img src="@/assets/refund.png" alt="" style="width: 25px; height: 25px" />
            <span>退款进度</span>
          </div>

          <div class="steps" v-if="refundRecord.list">
            <el-steps direction="vertical" :active="refundRecord.list.length">
              <el-step v-for="(i, index) in refundRecord.list">
                <template v-slot:icon>
                  <img style="width: 20px; height: 20px" src="@/assets/refundPrice.png" alt="" />
                </template>
                <template v-slot:title>
                  <span style="font-size: 15px" v-if="i.approve == 0">待审批</span>
                  <span style="font-size: 15px" v-if="i.approve == 1">通过</span>
                  <span style="font-size: 15px" v-if="i.approve == 2">驳回</span>
                </template>
                <template v-slot:description>
                  <div class="content">
                    <span>退款时间 : {{ i.createTime }}</span>
                  </div>
                  <div class="content">
                    <span>
                      {{
                        `第${index + 1}次 ` +
                        "退款金额 : " +
                        i.refundPrice +
                        " 元"
                      }}
                    </span>
                    <span v-if="i.isSuccess == 0" style="color:rgb(60, 234, 240)">（ 退款中 ）</span>
                    <span v-if="i.isSuccess == 1" style="color:green">（ 退款成功 ）</span>
                    <!-- <span v-if="i.isSuccess == 2" style="color:red">（ 退款失败 ）</span> -->
                    <span v-if="i.isSuccess == 2" style="color:red">（ 驳回退款 ）</span>
                  </div>
                </template>
              </el-step>
            </el-steps>
          </div>
        </div>
      </el-dialog>
      <!-- 退款弹窗 -->
      <el-dialog class="refund" v-model="refundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
        title="申请退款" align-center width="500" :before-close="cancelRefund">
        <div class="priceContent">
          <span>申请人 : </span>
          <span>{{ refundName }}</span>
        </div>
        <div class="priceContent">
          <span>退款金额 : </span>
          <el-input
            oninput="value=value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3').replace(/^0+(\d)/, '$1') .replace(/^\./, '0.').match(/^\d*(\.?\d{0,2})/g)[0] || ''"
            clearable v-model="refundPrice" class="w-50 m-2" placeholder="请输入退款金额" style="width: 180px" />
        </div>
        <div class="priceContent">
          <span>剩余金额 : </span>
          <span style="color: red">{{ restrictPrice }}元</span>
        </div>
        <!-- <ul>
          <li v-for="(i, index) in refundRecord.list">
            <span>{{ `第${index + 1}次实退` }}</span>
            <span style="margin: 0 20px">{{ i.createTime }}</span>
            <span>{{ i.refundPrice + " 元" }}</span>
            <span v-if="i.isSuccess == 0" style="color:rgb(60, 234, 240)">（ 退款中 ）</span>
            <span v-if="i.isSuccess == 1" style="color:green">（ 退款成功 ）</span>
            <span v-if="i.isSuccess == 2" style="color:red">（ 退款失败 ）</span>
          </li>
        </ul> -->
        <div class="priceContent" style="display:flex">
          <div style="margin-bottom: 15px;width:50px">备注 : </div>
          <el-input v-model="refundRemark" :rows="4" type="textarea" show-word-limit placeholder="此处为备注内容" />
        </div>
        <div class="options">
          <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="refundYes">
            提交
          </el-button>
          <el-button @click="cancelRefund">取消</el-button>
        </div>
      </el-dialog>
      <!-- 退款 -->
      <!-- <el-dialog class="refund" v-model="refundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
        title="退款" align-center width="500" :before-close="cancelRefund">
        <div class="priceContent">
          <div style="margin-bottom: 15px;">备注 : </div>
          <el-input v-model="refundRemark" :rows="4" type="textarea" show-word-limit placeholder="此处为备注内容" />
        </div>
        <div class="priceContent">
          <span>退款金额 : </span>
          <span style="color: red">{{ refundPrice }}元</span>
        </div>
        <div class="options">
          <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="refundYes">
            同意
          </el-button>
          <el-button @click="cancelRefund">驳回</el-button>
        </div>
      </el-dialog> -->
      <!-- 审核退款 -->
      <el-dialog class="refund" v-model="applyRefundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
        title="审核" align-center width="500" :before-close="cancelApplyRefund">
        <div class="priceContent">
          <span>申请人 : </span>
          <span>{{ applyRefundList[0].approveUser }}</span>
        </div>
        <div class="priceContent">
          <span>退款金额 : {{ applyRefundList[0].refundPrice }} 元</span>

          <!-- <el-input clearable v-model="applyRefundList[0].refundPrice" class="w-50 m-2" placeholder="请输入退款金额"
            style="width: 180px" /> -->
        </div>
        <!-- <div class="priceContent">
          <span>退款描述 : {{ applyRefundList[0].remark }} </span>
        </div> -->
        <div class="priceContent" style="display:flex">
          <div style="width:80px">退款描述 : </div>
          <el-input disabled v-model="applyRefundList[0].remark" :rows="4" type="textarea" show-word-limit
            placeholder="此处为备注内容" />
        </div>
        <div class="options">
          <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="applyRefundYes(1)">
            同意
          </el-button>
          <el-button @click="applyRefundYes(0)">驳回</el-button>
        </div>
      </el-dialog>
    </div>

    <!-- 分页组件 -->
    <div class="pageSize">
      <span>合计 : 共{{ tablePrice.count }}笔，交易总金额{{
        tablePrice.totalPrice
      }}元，实退{{ tablePrice.refundTotalPrice }}元 &nbsp;&nbsp;&nbsp;实收{{
  tablePrice.officialPrice
}}元</span>
      <el-pagination background :current-page="currentPage" :page-size="pageSize"
        layout="total, prev, pager, next, jumper, slot" :total="total" @update:current-page="handleCurrentChange" />
    </div>
  </div>
</template>

<script setup>
import {
  ref,
  reactive,
  watch,
  nextTick,
  onBeforeMount,
  onUnmounted,
} from "vue";
import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import { Calendar } from "@element-plus/icons-vue";
import vidiconsApi from "@/api/vidicons.js";
import { dayjs } from "element-plus";
import lodash from "lodash";
import axios from "axios";
import { useStore } from "vuex";
const store = useStore();
const api = ref("");
const router = useRouter();
// 表格数据
const schoolId = ref() // 判断是否为超级管理员
const tableData = reactive({ list: [] });
const tablePrice = ref({
  count: "",
  refundTotalPrice: "",
  officialPrice: "",
  totalPrice: "",
});

const searchInput = reactive({
  keyWord: "",
  createTime: "",
}); // 搜索按钮数据

watch(
  () => searchInput.createTime,
  (newVal, oldVal) => {
    console.log("监听时间:", newVal);
    if (newVal == null) {
      getList();
    }
  }
);
// 详情（----------------------）
const refundInfoVisible = ref(false);
const refundInfolist = reactive({
  list: [
    {
      payNo: "",
      id: "",
      payPrice: "",
      payTime: "",
      recordId: "",
      state: "",
      userName: "",
      refundTotalPrice: "",
      officialPrice: "",
    },
  ],
});

// 退款（----------------------）
// const refundVisible = ref(false); // 控制退款弹窗
// const refundPrice = ref(); // 退款费用
// const refundRecord = reactive({ list: [] }); // 退款记录
// const refundId = ref(); // 退款id
// const restrictPrice = ref(); // 限制退款金额

// 退款
const refundRecord = reactive({ list: [] }); // 退款记录
const refundVisible = ref(false) // 退款弹窗
const refundRemark = ref() // 备注
const refundPrice = ref() // 退款的金额
const refundId = ref(); // 退款id
const restrictPrice = ref(); // 限制退款金额
const refundName = ref() // 申请人

// 审核退款
const applyRefundVisible = ref(false)// 申请退款弹窗
const applyRefundList = ref()  // 审核信息
const applyRefundPrice = ref() // 退款金额
const applyRefundPriceRemark = ref() // 退款备注

const currentPage = ref(1); // 当前页
const pageSize = ref(10);
const total = ref(); // 当前总数

// 查看车辆管理列表
const getList = async () => {
  let data = {
    currentPage: currentPage.value,
    pageCount: pageSize.value,
    keyWord: searchInput.keyWord,
  };
  if (searchInput.createTime) {
    data.startTime = searchInput.createTime[0];
    data.endTime = searchInput.createTime[1];
  }

  let res = await axios({
    method: "get",
    url: api.value + "/repairPayRecord/queryProsperityRepairPayRecords",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    params: data,
  });
  console.log(res, "支付成功数据");
  if (res.data.code == 200) {
    tableData.list = res.data.data.list;
    total.value = res.data.data.totalCount;
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
    if (res.data.code == 570) {
      sessionStorage.removeItem("token")
      router.push({
        path: `/login`,
      });
    }
  }

  // 合计接口
  {
    if (searchInput.createTime) {
      data.startTime = searchInput.createTime[0];
      data.endTime = searchInput.createTime[1];
    }

    let res = await axios({
      method: "get",
      url: api.value + "/repairPayRecord/statistics",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("userhead"),
      },
    });
    console.log(res, "合计");
    if (res.data.code == 200) {
      tablePrice.value.count = res.data.data.count;
      tablePrice.value.refundTotalPrice = res.data.data.refundTotalPrice;
      tablePrice.value.totalPrice = res.data.data.totalPrice;
      tablePrice.value.officialPrice = res.data.data.officialPrice;
    } else {
      ElMessage({
        type: "error",
        showClose: true,
        message: res.data.message,
        center: true,
      });
    }
  }
};

// 搜索功能
const searchBtn = lodash.debounce(async () => {
  getList();
}, 300);
// 详情（----------------------）
const refundInfo = (row) => {
  refundInfoVisible.value = true;
  refundRecord.list = row.repairRefundRecordList;
  refundInfolist.list.payNo = row.payNo;
  refundInfolist.list.id = row.id;
  refundInfolist.list.payPrice = row.payPrice;
  refundInfolist.list.payTime = row.payTime;
  refundInfolist.list.recordId = row.recordNo;
  refundInfolist.list.state = row.state;
  refundInfolist.list.userName = row.userName;
  refundInfolist.list.refundTotalPrice = row.refundTotalPrice;
  refundInfolist.list.officialPrice = row.officialPrice;
};
// 关闭详情
const cancelRefundInfo = () => {
  refundInfoVisible.value = false;
};

//退款按钮  （-------------------------------------------）
const refund = async (row) => {
  refundVisible.value = true;
  refundId.value = row.id;
  refundRecord.list = row.repairRefundRecordList;
  restrictPrice.value = row.officialPrice;
  // let data = {
  //   payRecordId: refundId.value,
  // };
  // let res = await axios({
  //   method: "get",
  //   url: api.value + "/repairPayRecord/restrict",
  //   headers: {
  //     token: sessionStorage.getItem("token"),
  //     user_head: sessionStorage.getItem("userhead"),
  //   },
  //   params: data,
  // });
  // restrictPrice.value = res.data.data;
  // console.log(res, "退款限制金额");
};
// 确定退款
const refundYes = async () => {
  var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
  console.log(reg.test(refundPrice.value));

  if (refundPrice.value > restrictPrice.value) {
    ElMessage({
      type: "error",
      showClose: true,
      message: "退款金额不能大于剩余金额",
      center: true,
    });
    return false;
  } else if (restrictPrice.value == 0) {
    ElMessage({
      type: "error",
      showClose: true,
      message: "金额已全部退款",
      center: true,
    });
    return false;
  } else if (refundPrice.value <= 0) {
    ElMessage({
      type: "error",
      showClose: true,
      message: "输入的退款金额必须大于0",
      center: true,
    });
    return false;
  } else if (!reg.test(refundPrice.value)) {
    ElMessage({
      type: "error",
      showClose: true,
      message: "退款金额为正数(小数位不超过2位)",
      center: true,
    });
    return false;
  } else {
    console.log("金额允许");
    if (!refundRemark.value) {
      ElMessage({
        type: "error",
        showClose: true,
        message: "备注不能为空",
        center: true,
      });
      return false;
    }
  }
  let data = {
    repairPayRecordId: refundId.value,
    refundPrice: refundPrice.value,
    remark: refundRemark.value
  };
  let res = await axios({
    method: "post",
    url: api.value + "/repairPayRecord/RefundableAmount",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    data: data,
  });
  console.log(res, "退款");
  if (res.data.code == 200) {
    refundVisible.value = false;
    refundPrice.value = "";
    refundRemark.value = ""
    getList();
    ElMessage({
      type: "success",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};
// 取消按钮
const cancelRefund = () => {
  refundVisible.value = false;
  refundPrice.value = ""
  refundRemark.value = ""
};


// 审核退款 （----------------------------------------------------）
const applyRefund = (row) => {
  applyRefundVisible.value = true
  applyRefundList.value = row.approveRefunds
}
// 确定审核
const applyRefundYes = async (flag) => {
  console.log(applyRefundList.value, "确定申请退款");
  let data = {
    id: applyRefundList.value[0].id,
    state: flag,
  };
  let res = await axios({
    method: "post",
    url: api.value + "/repairPayRecord/refundReview",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    data: data,
  });
  if (res.data.code == 200) {
    applyRefundVisible.value = false
    getList();
    ElMessage({
      type: "success",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
}
// 驳回审核
const cancelApplyRefund = () => {
  applyRefundVisible.value = false
}

//导出功能
const importExcel = async () => {
  let data = {
    keyWord: searchInput.keyWord,
  };
  if (searchInput.createTime) {
    data.startTime = searchInput.createTime[0];
    data.endTime = searchInput.createTime[1];
  }
  let res = await axios({
    method: "get",
    url: api.value + "/repairPayRecord/queryExport",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    responseType: "blob",
    params: data,
  });
  console.log(res, "导出支付订单");
  if (res.status == 200) {
    let name = `支付成功订单数据`;
    var content = res.data;
    var datas = new Blob([content]);
    var downloadUrl = window.URL.createObjectURL(datas);
    var anchor = document.createElement("a");
    anchor.href = downloadUrl;
    anchor.download = name + ".xlsx";
    anchor.click();
    window.URL.revokeObjectURL(datas);
    ElMessage({
      type: "success",
      showClose: true,
      message: "导出成功",
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: "导出失败",
      center: true,
    });
  }
};
// 表格斑马纹颜色修改
const tableRowClassName = ({ row, rowIndex }) => {
  if (rowIndex % 2 === 0) {
    return "even";
  } else if (rowIndex % 2 !== 0) {
    return "odd";
  }
  return "";
};
// 耗材管理分页
const handleCurrentChange = (value) => {
  // console.log(value);
  currentPage.value = value;
  getList();
};

onBeforeMount(() => {
  api.value = store.state.user.api;
  if (sessionStorage.getItem("schoolId") == "null") {
    schoolId.value = 0;
  } else {
    schoolId.value = Number(sessionStorage.getItem("schoolId"));
  }
  refundName.value = sessionStorage.getItem("username")
  getList();
});
onUnmounted(() => {
  // document.removeEventListener("keyup", Enters);
});
</script>

<style scoped lang="scss">
.content-box {
  width: 97.5%;
  height: 89%;
  margin: 20px auto;
  background-color: #fff;
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);

  .left {
    // width: calc(100wh - 40px);
    display: flex;
    align-items: center;
    height: 60px;
    margin: 0 30px;
    border-bottom: 1px solid #ccc;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: 600;

    span {
      margin-right: 20px;
      cursor: pointer;
    }

    .is_active {
      color: rgba(111, 182, 184, 1);
    }
  }

  .middle {
    width: 96%;
    margin: 0 auto;

    color: #000;

    // border-bottom: 1px solid rgb(231, 231, 231);
    .filter {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      margin: 10px 0 0 0;

      .search {
        color: #fff;
      }

      .condition {
        display: flex;
        align-items: center;
        margin: 10px 30px 10px 0;

        :deep(.el-input .el-input__inner) {
          font-size: 16px;
        }

        span {
          margin: 0 10px 0 0;
        }
      }
    }

    .gongneng {
      margin: 10px 0 10px 0;

      span {
        color: #fff;
      }
    }

    :deep(.cont) {
      width: 60%;
      margin: 20px auto;
    }

    :deep(.download) {
      display: flex;
      align-items: center;
      margin: 10px;
    }

    :deep(.download span) {
      font-size: 16px;
      margin-left: 20px;
    }

    :deep(.cont .el-button) {
      margin-left: 60px;
      margin-bottom: 30px;
    }

    :deep(.cont .accomplish) {
      width: 100%;
      display: flex;
      justify-content: center;
    }

    :deep(.cont .accomplish .el-button) {
      width: 50%;
      margin: 0;
    }
  }

  .footer {
    width: 96%;
    height: 550px;
    margin: 10px auto 25px;

    .el-table--fit {
      height: 100%;

      :deep(.el-table__header-wrapper) {
        background-color: #000;
        font-size: 16px;

        tr {
          color: #000;
        }
      }

      :deep(.el-table__row) {
        height: 50px;
        font-size: 16px;
        color: #000;
      }

      :deep(.el-table__row td) {
        padding: 0;
        border: 0;
      }

      .el-button--primary {
        margin-left: 5px;
      }

      :deep(.el-table__body .even) {
        background-color: #fff;
      }

      :deep(.el-table__body .odd) {
        background-color: rgba(240, 243, 247, 1);
      }

      :deep(.edit) {
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(111, 182, 184, 1);
      }

      :deep(.look) {
        padding: 0 10px;
        cursor: pointer;
      }

      //   :deep(.look):hover {
      //     color: red;
      //   }
    }

    // 添加员工弹窗样式
    :deep(.addStaff) {
      //   height: 420px;
      border-radius: 11px;

      .el-dialog__header {
        border-radius: 11px 11px 0 0;
        background: rgba(237, 241, 245, 1);
        font-weight: 600;
        margin: 0;

        .el-dialog__headerbtn {
          outline: none;
        }
      }

      .el-dialog__body {
        padding: 30px 20px 10px 20px;

        .el-input {
          width: 200px;
        }

        .checkbox {
          .el-form-item__content {
            display: flex;
            flex-direction: column;
            align-items: flex-start;

            .el-checkbox-group {
              display: flex;
              flex-direction: column;
            }
          }
        }

        .options {
          .el-form-item__content {
            .queding {
              margin-left: 20px;
              color: #fff;
            }

            display: flex;
            flex-direction: row-reverse;
          }
        }
      }
    }
  }

  // 详情样式
  :deep(.refundInfo) {
    height: 800px;
    overflow: hidden;
    border-radius: 11px;

    .el-dialog__header {
      border-radius: 11px 11px 0 0;
      background: rgba(237, 241, 245, 1);
      font-weight: 600;
      margin: 0;

      .el-dialog__headerbtn {
        outline: none;
      }
    }

    .el-dialog__body {
      height: 720px;
      overflow: auto;
      padding: 0px 20px 10px 20px;

      .order_info {
        .title {
          display: flex;
          align-items: center;
          margin: 25px 0 20px 0;

          img {
            width: 20px;
            height: 20px;
            margin-right: 10px;
          }

          span {
            color: #000;
            font-size: 18px;
            font-weight: 600;
          }
        }

        // 工单详情 排列模式样式
        .workNum {
          display: flex;
          align-items: center;
          margin-bottom: 12px;
          font-size: 16px;

          .titles {
            color: rgba(128, 128, 128, 1);
            margin-right: 8px;
            font-weight: 400;
            width: 76px;
          }

          span {
            color: #000;
            font-weight: 600;
          }
        }

        // 工单详情 步骤条样式
        .steps {
          .el-step {

            // margin: 15px 0;
            .el-step__main {
              display: flex;
              margin-bottom: 25px;

              span {
                font-size: 16px;
              }

              .el-step__title {
                display: inline;
                padding: 0 15px 0 0;

                span {
                  background-color: rgba(111, 182, 184, 1);
                  color: #fff;
                  padding: 1px 3px;
                  border-radius: 3px;
                }
              }
            }

            .el-step__description {
              .content {
                margin-top: 7px;
                color: #000;
              }
            }
          }
        }
      }
    }
  }

  //退款弹窗样式
  :deep(.refund) {
    // height: 320px;
    border-radius: 11px;

    .el-dialog__header {
      border-radius: 11px 11px 0 0;
      background: rgba(237, 241, 245, 1);
      font-weight: 600;
      margin: 0;

      .el-dialog__headerbtn {
        outline: none;
      }
    }

    .el-dialog__body {
      padding: 25px 20px 10px 20px;

      .el-form-item__label {
        color: #000;
      }

      .priceContent {
        margin-bottom: 20px;

        .el-input {
          margin: 0 15px;
        }

        // .el-input__suffix {
        //   width: 20px;
        //   margin: 0 0 0 10px;
        //   padding: 0;
        // }
      }

      ul {
        li {
          margin: 5px 0;
        }
      }

      .options {
        display: flex;
        flex-direction: row-reverse;
        width: 100%;
        margin: 20px 20px 20px 0;

        .queding {
          margin-left: 20px;
          color: #fff;
        }
      }
    }
  }

  .pageSize {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 30px;

    span {
      color: #000;
    }

    .el-pagination {

      // width: 1600px;
      :deep(.el-pagination__total) {
        color: #000;
      }

      :deep(.el-pagination__goto) {
        color: #000;
      }

      :deep(.el-pagination__classifier) {
        color: #000;
      }

      :deep(.el-input__wrapper) {
        border: 1px solid rgba(0, 0, 0, 1);
        border-radius: 5px;
        box-shadow: none;
      }

      :deep(.el-pager li) {
        margin: 0 5px;
        border: 1px solid rgba(0, 0, 0, 1);
        border-radius: 5px;
        background-color: transparent;
      }

      :deep(.el-pager li.is-active) {
        background-color: rgba(111, 182, 184, 1);
      }

      :deep(.btn-prev) {
        margin-right: 5px;
        border: 1px solid rgba(0, 0, 0, 1);
        border-radius: 5px;
        background-color: transparent;
      }

      :deep(.btn-next) {
        margin-left: 5px;
        border: 1px solid rgba(0, 0, 0, 1);
        border-radius: 5px;
        background-color: transparent;
      }
    }
  }
}

.el-input {
  width: 192px;
}
</style>
