|
|
@@ -31,13 +31,13 @@ const storeDesktopNumber = () => { |
|
|
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
const showQRCode = (record, store) => { |
|
|
|
const showQRCode = (record) => { |
|
|
|
var config = { |
|
|
|
title: `${store.name} ${record.number}号桌`, |
|
|
|
title: `${record.storeName} ${record.desktopNumber}号桌`, |
|
|
|
okText: '下载', |
|
|
|
cancelText: '取消', |
|
|
|
onOk() { |
|
|
|
changeCanvasToPic(`${store.name} ${record.number}号桌`); |
|
|
|
changeCanvasToPic(`${record.storeName} ${record.desktopNumber}号桌`); |
|
|
|
}, |
|
|
|
content: ( |
|
|
|
// <QRCode |
|
|
@@ -50,13 +50,13 @@ const storeDesktopNumber = () => { |
|
|
|
|
|
|
|
<Card |
|
|
|
style={{ width: 300, height: 450, backgroundImage: 'url(http://bpic.588ku.com/back_pic/05/42/90/125a6c515c035ab.jpg%21r650/fw/800)', backgroundSize: 'cover' }} |
|
|
|
title={(<h2 style={{ fontWeight: 600 }}>{`${store.name}`}</h2>)} |
|
|
|
title={(<h2 style={{ fontWeight: 600 }}>{`${record.storeName}`}</h2>)} |
|
|
|
headStyle={{ border: '0px', textAlign: 'center' }} |
|
|
|
cover={ |
|
|
|
<QRCode |
|
|
|
id="qrCode" |
|
|
|
// value={`https://www.black-pa.com:5500?number=${number}`} |
|
|
|
value={`${record.host}?storeId=${store.id}&number=${record.number}`} |
|
|
|
value={`${record.host}?storeId=${record.storeId}&number=${record.desktopNumber}`} |
|
|
|
size={174} // 二维码的大小 |
|
|
|
fgColor="#000000" // 二维码的颜色 |
|
|
|
style={{ margin: 'auto', marginTop: '60px' }} |
|
|
@@ -64,7 +64,7 @@ const storeDesktopNumber = () => { |
|
|
|
/> |
|
|
|
}> |
|
|
|
<div style={{ textAlign: 'center' }}> |
|
|
|
<h2 style={{ fontWeight: 600 }}>{`${record.number}号桌`}</h2> |
|
|
|
<h2 style={{ fontWeight: 600 }}>{`${record.desktopNumber}号桌`}</h2> |
|
|
|
</div> |
|
|
|
</Card> |
|
|
|
), |
|
|
@@ -96,7 +96,7 @@ const storeDesktopNumber = () => { |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '桌号', |
|
|
|
dataIndex: 'number', |
|
|
|
dataIndex: 'desktopNumber', |
|
|
|
align: 'center', |
|
|
|
search: false, |
|
|
|
render: item => ( |
|
|
@@ -110,19 +110,16 @@ const storeDesktopNumber = () => { |
|
|
|
{ |
|
|
|
title: '适用店铺', |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'storeList', |
|
|
|
search: false, |
|
|
|
render: tags => ( |
|
|
|
<> |
|
|
|
{tags.map(tag => { |
|
|
|
return ( |
|
|
|
<Tag color={'green'} key={tag.id}> |
|
|
|
{tag.name} |
|
|
|
</Tag> |
|
|
|
); |
|
|
|
})} |
|
|
|
</> |
|
|
|
), |
|
|
|
dataIndex: 'storeName', |
|
|
|
// render: tags => ( |
|
|
|
// <> |
|
|
|
// {return ( |
|
|
|
// <Tag color={'green'} key={tag.storeId}> |
|
|
|
// {tag.storeName} |
|
|
|
// </Tag> |
|
|
|
// );} |
|
|
|
// </> |
|
|
|
// ), |
|
|
|
}, { |
|
|
|
title: '创建时间', |
|
|
|
dataIndex: 'createAt', |
|
|
@@ -133,9 +130,8 @@ const storeDesktopNumber = () => { |
|
|
|
dataIndex: 'option', |
|
|
|
valueType: 'option', |
|
|
|
render: (_, record) => [ |
|
|
|
record.storeList.map(item => { |
|
|
|
return (<a onClick={() => { showQRCode(record, item) }} type="link">{item.name}</a>); |
|
|
|
}), <a onClick={() => { |
|
|
|
<a onClick={() => { showQRCode(record) }} type="link">{record.storeName}</a>, |
|
|
|
<a onClick={() => { |
|
|
|
DeleteDesktopNumber([record.id]).then((r) => { |
|
|
|
if (r.data) { |
|
|
|
message.success('删除成功'); |
|
|
|