提交
This commit is contained in:
1 parent
833544def3
commit
16be6fa22d
204 files changed
+455089
-46491
No files matched your search
@@ -47,16 +47,14 @@
|
||||
批量删除
|
||||
</el-button>
|
||||
|
||||
<ArtExcelExport
|
||||
:data="batchExportData"
|
||||
:list-total="pagination.total"
|
||||
:load-all-data="loadAllCategoriesForExport"
|
||||
:filename="categoryExportFilename"
|
||||
sheetName="分类数据"
|
||||
:columns="categoryExportColumns"
|
||||
>
|
||||
批量导出
|
||||
</ArtExcelExport>
|
||||
<ListExportDropdown
|
||||
:export-fn="fetchExportDemoCategories"
|
||||
:get-filter-params="getDemoCategoryExportFilterParams"
|
||||
:has-selection="true"
|
||||
:selected-ids="selectedRows.map((r) => String(r.id))"
|
||||
:visible-columns="demoCategoryExportVisibleColumns"
|
||||
filename="分类数据.xlsx"
|
||||
/>
|
||||
|
||||
<ArtExcelExport
|
||||
:data="categoryImportTemplateData"
|
||||
@@ -510,7 +508,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import ListExportDropdown from '@/components/business/list-export-dropdown/index.vue'
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import { useListMediaActive } from '@/composables/useListMediaActive'
|
||||
/* eslint-disable vue/no-v-model-argument */
|
||||
@@ -533,6 +532,7 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
|
||||
import {
|
||||
fetchCategoryList,
|
||||
fetchExportDemoCategories,
|
||||
fetchCreateCategory,
|
||||
fetchUpdateCategory,
|
||||
fetchDeleteCategory,
|
||||
@@ -595,6 +595,24 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
selectedRows.value = rows
|
||||
}
|
||||
|
||||
const demoCategoryExportVisibleColumns = [
|
||||
'id',
|
||||
'name',
|
||||
'parentId',
|
||||
'parentName',
|
||||
'sortOrder',
|
||||
'priceCoefficient',
|
||||
'isActive',
|
||||
'imageUrl'
|
||||
]
|
||||
|
||||
function getDemoCategoryExportFilterParams() {
|
||||
return {
|
||||
keyword: searchForm.keyword || undefined,
|
||||
isActive: searchForm.isActive === '' ? undefined : searchForm.isActive
|
||||
}
|
||||
}
|
||||
|
||||
const categoryExportFilename = 'base_category_batch_export'
|
||||
const categoryImportTemplateFilename = 'base_category_import_template'
|
||||
|
||||
|
||||
@@ -62,16 +62,14 @@
|
||||
批量删除
|
||||
</el-button>
|
||||
|
||||
<ArtExcelExport
|
||||
:data="batchExportData"
|
||||
:list-total="pagination.total"
|
||||
:load-all-data="loadAllProductsForExport"
|
||||
:filename="productExportFilename"
|
||||
sheetName="商品数据"
|
||||
:columns="productExportColumns"
|
||||
>
|
||||
批量导出
|
||||
</ArtExcelExport>
|
||||
<ListExportDropdown
|
||||
:export-fn="fetchExportDemoProducts"
|
||||
:get-filter-params="getDemoProductExportFilterParams"
|
||||
:has-selection="true"
|
||||
:selected-ids="selectedRows.map((r) => String(r.id))"
|
||||
:visible-columns="demoProductExportVisibleColumns"
|
||||
filename="商品数据.xlsx"
|
||||
/>
|
||||
|
||||
<ListToolbarEndActions :loading="loading" @refresh="loadData" />
|
||||
</div>
|
||||
@@ -925,9 +923,11 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
} from '@element-plus/icons-vue'
|
||||
import { VueDraggable as draggable } from 'vue-draggable-plus'
|
||||
import ProductViewDialog from '@/components/business/product-view-dialog/index.vue'
|
||||
import ListExportDropdown from '@/components/business/list-export-dropdown/index.vue'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import {
|
||||
fetchProductList,
|
||||
fetchExportDemoProducts,
|
||||
fetchProductDetail,
|
||||
fetchCreateProduct,
|
||||
fetchUpdateProduct,
|
||||
@@ -973,6 +973,26 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
selectedRows.value = rows
|
||||
}
|
||||
|
||||
const demoProductExportVisibleColumns = [
|
||||
'id',
|
||||
'name',
|
||||
'skuCode',
|
||||
'categoryName',
|
||||
'measureValue',
|
||||
'unitName',
|
||||
'imageUrl',
|
||||
'isActive',
|
||||
'createAt'
|
||||
]
|
||||
|
||||
function getDemoProductExportFilterParams() {
|
||||
return {
|
||||
keyword: searchForm.keyword || undefined,
|
||||
categoryId: searchForm.categoryId || undefined,
|
||||
isActive: searchForm.isActive === '' ? undefined : searchForm.isActive
|
||||
}
|
||||
}
|
||||
|
||||
const productExportFilename = 'base_product_batch_export'
|
||||
const formatMeasureCell = (v: unknown) => {
|
||||
if (v == null || v === '') return '-'
|
||||
|
||||
Reference in new issue
Block a user