Browse Source

物品基本信息导入前端代码

master
chenfang 1 year ago
parent
commit
c15afe163e
  1. 10
      src/views/wms/itembasic/ItembasicImportForm.vue

10
src/views/wms/itembasic/ItembasicImportForm.vue

@ -41,11 +41,11 @@
</Dialog> </Dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import * as UserApi from '@/api/system/user' import * as ItembasicApi from '@/api/wms/itembasic'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
import download from '@/utils/download' import download from '@/utils/download'
defineOptions({ name: 'SystemUserImportForm' }) defineOptions({ name: 'WmsItembasicImportForm' })
const message = useMessage() // const message = useMessage() //
@ -53,7 +53,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // const formLoading = ref(false) //
const uploadRef = ref() const uploadRef = ref()
const importUrl = const importUrl =
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/user/import' import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/wms/itembasic/import'
const uploadHeaders = ref() // Header const uploadHeaders = ref() // Header
const fileList = ref([]) // const fileList = ref([]) //
const updateSupport = ref(0) // const updateSupport = ref(0) //
@ -127,7 +127,5 @@ const handleExceed = (): void => {
/** 下载模板操作 */ /** 下载模板操作 */
const importTemplate = async () => { const importTemplate = async () => {
const res = await UserApi.importUserTemplate() const res = await ItembasicApi.importUserTemplate()
download.excel(res, '物品基本信息导入模版.xls') download.excel(res, '物品基本信息导入模版.xls')
}
</script>

Loading…
Cancel
Save