update:新增导出未分配的商品数据
This commit is contained in:
parent
0211c1d57c
commit
7d1bd2dee8
@ -45,6 +45,16 @@ export async function downloadTempGoods() {
|
|||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export async function exportUncheckShopData(storeId) {
|
||||||
|
return request({
|
||||||
|
url: '/admin/shop/shop-sync-productMapper/exportUncheckShopData',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob',
|
||||||
|
params: {
|
||||||
|
storeId: storeId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export async function batchCreateGoods(data) {
|
export async function batchCreateGoods(data) {
|
||||||
return request({
|
return request({
|
||||||
@ -149,6 +159,7 @@ export default {
|
|||||||
updateGoods,
|
updateGoods,
|
||||||
deleteGoods /* */,
|
deleteGoods /* */,
|
||||||
downloadTempGoods,
|
downloadTempGoods,
|
||||||
|
exportUncheckShopData,
|
||||||
batchCreateGoods,
|
batchCreateGoods,
|
||||||
batchExportGoods,
|
batchExportGoods,
|
||||||
getProductMapping,
|
getProductMapping,
|
||||||
|
|||||||
@ -38,14 +38,14 @@
|
|||||||
>
|
>
|
||||||
导出数据
|
导出数据
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
type="info"
|
type="info"
|
||||||
@click="downloadTemplate()"
|
@click="downloadTemplate()"
|
||||||
>
|
>
|
||||||
下载模板
|
下载模板
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
action=""
|
action=""
|
||||||
:before-upload="beforeGoodsDataUpload"
|
:before-upload="beforeGoodsDataUpload"
|
||||||
@ -81,7 +81,17 @@
|
|||||||
<!-- <el-button type="danger" @click="handleSyncShopImages">
|
<!-- <el-button type="danger" @click="handleSyncShopImages">
|
||||||
图库匹配并上架商品
|
图库匹配并上架商品
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<el-button @click="openSynForm">批量商品上架</el-button>
|
<el-button @click="openSynForm">批量商品上架</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
type="info"
|
||||||
|
@click="handleExportUncheckShopData()"
|
||||||
|
>
|
||||||
|
导出未分配商品数据
|
||||||
|
</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="productTable"
|
ref="productTable"
|
||||||
@ -374,7 +384,18 @@
|
|||||||
this.downloadFile(res, '商品商品映射数据模板.xlsx')
|
this.downloadFile(res, '商品商品映射数据模板.xlsx')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async handleExportUncheckShopData() {
|
||||||
|
// 校验是否选择了店铺
|
||||||
|
if (!this.filter.storeId) {
|
||||||
|
this.$message.warning('请先选择店铺');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const res = await GoodsToolApi.exportUncheckShopData(this.filter.storeId);
|
||||||
|
if (res) {
|
||||||
|
this.$message.success('导出成功');
|
||||||
|
this.downloadFile(res, '未分配的商品数据.xlsx');
|
||||||
|
}
|
||||||
|
},
|
||||||
downloadFile(blobData, fileName) {
|
downloadFile(blobData, fileName) {
|
||||||
const url = window.URL.createObjectURL(new Blob([blobData]))
|
const url = window.URL.createObjectURL(new Blob([blobData]))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user