Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
shenshaokai
jinfa-platform
Commits
0c7ecd51
Commit
0c7ecd51
authored
Oct 19, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 积分类型商品编辑积分回显问题,商品描述移除剪切
parent
5ac98cd6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
14 deletions
+18
-14
index.less
src/components/TableOperation/index.less
+0
-0
index.tsx
src/components/TableOperation/index.tsx
+1
-1
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+9
-3
productDescFormDefault.tsx
...odity/products/addProductsItem/productDescFormDefault.tsx
+2
-2
index.tsx
src/pages/commodity/products/index.tsx
+6
-8
No files found.
src/
pages/commodity/produc
ts/TableOperation/index.less
→
src/
componen
ts/TableOperation/index.less
View file @
0c7ecd51
File moved
src/
pages/commodity/produc
ts/TableOperation/index.tsx
→
src/
componen
ts/TableOperation/index.tsx
View file @
0c7ecd51
...
...
@@ -24,7 +24,7 @@ const TableOperation:React.FC<TableOperationProps> = (props) => {
}
else
{
setOperationName
(()
=>
statusOperationMap
[
record
.
status
])
}
},
[])
},
[
record
])
return
(
<>
{
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
0c7ecd51
...
...
@@ -52,6 +52,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
const
[
minOrderNumber
,
setMinOrderNumber
]
=
useState
<
number
>
()
const
[
isBatchSetting
,
setIsBatchSetting
]
=
useState
<
boolean
>
(
false
)
//是否点击批量设置
const
flagRef
=
useRef
<
boolean
>
(
false
)
const
[
isChangePriceType
,
setIsChangePriceType
]
=
useState
<
boolean
>
(
false
)
// 价格类型是否有变动
const
[
colums
,
setColumns
]
=
useState
<
ColumnType
<
any
>
[]
>
()
const
{
ProductStore
}
=
store
...
...
@@ -309,12 +310,15 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_tableDataSource
=
_tableData
// 有前面tab变动引起的二次构建 需要清空价格数据
if
(
updateFlag
.
current
){
// ***** bug编辑积分商品(非现货价格)会导致价格类型变动引发重复渲染 *****
updateFlag
.
current
=
false
}
else
{
// ***** 编辑情况下且是积分商品 不做清空单价处理 *****
if
(
!
(
productInfoByEdit
?.
id
&&
planPrice
===
3
))
// if(!(history.location.query?.id && planPrice === 3)){
// _tableDataSource.map(item => item['单价'] = {})
// }
if
(
isChangePriceType
){
// 价格类型变动 清空价格
_tableDataSource
.
map
(
item
=>
item
[
'单价'
]
=
{})
}
}
setTableDataSource
(
productName
?
_tableDataSource
:
[])
// 通过商品名称来判断是否显示表格数据
...
...
@@ -418,6 +422,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setPriceForm
.
resetFields
()
setLadderPrice
(
false
)
setPlanPrice
(
v
.
target
.
value
)
setIsChangePriceType
(
true
)
console
.
log
(
'价格类型变动'
)
}
const
setPriceOk
=
()
=>
{
...
...
src/pages/commodity/products/addProductsItem/productDescFormDefault.tsx
View file @
0c7ecd51
...
...
@@ -168,7 +168,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
}
<
div
className=
{
styles
.
descriptBox
}
>
<
div
className=
{
styles
.
middleAddBtn
}
>
<
ImgCrop
rotate
>
{
/* <ImgCrop rotate> */
}
<
Upload
{
...
uploadImgProps
}
>
<
Button
size=
"small"
type=
"text"
>
<
PlusOutlined
/>
...
...
@@ -176,7 +176,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
<
br
/>
<
span
>
添加图片
</
span
>
</
Upload
>
</
ImgCrop
>
{
/* </ImgCrop> */
}
</
div
>
</
div
>
</
Spin
>
...
...
src/pages/commodity/products/index.tsx
View file @
0c7ecd51
...
...
@@ -20,7 +20,7 @@ import styles from "./index.less"
import
{
PublicApi
}
from
'@/services/api'
import
{
GetProductCommodityGetShopResponse
}
from
'@/services/ProductApi'
import
TableOperation
from
'
.
/TableOperation'
import
TableOperation
from
'
@/components
/TableOperation'
import
{
store
}
from
'@/store'
...
...
@@ -258,14 +258,12 @@ const Products: React.FC<{}> = () => {
}
return
(
<>
<
TableOperation
record=
{
record
}
statusOperationMap=
{
statusAndOperationList
}
operationHandler=
{
operationHandler
}
priorityOperationName=
"提交审核"
<
TableOperation
record=
{
record
}
statusOperationMap=
{
statusAndOperationList
}
operationHandler=
{
operationHandler
}
priorityOperationName=
"提交审核"
/>
</>
)
}
...
...
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