// 司机身份审核
<template>
  <div class="center">
    <div class="center_css">
      <div class="top_css">
        <el-row>
          <el-col :span="14" style="height: 45px">
            <!-- <el-button type="primary">添加</el-button> -->
          </el-col>
          <el-col :span="10">
            <div class="screen">
              <el-input class='find' placeholder="可按司机姓名、账号、身份证号查找" @keyup.enter.native="find" v-model="searchkeyWord" clearable @change="find"></el-input>
              <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
                  src="../../../public/img/sousuo.png" /></el-button><span
                class="count_css">共{{ deptBudgetTotal }}条</span>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col>
            <div class="search_btn">
              <div :class="search == '' ? 'search' : 'searchNo'" class="search_item search_block"
                @click="searchBtn('')">
                全部
              </div>
              <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(1)">
                待审核
              </div>
              <div :class="search == 2 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(2)">
                已通过
              </div>
              <div :class="search == 3 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(3)">
                已驳回
              </div>
              <div :class="search == 4 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(4)">
                已过期
              </div>
              <div :class="search == 7 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(7)">
                未认证
              </div>
              <div :class="search == 5 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(5)">
                已注销
              </div>
              <div :class="search == 6 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(6)">
                已禁用
              </div>
              <div :class="search == 8 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(8)">
                重点关注
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
      <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="68vh" border highlight-current-row>
        <el-table-column type="index" width="60"  label="序号" align="center">
            <template scope="scope">
                <span>{{scope.$index + 1}}</span>
                <!-- <span v-else>{{scope.$index}}</span> -->
            </template>
        </el-table-column>
        <el-table-column prop="driverName" label="司机姓名" min-width="90"></el-table-column>
        <el-table-column prop="driverPhone" label="账号" min-width="110"></el-table-column>
        <el-table-column prop="numberCard" label="身份证号" min-width="165"></el-table-column>
        <el-table-column prop="carCaptainName" label="车队长" min-width="165">
          <template scope="scope">
            <span v-if="scope.row.carCaptainName"> {{scope.row.carCaptainName}}({{scope.row.carCaptainAccountNumber}})</span>
          </template>
        </el-table-column>
        <el-table-column prop="shipmentsNumber" label="承运次数">
          <template scope="scope">
            {{ scope.row.shipmentsNumber ? scope.row.shipmentsNumber : 0 }}
          </template>
        </el-table-column>
        <el-table-column prop="favorableRate" label="好评率" min-width="90">
          <!-- <template slot-scope="scope">
            <el-rate v-model="scope.row.count" disabled show-score text-color="#ff9900" score-template="{value}">
            </el-rate>
          </template> -->
        </el-table-column>
        <el-table-column min-width="110" prop="complaintsNumber" label="投诉和举报">
          <template scope="scope">
            <span>{{
              scope.row.complaintsNumber ? scope.row.complaintsNumber : 0
            }}</span>
            <el-divider direction="vertical"></el-divider>
            <span>{{
              scope.row.reportedNumber ? scope.row.reportedNumber : 0
            }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="accumulatedFreight" label="累计收款(元)" min-width="110"></el-table-column>
        <el-table-column prop="advancePayment" label="垫付比例(%)" min-width="100">
          <template scope="scope">
            <div class="input_css">
              <div style="text-align: center; margin: 0 auto">
                <!-- <span v-if="scope.row.iconShow">{{scope.row.advancePayment ? scope.row.advancePayment : "暂无" }}</span> -->
                <el-input placeholder="暂无" v-model="scope.row.advancePayment"></el-input>
              </div>
              <!-- <img src="../../../public/img/edit.png" alt="" style="width: 20px; height: 20px" v-if="scope.row.iconShow"
                @click="editNumber(scope.row)" /> -->
              <img src="../../../public/img/yes.png" alt="" style="width: 20px; height: 20px; margin-top: 4px"
                @click="editRatio(scope.row)" />
            </div>
          </template>
        </el-table-column>
        <el-table-column label="车辆">
          <template slot-scope="scope">
            <span @click="carLook(scope.row)" class="btn_css">查看</span>
          </template>
        </el-table-column>
        <el-table-column prop="payee" label="账户">
          <template slot-scope="scope">
            <span @click="account(scope.row)" class="btn_css">查看</span>
          </template>
        </el-table-column>
        <el-table-column prop="payee" label="账单">
          <template slot-scope="scope">
            <span @click="billLook(scope.row)" class="btn_css">查看</span>
          </template>
        </el-table-column>
        <el-table-column prop="paymentDate" label="附件">
          <template slot-scope="scope" style="text-align: center" v-if="scope.row.backStageStatus !='未认证'">
            <span class="btn_css" @click="fujianLook(scope.row)">查看</span>
            <el-tooltip placement="top" v-if="
                scope.row.overdueFlag == 1 ||
                scope.row.driverOverdueFlag == 1 ||
                scope.row.drivingOverdueFlag == 1 ||
                scope.row.trailerOverdueFlag == 1 ||
                scope.row.qualificationOverdueFlag == 1 ||
                scope.row.operationOverdueFlag == 1 ||
                scope.row.trailerOperationOverdueFlag == 1
              ">
              <div slot="content">
                <span v-if="scope.row.overdueFlag == 1">身份证已过有效期<br /></span>
                <span v-if="scope.row.driverOverdueFlag == 1">驾驶证已过有效期<br /></span><span
                  v-if="scope.row.qualificationOverdueFlag == 1">从业资格证已过有效期<br /></span>
              </div>
              <span style="margin-top: 10px"></span>
              <img src="../../../public/img/wenhao.png" alt="" class="ask_css" />
            </el-tooltip>
          </template>
        </el-table-column>
        <el-table-column prop="createDate" label="注册日期" min-width="100"></el-table-column>
        <el-table-column prop="backStageStatus" label="状态"></el-table-column>
        <el-table-column label="操作" min-width="200">
          <template slot-scope="scope">
            <el-link target="_blank" @click="adopt(scope.row)" type="primary" :underline="false"
              :disabled="scope.row.authenticationStatus != '审核中'">通过</el-link>
            <el-divider direction="vertical"></el-divider>
            <el-link target="_blank" @click="reject(scope.row)" type="primary" :underline="false"
              :disabled="scope.row.authenticationStatus != '审核中'">驳回</el-link>
            <el-divider direction="vertical"></el-divider>
            <el-link target="_blank" @click="newInfo(scope.row)" type="primary" :underline="false"
              :disabled="scope.row.authenticationStatus == '审核中'">消息</el-link>
            <el-divider direction="vertical"></el-divider>
            <el-dropdown>
              <span class="btn_css">•••</span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item :disabled="
                    scope.row.authenticationStatus == '已禁用' &&
                    scope.row.authenticationStatus != '审核中'
                  "><span @click="switchChange(scope.row, '1')">禁用</span>
                </el-dropdown-item>
                <el-dropdown-item :disabled="
                    scope.row.authenticationStatus != '已禁用' &&
                    scope.row.authenticationStatus != '审核中'
                  "><span @click="switchChange(scope.row, '2')">启用</span>
                </el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
      style="text-align: center; margin-top: 10px" :page-size="deptCircularPage.pageSize"
      layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
    </el-pagination>
    <el-dialog :close-on-click-modal='false' title="车辆信息" :visible.sync="carInfo" width="500px" :before-close="carClose">
      <!-- <span v-if="carSee.length == 0">暂无车辆</span> -->
      <span v-if='carSee.length>0' class="tips">注：车辆信息不在本页面审核，仅供查看</span>
      <div v-if='carSee.length>0'>
        <div class="car_css" v-for="(item, index) in carSee" :key="index">
          <img :src="item.addressUrl" class="car_item" @click="enlarge(item.addressUrl)" />
          <div class="status_css" v-if="item.status == '审核中'" style="color: #2f53eb; background: #cfdbfe">
            {{ item.status }}
          </div>
          <div class="status_css" v-else-if="item.status == '已通过'" style="color: #3ac602; background: #eefaea">
            {{ item.status }}
          </div>
          <div class="status_css" v-else style="color: #f53f3f; background: #ffeff0">
            {{ item.status }}
          </div>
          <div class="carno_css">
            {{ item.carNumber }}
          </div>
          <div class="carborder_css"></div>
        </div>
      </div>
      <div v-else>暂无车辆</div>
      
    </el-dialog>
    <el-dialog :close-on-click-modal='false' title="账户信息" :visible.sync="userInfo" width="500px" :before-close="userClose">
      <div class="user" v-for="(item, index) in paySee" :key="index">
        <div class="name_css">{{ item.payeeName }}</div>
        <div class="id_css">{{ item.bankCard }}</div>
        <div class="pay_name">{{ item.bankDepositBranch }}</div>
        <img :src="item.payeeAddressUrl" class="user_item" @click="enlarge(item.payeeAddressUrl)" />
        <div class="border_css"></div>
      </div>
      <div v-if="paySee.length == 0">暂无账户信息</div>
    </el-dialog>
    <!-- 账单 -->
    <el-dialog :close-on-click-modal='false' title="账单" :visible.sync="billShow" width="500px" :before-close="billClose">
      <div style="height: 450px" class="bill_css">
        <div class="user" v-for="(item, index) in billInfo" :key="index">
          <div class="flex order">
            <div class="left">订单编号：{{ item.orderNo }}</div>
            <div class="right">{{ item.types }}</div>
          </div>
          <div class="flex order">
            <div class="left">{{ item.updateDate }}</div>
            <div class="right">{{ item.amountMoney }} {{item.amountMoney?"元":""}}</div>
          </div>
        </div>
        <div v-show="billInfo.length == 0">暂无账单信息</div>
      </div>
    </el-dialog>
    <el-dialog :close-on-click-modal='false' title="附件" :visible.sync="fujianInfo" width="830px" :before-close="fujianClose">
      <div class="file">
        <div class="fujian_css">
          <div class="fujian_item" :class="count == 1 ? 'file_btn' : ''" @click="btnChange(1)">
            身份证
          </div>
          <div class="fujian_item" :class="count == 2 ? 'file_btn' : ''" @click="btnChange(2)">
            驾驶证
          </div>
          <!-- <div class="fujian_item" :class="count == 3 ? 'file_btn' : ''" @click="btnChange(3)">
            行驶证
          </div> -->
          <div class="fujian_item" :class="count == 4 ? 'file_btn' : ''" @click="btnChange(4)">
            从业资格证
          </div>
          <!-- <div class="fujian_item" :class="count == 5 ? 'file_btn' : ''" @click="btnChange(5)">
            挂车行驶证
          </div>
          <div class="fujian_item" :class="count == 6 ? 'file_btn' : ''" @click="btnChange(6)">
            运营证
          </div>
          <div class="fujian_item" :class="count == 7 ? 'file_btn' : ''" @click="btnChange(7)">
            挂车运营证
          </div> -->
        </div>
        <div class="file_tips">
          <span v-if="count == 1">有效期：{{file.cardValidityDate}} </span>
          <span v-if="count == 2"> 准驾车型：{{file.quasiDrivingVehicle}} </span>
          <span v-if="count == 2"> 发证机关：{{file.lssuingAuthority}} </span>
          <span v-if="count == 2"> 有效期：{{file.driverLicenseValidityStartDate}} ~ {{file.driverLicenseValidityDate}} </span>
          <span v-if="count == 4"> 从业资格证号：{{file.qualificationCertificateNumber}}</span>
          <span v-if="count == 4"> 有效期：{{file.qualificationCertificateValidityDate}}</span>
        </div>
        <div class="file_img">
          <img :src="img[index]" class="img_css" @click="enlarge(img[index])"/>
        </div>
        <div class="btn">
          <el-button style="margin-right: 120px" @click="index = 0"
            v-if="count == 1 || count == 2 || count == 3 || count == 5">{{ abilityName }}</el-button>
          <el-button @click="index = 1" v-if="count == 1 || count == 2 || count == 3 || count == 5">{{ abilityName1 }}
          </el-button>
        </div>
      </div>
    </el-dialog>
    <el-dialog :close-on-click-modal='false' title="驳回认证" :visible.sync="rejectInfo" width="400px" :before-close="rejectClose">
      <div>
        <div><span class="sign">*</span>选择驳回原因</div>
        <div class="form_css">
          <el-form ref="form" :model="form" label-width="80px">
            <el-checkbox-group v-model="checkList">
              <el-checkbox label="证件照片不清晰" value="1"></el-checkbox>
              <el-checkbox label="证件照片上传错误" value="2"></el-checkbox>
              <el-checkbox label="身份信息填写错误" value="3"></el-checkbox>
              <el-checkbox label="证件信息填写错误" value="4"></el-checkbox>
              <el-checkbox label="其他" value="5"></el-checkbox>
            </el-checkbox-group>
            <div style="margin: 20px 0">驳回原因描述（选填）</div>
            <el-input type="textarea" :rows="3" resize="none" placeholder="输入驳回原因，1-100个字"
              v-model="form.rejectReasonDescription" maxlength="100"></el-input>
            <div class="form_btn">
              <el-button @click="rejectClose">取消</el-button>
              <el-button @click="submit" type="primary">确定</el-button>
            </div>
          </el-form>
        </div>
      </div>
    </el-dialog>
    <!-- //消息 -->
    <el-dialog title="发送信息" :close-on-click-modal='false' :visible.sync="sendInfo" width="400px" :before-close="sendInfoClose">
      <div class="Info_css">
        <div class="Info_title">标题</div>
        <div class="Info_item">
          <el-input placeholder="输入消息标题，不超过4-20个字。" v-model="Info.newsTitle" maxlength="20"></el-input>
        </div>
        <div class="Info_title">内容</div>
        <div class="Info_item">
          <el-input type="textarea" :rows="3" resize="none" placeholder="消息内容10-100字" maxlength="100"
            v-model="Info.newsContent"></el-input>
        </div>
        <div class="Info_btn">
          <el-button @click="sendInfoClose">取消</el-button>
          <el-button @click="submitInfo" type="primary">确定</el-button>
        </div>
      </div>
    </el-dialog>
    <el-dialog title="禁用天数" :close-on-click-modal='false' :visible.sync="forbiddenshow" width="400px" :before-close="forbiddenshowClose">
       <el-form ref="form" label-width="80px">
            <el-form-item label="禁用天数">
              <el-input placeholder="输入禁用天数，当天起算" v-model="disabledDays"></el-input>
            </el-form-item>
            <div class="form_btn">
              <el-button @click="forbiddenshowClose">取消</el-button>
              <el-button @click="submitforbidden" type="primary">确定</el-button>
            </div>
          </el-form>
    </el-dialog>
    <el-image-viewer v-if="imgsVisible" :on-close="closeImgViewer" :url-list="srcList" style="z-index:9999" />
  </div>
</template>
<script>
  import {
    getList,
    toExamine,
    postNews,
    billSee,
    editInfo,
    forbidden
  } from "@/api/driverManagement";
  export default {
    data() {
      return {
        tableData: [],
        //分页
        searchkeyWord: "",
        currentPage: 1,
        pageSize: 10,
        deptBudgetTotal: 0,
        deptCircularPage: {},
        search: "",
        addressUrl: [],
        disabled: false,
        carInfo: false,
        userInfo: false,
        fujianInfo: false,
        rejectInfo: false,
        forbiddendata:{},
        form: {
          id: "",
          rejectReasonDescription: "",
        },
        checkList: [],
        carSee: [],
        paySee: [],
        sendInfo: false,
        Info: {},
        file: {},
        img: [],
        index: "0",
        count: "1",
        abilityName: "身份证人像面",
        abilityName1: "身份证国徽面",
        billInfo: [], //账单
        billShow: false,
        // iconShow: true,
        //图片预览
        srcList: [],
        forbiddenshow:false,
        imgsVisible: false,
        disabledDays:''
      };
    },

    mounted() {
      this.getList();
    },
    components: {
      "el-image-viewer": () =>
        import("element-ui/packages/image/src/image-viewer"),
    },
    methods: {
      
      closeImgViewer() {
         this.srcList = []
        this.imgsVisible = false;
      },
      enlarge(url) {
        this.imgsVisible = true;
        this.srcList.push(url)
      },
            editNumber(item) {
        //   // item.iconShow = false
        //   this.$set(item,"iconShow",false)
        for (let i = 0; i < this.tableData.length; i++) {
          if (this.tableData[i].id == item.id) {
            this.tableData[i].iconShow = false;
            this.$set(this.tableData[i], "iconShow", false);
            this.$forceUpdate();
            this.$forceupdate();
          }
        }
      },
      editRatio(val) {
        this.$confirm("确定修改该司机的垫付比例？", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          this.listLoading = true;
          val.advancePayment = val.advancePayment/100
          editInfo(val)
            .then((response) => {
              if (response.code == 200) {
                this.$notify({
                  title: "成功",
                  message: "修改成功！",
                  type: "success",
                });
                this.getList();
              }
            })
            .catch(() => {
              this.listLoading = false;
            });
        });
      },
      billLook(val) {
        this.listLoading = true;
        billSee({
            commonId: val.commonId,
          })
          .then((response) => {
            this.billInfo = response.data;
            this.listLoading = false;
          })
          .catch(() => {
            this.listLoading = false;
          });
        this.billShow = true;
      },
      billClose() {
        this.billShow = false;
      },
      getList() {
        this.listLoading = true;
        let _obj = {};
        _obj.currentPage = this.currentPage;
        _obj.pageSize = this.pageSize;
        _obj.searchKeyWord = this.searchkeyWord;
        _obj.searchType = this.search;
        getList(_obj)
          .then((response) => {
            this.tableData = response.data.records;
            for (let i = 0; i < this.tableData.length; i++) {
              this.tableData[i].iconShow = true;
              if(this.tableData[i].advancePayment){
                this.tableData[i].advancePayment*=100
              }
            }
            this.deptBudgetTotal = response.data.total;
            this.listLoading = false;
          })
          .catch(() => {
            this.listLoading = false;
          });
      },
      btnChange(num) {
        this.count = num;
        if (num == 1) {
          this.abilityName = "身份证人像面";
          this.abilityName1 = "身份证国徽面";
          this.img[0] = this.file.cardAddressUrl;
          this.img[1] = this.file.cardBackAddressUrl;
        } else if (num == 2) {
          this.abilityName = "驾驶证主页";
          this.abilityName1 = "驾驶证副页";
          this.img[0] = this.file.driverLicenseHomePage;
          this.img[1] = this.file.driverLicenseBackPage;
        } else if (num == 3) {
          this.abilityName = "行驶证主页";
          this.abilityName1 = "行驶证副页";
          this.img[0] = this.file.drivingLicenseHomePage;
          this.img[1] = this.file.drivingLicenseBackPage;
        } else if (num == 4) {
          this.index = 0;
          this.img[0] = this.file.qualificationCertificate;
        } else if (num == 5) {
          this.abilityName = "挂车行驶证主页";
          this.abilityName1 = "挂车行驶证副页";
          this.img[0] = this.file.trailerLicenseHomePage;
          this.img[1] = this.file.trailerLicenseBackPage;
        } else if (num == 6) {
          this.index = 0;
          this.img[0] = this.file.operationCertificate;
        } else if (num == 7) {
          this.index = 0;
          this.img[0] = this.file.trailerOperationCertificate;
        }
      },
      newInfo(row) {
        this.Info.newsTypeKey = 1;
        this.Info.newsType = "系统消息";
        this.Info.crtCommonId = JSON.parse(
          localStorage.getItem("UserInfo")
        ).accountId;
        this.Info.reCommonId = row.commonId;
        this.Info.bussId = row.id;
        this.sendInfo = true;
      },
      sendInfoClose() {
        this.Info = {};
        this.sendInfo = false;
      },
      forbiddenshowClose(){
        this.disabledDays=''
        this.forbiddenshow=false
      },
      submitInfo() {
        if (!this.Info.newsTitle) {
          this.$message.error("标题不能为空");
          return;
        }
        if (!this.Info.newsContent) {
          this.$message.error("消息内容不能为空");
          return;
        }
        if (this.Info.newsTitle.length < 4 || this.Info.newsTitle.length > 20) {
          this.$message.error("标题字数应在4-20之间");
          return;
        }
        if (
          this.Info.newsContent.length < 10 ||
          this.Info.newsContent.length > 100
        ) {
          this.$message.error("消息内容字数应在10-100之间");
          return;
        }
        this.listLoading = true;
        postNews(this.Info)
          .then((response) => {
            this.$notify({
              title: "成功",
              message: "发送成功！",
              type: "success",
            });
            this.sendInfoClose();
            this.listLoading = false;
          })
          .catch(() => {
            this.listLoading = false;
          });
      },
      switchChange(row, num) {
        console.log(1111111)
        this.forbiddendata=row
        var _examine = {};
        _examine.id = row.commonId;
        let title;
        if (num == 1) {
          // _examine.flag = 3;
          // title = "禁用后客户将无法使用所有功能，是否确定禁用？";
          this.forbiddenshow=true
          
        } else if (num == 2) {
          title = "确定重新启用该用户？";
          _examine.disableFlag = 2;
          _examine.identityFlag = 2;
          this.$confirm(title, "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          this.listLoading = true;
          forbidden(_examine)
            .then((response) => {
                this.$notify({
                  title: "成功",
                  message: "启用成功！",
                  type: "success",
                });
              this.getList();
              this.listLoading = false;
            })
            .catch(() => {
              this.listLoading = false;
            });
        });
        }
      },
      submitforbidden(){
          if(!this.disabledDays){
            this.$message.error("禁用天数不能为空");
            return
          }if(this.disabledDays<2){
            this.$message.error("禁用天数输入错误");
            return
          }
          var _examine={}
          _examine.id = this.forbiddendata.commonId
          _examine.disableFlag = 1;
          _examine.identityFlag = 2;
          _examine.disabledDays = this.disabledDays;
          this.listLoading = true;
          forbidden(_examine)
            .then((response) => {
                this.$notify({
                  title: "成功",
                  message: "禁用成功！",
                  type: "success",
                });
                this.forbiddenshow=false
              this.getList();
              this.listLoading = false;
            })
            .catch(() => {
              this.listLoading = false;
            });
      },
      account(row) {
        this.paySee = row.hyDriverPayeeInfoList;
        this.userInfo = true;
      },
      fujianLook(row) {
        this.file = row;
        this.index = 0;
        this.img[0] = this.file.cardAddressUrl;
        this.img[1] = this.file.cardBackAddressUrl;
        this.fujianInfo = true;
      },
      userClose() {
        this.userInfo = false;
      },
      fujianClose() {
        this.count = 1;
        this.fujianInfo = false;
      },
      carLook(row) {
        this.carSee = row.hyDriverCarInfoList;
        this.carInfo = true;
      },
      carClose() {
        this.carInfo = false;
      },
      searchBtn(num) {
        this.search = num;
        this.getList();
      },
      find() {
        this.currentPage = 1
        this.getList();
      },
      adopt(row) {
        this.$confirm("确定通过身份审核？", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          this.listLoading = true;
          var _examine = {};
          _examine.id = row.id;
          _examine.flag = 1;
          _examine.numberCard = row.numberCard;
          toExamine(_examine)
            .then((response) => {
              this.$notify({
                title: "成功",
                message: "通过成功！",
                type: "success",
              });
              this.rejectInfo = false;
              this.getList();
              this.listLoading = false;
            })
            .catch(() => {
              this.listLoading = false;
            });
        });
      },
      submit() {
        if (this.checkList.length == 0) {
          this.$message.error("请选择驳回原因");
          return;
        }
        this.listLoading = true;
        this.form.rejectReason = this.checkList.toString();
        // delete this.form.checkList
        toExamine(this.form)
          .then((response) => {
            this.$notify({
              title: "成功",
              message: "驳回成功！",
              type: "success",
            });
            this.checkList = [];
            this.form = {};
            this.rejectInfo = false;
            this.getList();
            this.listLoading = false;
          })
          .catch(() => {
            this.listLoading = false;
          });
      },
      reject(row) {
        this.form.id = row.id;
        this.form.flag = 2;
        this.rejectInfo = true;
      },
      rejectClose() {
        this.checkList = [];
        this.form = {};
        this.rejectInfo = false;
      },
      // onChange() {
      // 	this.$refs.upload
      // 		.handleSaveBill()
      // 		.then(async (response) => {
      // 			this.formData.addressUrl = response;
      // 		})
      // 		.catch((res) => {
      // 			EventBus.$emit("error", (JSON.parse(res) || {}).message);
      // 			this.$refs.upload.clearFiles();
      // 		});
      // },
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.pageSize = val;
        this.getList();
      },
      handleCurrentChange(val) {
        this.currentPage = val;
        console.log(`当前页: ${val}`);
        this.getList();
      },
    },
  };
</script>
<style lang="scss" scoped>
  .center {
    padding: 10px 20px;
    background: #f5f6f7;
    min-height: calc(100vh - 50px);

    .top_css {
      padding: 10px;

      .search_btn {
        height: 80px;
        background: linear-gradient(#fafbfb, #ffffff);
        display: flex;
        margin-top: 20px;
        .search_block {
          margin-left: 20px;
        }

        .search_item {
          text-align: center;
          font-size: 14px;
          font-weight: 600;
          line-height: 40px;
          width: 112px;
          height: 40px;
          background: #f7f8f9;
          cursor: pointer;
          margin-top: 30px;
        }

        .searchNo {
          color: #323233;
        }

        .search {
          color: #2f53eb;
          background: #ffffff;
        }
      }
    }

    .ask_css {
      position: absolute;
      margin: 3px 0 0 10px;
    }

    .center_css {
      background: #ffffff;
      border-radius: 1px;
      margin-top: 10px;
      padding-bottom: 10px;
    }

    .screen {
      // float: right;
      display: flex;

      .search {
        width: 40px;
        height: 40px;
        background: #2f53eb;
        border-radius: 0px 2px 2px 0px;
        border: 1px solid #DCDFE6;
        margin-left:-1px;
      }

      .count_css {
        width: 80px;
        text-align: center;
        line-height: 40px;
        color: #666666;
      }
    }

    .el-button {
      padding: 10px 20px !important;
    }

    .center_css {

      ::v-deep .el-table th,
      ::v-deep .el-table td {
        text-align: center;
      }

      .fujian {
        font-size: 24px;
        color: #409eff;
      }

      .warning {
        font-size: 14px;
        color: #ed1d1d;
      }
    }
  }

  .car_css {
    width: 50%;
    display: inline-block;
    text-align: center;
    margin-top: 30px;
    position: relative;

    .status_css {
      background: #3ac602;
      width: 50px;
      height: 17px;
      position: absolute;
      top: 0px;
      right: 15px;
      border-radius: 3px;
    }

    .carno_css {
      padding: 1px 5px;
      background-color: #f5f6f7;
      color: #666666;
      border-radius: 12px;
      text-align: center;
      width: 100px;
      margin: 10px auto 0;
    }

    .carborder_css {
      border: 1px solid #f0f1f2;
      margin: 15px auto 0;
      width: 90%;
    }
  }

  .tips {
    color: #999999;
    font-size: 14px;
  }

  .car_item {
    width: 200px;
    height: 160px;
    border-radius: 5px;
  }

  .user {
    margin-bottom: 20px;

    .id_css {
      font-size: 14px;
    }

    .id_css,
    .name_css {
      margin: 5px 0;
      color: #0d0d0d;
    }

    .pay_name {
      color: #9d9d9d;
      font-size: 14px;
    }

    .name_css {
      font-size: 16px;
    }

    .user_item {
      margin: 25px 0;
      width: 450px;
      height: 300px;
    }

    .border_css {
      width: 100%;
      border: 1px solid #f0f1f2;
    }
    .order{
      margin-top: 8px;
      display: flex;
      .left,.right{
        width: 50%;
      }
      .right{
        text-align: right;
        margin-right: 20px;
      }
    }
  }

  ::v-deep .el-table--border .el-table__header th {
    background: #f7f8f9;
  }

  .btn_css {
    color: #409eff;
    cursor: pointer;
  }

  .btn_css1 {
    margin-left: -20px;
  }

  .sign {
    font-size: 14px;
    color: red;
  }

  .form_css {
    width: 100%;
    margin: 20px auto 20px;

    ::v-deep .el-checkbox {
      width: 40%;
      height: 30px;
    }

    // ::v-deep .el-dialog__body{
    // 	padding: 10px 20px;
    // }
    ::v-deep .el-dialog__title {
      font-size: 16px;
    }

    // ::v-deep .el-textarea__inner {
    //   background: #f0f1f2;
    // }

    .form_btn {
      text-align: right;
      margin-top: 10px;
    }
  }

  //发送信息
  .Info_css {
    .Info_title {
      color: #323233;
      font-size: 16px;
    }

    .Info_item {
      margin: 20px 0;
    }

    .Info_btn {
      text-align: right;
      margin-top: 10px;
    }
  }

  //附件
  .file {
    .fujian_css {
      width: 270px;
      display: flex;
      margin: 0 auto;
      text-align: center;
      line-height: 32px;
      border: 1px solid #f0f1f2;
      border-right: 0px;
      border-radius: 2px 0px 0px 2px;

      .fujian_item {
        cursor: pointer;
        width: 90px;
        height: 32px;
        border-right: 1px solid #f0f1f2;
      }

      .file_btn {
        color: #2f53eb;
        background-color: #cfdbfe;
      }
    }
    .file_tips{
        margin: 10px auto;
      //  width: 50%;
      text-align:center;
    }

    .file_img {
      width: 525px;
      height: 332px;
      margin: 20px auto;
    }

    .img_css {
      width: 525px;
      height: 332px;
    }

    .btn {
      width: 410px;
      margin: 0 auto;
    }
  }

  .bill_css {
    height: 500px;
    overflow-y: scroll;
  }

  .input_css {
    display: flex;
    text-align: center;
    margin: 0 auto;
    width: 100%;
  }

  ::v-deep .input_css .el-input__inner {
    height: 30px;
  }
  .find::v-deep input.el-input__inner{
    border-radius:0;
  }
  // .tupian{
  //   width: 100%;
  //   height: 100%;
  //   position: absolute;
  // }
</style>
