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
e3c3c17b
Commit
e3c3c17b
authored
Apr 06, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新时间问题
parent
5d4359f5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
91 deletions
+107
-91
common.less
src/pages/ServiceGoods/common.less
+5
-1
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+102
-90
No files found.
src/pages/ServiceGoods/common.less
View file @
e3c3c17b
...
...
@@ -215,8 +215,12 @@
.ant-form-item-control-input-content {
display: flex;
}
.ant-form-text {
display: flex;
justify-content: center;
align-items: center;
}
}
}
.itemInline {
:global {
...
...
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
e3c3c17b
...
...
@@ -214,7 +214,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
const
sepcx
=
specs
.
map
(
item
=>
item
.
specs
);
sepcx
.
map
(
item
=>
{
item
.
unit
=
''
;
return
item
return
item
;
});
// 生成 specs 规格sku
tempSku
=
[[...
weight
],
...
sepcx
].
reduce
(
...
...
@@ -231,7 +231,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
obj
.
salePrice
=
salePrice
;
obj
.
productStock
=
productStock
;
obj
.
list
=
list
;
obj
.
id
=
multiSpu
?.[
index
]?.
id
||
''
obj
.
id
=
multiSpu
?.[
index
]?.
id
||
''
;
obj
.
serviceItem
=
{
...
temp
.
serviceItem
,
productStock
:
multiSpu
?.[
index
]?.
serviceItem
?.
productStock
||
productStock
,
...
...
@@ -730,7 +730,9 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
) : null}
</Form.Item>
))}
<Form.Item>
{fields.length < 5 ? (
<Button
type="dashed"
onClick={() => add()}
...
...
@@ -739,6 +741,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
>
新增售卖时段
</Button>
) : null}
</Form.Item>
</>
)}
...
...
@@ -787,12 +790,21 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
{repertoryType === '1' && (
<>
<Form.Item label="份量" className={styles.required}>
{form.getFieldValue(['unit']) &&
Array.isArray(form.getFieldValue(['unit'])) &&
weightUnits.includes(
form
.getFieldValue(['unit'])
.slice(1)
.toString(),
) && <span className="ant-form-text"> 约</span>}
<Form.Item
// noStyle
shouldUpdate={(prevValues, curValues) => false}
>
{form => {
let unit = form.getFieldValue('unit') || '';
console.log('unit', unit);
unit =
(unit && (Array.isArray(unit) && unit?.length && unit?.slice(1).toString())) ||
unit;
...
...
@@ -1222,7 +1234,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
}}
shape="round"
>
统一设置
置
库存
统一设置库存
</Button>
<div className={styles.rowWarp}>
{multiSpu.length > 0 &&
...
...
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