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
f4e553b1
Commit
f4e553b1
authored
Oct 31, 2023
by
guang.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加商品竞价功能
parent
acc5a333
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
679 additions
and
0 deletions
+679
-0
config.js
config/config.js
+6
-0
UpdatePriceStock.jsx
...sManage/SupplyPriceUpdate/components/UpdatePriceStock.jsx
+49
-0
index.jsx
src/pages/GoodsManage/SupplyPriceUpdate/index.jsx
+526
-0
staticdata.js
src/pages/GoodsManage/SupplyPriceUpdate/staticdata.js
+93
-0
style.less
src/pages/GoodsManage/SupplyPriceUpdate/style.less
+5
-0
No files found.
config/config.js
View file @
f4e553b1
...
@@ -294,6 +294,12 @@ export default {
...
@@ -294,6 +294,12 @@ export default {
name
:
'
brandManage
'
,
name
:
'
brandManage
'
,
component
:
'
./BrandManage
'
,
component
:
'
./BrandManage
'
,
},
},
{
title
:
'
商户管理后台-自营商品供货价更新
'
,
path
:
'
/supplyPriceUpdate
'
,
name
:
'
supplyPriceUpdate
'
,
component
:
'
./GoodsManage/SupplyPriceUpdate
'
,
},
...
groupMealRoute
,
...
groupMealRoute
,
{
{
component
:
'
./404
'
,
component
:
'
./404
'
,
...
...
src/pages/GoodsManage/SupplyPriceUpdate/components/UpdatePriceStock.jsx
0 → 100644
View file @
f4e553b1
import
React
,
{
useState
,
createContext
}
from
'
react
'
;
import
{
Modal
,
Table
,
Form
}
from
'
antd
'
;
import
{
column
}
from
'
../staticdata
'
;
import
styles
from
'
../style.less
'
;
/**
* 更新供货价
* * */
const
UpdatePriceStock
=
options
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
();
const
onSubmit
=
async
()
=>
{
const
value
=
await
form
.
validateFields
();
console
.
log
(
'
value :>>
'
,
value
);
setLoading
(
true
);
setLoading
(
false
);
options
.
refresh
();
options
.
onCancel
();
};
const
EditableContext
=
createContext
(
null
);
return
(
<
Modal
title=
"修改供货价"
open=
{
options
.
visible
}
onCancel=
{
options
.
onCancel
}
onOk=
{
onSubmit
}
confirmLoading=
{
loading
}
width=
{
900
}
className=
{
styles
.
priceStockTable
}
destroyOnClose
>
<
Form
form=
{
form
}
scrollToFirstError
component=
{
false
}
>
<
EditableContext
.
Provider
value=
{
form
}
>
<
Table
className=
{
styles
.
priceStockTable
}
rowKey=
"key"
columns=
{
column
.
call
(
this
)
}
dataSource=
{
options
.
data
}
/>
</
EditableContext
.
Provider
>
</
Form
>
</
Modal
>
);
};
export
default
UpdatePriceStock
;
src/pages/GoodsManage/SupplyPriceUpdate/index.jsx
0 → 100644
View file @
f4e553b1
This diff is collapsed.
Click to expand it.
src/pages/GoodsManage/SupplyPriceUpdate/staticdata.js
0 → 100644
View file @
f4e553b1
import
React
from
'
react
'
;
import
{
Input
,
Form
}
from
'
antd
'
;
import
styles
from
'
../style.less
'
;
import
{
isNumberSection
,
isCheckPriceTwoDecimal
}
from
'
@/utils/validator
'
;
export
function
column
()
{
return
[
{
title
:
'
供货价
'
,
dataIndex
:
'
supplyPrice
'
,
width
:
150
,
align
:
'
center
'
,
render
:
(
_
,
row
,
index
)
=>
(
<
div
className
=
{
styles
.
price
}
>
<
Form
.
Item
label
=
""
key
=
"
supplyPrice
"
name
=
{[
'
data
'
,
index
,
'
supplyPrice
'
]}
initialValue
=
{
row
.
supplyPrice
}
rules
=
{[
{
required
:
true
,
message
:
'
请输入供货价!
'
},
{
validator
:
isCheckPriceTwoDecimal
},
]}
>
<
Input
allowClear
/>
<
/Form.Item
>
<
/div
>
),
},
{
title
:
'
市场价
'
,
width
:
135
,
align
:
'
center
'
,
dataIndex
:
'
marketPrice
'
,
},
{
title
:
'
重量(kg)
'
,
width
:
135
,
align
:
'
center
'
,
dataIndex
:
'
weight
'
,
},
{
title
:
'
库存
'
,
width
:
120
,
dataIndex
:
'
productStock
'
,
align
:
'
center
'
,
render
:
(
_
,
row
,
index
)
=>
(
<
div
>
<
Form
.
Item
label
=
""
key
=
"
productStock
"
name
=
{[
'
data
'
,
index
,
'
productStock
'
]}
initialValue
=
{
row
.
productStock
}
rules
=
{[
{
required
:
true
,
message
:
'
请输入库存!
'
},
{
validator
:
isNumberSection
,
min
:
1
,
max
:
500
,
message
:
'
请输入1-500的整数
'
},
]}
>
<
Input
allowClear
/>
<
/Form.Item
>
<
/div
>
),
},
{
title
:
'
库存预警
'
,
width
:
120
,
dataIndex
:
'
productStockWarning
'
,
align
:
'
center
'
,
render
:
(
_
,
row
,
index
)
=>
(
<
div
>
<
Form
.
Item
label
=
""
key
=
"
productStockWarning
"
name
=
{[
'
data
'
,
index
,
'
productStockWarning
'
]}
rules
=
{[
{
required
:
true
,
message
:
'
请输入库存!
'
},
{
validator
:
isNumberSection
,
min
:
1
,
max
:
500
,
message
:
'
请输入1-500的整数
'
},
]}
initialValue
=
{
row
.
productStockWarning
}
>
<
Input
allowClear
/>
<
/Form.Item
>
<
/div
>
),
},
{
title
:
'
商品自编码
'
,
dataIndex
:
'
thirdSkuNo
'
,
width
:
200
,
align
:
'
center
'
,
},
];
}
src/pages/GoodsManage/SupplyPriceUpdate/style.less
0 → 100644
View file @
f4e553b1
.priceStockTable {
:global(.ant-table-cell) {
padding: 5px 0 0 0 !important;
}
}
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