<template>
  <!-- 停用仓库信息-->
  <a-modal class="commonModal warehouse-disable"
           title="停用仓库信息"
           v-model:visible="visible"
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                class="cancelBtn"
                @click="cancel">取消</a-button>
      <a-button key="submit"
                type="primary"
                :loading="loading"
                @click="submit">确认停用</a-button>
    </template>
    <a-form class="inlineForm"
            :form="form"
            @submit="handleSearch">
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item label="仓库类型">
            <span class="white">自有库</span>
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item label="仓库名称">
            <span class="white">深圳市南储公司2号库房</span>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item label="仓库简称">
            <span class="white">南储深圳2号库</span>
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item label="联系人">
            <span class="white">王平</span>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item label="联系电话">
            <span class="white">13832676234</span>
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item label="状态">
            <span class="green">正常</span>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item label="所在地区">
            <span class="white">广东省深圳市南山区</span>
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item label="详细地址">
            <span class="white">深南大道1290号仓库</span>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </a-modal>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import { closeModal } from '@/common/setup/modal/index';

export default defineComponent({
    name: 'custom-disable',
    components: {},
    setup() {
        const { visible, cancel } = closeModal('custom_info_btn_disable');
        const loading = ref<boolean>(false);
        function submit() {
            loading.value = true;
            setTimeout(() => {
                loading.value = false;
                cancel();
            }, 2000);
        }
        return {
            visible,
            cancel,
            submit,
            loading,
        };
    },
});
</script>

<style lang="less">
.warehouse-disable {
}
</style
>;
