Commit 1284ccdf authored by 武广's avatar 武广

Merge branch 'feature/sourcemap' of git.quantgroup.cn:ui/merchant-manage-ui...

Merge branch 'feature/sourcemap' of git.quantgroup.cn:ui/merchant-manage-ui into feature/sourcemap-merchant
parents aa98368c 09d74448
......@@ -23,6 +23,7 @@ const SaleDateModal = props => {
message.error('请选择餐段');
return;
}
const arr = value.sort((x, y) => x - y);
if (props.productType === 4) {
const data = [];
props.dataSource.forEach(item => {
......@@ -31,7 +32,7 @@ const SaleDateModal = props => {
tabCateList: item.tabCate?.map(v => ({ tabId: v })),
};
if (props.item.skuId === item.skuId && item.saleDate) {
obj.tabCateList = value.map(v => ({ tabId: v }));
obj.tabCateList = arr.map(v => ({ tabId: v }));
data.push(obj);
} else if (item.saleDate?.length && item.tabCate?.length) {
data.push(obj);
......@@ -45,13 +46,13 @@ const SaleDateModal = props => {
if (props.id) {
const params = {
id: props.id,
tabIds: value,
tabIds: arr,
};
await apiMealInfoUpdate(params);
notification.success({ message: '保存成功' });
}
handleCancel();
props.handleRefresh(value);
props.handleRefresh(arr);
};
// 获取店铺餐段通过企业ID
......
......@@ -144,7 +144,15 @@ export const takeawayGoodsColumn = options => {
hideInSearch: true,
render: (_, record) => (
<Space>
{_ && _.length ? <span>{_.map(item => item.tabName).join('/')}</span> : <span>-</span>}
{_ && _.length ? (
<span>
{_.sort((x, y) => x.tabId - y.tabId)
.map(item => item.tabName)
.join('/')}
</span>
) : (
<span>-</span>
)}
<span
className={style.columnBtnEdit}
onClick={() => {
......@@ -380,7 +388,11 @@ export const GoodsInfoColumn = options => {
render: (_, record) => (
<Space>
{_ && _.length ? (
<span key="1">{_.map(item => mealColumn[item]).join('/')}</span>
<span key="1">
{_.sort((x, y) => x - y)
.map(item => mealColumn[item])
.join('/')}
</span>
) : (
<span key="2" className={style.columnTip}>
请配置
......@@ -552,7 +564,15 @@ export const virtualGoodsColumn = options => {
align: 'center',
hideInSearch: true,
render: (_, record) => (
<Space>{_ && _.length && <span>{_.map(item => item.tabName).join('/')}</span>}</Space>
<Space>
{_ && _.length && (
<span>
{_.sort((x, y) => x.tabId - y.tabId)
.map(item => item.tabName)
.join('/')}
</span>
)}
</Space>
),
},
{
......
......@@ -137,6 +137,7 @@ const VirtualGoodsInfo = props => {
setSelectedRowKeys(keys);
} else {
setDataSource([]);
setSelectedRowKeys([]);
}
};
......
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