TrackEdit.vue 2.19 KB
<template>
  <template>
    <BasicDrawer
      @register="register"
      v-bind="$attrs"
      title="编辑"
      width="30%"
      :isDetail="true"
      @ok="handleSubmit"
      :showDetailBack="false"
      okText="保存"
      showFooter
      :destroyOnClose="true"
    >
      <div>
        <div style="font-size: 15px">生产科扣款金额</div>
        <a-input v-model:value="Input1" placeholder="请输入" auto-size />
        <div style="margin: 16px 0"></div>
        <div style="font-size: 15px">扣款责任部门</div>
        <a-input v-model:value="Input2" placeholder="请输入" auto-size />
        <div style="margin: 16px 0"></div>
        <div>上传扣款单</div
        ><a-space direction="vertical" style="width: 100%" size="large">
          <a-upload
            v-model:file-list="fileList"
            list-type="picture"
            :max-count="1"
            action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
          >
            <a-button>
              <!-- <upload-outlined></upload-outlined> -->
              上传报关单
            </a-button>
          </a-upload>
        </a-space>
      </div>
      <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> -->
      <template #appendFooter>
        <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> -->
      </template>
    </BasicDrawer>
  </template>
</template>
<script lang="ts" setup>
  import { BasicDrawer, useDrawerInner } from '@/components/Drawer';
  import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue';
  import { getEmailList } from '/@/api/sys/config';
  import { UploadOutlined } from '@ant-design/icons-vue';
  import type { UploadProps } from 'ant-design-vue';

  const fileList = ref<UploadProps['fileList']>([]);

  const Input1 = ref('');
  const Input2 = ref('123');

  const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
    console.log(data, 56561);
  });
  //获取现有的列表
  async function getData() {
    const emailAll = await getEmailList({});
    return emailAll;
  }
  //完成编辑
  async function handleSubmit() {
    console.log('5656handleSubmit');
  }
</script>