From 801ed95b7525e48eb068e40eb4ac38e4d43d2aa5 Mon Sep 17 00:00:00 2001 From: fanfan Date: Thu, 21 Mar 2024 10:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 7 +++- src/views/dataCenter/goods/Create.vue | 18 +++++++-- src/views/dataCenter/goods/Index.vue | 55 ++++++++++----------------- src/views/dataCenter/goods/Update.vue | 20 +++++++++- 4 files changed, 59 insertions(+), 41 deletions(-) diff --git a/src/App.vue b/src/App.vue index 99950c5..d01d78c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -24,7 +24,10 @@ export default { diff --git a/src/views/dataCenter/goods/Create.vue b/src/views/dataCenter/goods/Create.vue index e160e01..4dda47e 100644 --- a/src/views/dataCenter/goods/Create.vue +++ b/src/views/dataCenter/goods/Create.vue @@ -137,12 +137,22 @@ 刷新 --> - + - 上架 - 下架 + 待处理 + 已入池 + 未入池 + + + + + 停售 + 在售 + 无货 diff --git a/src/views/dataCenter/goods/Index.vue b/src/views/dataCenter/goods/Index.vue index e834984..a82c613 100644 --- a/src/views/dataCenter/goods/Index.vue +++ b/src/views/dataCenter/goods/Index.vue @@ -135,22 +135,22 @@ 创建商品 批量导入 -
+
- 上架 - 移除 - 归类 - 归类 + 停售 导出 - 删除 + 删除
@@ -210,10 +210,9 @@ @@ -567,7 +566,7 @@ export default { return } this.isLoading = true - GoodsApi.addPrice({ goodsIds, categoryIds, rate }) + GoodsApi.addPrice({categoryIds, rate }) .then((result) => { this.priceVisible = false this.$message.success(result.message, 1.5) @@ -595,27 +594,19 @@ export default { handleExport() { const formData = this.searchForm.getFieldsValue() this.isLoading = true - GoodsApi.exportData(this.queryParam) - .then((result) => { - // this.exportData(result.data.list.data) - this.$message.success(result.message, 1.5) - this.handleRefresh() - }) - .finally((result) => { - this.isLoading = false - }) - }, - exportData(itemList) { - const content = itemList.map((item) => `${item.goods_id},${item.channel_name}`).join('\n') - const blob = new Blob(['\ufeff', content], { type: 'text/csv;charset=utf-8;' }) - const url = URL.createObjectURL(blob) - const link = document.createElement('a') - link.href = url - link.setAttribute('download', 'export.csv') - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - window.URL.revokeObjectURL(url) + var index = window.serverConfig.BASE_API.indexOf("?") + var resolve = window.serverConfig.BASE_API.substring(0, index); + let params='&goodsName='+(formData.goodsName||'')+ + '&goodsNo='+(formData.goodsNo||'')+'&goods_price_max='+(formData.goods_price_max || '')+'&goods_price_min='+(formData.goods_price_min || '')+ + '&profit_rate_max='+(formData.profit_rate_max || '')+ + '&profit_rate_min='+(formData.profit_rate_min || '')+ + '&categoryId='+this.queryParam.categoryId+ + '&channel='+this.queryParam.channel+ + '&data_type='+this.queryParam.data_type+ + '&is_pool='+this.queryParam.is_pool+ + '&is_sale='+this.queryParam.is_sale+ + '&is_self='+this.queryParam.is_self + window.open(resolve+'?s=/admin/goods/export'+params) }, // 删除记录 handleDelete(goodsIds) { @@ -663,10 +654,6 @@ export default { .tab-list { margin-right: 20px; } -/deep/.ant-table-body { - overflow-x: scroll; - max-width: 1350px; -} // 列表页-操作按钮组 .row-item-tab { display: flex; diff --git a/src/views/dataCenter/goods/Update.vue b/src/views/dataCenter/goods/Update.vue index cb3ae93..cd0e971 100644 --- a/src/views/dataCenter/goods/Update.vue +++ b/src/views/dataCenter/goods/Update.vue @@ -139,13 +139,31 @@ 刷新
--> - + + + + 待处理 + 已入池 + 未入池 + + + + + 停售 + 在售 + 无货 +