update:新增导出未分配的商品数据
This commit is contained in:
parent
0211c1d57c
commit
7d1bd2dee8
@ -45,6 +45,16 @@ export async function downloadTempGoods() {
|
||||
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) {
|
||||
return request({
|
||||
@ -149,6 +159,7 @@ export default {
|
||||
updateGoods,
|
||||
deleteGoods /* */,
|
||||
downloadTempGoods,
|
||||
exportUncheckShopData,
|
||||
batchCreateGoods,
|
||||
batchExportGoods,
|
||||
getProductMapping,
|
||||
|
||||
@ -82,6 +82,16 @@
|
||||
图库匹配并上架商品
|
||||
</el-button> -->
|
||||
<el-button @click="openSynForm">批量商品上架</el-button>
|
||||
|
||||
<el-button
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleExportUncheckShopData()"
|
||||
>
|
||||
导出未分配商品数据
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
<el-table
|
||||
ref="productTable"
|
||||
@ -374,7 +384,18 @@
|
||||
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) {
|
||||
const url = window.URL.createObjectURL(new Blob([blobData]))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user