<template>
  <div>
    <el-breadcrumb class="heading">
      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/oilsupplier/supplier/auditlist' }">准入审核列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="box-card" style="height: calc(100vh - 115px);">
      <div slot="header">
        <span>
          <i class="icon icon-table2"></i> 准入审核列表
        </span>
        <!--<span style="float: right;">
          <router-link :to="'/oilsupplier/supplier/add/auditedit'">
            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
          </router-link>
        </span>-->
        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
          <el-form-item label="时间">
            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                            start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
          </el-form-item>

          <el-form-item>
            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
              查询
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="search">高级查询</el-dropdown-item>
                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </el-form-item>
        </el-form>
      </div>
      <el-table :data="entityList" size="mini" border height="calc(100vh - 246px)" style="width: 100%" @sort-change="orderby">
        <el-table-column label="操作" min-width="90" align="center" fixed="right">
          <template slot-scope="scope">
            <router-link :to="'/oilsupplier/supplieraudit/' + scope.row.Id + '/' + (scope.row.SupplierTypeCode === '01' ? 'goodsedit' : (scope.row.SupplierTypeCode === '02' ? 'basisedit' : 'techedit')) + '?certid=' + scope.row.CertId">
              <el-button type="primary" plain size="mini" title="分办" v-if="scope.row.Status == '3'&&IsCompanyUser == 0">分办</el-button>
              <el-button type="primary" plain size="mini" title="分办" v-if="scope.row.Status == '10'&&IsCompanyUser == 1">分办</el-button>
              <el-button type="primary" plain size="mini" title="审核" v-else>审核</el-button>
            </router-link>

            <!--<el-popover placement="top" title="提示">
              <el-alert
                title=""
                description="确认要删除吗？"
                type="warning"
                :closable="false">
              </el-alert>
              <br/>
              <div style="text-align: center; margin: 0">
                <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
              </div>
              <el-button slot="reference" type="plain" style="margin-left:3px" size="small">删除</el-button>
            </el-popover>-->
          </template>
        </el-table-column>
        <el-table-column min-width="110" align="center" prop="Status" label="审核状态" show-overflow-tooltip>
          <template slot-scope="scope">
            <span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
            <span v-if="scope.row.Status=='10'" style="color:#E6A23C">待二级单位分办</span>
            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室分办</span>
            <span v-if="scope.row.Status=='4'" style="color:#E6A23C">待专业处室审批</span>
            <span v-if="scope.row.Status=='-4'" style="color:#F56C6C">专业处室审批未通过</span>
            <span v-if="scope.row.Status=='5'" style="color:#E6A23C">待集中评审</span>
            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">集中评审未通过</span>
            <span v-if="scope.row.Status=='6'" style="color:#E6A23C">待交费</span>
            <span v-if="scope.row.Status=='7'" style="color:#E6A23C">待入库</span>
            <span v-if="scope.row.Status=='8'" style="color:#67C23A">已入库</span>
          </template>
        </el-table-column>
        <el-table-column v-for="column in tableColumns" :key="column.Id"
                         v-if="column.prop != 'CreateOn'" :prop="column.prop" sortable :width="column.width" :label="column.label" align="center" show-overflow-tooltip></el-table-column>

        <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
          <template slot-scope="scope">
            {{ jstimehandle(scope.row.CreateOn+'') }}
          </template>
        </el-table-column>-->
      </el-table>
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
                     :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
      </el-pagination>
    </el-card>

    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
      <el-form ref="advancedsearchForm" label-width="110px">
        <el-row>

          <el-col :span="12">
            <el-form-item label="生成时间">
              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
                              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="企业名称">
              <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="中石油供应商证书号">
              <el-input size="mini" v-model="searchForm.OilCertificateNo" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="级别">
              <el-input size="mini" v-model="searchForm.Grade" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="管理单位">
              <el-input size="mini" v-model="searchForm.MgrUnit" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="经营方式">
              <el-input size="mini" v-model="searchForm.OperType" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="国家">
              <el-input size="mini" v-model="searchForm.Country" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="所代理制造商名称">
              <el-input size="mini" v-model="searchForm.MaunAgent" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="施工队伍名称">
              <el-input size="mini" v-model="searchForm.ConstructTeam" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="工商注册号">
              <el-input size="mini" v-model="searchForm.CommercialNo" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="组织机构代码">
              <el-input size="mini" v-model="searchForm.OrganCode" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="税务登记证国税编号">
              <el-input size="mini" v-model="searchForm.CountryTaxNo" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="税务登记证地税编号">
              <el-input size="mini" v-model="searchForm.LocalTaxNo" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="单位地址">
              <el-input size="mini" v-model="searchForm.Address" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="省直辖市">
              <el-input size="mini" v-model="searchForm.Province" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="地市区县">
              <el-input size="mini" v-model="searchForm.City" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="街道">
              <el-input size="mini" v-model="searchForm.Street" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="门牌号">
              <el-input size="mini" v-model="searchForm.HouseNo" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="邮编">
              <el-input size="mini" v-model="searchForm.ZipCode" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="质量管理体系认证情况及认证机构">
              <el-input size="mini" v-model="searchForm.QualitySystemCert" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="产品质量认证情况及认证机构">
              <el-input size="mini" v-model="searchForm.ProductQualityCert" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="生产制造许可证获证情况及编号">
              <el-input size="mini" v-model="searchForm.MaunLicense" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="企业资质证书编号">
              <el-input size="mini" v-model="searchForm.QualifCert" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="企业资质证书级别">
              <el-input size="mini" v-model="searchForm.QualifCertLevel" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="安全生产许可证">
              <el-input size="mini" v-model="searchForm.SafetyLicense" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="技术服务类准入许可证">
              <el-input size="mini" v-model="searchForm.TechServiceLic" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="外地企业进津备案通知书">
              <el-input size="mini" v-model="searchForm.TJInNotify" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="行业特殊要求的认证证书">
              <el-input size="mini" v-model="searchForm.SpecIndustryCert" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="法定代表人姓名">
              <el-input size="mini" v-model="searchForm.LegalPerson" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="行业类别代码">
              <el-input size="mini" v-model="searchForm.CategoryCode" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="行业类别名称">
              <el-input size="mini" v-model="searchForm.CategoryName" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="注册资本">
              <el-input size="mini" v-model="searchForm.RegCapital" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="币种">
              <el-input size="mini" v-model="searchForm.Currency" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="联系人姓名">
              <el-input size="mini" v-model="searchForm.ContactName" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="公司类型">
              <el-input size="mini" v-model="searchForm.CompanyType" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="成立时间">
              <el-input size="mini" v-model="searchForm.SetupTime" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="开户银行">
              <el-input size="mini" v-model="searchForm.DepositBank" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="银行账号">
              <el-input size="mini" v-model="searchForm.BankAccount" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="电子邮箱">
              <el-input size="mini" v-model="searchForm.EMail" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="银行信用等级">
              <el-input size="mini" v-model="searchForm.BankCreditRating" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="移动电话">
              <el-input size="mini" v-model="searchForm.Mobile" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="固定电话">
              <el-input size="mini" v-model="searchForm.Telphone" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="传真">
              <el-input size="mini" v-model="searchForm.Fax" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="公司电话">
              <el-input size="mini" v-model="searchForm.CompanyTel" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="QQ号码">
              <el-input size="mini" v-model="searchForm.QQ" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="公司网址">
              <el-input size="mini" v-model="searchForm.CompanyUrl" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="是否特殊业务供应商(可不招标)">
              <el-input size="mini" v-model="searchForm.SpecSupplier" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="业务类型（1战略合作，2内部多经，3区域关键，4专业化实施）">
              <el-input size="mini" v-model="searchForm.SpecTypeCode" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="业务类型（1战略合作，2内部多经，3区域关键，4专业化实施）">
              <el-input size="mini" v-model="searchForm.SpecTypeName" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="备注">
              <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="删除状态，0正常，1已删除">
              <el-input size="mini" v-model="searchForm.IsDelete" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.CreateOn" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.CreateUserId" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.CreateBy" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.ModifiedOn" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.ModifiedUserId" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-input size="mini" v-model="searchForm.ModifiedBy" style="width:100%" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>

        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
        <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
      </span>
    </el-dialog>

  </div>
</template>
<script>
  import { mapGetters } from 'vuex';
  import api from '@/api/oilsupplier/supplier';

  export default {
    computed: {
      ...mapGetters({
        authUser: 'authUser'
      })
    },
    name: 'oilsupplieraudit',

    data() {
      return {
        IsCompanyUser: 0,
        dialogVisible: false,
        //列表数据
        entityList: [],
        //分页参数
        size: 10,
        currentPage: 1,
        currentItemCount: 0,
        //列表排序
        Column: {
          Order: '',
          Prop: ''
        },
        //查询时间
        CreateOn: '',
        //查询项
        searchFormReset: {},
        searchForm: {
          Id: '',
          SupplierName: '',
          OilCertificateNo: '',
          Grade: '',
          MgrUnit: '',
          OperType: '',
          Country: '',
          MaunAgent: '',
          ConstructTeam: '',
          CommercialNo: '',
          OrganCode: '',
          CountryTaxNo: '',
          LocalTaxNo: '',
          Address: '',
          Province: '',
          City: '',
          Street: '',
          HouseNo: '',
          ZipCode: '',
          QualitySystemCert: '',
          ProductQualityCert: '',
          MaunLicense: '',
          QualifCert: '',
          QualifCertLevel: '',
          SafetyLicense: '',
          TechServiceLic: '',
          TJInNotify: '',
          SpecIndustryCert: '',
          LegalPerson: '',
          CategoryCode: '',
          CategoryName: '',
          RegCapital: '',
          Currency: '',
          ContactName: '',
          CompanyType: '',
          SetupTime: '',
          DepositBank: '',
          BankAccount: '',
          EMail: '',
          BankCreditRating: '',
          Mobile: '',
          Telphone: '',
          Fax: '',
          CompanyTel: '',
          QQ: '',
          CompanyUrl: '',
          SpecSupplier: '',
          SpecTypeCode: '',
          SpecTypeName: '',
          Remark: '',
          IsDelete: '',
          CreateOn: '',
          CreateUserId: '',
          CreateBy: '',
          ModifiedOn: '',
          ModifiedUserId: '',
          ModifiedBy: ''

        },
        tableColumns: [

          /*{
           prop: "Id",
           label: '',
           width: 100,
           sort: true
           },*/

          {
            prop: "AccessCardNo",
            label: '准入证编号',
            width: 260,
            sort: true
          },

          {
            prop: "SupplierTypeName",
            label: '准入类别',
            width: 260,
            sort: true
          },

          {
            prop: "SupplierName",
            label: '企业名称',
            width: 260,
            sort: true
          },

          /*{
           prop: "OilCertificateNo",
           label: '中石油供应商证书号',
           width: 100,
           sort: true
           },

           {
           prop: "Grade",
           label: '级别',
           width: 100,
           sort: true
           },*/

          /*{
           prop: "MgrUnit",
           label: '管理单位',
           width: 100,
           sort: true
           },*/

          /*{
           prop: "OperType",
           label: '经营方式',
           width: 100,
           sort: true
           },*/

          /*{
           prop: "Country",
           label: '国家',
           width: 100,
           sort: true
           },

           {
           prop: "MaunAgent",
           label: '所代理制造商名称',
           width: 100,
           sort: true
           },

           {
           prop: "ConstructTeam",
           label: '施工队伍名称',
           width: 100,
           sort: true
           },*/

          {
            prop: "CommercialNo",
            label: '工商注册号',
            width: 260,
            sort: true
          },

          /*{
           prop: "OrganCode",
           label: '组织机构代码',
           width: 100,
           sort: true
           },*/

          {
            prop: "CountryTaxNo",
            label: '税务登记证编号',
            width: 260,
            sort: true
          },

          /*{
           prop: "LocalTaxNo",
           label: '税务登记证地税编号',
           width: 100,
           sort: true
           },*/

          {
            prop: "Address",
            label: '单位地址',
            width: 360,
            sort: true
          },

          /*{
           prop: "Province",
           label: '省直辖市',
           width: 200,
           sort: true
           },

           {
           prop: "City",
           label: '地市区县',
           width: 200,
           sort: true
           },

           {
           prop: "Street",
           label: '街道',
           width: 200,
           sort: true
           },

           {
           prop: "HouseNo",
           label: '门牌号',
           width: 200,
           sort: true
           },

           {
           prop: "ZipCode",
           label: '邮编',
           width: 200,
           sort: true
           },*/

          /*{
           prop: "QualitySystemCert",
           label: '质量管理体系认证情况及认证机构',
           width: 300,
           sort: true
           },

           {
           prop: "ProductQualityCert",
           label: '产品质量认证情况及认证机构',
           width: 300,
           sort: true
           },

           {
           prop: "MaunLicense",
           label: '生产制造许可证获证情况及编号',
           width: 100,
           sort: true
           },

           {
           prop: "QualifCert",
           label: '企业资质证书编号',
           width: 300,
           sort: true
           },

           {
           prop: "QualifCertLevel",
           label: '企业资质证书级别',
           width: 300,
           sort: true
           },

           {
           prop: "SafetyLicense",
           label: '安全生产许可证',
           width: 100,
           sort: true
           },

           {
           prop: "TechServiceLic",
           label: '技术服务类准入许可证',
           width: 100,
           sort: true
           },

           {
           prop: "TJInNotify",
           label: '外地企业进津备案通知书',
           width: 100,
           sort: true
           },

           {
           prop: "SpecIndustryCert",
           label: '行业特殊要求的认证证书',
           width: 200,
           sort: true
           },

           {
           prop: "LegalPerson",
           label: '法定代表人姓名',
           width: 100,
           sort: true
           },

           {
           prop: "CategoryCode",
           label: '行业类别代码',
           width: 100,
           sort: true
           },

           {
           prop: "CategoryName",
           label: '行业类别名称',
           width: 100,
           sort: true
           },*/

          {
            prop: "RegCapital",
            label: '注册资本',
            width: 150,
            sort: true
          },

          {
            prop: "Currency",
            label: '币种',
            width: 100,
            sort: true
          },

          {
            prop: "ContactName",
            label: '联系人姓名',
            width: 140,
            sort: true
          },

          {
            prop: "CompanyType",
            label: '公司类型',
            width: 150,
            sort: true
          },

          {
            prop: "SetupTime",
            label: '成立时间',
            width: 220,
            sort: true
          },

          {
            prop: "DepositBank",
            label: '开户银行',
            width: 220,
            sort: true
          },

          {
            prop: "BankAccount",
            label: '银行账号',
            width: 220,
            sort: true
          },

          {
            prop: "EMail",
            label: '电子邮箱',
            width: 220,
            sort: true
          },

          {
            prop: "BankCreditRating",
            label: '银行信用等级',
            width: 220,
            sort: true
          },

          {
            prop: "Mobile",
            label: '移动电话',
            width: 220,
            sort: true
          },

          {
            prop: "Telphone",
            label: '固定电话',
            width: 220,
            sort: true
          },

          {
            prop: "Fax",
            label: '传真',
            width: 220,
            sort: true
          },

          {
            prop: "CompanyTel",
            label: '公司电话',
            width: 220,
            sort: true
          },

          {
            prop: "QQ",
            label: 'QQ号码',
            width: 220,
            sort: true
          },

          {
            prop: "CompanyUrl",
            label: '公司网址',
            width: 220,
            sort: true
          },

          /*{
           prop: "SpecSupplier",
           label: '是否特殊业务供应商(可不招标)',
           width: 100,
           sort: true
           },

           {
           prop: "SpecTypeCode",
           label: '业务类型（1战略合作，2内部多经，3区域关键，4专业化实施）',
           width: 100,
           sort: true
           },

           {
           prop: "SpecTypeName",
           label: '业务类型（1战略合作，2内部多经，3区域关键，4专业化实施）',
           width: 100,
           sort: true
           },*/

          {
            prop: "Remark",
            label: '备注',
            width: 220,
            sort: true
          }

        ]
      }
    },
    created() {
      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
      //查询条件初始值备份
      Object.assign(this.searchFormReset, this.searchForm);
      //查询列表
      this.initDatas();
      //this.getDictOptions()
    },
    methods: {
      initDatas() {
        //分页及列表条件
        let params = {
          _currentPage: this.currentPage,
          _size: this.size,
          Order: this.Column.Order,
          Prop: this.Column.Prop,
          Statustype : 2,
        }
        let myCreateOn = []
        // 解析时间
        if (this.CreateOn.length === 2) {
          this.CreateOn[1].setHours(23)
          this.CreateOn[1].setMinutes(59)
          this.CreateOn[1].setSeconds(59)
          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
        }
        //查询条件
        Object.assign(params, this.searchForm)
        //访问接口
        api.getMyTasks(myCreateOn.join(','), params, this.$axios).then(res => {
          this.entityList = res.data.items
          this.currentItemCount = res.data.currentItemCount
        }).catch(err => {
          console.error(err)
        })
      },

      getDictOptions () {
        api.getDictList(this.$axios).then(res => {
          //this.dictOptions.customerList = res.data.items['customerList']
          //this.dictOptions.projectList = res.data.items['projectList']

        }).catch(err => {
          console.error(err)
        })
      },

      searchCommand(command) {
        if (command == 'search') {
          this.dialogVisible = true
        } else if (command == 'clear') {
          this.clearSearch()
        }
      },
      //列表排序功能
      orderby(column) {
        if (column.order == 'ascending') {
          this.Column.Order = 'asc'
        } else if (column.order == 'descending') {
          this.Column.Order = 'desc'
        }
        this.Column.Prop = column.prop
        this.initDatas()
      },
      clearSearch() {
        Object.assign(this.searchForm, this.searchFormReset);
        //this.searchForm = this.searchFormReset;
        this.CreateOn = ''
        this.initDatas()
      },
      handleSearch() {
        this.currentPage = 1;
        this.dialogVisible = false;
        this.initDatas();
      },
      handleCurrentChange(value) {
        this.currentPage = value
        this.initDatas()
      },
      handleSizeChange(value) {
        this.size = value
        this.currentPage = 1
        this.initDatas()
      },
      deleteEntity(row) {
        row.deleteConfirmFlag = false;
        api.deleteEntity(row.Id, this.$axios).then(res => {
          if (res.data.code === 0) {
            this.initDatas();
            this.$message({
              type: 'success',
              message: res.data.message
            });

          } else {
            this.$message({
              type: 'warning',
              message: res.data.message
            });
          }
        }).catch(err => {
          console.error(err)
        });
      },

      jstimehandle(val) {
        if (val === '') {
          return '----'
        } else if (val === '0001-01-01T08:00:00+08:00') {
          return '----'
        } else if (val === '5000-01-01T23:59:59+08:00') {
          return '永久'
        } else {
          val = val.replace('T', ' ')
          return val.substring(0, 10)
        }
      },

      formatDateTime(date) {
        var y = date.getFullYear();
        var m = date.getMonth() + 1;
        m = m < 10 ? ('0' + m) : m;
        var d = date.getDate();
        d = d < 10 ? ('0' + d) : d;
        var h = date.getHours();
        var minute = date.getMinutes();
        minute = minute < 10 ? ('0' + minute) : minute;
        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
      }
    }
  }

</script>

<style lang="scss">
  .el-pagination {
    margin: 1rem 0 2rem;
    text-align: right;
  }
</style>
