Commit 486fa92d authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 商品导出二维码添加一千限制

parent dd9130c3
......@@ -914,6 +914,7 @@ export default {
'commodity.products.schema.fastSchema.submit':'Query',
'commodity.products.schema.fastSchema.qingxuanzeshangjiashangpin' : 'Please select the goods on the shelves',
'commodity.products.schema.fastSchema.daochuchenggong' : 'Export success',
'commodity.products.schema.fastSchema.zuiduodaochuyiqiange' : 'Export a maximum of 1000 QR codes',
'commodity.products.menuMore.5' : 'Export product QR code',
'commodity.products.liebiaogouxuan' : 'List check:',
'commodity.products.geshangpin' : 'A commodity',
......
......@@ -914,6 +914,7 @@ export default {
'commodity.products.schema.fastSchema.submit' : '조회',
'commodity.products.schema.fastSchema.qingxuanzeshangjiashangpin' : '진열대 상품 조작을 선택하세요',
'commodity.products.schema.fastSchema.daochuchenggong' : '성공적으로 내보내기',
'commodity.products.schema.fastSchema.zuiduodaochuyiqiange' : '최대 1000개의 상품 qr 코드를 내보낸다',
'commodity.products.menuMore.5' : '상품의 qr 코드를 내보내다',
'commodity.products.liebiaogouxuan' : '목록 체크:',
'commodity.products.geshangpin' : '몇 가지 상품',
......
......@@ -915,6 +915,7 @@ export default {
'commodity.products.schema.fastSchema.submit' : '查询',
'commodity.products.schema.fastSchema.qingxuanzeshangjiashangpin' : '请选择上架的商品操作',
'commodity.products.schema.fastSchema.daochuchenggong' : '导出成功',
'commodity.products.schema.fastSchema.zuiduodaochuyiqiange' : '最多导出1000个商品二维码',
'commodity.products.menuMore.5' : '导出商品二维码',
'commodity.products.liebiaogouxuan' : '列表勾选:',
'commodity.products.geshangpin' : '个商品',
......
......@@ -520,6 +520,9 @@ const Products: React.FC<{}> = () => {
a.style = "display: none"
setExportLoading(true)
const selectedRowKeys = currentRefRow.current.map(item => item.id)
if(selectedRowKeys.length > 1000) {
return message.error(intl.formatMessage({ id: 'commodity.products.schema.fastSchema.zuiduodaochuyiqiange' }))
}
postProductCommodityExportCommodityQrCode({idList: selectedRowKeys}, { responseType: 'blob', getResponse: true }).then((res:any) => {
const { data, response } = res
const filename = response.headers.get('content-disposition').split('=')[1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment