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
黄庭坚
jinfa-platform
Commits
95c8f37e
Commit
95c8f37e
authored
Sep 01, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
805a3f69
43a1de49
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
53 deletions
+17
-53
index.tsx
src/pages/classAndProperty/propertyValue/index.tsx
+1
-0
index.tsx
src/pages/commodity/goods/index.tsx
+1
-0
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+6
-9
otherForm.tsx
src/pages/commodity/products/addProductsItem/otherForm.tsx
+7
-1
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+0
-0
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+1
-3
index.tsx
src/pages/commodity/products/index.tsx
+0
-39
viewProducts.tsx
src/pages/commodity/products/viewProducts.tsx
+1
-1
No files found.
src/pages/classAndProperty/propertyValue/index.tsx
View file @
95c8f37e
...
...
@@ -23,6 +23,7 @@ import { GetProductCustomerGetCustomerAttributeResponse } from '@/services';
const
treeActions
=
createTreeActions
()
const
fetchAttributeTreeData
=
async
(
params
?)
=>
{
// @ts-ignore
const
res
=
await
PublicApi
.
getProductCustomerGetCustomerAttributeTree
({
filterInput
:
true
})
return
res
}
...
...
src/pages/commodity/goods/index.tsx
View file @
95c8f37e
...
...
@@ -303,6 +303,7 @@ const Goods: React.FC<{}> = () => {
ref
.
current
.
reload
()
})
},
okType
:
'danger'
,
onCancel
()
{
console
.
log
(
'Cancel'
);
},
...
...
src/pages/commodity/products/addProducts.tsx
View file @
95c8f37e
...
...
@@ -136,7 +136,6 @@ const AddProducts: React.FC<{}> = (props) => {
delete
_item
.
goodsId
_item
.
attributeAndValueList
.
map
(
__item
=>
{
delete
__item
.
customerAttributeName
// __item.customerAttributeValueId = __item.id
// **** 新字段结构变更
__item
.
customerAttribute
=
{
id
:
__item
.
customerAttributeId
}
__item
.
customerAttributeValue
=
{
id
:
__item
.
id
,
value
:
__item
.
value
}
...
...
@@ -145,8 +144,6 @@ const AddProducts: React.FC<{}> = (props) => {
delete
__item
.
customerAttributeId
})
}
// _item.attributeAndValueList = _item.goodsCustomerAttributeList
// delete _item.goodsCustomerAttributeList
if
(
_item
.
commodityPic
.
length
>
0
){
// 编辑情况下兼顾手动添加图片列表属性
_item
.
commodityPic
=
_item
.
commodityPic
.
map
(
__item
=>
__item
?.
response
?.
data
||
__item
?.
url
)
...
...
@@ -165,23 +162,23 @@ const AddProducts: React.FC<{}> = (props) => {
return
e
}
_params
.
unitPriceAndPicList
=
productAttributeAndImageParams
}
else
{
}
else
{
// 编辑 没有点击商品图片
_params
.
unitPriceAndPicList
=
productInfoByEdit
.
unitPriceAndPicList
}
if
(
clickTabIndex
.
indexOf
(
"3"
)
===-
1
)
if
(
clickTabIndex
.
indexOf
(
"3"
)
===-
1
)
// 商品属性
_params
.
commodityAttributeList
=
productInfoByEdit
.
commodityAttributeList
if
(
clickTabIndex
.
indexOf
(
"4"
)
===-
1
){
if
(
clickTabIndex
.
indexOf
(
"4"
)
===-
1
){
// 价格属性
_params
.
unitId
=
productInfoByEdit
.
unitId
_params
.
unitName
=
productInfoByEdit
.
unitName
_params
.
minOrder
=
productInfoByEdit
.
minOrder
_params
.
priceType
=
productInfoByEdit
.
priceType
_params
.
isMemberPrice
=
productInfoByEdit
.
isMemberPrice
}
if
(
clickTabIndex
.
indexOf
(
"6"
)
===-
1
)
if
(
clickTabIndex
.
indexOf
(
"6"
)
===-
1
)
// 商品描述
_params
.
commodityRemark
=
productInfoByEdit
.
commodityRemark
if
(
clickTabIndex
.
indexOf
(
"7"
)
===-
1
)
if
(
clickTabIndex
.
indexOf
(
"7"
)
===-
1
)
// 物流
_params
.
logistics
=
productInfoByEdit
.
logistics
if
(
clickTabIndex
.
indexOf
(
"8"
)
===-
1
){
if
(
clickTabIndex
.
indexOf
(
"8"
)
===-
1
){
// 其他
_params
.
isInvoice
=
productInfoByEdit
.
isInvoice
_params
.
marks
=
productInfoByEdit
.
marks
_params
.
packing
=
productInfoByEdit
.
packing
...
...
src/pages/commodity/products/addProductsItem/otherForm.tsx
View file @
95c8f37e
...
...
@@ -40,11 +40,17 @@ const OtherForm: React.FC<Iprops> = (props) => {
ref=
{
otherFormRef
}
colon=
{
false
}
autoComplete=
"off"
initialValues=
{
history
.
location
.
query
?.
id
?
getOtherFormParamsByEdit
:
{
isInvoice
:
false
}
}
initialValues=
{
history
.
location
.
query
?.
id
?
getOtherFormParamsByEdit
:
{}
}
>
<
Form
.
Item
name=
"isInvoice"
label=
"提供发票"
rules=
{
[
{
required
:
true
,
message
:
'请选择是否提供发票'
}
]
}
>
<
Radio
.
Group
size=
"small"
>
<
Radio
.
Button
value=
{
true
}
style=
{
{
width
:
100
,
textAlign
:
'center'
}
}
>
是
</
Radio
.
Button
>
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
95c8f37e
This diff is collapsed.
Click to expand it.
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
95c8f37e
...
...
@@ -50,10 +50,8 @@ const ProductImageForm: React.FC<Iprops> = (props) => {
/* 给数据添加图片字段 */
useEffect
(()
=>
{
// console.log('图片111', priceAttributeParams)
let
_priceAttributeParams
:
any
=
[]
if
(
productInfoByEdit
?.
id
){
// id判断是否新增还是编辑
// console.log('图片222', priceAttributeParams)
setSetImageType
(
productInfoByEdit
.
isAllAttributePic
)
setIsAllAttributePic
(
productInfoByEdit
.
isAllAttributePic
)
let
_commodityPicList
=
productInfoByEdit
.
unitPriceAndPicList
.
map
(
_
=>
_
.
commodityPic
)
...
...
@@ -87,7 +85,7 @@ const ProductImageForm: React.FC<Iprops> = (props) => {
// }
setPriceAttributeParamsByRender
(
_priceAttributeParams
)
setProductAttributeAndImageParams
(
_priceAttributeParams
)
console
.
log
(
_priceAttributeParams
,
priceAttributeParams
,
'_p'
)
// 这里可能为空数组
console
.
log
(
_priceAttributeParams
,
priceAttributeParams
,
'_p'
)
// 这里可能为空数组
** 如果不到此页面 前一个是旧数据 后面的为新数据
// 初始化若是按所有属性共用做显示处理
if
(
setImageType
&&
_priceAttributeParams
.
length
>
0
){
setCommonImageList
(
_priceAttributeParams
[
0
].
commodityPic
)
...
...
src/pages/commodity/products/index.tsx
View file @
95c8f37e
...
...
@@ -84,13 +84,11 @@ const Products: React.FC<{}> = () => {
{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
className=
"commonPickColor"
onClick=
{
()
=>
handleSee
(
record
)
}
>
{
text
}
<
EyeOutlined
/></
span
>
...
...
@@ -98,19 +96,16 @@ const Products: React.FC<{}> = () => {
{
title
:
'品类'
,
dataIndex
:
[
'customerCategory'
,
'name'
],
align
:
'center'
,
key
:
'customerCategory.name'
,
},
{
title
:
'品牌'
,
dataIndex
:
[
'brand'
,
'name'
],
align
:
'center'
,
key
:
'brand.name'
,
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
,
align
:
'center'
,
key
:
'unitName'
,
},
{
...
...
@@ -156,7 +151,6 @@ const Products: React.FC<{}> = () => {
{
title
:
'审核状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
...
...
@@ -205,40 +199,7 @@ const Products: React.FC<{}> = () => {
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
// {
// return (
// <>
// <Popconfirm
// title="确定要执行这个操作?"
// onConfirm={() => handleBatchDelete([record.id])}
// onCancel={cancel}
// okText="是"
// cancelText="否"
// >
// <Button type='link'>删除</Button>
// </Popconfirm>
// <Dropdown overlay={
// <Menu>
// <Menu.Item>
// {record.status === 1 ? <Button type='link' onClick={()=>clickSubmitCheck(record)}>提交审核</Button> : ''}
// </Menu.Item>
// {(record.status === 4 || record.status === 6) ? <Menu.Item><Button type='link' onClick={() => clickUp(1, record.id)}>上架</Button></Menu.Item> : ''}
// {record.status === 5 ? <Menu.Item><Button type='link' onClick={() => clickUp(0, record.id)}>下架</Button></Menu.Item> : ''}
// {record.status === 3 || record.status === 1 ? <Menu.Item><Button type='link' onClick={() => clickModify(record.id)}>修改</Button></Menu.Item> : ''}
// <Menu.Item>
// <Button type='link' onClick={()=>clickCopy(record)}>复制</Button>
// </Menu.Item>
// </Menu>
// }>
// <a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
// 更多 <CaretDownOutlined />
// </a>
// </Dropdown>
// </>
// )
// }
}
];
...
...
src/pages/commodity/products/viewProducts.tsx
View file @
95c8f37e
...
...
@@ -360,7 +360,7 @@ const viewProducts: React.FC<{}> = () => {
<
Col
span=
{
20
}
>
<
p
>
{
productDetail
?.
commodityAreaList
.
map
(
_item
=>
<
p
>
{
_item
.
provinceName
+
'/'
+
(
_item
.
cityName
||
''
)
}
</
p
>)
productDetail
?.
commodityAreaList
.
length
>
0
?
productDetail
?.
commodityAreaList
.
map
(
_item
=>
<
p
>
{
_item
.
provinceName
+
'/'
+
(
_item
.
cityName
||
''
)
}
</
p
>)
:
'全国'
}
</
p
>
</
Col
>
...
...
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