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
a8216b1b
Commit
a8216b1b
authored
Oct 22, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
7c9300a4
3ed91a61
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
135 additions
and
30 deletions
+135
-30
proxy.ts
config/proxy.ts
+1
-1
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+27
-9
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+14
-1
viewProducts.tsx
src/pages/commodity/products/viewProducts.tsx
+64
-11
index.less
...Mall/components/Filter/components/ActiveStores/index.less
+1
-0
index.tsx
...xMall/components/Filter/components/ActiveStores/index.tsx
+1
-1
index.less
...ages/lxMall/components/Filter/components/Brand/index.less
+17
-1
index.less
...es/lxMall/components/Filter/components/NewJoin/index.less
+1
-0
index.tsx
...ges/lxMall/components/Filter/components/NewJoin/index.tsx
+1
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+5
-2
index.tsx
src/pages/lxMall/shopList/index.tsx
+2
-2
index.ts
src/store/site/index.ts
+1
-1
No files found.
config/proxy.ts
View file @
a8216b1b
export
default
{
'/api'
:
{
'target'
:
'http://10.0.0.
25
:8100/'
,
'target'
:
'http://10.0.0.
10
:8100/'
,
'changeOrigin'
:
true
,
'pathRewrite'
:
{
'^/api'
:
''
},
}
...
...
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
a8216b1b
...
...
@@ -182,6 +182,25 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
return
'积分兑换商品'
}
const
checkSellingPoint
=
(
rule
,
value
,
callback
)
=>
{
try
{
if
(
Array
.
isArray
(
value
)){
if
(
value
.
length
>
3
)
{
throw
new
Error
(
'商品卖点不能超过三个'
);
}
else
{
value
.
map
(
item
=>
{
if
(
item
.
length
>
8
){
throw
new
Error
(
'标签长度不超过八个字符'
);
}
})
callback
()
}
}
}
catch
(
err
)
{
callback
(
err
)
}
}
return
(<>
<
Form
{
...
layout
}
...
...
@@ -295,18 +314,17 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
</
Tooltip
>
</
span
>
}
// rules={[
// {
// required: true,
// message: '请添加卖点标签',
// },
// ]}
rules=
{
[
{
validator
:
checkSellingPoint
},
]
}
>
<
Select
mode=
"tags"
placeholder=
"请输入
或
选择商品卖点"
maxTagCount=
{
3
}
maxTagTextLength=
{
8
}
placeholder=
"请输入
并
选择商品卖点"
//
maxTagCount={3}
//
maxTagTextLength={8}
tagRender=
{
tagRender
}
/>
</
Form
.
Item
>
...
...
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
a8216b1b
...
...
@@ -37,6 +37,17 @@ const ProductImageForm: React.FC<{}> = (props) => {
}
},
[])
// 修改图片操作中icon的描述
useEffect
(()
=>
{
let
parentEle
=
document
.
getElementById
(
'uploadBox'
);
let
btns
=
parentEle
.
getElementsByClassName
(
'ant-upload-list-item-card-actions-btn'
);
for
(
let
i
=
0
;
i
<
btns
.
length
;
i
++
){
if
(
btns
[
i
].
getAttribute
(
'title'
)
===
'下载文件'
){
btns
[
i
].
setAttribute
(
'title'
,
'编辑文件'
)
}
}
})
useEffect
(()
=>
{
// 品类 变动清空数据
// 编辑下 flag为false 不清空;编辑下 flag为true 新建清空
...
...
@@ -257,7 +268,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
</
ul
>
</
Col
>
{
/* 按属性设置---所有属性共用 */
}
<
Col
span=
{
20
}
style=
{
{
padding
:
24
}
}
>
<
Col
span=
{
20
}
style=
{
{
padding
:
24
}
}
id=
"uploadBox"
>
{
!
setImageType
?
(
priceAttributeParamsByRender
?.
length
>
0
&&
priceAttributeParamsByRender
[
0
]?.
attributeAndValueList
?.
length
!=
0
?
priceAttributeParamsByRender
.
map
((
item
,
index
)
=>
...
...
@@ -277,6 +288,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
onDownload=
{
(
file
)
=>
handlefileEdit
(
file
,
index
)
}
showUploadList=
{
{
showDownloadIcon
:
true
,
downloadIcon
:
<
EditOutlined
style=
{
{
color
:
'#fff'
}
}
/>}
}
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
className=
"uploadBox"
>
{
item
.
commodityPic
.
length
>=
6
?
null
:
uploadButton
}
</
Upload
>
...
...
@@ -310,6 +322,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
onDownload=
{
(
file
)
=>
handlefileEdit
(
file
,
0
)
}
showUploadList=
{
{
showDownloadIcon
:
true
,
downloadIcon
:
<
EditOutlined
style=
{
{
color
:
'#fff'
}
}
/>}
}
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
className=
"uploadBox"
>
{
commonImageList
.
length
>=
6
?
null
:
uploadButton
}
</
Upload
>
...
...
src/pages/commodity/products/viewProducts.tsx
View file @
a8216b1b
...
...
@@ -5,7 +5,9 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'
import
{
QuestionCircleOutlined
,
FormOutlined
,
UserOutlined
UserOutlined
,
CaretDownOutlined
,
CaretUpOutlined
}
from
'@ant-design/icons'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
cx
from
'classnames'
...
...
@@ -45,6 +47,7 @@ const viewProducts: React.FC<{}> = () => {
const
[
logisticTemplateName
,
setLogisticTemplateName
]
=
useState
<
string
>
()
const
[
logisticResourceCompanyName
,
setLogisticResourceCompanyName
]
=
useState
<
string
>
()
const
[
logisticResourceSendAddress
,
setLogisticResourceSendAddress
]
=
useState
<
string
>
()
const
[
showMore
,
setShowMore
]
=
useState
<
any
>
({
areaShowMore
:
false
,
shopShowMore
:
false
})
useEffect
(()
=>
{
const
{
id
}
=
history
.
location
.
query
...
...
@@ -52,7 +55,7 @@ const viewProducts: React.FC<{}> = () => {
PublicApi
.
getProductCommodityGetCommodity
({
id
:
id
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
){
console
.
log
(
data
,
'data'
)
//
console.log(data, 'data')
setPorductDetail
(
data
)
renderDataByTab
(
data
)
constructTableData
(
data
,
data
.
unitPriceAndPicList
)
...
...
@@ -155,7 +158,7 @@ const viewProducts: React.FC<{}> = () => {
let
dataByTab
=
groupBy
(
archiveByAttributeGroup
,
'groupName'
)
setDataByTab
(
Object
.
values
(
dataByTab
))
setDataByTabTitle
(
Object
.
keys
(
dataByTab
))
console
.
log
(
dataByTab
,
'dataByData'
)
//
console.log(dataByTab,'dataByData')
}
/* 按属性归类 */
...
...
@@ -207,14 +210,14 @@ const viewProducts: React.FC<{}> = () => {
<
Descriptions
colon=
{
true
}
style=
{
{
paddingLeft
:
128
}
}
>
<
Descriptions
.
Item
label=
"商品品牌"
>
{
productDetail
?.
brand
?.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品品类"
>
{
productDetail
?.
customerCategory
?.
fullName
}
</
Descriptions
.
Item
>
{
{
/* {
productDetail?.commodityShopList?.length>0 &&
<Descriptions.Item label="上架商城">
{
productDetail.commodityShopList.map((item, index)=><span key={index}><img width="24" height="24" style={{borderRadius: '50%', marginRight: 4}} src={item.logoUrl} title={item.name} alt={item.name}/></span>)
}
</Descriptions.Item>
}
}
*/
}
{
renderStatus
(
productDetail
?.
status
,
1
)
&&
<
Descriptions
.
Item
label=
"审核状态"
>
{
renderStatus
(
productDetail
?.
status
,
1
)
}
</
Descriptions
.
Item
>
}
{
renderStatus
(
productDetail
?.
status
,
2
)
&&
<
Descriptions
.
Item
label=
"商品状态"
>
{
renderStatus
(
productDetail
?.
status
,
2
)
}
</
Descriptions
.
Item
>
}
<
Descriptions
.
Item
label=
"商品类型"
><
span
className=
"commonStatusValid"
></
span
>
{
renderCustomerCategoryType
(
productDetail
?.
customerCategory
?.
type
)
}
</
Descriptions
.
Item
>
...
...
@@ -242,7 +245,7 @@ const viewProducts: React.FC<{}> = () => {
/* 构建表格数据 */
const
constructTableData
=
(
product
:
any
,
unitPriceAndPicList
:
GetProductCommodityGetCommodityResponse
[
"unitPriceAndPicList"
])
=>
{
// 构建列
console
.
log
(
product
,
unitPriceAndPicList
,
'构建列'
)
//
console.log(product, unitPriceAndPicList, '构建列')
let
_col
=
[];
let
col_productName
=
{
title
:
'商品名称'
,
dataIndex
:
'商品名称'
,
key
:
'索引'
}
_col
.
push
(
col_productName
)
...
...
@@ -311,7 +314,7 @@ const viewProducts: React.FC<{}> = () => {
}
return
temp
})
console
.
log
(
_tableData
,
_attributeArrByImageRender
,
'_tableData'
)
//
console.log(_tableData, _attributeArrByImageRender, '_tableData')
setTableRenderDatas
(
_tableData
)
setAttributeArrByImageRender
(
_attributeArrByImageRender
)
setImageArrByImageRender
(
_imageArrByImageRender
)
...
...
@@ -321,6 +324,41 @@ const viewProducts: React.FC<{}> = () => {
history
.
push
(
`/memberCenter/commodityAbility/commodity/products/edit?id=
${
productDetail
.
id
}
`
)
}
const
toogleMore
=
(
str
:
string
)
=>
{
if
(
str
===
'area'
){
setShowMore
({
shopShowMore
:
showMore
.
shopShowMore
,
areaShowMore
:
!
showMore
.
areaShowMore
})
}
else
{
setShowMore
({
shopShowMore
:
!
showMore
.
shopShowMore
,
areaShowMore
:
showMore
.
areaShowMore
})
}
}
const
renderMoreList
=
(
data
,
str
)
=>
{
const
showDataSource
=
(
str
===
'area'
?
showMore
.
areaShowMore
:
showMore
.
shopShowMore
)
?
data
:
[...
data
].
splice
(
0
,
3
)
return
<>
<
p
>
{
str
===
'area'
?
showDataSource
.
map
((
_item
,
_i
)
=>
<
p
key=
{
_i
}
>
{
_item
.
provinceName
+
'/'
+
(
_item
.
cityName
||
''
)
}
</
p
>)
:
showDataSource
.
map
((
_item
,
_i
)
=>
<
p
key=
{
_i
}
>
{
_item
.
name
}
</
p
>)
}
</
p
>
{
data
.
length
>
3
&&
<
p
onClick=
{
()
=>
toogleMore
(
str
)
}
style=
{
{
cursor
:
'pointer'
}
}
className=
"commonPickColor"
>
展开
{
showMore
.
areaShowMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
</
p
>
}
</>
}
return
(
<
PageHeaderWrapper
title=
{
productDetail
?.
name
}
...
...
@@ -346,7 +384,7 @@ const viewProducts: React.FC<{}> = () => {
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Row
gutter=
{
[
26
,
0
]
}
>
<
Col
span=
{
8
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"基本信息"
style=
{
{
height
:
'
320px
'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"基本信息"
style=
{
{
height
:
'
100%
'
}
}
>
{
productDetail
?.
slogan
&&
<
Row
>
<
Col
span=
{
4
}
>
...
...
@@ -374,15 +412,30 @@ const viewProducts: React.FC<{}> = () => {
<
Col
span=
{
20
}
>
<
p
>
{
productDetail
?.
commodityAreaList
.
length
>
0
?
productDetail
?.
commodityAreaList
.
map
(
_item
=>
<
p
>
{
_item
.
provinceName
+
'/'
+
(
_item
.
cityName
||
''
)
}
</
p
>
)
:
'全国'
productDetail
?.
commodityAreaList
.
length
>
0
?
renderMoreList
(
productDetail
?.
commodityAreaList
,
'area'
)
:
'全国'
}
</
p
>
</
Col
>
</
Row
>
{
productDetail
?.
commodityShopList
?.
length
>
0
&&
<
Row
>
<
Col
span=
{
4
}
>
<
p
>
上架商城:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
{
renderMoreList
(
productDetail
.
commodityShopList
,
'shop'
)
}
</
p
>
</
Col
>
</
Row
>
}
</
Card
>
</
Col
>
<
Col
span=
{
8
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"物流信息"
style=
{
{
height
:
'
320px
'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"物流信息"
style=
{
{
height
:
'
100%
'
}
}
>
{
renderDeliveryType
(
productDetail
?.
logistics
?.
deliveryType
)
&&
<
Row
>
...
...
@@ -452,7 +505,7 @@ const viewProducts: React.FC<{}> = () => {
</
Card
>
</
Col
>
<
Col
span=
{
8
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"其他信息"
style=
{
{
height
:
'
320px
'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"其他信息"
style=
{
{
height
:
'
100%
'
}
}
>
<
Row
>
<
Col
span=
{
4
}
>
<
p
>
提供发票:
</
p
>
...
...
src/pages/lxMall/components/Filter/components/ActiveStores/index.less
View file @
a8216b1b
...
...
@@ -46,6 +46,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1;
&>a {
color: #303133;
...
...
src/pages/lxMall/components/Filter/components/ActiveStores/index.tsx
View file @
a8216b1b
...
...
@@ -3,7 +3,7 @@
* @Author: ghua
* @Date: 2020-08-20 16:23:39
* @Last Modified by: ghua
* @Last Modified time: 2020-
08-20 16:38:49
* @Last Modified time: 2020-
10-22 18:03:14
*/
import
React
from
'react'
...
...
src/pages/lxMall/components/Filter/components/Brand/index.less
View file @
a8216b1b
.filter_brand {
margin: 10px 0;
max-height: 320px;
overflow-y: auto;
padding: 10px 0;
&::-webkit-scrollbar {
width: 8px;
}
&::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(48, 49, 51, 0.24);
}
&::-webkit-scrollbar-track {
background: rgba(48, 49, 51, 0.08);
}
.filter_brand_list {
display: flex;
...
...
src/pages/lxMall/components/Filter/components/NewJoin/index.less
View file @
a8216b1b
...
...
@@ -46,6 +46,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1;
&>a {
color: #303133;
...
...
src/pages/lxMall/components/Filter/components/NewJoin/index.tsx
View file @
a8216b1b
...
...
@@ -3,7 +3,7 @@
* @Author: ghua
* @Date: 2020-08-20 16:23:39
* @Last Modified by: ghua
* @Last Modified time: 2020-
09-23 19:49:12
* @Last Modified time: 2020-
10-22 17:49:07
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
a8216b1b
...
...
@@ -498,8 +498,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
let
commonLogistics
=
{}
setConfirmLoading
(
true
)
let
purchaseIds
=
[]
for
(
let
item
of
selectOrderList
)
{
purchaseIds
.
push
(
item
.
id
)
productIds
.
push
(
item
.
commodityUnitPrice
.
id
)
commonLogistics
=
item
.
commodityUnitPrice
.
commodity
.
logistics
let
buyCommodityInfo
:
any
=
{
...
...
@@ -525,7 +526,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
}
let
buyOrderInfo
:
any
=
{
purchaseOrder
:
true
,
purchaseOrder
:
true
,
// 是否进货单下单
idList
:
purchaseIds
,
productType
:
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
2
:
1
,
logistics
:
commonLogistics
,
supplyMembersName
:
selectItem
.
shopname
,
supplyMembersId
:
selectItem
.
memberId
,
...
...
src/pages/lxMall/shopList/index.tsx
View file @
a8216b1b
...
...
@@ -28,8 +28,8 @@ const ShopList: React.FC<ShopListPropsType> = (props) => {
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
shopList
,
setShopList
]
=
useState
<
GetTemplateShopFindShopListResponseDetail
[]
>
([])
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
filterConfig
=
[
FILTER_TYPE
.
category
,
FILTER_TYPE
.
useArea
,
FILTER_TYPE
.
activeStores
,
FILTER_TYPE
.
newJoin
]
//FILTER_TYPE.activeStores,
const
filterConfig
=
[
FILTER_TYPE
.
category
,
FILTER_TYPE
.
useArea
,
FILTER_TYPE
.
newJoin
]
useEffect
(()
=>
{
setCurrent
(
1
)
...
...
src/store/site/index.ts
View file @
a8216b1b
...
...
@@ -27,7 +27,7 @@ class SiteStore implements ISiteModule {
//@ts-ignore
const
res
=
await
PublicApi
.
getTemplatePlatformFindUseTemplateBySite
({
siteId
:
this
.
siteId
})
runInAction
(()
=>
{
this
.
mallTemplateInfo
=
res
.
data
this
.
mallTemplateInfo
=
res
.
data
||
{}
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
sessionStorage
.
setItem
(
"mallTemplateInfo"
,
JSON
.
stringify
(
this
.
mallTemplateInfo
))
})
...
...
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