Browse Source

BUG修改

master
parent
commit
711d323e46
  1. 5
      src/api/eam/basic/item/index.ts
  2. 5
      src/api/eam/basic/location/index.ts
  3. 5
      src/api/eam/basic/locationArea/index.ts
  4. 37
      src/views/eam/basic/item/index.vue
  5. 23
      src/views/eam/basic/location/index.vue
  6. 38
      src/views/eam/basic/locationArea/index.vue

5
src/api/eam/basic/item/index.ts

@ -78,3 +78,8 @@ export const getItemList = async (params) => {
export const getItemNoPage = async (params) => {
return await request.get({ url: `/eam/item/noPage`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/item/get-import-template' })
}

5
src/api/eam/basic/location/index.ts

@ -52,3 +52,8 @@ export const exportLocation = async (params) => {
export const getLocationNoPage = async (params) => {
return await request.get({ url: `/eam/location/noPage`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/location/get-import-template' })
}

5
src/api/eam/basic/locationArea/index.ts

@ -46,3 +46,8 @@ export const exportLocationArea = async (params) => {
return await request.download({ url: `/eam/location-area/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/location-area/get-import-template' })
}

37
src/views/eam/basic/item/index.vue

@ -34,6 +34,9 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Item.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/item/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
@ -59,6 +62,7 @@
routeName.value = route.name
const itemNumber = ref();
const tableColumns = ref(Item.allSchemas.tableColumns)
const importFormRef = ref()
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -83,8 +87,9 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:item:create'}), //
defaultButtons.defaultExportBtn({hasPermi:'basic:item:export'}), //
defaultButtons.defaultAddBtn({ hasPermi: 'basic:item:create' }), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({ hasPermi: 'basic:item:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -94,6 +99,8 @@
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
}else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -106,9 +113,8 @@
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'basic:item:update'}), //
defaultButtons.chooseDeviceBtn({hasPermi:'basic:item:choose'}),//
defaultButtons.mainListDeleteBtn({hasPermi:'basic:item:delete'}), //
defaultButtons.mainListEditBtn({ hasPermi: 'basic:item:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'basic:item:delete' }), //
]
// -
@ -233,7 +239,26 @@
exportLoading.value = false
}
}
onMounted(async () => {
importTemplateData.templateUrl = await ItemApi.importTemplate()
})
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '物料导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

23
src/views/eam/basic/location/index.vue

@ -56,6 +56,7 @@
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Location.allSchemas.tableColumns)
const importFormRef = ref()
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
@ -89,6 +90,7 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:location:create'}), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'basic:location:update'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -107,6 +109,8 @@
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
}else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -200,6 +204,25 @@
exportLoading.value = false
}
}
onMounted(async () => {
importTemplateData.templateUrl = await LocationApi.importTemplate()
})
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库位导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {

38
src/views/eam/basic/locationArea/index.vue

@ -35,7 +35,7 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="LocationArea.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/eam/location-area/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
@ -57,6 +57,7 @@
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(LocationArea.allSchemas.tableColumns)
const importFormRef = ref()
//
const updataTableColumns = (val) => {
@ -83,6 +84,7 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'basic:locationArea:create'}), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'basic:locationArea:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -101,6 +103,8 @@
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
}else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
@ -206,20 +210,24 @@
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库区导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
onMounted(async () => {
importTemplateData.templateUrl = await LocationAreaApi.importTemplate()
})
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库区导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {

Loading…
Cancel
Save