<template>
  <div>
    <companyInfoDialog v-if="showCompanyInfoDialog" :visiable.sync="showCompanyInfoDialog"
                       :title="$t1('批量设置组织流程单据类型')" :allCompany="true"
                       :beforeConfirm="beforeConfirmCompanyInfoDialog"
                       :beforeCancel="beforeCloseCompanyInfoDialog"
                       @confirm="confirmCompanyInfoDialog"></companyInfoDialog>
    <el-dialog
      ref="importDialog"
      :title="$t1('批量设置组织流程单据类型')"
      :append-to-body="falseValue"
      :modal-append-to-body="falseValue"
      :close-on-click-modal="falseValue"
      :visible.sync="showImportDialog2"
      :modal="falseValue"
      custom-class="dialog-style"
      width="501px"
      height="250px"
      @close="dialogClose2"
      v-el-drag-dialog
    >
      <div>
        <div class="import-box">
          <div class="i-status" style="margin-top: 14px;">
            <div class="item">
              <i class="el-icon-success f-green"></i>
              {{ $t2('成功', 'components.excelImport.success') }}：
              <span class="successNum" @click="showSuccessResult">{{ totalSuccessNum }}</span>
            </div>
            <div class="item">
              <i class="el-icon-error f-red"></i>
              {{ $t2('失败', 'components.excelImport.fail') }}：
              <span class="failNum" @click="showErrorResult">{{ totalErrorNum }}</span>
            </div>
          </div>
        </div>
      </div>
      <div slot="footer" class="dialog-footer" center="true">
        <div class="fl import-count">
          <span class="f-red doneNum">{{ doneSize }}</span>
          /
          <span class="dataSize">{{ dataSize }}</span>
        </div>
        <el-button type="primary" plain class="button-sty" @click="dialogClose2">
          <i class="el-icon-close el-icon"></i>
          {{ $t1('取 消') }}
        </el-button>
        <el-button type="primary" class="button-sty" @click="dialogPrimary2">
          <i class="el-icon-check el-icon"></i>
          {{ $t1('确 定') }}
        </el-button>
      </div>
    </el-dialog>
    <el-dialog
      :title="$t1(resultType===1?'结果(成功)':'结果(失败)')"
      :append-to-body="true"
      :modal-append-to-body="true"
      :close-on-click-modal="falseValue"
      :visible.sync="showImportResult"
      :modal="falseValue"
      custom-class="dialog-style list-dialog"
      width="1200px"
      v-el-drag-dialog
    >
      <div>
        <div class="box-style">
          <div class="cont">
            <div class="table-div">
              <vxe-grid
                id="resGrid"
                ref="resGrid"
                height="440px"
                v-bind="resOption"
                @resizable-change="$vxeTableUtil.onColumnWitchChange"
                @custom="$vxeTableUtil.customHandle"
              >
                <template #form>
                  <div class="clearfix screen-btns">
                    <div class="fl">
                      <vxe-button status="primary" class="button-sty" icon="el-icon-upload2" @click="exportToExcel()">
                        {{ $t1('导出') }}
                      </vxe-button>
                    </div>
                    <div class="fr"></div>
                  </div>
                </template>
              </vxe-grid>
            </div>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {mixins} from './mixins/batchWfObjConfigDialog';
import companyInfoDialog from "@base/views/user/company_info/dialog.vue";


export default {
  mixins: [mixins],
  components: {companyInfoDialog}
};
</script>
