Browse Source

标签类型导入按钮取消

master
chenfang 12 months ago
parent
commit
8861f77d0c
  1. 5
      src/api/wms/labeltype/index.ts
  2. 23
      src/views/wms/basicDataManage/labelManage/labeltype/index.vue

5
src/api/wms/labeltype/index.ts

@ -56,8 +56,3 @@ export const deleteLabeltype = async (id: number) => {
export const exportLabeltype = async (params) => { export const exportLabeltype = async (params) => {
return await request.download({ url: `/wms/labeltype/export-excel`, params }) return await request.download({ url: `/wms/labeltype/export-excel`, params })
} }
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/labeltype/get-import-template' })
}

23
src/views/wms/basicDataManage/labelManage/labeltype/index.vue

@ -54,9 +54,7 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Labeltype.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="Labeltype.allSchemas" />
<!-- 导入 --> </template>
<ImportForm ref="importFormRef" url="/wms/labeltype/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
@ -64,7 +62,6 @@ import { Labeltype,LabeltypeRules } from './labeltype.data'
import * as LabeltypeApi from '@/api/wms/labeltype' import * as LabeltypeApi from '@/api/wms/labeltype'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Labeltype' }) defineOptions({ name: 'Labeltype' })
@ -121,8 +118,6 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
@ -211,21 +206,6 @@ const handleExport = async () => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '标签定义导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -238,7 +218,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await LabeltypeApi.importTemplate()
}) })
</script> </script>

Loading…
Cancel
Save