<template>
  <Modal
    :closable="false"
    :mask-closable="false"
    :title="'导表排单'"
    @on-visible-change="visibleChange"
    v-model="my_show"
  >
    <div class="page-edit-wrap uinn-lr20">
      <ui-loading :show="loading"></ui-loading>

      <ul>
        <li class="ui-list" v-if="data !== null">
          <div class="ui-list-title">订单编号:</div>
          <div class="ui-list-content">
            <span class="lh-32">{{data.sn}}</span>
          </div>
        </li>

        <li class="ui-list">
          <div class="ui-list-title">文件导入</div>
          <div class="ui-list-content">
            <Upload
              :before-upload="selectFile"
              action="/"
              :format="['xls','xlsx','csv']"
              class="f-l"
            >
              <Button icon="ios-cloud-upload-outline">选择文件</Button>
            </Upload>
            <a
              :href="CONFIG.url + 'storage/templates/ship-cards.xls'"
              download="排单模板.xls"
              class="fz-12 lh-32 umar-l10"
            >下载导入模板</a>
          </div>
        </li>

        <li class="ui-list" v-if="file !== null">
          <div class="ui-list-title">已选文件</div>
          <div class="ui-list-content">
            <span class="lh-32">{{file.name}}</span>
          </div>
        </li>
      </ul>
    </div>
    <footer class="ta-c" slot="footer">
      <Button @click="clear" class="w-80 umar-r5" ghost type="primary">取消</Button>
      <Button :loading="loading" @click="ok" class="w-80" type="primary">确定</Button>
    </footer>
  </Modal>
</template>

<script src="./js/ship_not_base.js"></script>
