Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
6ddb7c73
Commit
6ddb7c73
authored
Jun 06, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加外卖商品列表
parent
ae933e1a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
234 additions
and
0 deletions
+234
-0
groupMealRoute.js
config/groupMealRoute.js
+12
-0
goods.js
src/pages/businessGoods/model/goods.js
+183
-0
takeawayGoods.jsx
src/pages/businessGoods/takeawayGoods.jsx
+39
-0
virtualGoods.jsx
src/pages/businessGoods/virtualGoods.jsx
+0
-0
No files found.
config/groupMealRoute.js
View file @
6ddb7c73
...
...
@@ -5,4 +5,16 @@ export default [
name
:
'
BusinessCustomer
'
,
component
:
'
./businessCustomer/index
'
,
},
{
title
:
'
商户管理后台-企业团餐-外卖商品
'
,
path
:
'
/takeawayGoods
'
,
name
:
'
TakeawayGoods
'
,
component
:
'
./businessGoods/takeawayGoods
'
,
},
{
title
:
'
商户管理后台-企业团餐-虚拟商品
'
,
path
:
'
/virtualGoods
'
,
name
:
'
VirtualGoods
'
,
component
:
'
./businessGoods/virtualGoods
'
,
},
];
src/pages/businessGoods/model/goods.js
0 → 100644
View file @
6ddb7c73
import
React
from
'
react
'
;
import
{
Button
,
Space
,
Switch
}
from
'
antd
'
;
import
{
FormOutlined
}
from
'
@ant-design/icons
'
;
import
{
jsonToArray
}
from
'
@/utils/utils
'
;
export
const
layout
=
{
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
18
},
};
// 0-推荐 1-早餐 2-午餐 3-下午茶 4-晚餐
export
const
mealColumn
=
{
// 0: '推荐',
1
:
'
早餐
'
,
2
:
'
午餐
'
,
// 3: '晚餐',
4
:
'
晚餐
'
,
};
export
const
takeawayGoodsColumn
=
options
=>
{
const
{
onDel
,
companyEnum
,
shopEnum
,
onChangeFlag
}
=
options
;
return
[
{
title
:
'
企业名称
'
,
dataIndex
:
'
enterpriseId
'
,
hideInTable
:
true
,
valueEnum
:
{},
// companyEnum,
},
{
title
:
'
微店名称
'
,
dataIndex
:
'
shopId
'
,
hideInTable
:
true
,
valueEnum
:
{},
// shopEnum,
},
{
title
:
'
SKU编码
'
,
dataIndex
:
'
skuId
'
,
width
:
120
,
align
:
'
center
'
,
},
{
title
:
'
商品名称
'
,
dataIndex
:
'
skuName
'
,
width
:
120
,
align
:
'
center
'
,
},
{
title
:
'
商品图片
'
,
dataIndex
:
'
primaryImage
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
valueType
:
'
image
'
,
},
{
title
:
'
可售日期
'
,
dataIndex
:
'
saleTimeType
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
render
:
(
_
,
record
)
=>
(
<
Space
>
<
span
>
{
_
}
<
/span
>
<
span
>
<
FormOutlined
/>
<
/span
>
<
/Space
>
),
},
{
title
:
'
可售餐段
'
,
dataIndex
:
'
saleDate
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
render
:
(
_
,
record
)
=>
(
<
Space
>
<
span
>
{
_
}
<
/span
>
<
span
>
<
FormOutlined
/>
<
/span
>
<
/Space
>
),
},
{
title
:
'
企业价格
'
,
dataIndex
:
'
activityPrice
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
render
:
(
_
,
record
)
=>
(
<
Space
>
<
span
>
{
_
}
<
/span
>
<
span
>
<
FormOutlined
/>
<
/span
>
<
/Space
>
),
},
{
title
:
'
商品销售价
'
,
dataIndex
:
'
price
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
valueEnum
:
{
1
:
'
生效中
'
,
2
:
'
已下架
'
,
3
:
'
已售罄
'
,
},
},
{
title
:
'
排序
'
,
dataIndex
:
'
sort
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
render
:
(
_
,
record
)
=>
(
<
Space
>
<
span
>
{
_
}
<
/span
>
<
span
>
<
FormOutlined
/>
<
/span
>
<
/Space
>
),
},
{
title
:
'
列出商品
'
,
dataIndex
:
'
showFlag
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
render
:
(
_
,
record
)
=>
(
<
Space
>
<
span
>
<
Switch
onChange
=
{
onChangeFlag
}
/
>
<
/span
>
<
/Space
>
),
},
{
title
:
'
餐品类型
'
,
dataIndex
:
'
mealType
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
},
{
title
:
'
添加时间
'
,
dataIndex
:
'
createDate
'
,
width
:
120
,
valueType
:
'
dateRange
'
,
align
:
'
center
'
,
},
{
title
:
'
当日餐段
'
,
dataIndex
:
'
tabId
'
,
width
:
120
,
align
:
'
center
'
,
valueEnum
:
mealColumn
,
hideInTable
:
true
,
},
{
title
:
'
操作
'
,
hideInSearch
:
true
,
dataIndex
:
'
action
'
,
width
:
'
100px
'
,
align
:
'
center
'
,
fixed
:
'
right
'
,
render
:
(
val
,
r
)
=>
(
<
Button
key
=
"
del
"
onClick
=
{()
=>
onDel
(
r
,
'
del
'
)}
>
删除
<
/Button
>
),
},
];
};
src/pages/businessGoods/takeawayGoods.jsx
0 → 100644
View file @
6ddb7c73
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
Button
,
Space
}
from
'
antd
'
;
import
{
PlusOutlined
}
from
'
@ant-design/icons
'
;
import
{
takeawayGoodsColumn
}
from
'
./model/goods
'
;
// import CustomerInfo from './components/CustomerInfo';
const
BusinessCustomer
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
true
);
const
query
=
async
()
=>
{};
const
onDel
=
async
()
=>
{};
return
(
<
div
>
<
ProTable
search=
{
{
collapsed
:
false
,
collapseRender
:
()
=>
null
,
}
}
columns=
{
takeawayGoodsColumn
({
onDel
})
}
request=
{
params
=>
query
({
...
params
})
}
rowKey=
{
r
=>
r
.
id
}
expandIconColumnIndex=
{
10
}
bordered
// options={false}
tableAlertRender=
{
()
=>
(
<
Space
>
<
Button
>
111
</
Button
>
<
Button
>
2222
</
Button
>
</
Space
>
)
}
scroll=
{
{
x
:
'
100%
'
,
y
:
400
}
}
/>
{
/* <CustomerInfo visible={visible} /> */
}
</
div
>
);
};
export
default
BusinessCustomer
;
src/pages/businessGoods/virtualGoods.jsx
0 → 100644
View file @
6ddb7c73
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment