Commit 1abe915c authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理商品筛选上架商品批量导出二维码异常

parent 486fa92d
...@@ -3,7 +3,7 @@ import { TableRowSelection } from 'antd/es/table/interface' ...@@ -3,7 +3,7 @@ import { TableRowSelection } from 'antd/es/table/interface'
import { mergeArrByKey, dupliArr } from '@/utils' import { mergeArrByKey, dupliArr } from '@/utils'
import { useSelections } from '@umijs/hooks' import { useSelections } from '@umijs/hooks'
interface useRowSelectionTableCtl { export interface useRowSelectionTableCtl {
selectRow: any[], selectRow: any[],
selectedRowKeys: any[], selectedRowKeys: any[],
setSelectRow(rows: any[]), setSelectRow(rows: any[]),
...@@ -120,4 +120,4 @@ export const useRowSelectionTable = (options: useRowSelectionOptions = {}): [Tab ...@@ -120,4 +120,4 @@ export const useRowSelectionTable = (options: useRowSelectionOptions = {}): [Tab
} }
return [rowSelection, { selectRow, setSelectRow, selectedRowKeys, setSelectedRowKeys, appendSelectRow, appendSelectRowKeys }] return [rowSelection, { selectRow, setSelectRow, selectedRowKeys, setSelectedRowKeys, appendSelectRow, appendSelectRowKeys }]
} }
\ No newline at end of file
...@@ -167,6 +167,8 @@ export default { ...@@ -167,6 +167,8 @@ export default {
'transaction_components.qitayaoqiu': 'Other requirements', 'transaction_components.qitayaoqiu': 'Other requirements',
'transaction_components.jiaofuxinxi': 'Delivery Information', 'transaction_components.jiaofuxinxi': 'Delivery Information',
'transaction_components.qitaxinxi': 'Other information', 'transaction_components.qitaxinxi': 'Other information',
'transaction_components.pintuanxinxi': 'Order group information',
'transaction_components.pintuanzhuangtai': 'Spell group status',
'transaction_components.kaijuleixing': 'Issuing Type', 'transaction_components.kaijuleixing': 'Issuing Type',
'transaction_components.fapiaozhonglei': 'Invoice type', 'transaction_components.fapiaozhonglei': 'Invoice type',
'transaction_components.fapiaotaitou': 'Invoice header', 'transaction_components.fapiaotaitou': 'Invoice header',
......
...@@ -167,6 +167,8 @@ export default { ...@@ -167,6 +167,8 @@ export default {
'transaction_components.qitayaoqiu': '기타 요구 사항', 'transaction_components.qitayaoqiu': '기타 요구 사항',
'transaction_components.jiaofuxinxi': '제공 정보', 'transaction_components.jiaofuxinxi': '제공 정보',
'transaction_components.qitaxinxi': '기타 정보', 'transaction_components.qitaxinxi': '기타 정보',
'transaction_components.pintuanxinxi': '주문서 묶음 정보',
'transaction_components.pintuanzhuangtai': '단체 모음 상태',
'transaction_components.kaijuleixing': '구형', 'transaction_components.kaijuleixing': '구형',
'transaction_components.fapiaozhonglei': '영수증 종류', 'transaction_components.fapiaozhonglei': '영수증 종류',
'transaction_components.fapiaotaitou': '영수증', 'transaction_components.fapiaotaitou': '영수증',
......
...@@ -167,6 +167,8 @@ export default { ...@@ -167,6 +167,8 @@ export default {
'transaction_components.qitayaoqiu': '其他要求', 'transaction_components.qitayaoqiu': '其他要求',
'transaction_components.jiaofuxinxi': '交付信息', 'transaction_components.jiaofuxinxi': '交付信息',
'transaction_components.qitaxinxi': '其他信息', 'transaction_components.qitaxinxi': '其他信息',
'transaction_components.pintuanxinxi': '订单拼团信息',
'transaction_components.pintuanzhuangtai': '拼团状态',
'transaction_components.kaijuleixing': '开具类型', 'transaction_components.kaijuleixing': '开具类型',
'transaction_components.fapiaozhonglei': '发票种类', 'transaction_components.fapiaozhonglei': '发票种类',
'transaction_components.fapiaotaitou': '发票抬头', 'transaction_components.fapiaotaitou': '发票抬头',
......
...@@ -33,7 +33,7 @@ import UpperProductModalTable from './components/upperProductModalTable' ...@@ -33,7 +33,7 @@ import UpperProductModalTable from './components/upperProductModalTable'
import { getProductCommodityGetCommodityList, getProductCommodityGetShop, GetProductCommodityGetShopResponse, postProductCommodityApplyCheckCommodity, postProductCommodityCopyCommodity, postProductCommodityDeleteBatchCommodity, postProductCommodityExportCommodityQrCode, postProductCommodityGetShopBatch, postProductCommodityOffPublishCommodity, postProductCommodityOffPublishCommodityBatch, postProductCommodityPublishCommodity, postProductCommodityPublishCommodityBatch } from '@/services/ProductV2Api' import { getProductCommodityGetCommodityList, getProductCommodityGetShop, GetProductCommodityGetShopResponse, postProductCommodityApplyCheckCommodity, postProductCommodityCopyCommodity, postProductCommodityDeleteBatchCommodity, postProductCommodityExportCommodityQrCode, postProductCommodityGetShopBatch, postProductCommodityOffPublishCommodity, postProductCommodityOffPublishCommodityBatch, postProductCommodityPublishCommodity, postProductCommodityPublishCommodityBatch } from '@/services/ProductV2Api'
import { getTemplateWebMemberShopWebFindCurrMemberShop } from '@/services/TemplateV2Api' import { getTemplateWebMemberShopWebFindCurrMemberShop } from '@/services/TemplateV2Api'
import PutawayGuide from './components/putawayGuide' import PutawayGuide from './components/putawayGuide'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable' import { useRowSelectionTable, useRowSelectionTableCtl } from '@/hooks/useRowSelectionTable'
const { confirm } = Modal; const { confirm } = Modal;
...@@ -60,6 +60,7 @@ const Products: React.FC<{}> = () => { ...@@ -60,6 +60,7 @@ const Products: React.FC<{}> = () => {
const [exportQrcodeModal, setExportQrcodeModal] = useState<boolean>(false) const [exportQrcodeModal, setExportQrcodeModal] = useState<boolean>(false)
const [exportLoading, setExportLoading] = useState<boolean>(false) const [exportLoading, setExportLoading] = useState<boolean>(false)
const currentRefRow = useRef<any>([]) const currentRefRow = useRef<any>([])
const currentCtrlRef = useRef<useRowSelectionTableCtl>()
const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id' }); const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'id' });
const upperRef = useRef<any>({}) const upperRef = useRef<any>({})
const [giudeVisible, setGiudeVisible] = useState<boolean>(false) const [giudeVisible, setGiudeVisible] = useState<boolean>(false)
...@@ -69,6 +70,8 @@ const Products: React.FC<{}> = () => { ...@@ -69,6 +70,8 @@ const Products: React.FC<{}> = () => {
const { searchData, formatInitialValue, clear } = useSetSearchValueInTable() const { searchData, formatInitialValue, clear } = useSetSearchValueInTable()
useEffect(() => { useEffect(() => {
console.log(RowCtl.selectRow)
currentCtrlRef.current = RowCtl
currentRefRow.current = RowCtl.selectRow currentRefRow.current = RowCtl.selectRow
}, [RowCtl]) }, [RowCtl])
...@@ -477,7 +480,8 @@ const Products: React.FC<{}> = () => { ...@@ -477,7 +480,8 @@ const Products: React.FC<{}> = () => {
} else { } else {
postProductCommodityOffPublishCommodityBatch({ idList: selectedRowKeys }).then(res => { postProductCommodityOffPublishCommodityBatch({ idList: selectedRowKeys }).then(res => {
ref.current.reload() ref.current.reload()
RowCtl.setSelectedRowKeys([]) currentCtrlRef.current.setSelectedRowKeys([])
currentCtrlRef.current.setSelectRow([])
}) })
} }
}, },
...@@ -508,6 +512,8 @@ const Products: React.FC<{}> = () => { ...@@ -508,6 +512,8 @@ const Products: React.FC<{}> = () => {
handleBatch(e.key) handleBatch(e.key)
} else if(e.key === '5') { } else if(e.key === '5') {
if(!currentRefRow.current.every(item => item.status === 5)) { if(!currentRefRow.current.every(item => item.status === 5)) {
currentCtrlRef.current.setSelectedRowKeys([])
currentCtrlRef.current.setSelectRow([])
return message.error(intl.formatMessage({ id: 'commodity.products.schema.fastSchema.qingxuanzeshangjiashangpin' })) return message.error(intl.formatMessage({ id: 'commodity.products.schema.fastSchema.qingxuanzeshangjiashangpin' }))
} }
selectedRowKeys.length ? setExportQrcodeModal(true) : message.error(intl.formatMessage({ id: 'commodity.products.handleBatchDelete.error' })) selectedRowKeys.length ? setExportQrcodeModal(true) : message.error(intl.formatMessage({ id: 'commodity.products.handleBatchDelete.error' }))
......
...@@ -103,6 +103,10 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => { ...@@ -103,6 +103,10 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
{ title: intl.formatMessage({id: 'transaction_components.qitayaoqiu'}), name: 'remark' }, { title: intl.formatMessage({id: 'transaction_components.qitayaoqiu'}), name: 'remark' },
] ]
const promotionInfo = [
{ title: intl.formatMessage({id: 'transaction_components.pintuanzhuangtai'}), name: 'promotionStatusName' },
]
const applyInvoice = () => { const applyInvoice = () => {
setApplyVisible(true) setApplyVisible(true)
reload() reload()
...@@ -210,6 +214,13 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => { ...@@ -210,6 +214,13 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
</MellowCard> </MellowCard>
</Col> </Col>
{ {
data.groupOrder ? <Col span={24} style={{ marginTop: 24 }}>
<MellowCard title={intl.formatMessage({id: 'transaction_components.pintuanxinxi'})} fullHeight>
<RenderCard infoList={promotionInfo} dataSource={{...data, ...data.requirement}} />
</MellowCard>
</Col> : null
}
{
(data.orderKind === OrderKindType.SRM_ORDER) || !data.hasContract ? (data.orderKind === OrderKindType.SRM_ORDER) || !data.hasContract ?
null null
: :
......
...@@ -90,8 +90,7 @@ export const useSelfTable = () => { ...@@ -90,8 +90,7 @@ export const useSelfTable = () => {
] ]
const handleConfirm = async (record) => { const handleConfirm = async (record) => {
console.log(record)
// history.push(`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/detail?id=${record.orderId}&batchNo=${record.batchNo}`)
} }
return { return {
......
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