Browse Source

标签类型导入按钮取消

master
chenfang 11 months ago
parent
commit
8861f77d0c
  1. 5
      src/api/wms/labeltype/index.ts
  2. 21
      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) => {
return await request.download({ url: `/wms/labeltype/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/labeltype/get-import-template' })
}

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

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

Loading…
Cancel
Save