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
linweijiong
jinfa-platform
Commits
259dff07
Commit
259dff07
authored
Oct 14, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev
parents
bfb1899d
8ff562b6
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
831 additions
and
50 deletions
+831
-50
index.tsx
src/components/NestTable/index.tsx
+11
-5
index.less
src/components/SearchForm/index.less
+15
-0
index.tsx
src/components/SearchForm/index.tsx
+172
-0
index.ts
src/constants/index.ts
+0
-0
global.less
src/global/styles/global.less
+25
-7
index.less
...t/components/exchangeGoods/components/addModal/index.less
+16
-0
index.tsx
...st/components/exchangeGoods/components/addModal/index.tsx
+250
-0
index.less
...s/waitSubmitOrderList/components/exchangeGoods/index.less
+34
-0
index.tsx
...ds/waitSubmitOrderList/components/exchangeGoods/index.tsx
+96
-4
exchangeGoodsTable.tsx
...ist/components/exchangeGoods/model/exchangeGoodsTable.tsx
+90
-3
index.tsx
...ingsPanel/propsSettings/components/GoodsSetting/index.tsx
+48
-2
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+24
-0
index.tsx
...ges/lxMall/components/Filter/components/NewJoin/index.tsx
+2
-1
list.tsx
src/pages/lxMall/shopList/list.tsx
+2
-1
index.tsx
...ages/payandSettle/creditApplication/quotaMenage/index.tsx
+30
-16
index.ts
...ayandSettle/creditApplication/quotaMenage/schema/index.ts
+2
-2
commodity.tsx
src/pages/systemSetting/collection/commodity.tsx
+10
-5
index.tsx
src/pages/systemSetting/collection/index.tsx
+1
-1
index.tsx
src/pages/transaction/saleOrder/orderPreview/index.tsx
+1
-1
index.tsx
...ges/transaction/stockSellStorage/bills/addBills/index.tsx
+2
-2
No files found.
src/components/NestTable/index.tsx
View file @
259dff07
import
React
,
{
useCallback
}
from
'react'
import
{
Table
}
from
'antd'
import
{
TableProps
,
ColumnsType
}
from
'antd/es/table'
import
{
TableProps
,
ColumnsType
,
TablePaginationConfig
}
from
'antd/es/table'
import
{
CaretRightOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
export
interface
NestTableProps
extends
TableProps
<
any
>
{
...
...
@@ -9,15 +9,17 @@ export interface NestTableProps extends TableProps<any> {
*/
NestColumns
:
ColumnsType
<
any
>
[],
// 指定获得的子集数据类型
childrenDataKey
:
string
childrenDataKey
:
string
,
childPagination
?:
false
|
TablePaginationConfig
,
childRowSelection
?:
any
,
}
/**
* 嵌套表格
* @todo 实现无限嵌套, 目前暂时实现两层
*/
const
NestTable
:
React
.
FC
<
NestTableProps
>
=
(
props
)
=>
{
const
{
NestColumns
,
childrenDataKey
,
dataSource
,
...
resetProps
}
=
props
const
NestTable
:
React
.
FC
<
NestTableProps
>
=
(
props
)
=>
{
const
{
NestColumns
,
childrenDataKey
,
dataSource
,
pagination
=
false
,
childPagination
=
false
,
childRowSelection
=
null
,
...
resetProps
}
=
props
if
(
NestColumns
.
length
>
2
)
{
throw
new
Error
(
'暂时不支持2项以上的嵌套table'
)
}
...
...
@@ -27,8 +29,12 @@ const NestTable:React.FC<NestTableProps> = (props) => {
const
childRenderTable
=
useCallback
((
record
)
=>
{
return
<
Table
columns=
{
childColumns
}
size=
"middle"
dataSource=
{
record
[
childrenDataKey
]
||
[]
}
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
"tb_bg"
}
rowKey=
'id'
rowSelection=
{
childRowSelection
}
pagination=
{
childPagination
}
/>
},
[
childColumns
,
childrenDataKey
])
...
...
@@ -45,7 +51,7 @@ const NestTable:React.FC<NestTableProps> = (props) => {
<
CaretRightOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
}
}
pagination=
{
false
}
pagination=
{
pagination
}
{
...
resetProps
}
/>
)
...
...
src/components/SearchForm/index.less
0 → 100644
View file @
259dff07
.search_form {
position: relative;
margin-bottom: 16px;
:global {
.ant-form-item {
margin-bottom: 0;
}
}
.daterangegpicker_wrap {
display: flex;
}
}
\ No newline at end of file
src/components/SearchForm/index.tsx
0 → 100644
View file @
259dff07
import
React
,
{
useState
}
from
'react'
import
{
Form
,
Row
,
Col
,
Input
,
Button
,
Select
,
DatePicker
}
from
'antd'
import
{
CaretUpOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
import
styles
from
'./index.less'
const
{
RangePicker
}
=
DatePicker
interface
SearchItemType
{
type
:
any
,
component
:
any
,
key
:
any
,
placeholder
:
any
,
span
?:
number
,
option
?:
{
label
:
string
,
value
:
any
}[]
}
interface
OperationItemType
{
searchList
:
SearchItemType
[],
highSearchList
:
SearchItemType
[]
}
interface
SearchFormPropsType
{
option
:
OperationItemType
}
const
SearchForm
:
React
.
FC
<
SearchFormPropsType
>
=
(
props
)
=>
{
const
{
option
}
=
props
const
[
isHighSearch
,
setIsHighSearch
]
=
useState
<
boolean
>
(
false
)
const
[
form
]
=
Form
.
useForm
()
const
handleSearch
=
()
=>
{
}
const
handleReset
=
()
=>
{
}
const
renderFormItemByCompnent
=
(
detail
:
SearchItemType
)
=>
{
switch
(
detail
.
component
)
{
case
'Search'
:
return
(
<
Form
.
Item
name=
{
detail
.
key
}
>
<
Input
.
Search
style=
{
{
width
:
256
}
}
placeholder=
{
detail
.
placeholder
}
allowClear
onSearch=
{
handleSearch
}
/>
</
Form
.
Item
>
)
case
'Input'
:
return
(
<
Form
.
Item
name=
{
detail
.
key
}
>
<
Input
style=
{
{
width
:
'100%'
}
}
placeholder=
{
detail
.
placeholder
}
allowClear
/>
</
Form
.
Item
>
)
case
'Select'
:
return
(
<
Form
.
Item
name=
{
detail
.
key
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
placeholder=
{
detail
.
placeholder
}
allowClear
>
{
detail
.
option
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
key=
{
`option_${index}`
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Select
.
Option
>
))
}
</
Select
>
</
Form
.
Item
>
)
case
'DateRangePicker'
:
return
(
<
Form
.
Item
name=
{
detail
.
key
}
>
<
RangePicker
style=
{
{
width
:
'100%'
}
}
// format={dateFormat}
/>
</
Form
.
Item
>
// <span className={styles.daterangegpicker_wrap}>
// <Form.Item
// name={detail.key[0]}
// >
// <DatePicker placeholder={detail.placeholder[0]} />
// </Form.Item>
// <Form.Item
// name={detail.key[1]}
// >
// <DatePicker placeholder={detail.placeholder[1]} />
// </Form.Item>
// </span>
)
}
}
return
(
<
div
className=
{
styles
.
search_form
}
>
<
Form
form=
{
form
}
>
<
Row
>
<
Col
span=
{
24
}
>
<
Row
gutter=
{
[
16
,
16
]
}
style=
{
{
marginBottom
:
0
}
}
>
{
/* <Col span={6}></Col> */
}
<
Col
span=
{
18
}
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-start'
,
padding
:
'0 8px'
}
}
>
{
option
.
searchList
&&
option
.
searchList
.
map
((
item
,
index
)
=>
(
<
Col
key=
{
`searchList_item_${index}`
}
>
{
renderFormItemByCompnent
(
item
)
}
</
Col
>
))
}
{
option
.
highSearchList
&&
(
<
Col
>
<
Button
onClick=
{
()
=>
setIsHighSearch
(
!
isHighSearch
)
}
>
高级筛选
{
isHighSearch
?
<
CaretUpOutlined
/>
:
<
CaretDownOutlined
/>
}
</
Button
>
</
Col
>
)
}
<
Col
>
<
Button
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
</
Col
>
</
Col
>
</
Row
>
</
Col
>
{
isHighSearch
&&
<
Col
span=
{
24
}
>
<
Row
gutter=
{
[
16
,
16
]
}
justify=
"end"
>
<
Col
span=
{
24
}
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-start'
}
}
>
{
option
.
highSearchList
&&
option
.
highSearchList
.
map
((
hignSearchItem
,
hignSearchIndex
)
=>
(
<
Col
key=
{
`hignSearchList_item_${hignSearchIndex}`
}
span=
{
hignSearchItem
.
span
||
4
}
>
{
renderFormItemByCompnent
(
hignSearchItem
)
}
</
Col
>
))
}
</
Col
>
</
Row
>
</
Col
>
}
</
Row
>
</
Form
>
</
div
>
)
}
export
default
SearchForm
src/constants/index.ts
View file @
259dff07
src/global/styles/global.less
View file @
259dff07
...
...
@@ -27,6 +27,7 @@ margin;
.hide {
display: none;
}
// antd default
h1,
h2,
...
...
@@ -37,6 +38,21 @@ h6 {
color: #909399;
}
.tb_bg {
background-color: #FAFBFC;
}
.common_tb {
.ant-table-thead>tr>th {
background-color: #FFF;
}
tr.ant-table-expanded-row>td,
tr.ant-table-expanded-row:hover>td {
background: #FFF;
}
}
.@{prefix}-margin_content {
.center-margin;
width: 1190px;
...
...
@@ -152,13 +168,14 @@ h6 {
background: none;
}
}
.white-wrapper {
background-color: #fff;
}
//addonAfter 有选择弹窗时
.input_addonAfter{
.ant-input-group-addon{
.input_addonAfter
{
.ant-input-group-addon
{
padding: 0 !important;
}
}
...
...
@@ -170,6 +187,7 @@ h6 {
padding: 0;
border: none;
}
.connectBtn {
width: 80px;
height: 32px;
...
...
@@ -183,7 +201,7 @@ h6 {
/* 带树的模态框 */
// 此样式用于模态框上面
.useTreeModalWrapper{
.useTreeModalWrapper
{
.ant-tree .ant-tree-treenode {
padding-bottom: 0;
padding-right: 16px;
...
...
@@ -197,6 +215,7 @@ h6 {
border-color: @main-color;
background: @tree-node_hover;
}
&.ant-tree-treenode:hover {
border-color: @main-color;
background: @tree-node_hover;
...
...
@@ -260,8 +279,7 @@ h6 {
cursor: pointer;
}
.editable-row:hover
.editable-cell-value-wrap {
.editable-row:hover .editable-cell-value-wrap {
border: 1px solid #d9d9d9;
border-radius: 4px;
padding: 4px 11px;
...
...
@@ -273,8 +291,8 @@ h6 {
font-size: 12px;
}
// 强制覆盖下拉框固定位置
.fixed-ant-selected-down {
// 强制覆盖下拉框固定位置
.fixed-ant-selected-down {
.ant-select-dropdown {
top: 36px !important;
}
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/exchangeGoods/components/addModal/index.less
0 → 100644
View file @
259dff07
.modal_wrap {
position: relative;
.modal_tb_wrap {
position: relative;
height: 60vh;
overflow-y: auto;
}
.modal_tb_pagination {
position: relative;
text-align: right;
margin-top: 24px;
}
}
\ No newline at end of file
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/exchangeGoods/components/addModal/index.tsx
0 → 100644
View file @
259dff07
import
React
,
{
useState
}
from
'react'
import
{
Modal
,
Pagination
}
from
'antd'
import
NestTable
from
'@/components/NestTable'
import
{
exchangeGoodsModalTableColumn
,
exchangeGoodsModalChildTableColumn
}
from
'../../model/exchangeGoodsTable'
import
SearchForm
from
'@/components/SearchForm'
import
styles
from
'./index.less'
interface
AddModalPropsType
{
visible
:
boolean
;
onOk
:
Function
;
onCancel
:
Function
;
}
const
AddModal
:
React
.
FC
<
AddModalPropsType
>
=
(
props
)
=>
{
const
{
visible
=
false
,
onOk
,
onCancel
}
=
props
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
4
)
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
mockData
=
[
{
id
:
1
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
orderDeliveryProducts
:
[
{
id
:
1
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
2
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
2
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
orderDeliveryProducts
:
[
{
id
:
3
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
4
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
3
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
orderDeliveryProducts
:
[
{
id
:
5
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
6
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
4
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
orderDeliveryProducts
:
[
{
id
:
7
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
8
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
]
const
handleRowSelectionChangge
=
(
selectedRowKeys
,
selectedRows
)
=>
{
console
.
log
(
selectedRowKeys
,
selectedRows
)
}
const
searchOption
=
{
searchList
:
[
{
type
:
'string'
,
component
:
'Search'
,
key
:
'orderNo'
,
placeholder
:
'搜索'
,
}
],
highSearchList
:
[
{
type
:
'string'
,
component
:
'Input'
,
key
:
'applyAbstract'
,
placeholder
:
'订单摘要'
,
},
{
type
:
'array'
,
component
:
'DateRangePicker'
,
key
:
[
'startTime'
,
'endTime'
],
span
:
6
,
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
{
type
:
'string'
,
component
:
'Input'
,
key
:
'supplierName'
,
placeholder
:
'供应会员'
,
},
{
type
:
'string'
,
component
:
'Select'
,
key
:
'orderType'
,
placeholder
:
'订单类型'
,
option
:
[
{
label
:
'所有'
,
value
:
0
}
]
},
]
}
return
(
<
Modal
title=
"选择换货商品"
width=
{
1200
}
visible=
{
visible
}
centered
onOk=
{
()
=>
onOk
()
}
onCancel=
{
()
=>
onCancel
()
}
>
<
div
className=
{
styles
.
modal_wrap
}
>
<
SearchForm
option=
{
searchOption
}
/>
<
div
className=
{
styles
.
modal_tb_wrap
}
>
<
NestTable
NestColumns=
{
[
exchangeGoodsModalTableColumn
,
exchangeGoodsModalChildTableColumn
]
}
rowKey=
'id'
className=
"common_tb"
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
"tb_bg"
}
childrenDataKey=
'orderDeliveryProducts'
dataSource=
{
mockData
}
childRowSelection=
{
{
onChange
:
handleRowSelectionChangge
}
}
/>
</
div
>
<
div
className=
{
styles
.
modal_tb_pagination
}
>
<
Pagination
showQuickJumper
showSizeChanger
pageSize=
{
pageSize
}
current=
{
current
}
total=
{
totalCount
}
showTotal=
{
total
=>
`共 ${total} 条`
}
/>
</
div
>
</
div
>
</
Modal
>
)
}
export
default
AddModal
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/exchangeGoods/index.less
View file @
259dff07
...
...
@@ -16,6 +16,39 @@
}
}
.operation_btn_group {
display: flex;
align-items: center;
.opration_btn_split {
position: relative;
height: 16px;
width: 1px;
background: #EEF0F3;
margin: 0 15px;
}
.operation_btn {
position: relative;
padding: 5.6px 0;
}
}
.tb_wrap {
margin-top: 24px;
.exchange_goods_tb {
position: relative;
:global {
.ant-table-thead>tr>th {
background-color: #FFF;
}
}
}
.tb_bg {
background-color: #FAFBFC;
}
}
\ No newline at end of file
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/exchangeGoods/index.tsx
View file @
259dff07
import
React
from
'react'
import
React
,
{
useState
}
from
'react'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
{
exchangeGoodsTableColumn
}
from
'./model/exchangeGoodsTable'
import
AddModal
from
'./components/addModal'
import
styles
from
'./index.less'
import
{
Table
}
from
'antd'
import
{
Table
,
Button
}
from
'antd'
interface
ExchangeGoodsProps
{
}
const
ExchangeGoods
:
React
.
FC
<
ExchangeGoodsProps
>
=
(
props
)
=>
{
const
[
addVisible
,
setAddvisible
]
=
useState
<
boolean
>
(
true
)
const
data
=
[
{
...
...
@@ -23,18 +25,108 @@ const ExchangeGoods: React.FC<ExchangeGoodsProps> = (props) => {
purchaseAmount
:
40000
,
replaceCount
:
2000
,
replaceReason
:
'质量检查不合格'
,
},
{
id
:
2
,
orderNo
:
'SPTY12'
,
productId
:
'1110'
,
productName
:
'进口头层黄牛皮荔枝纹/红色/XXL'
,
category
:
'category'
,
unit
:
''
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
40000
,
replaceCount
:
2000
,
replaceReason
:
'质量检查不合格'
,
},
{
id
:
3
,
orderNo
:
'SPTY12'
,
productId
:
'1110'
,
productName
:
'进口头层黄牛皮荔枝纹/红色/XXL'
,
category
:
'category'
,
unit
:
''
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
40000
,
replaceCount
:
2000
,
replaceReason
:
'质量检查不合格'
,
},
{
id
:
4
,
orderNo
:
'SPTY12'
,
productId
:
'1110'
,
productName
:
'进口头层黄牛皮荔枝纹/红色/XXL'
,
category
:
'category'
,
unit
:
''
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
40000
,
replaceCount
:
2000
,
replaceReason
:
'质量检查不合格'
,
},
{
id
:
5
,
orderNo
:
'SPTY12'
,
productId
:
'1110'
,
productName
:
'进口头层黄牛皮荔枝纹/红色/XXL'
,
category
:
'category'
,
unit
:
''
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
40000
,
replaceCount
:
2000
,
replaceReason
:
'质量检查不合格'
,
}
]
const
columns
=
exchangeGoodsTableColumn
.
concat
([
{
title
:
'操作'
,
dataIndex
:
'opration'
,
render
:
()
=>
{
return
<
div
className=
{
styles
.
operation_btn_group
}
>
<
Button
type=
"link"
className=
{
styles
.
operation_btn
}
>
编辑
</
Button
>
<
div
className=
{
styles
.
opration_btn_split
}
></
div
>
<
Button
type=
"link"
className=
{
styles
.
operation_btn
}
>
删除
</
Button
>
</
div
>
}
},
])
/**
* 确认添加换货商品
*/
const
handldAddOk
=
()
=>
{
}
/**
* 取消添加
*/
const
handleAddCancel
=
()
=>
{
setAddvisible
(
false
)
}
return
(
<
div
>
<
div
className=
{
styles
.
add_btn
}
>
<
div
className=
{
styles
.
add_btn
}
onClick=
{
()
=>
setAddvisible
(
true
)
}
>
<
PlusOutlined
/>
<
span
>
选择换货商品
</
span
>
</
div
>
<
div
className=
{
styles
.
tb_wrap
}
>
<
Table
dataSource=
{
data
}
columns=
{
exchangeGoodsTableColumn
}
/>
<
Table
className=
{
styles
.
exchange_goods_tb
}
rowKey=
"id"
rowClassName=
{
(
_
,
index
)
=>
(
index
===
0
||
(
index
%
2
)
===
0
)
&&
styles
.
tb_bg
}
dataSource=
{
data
}
columns=
{
columns
}
/>
</
div
>
<
AddModal
visible=
{
addVisible
}
onOk=
{
handldAddOk
}
onCancel=
{
handleAddCancel
}
/>
</
div
>
)
}
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/exchangeGoods/model/exchangeGoodsTable.tsx
View file @
259dff07
...
...
@@ -61,9 +61,95 @@ export const exchangeGoodsTableColumn: any[] = [
dataIndex
:
'replaceReason'
,
ellipsis
:
true
,
},
]
export
const
exchangeGoodsModalTableColumn
:
any
[]
=
[
{
title
:
'操作'
,
dataIndex
:
'opration'
,
ellipsis
:
true
,
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
},
{
title
:
'订单摘要'
,
dataIndex
:
'applyAbstract'
,
key
:
'applyAbstract'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
// render: text => formatTimeString(text)
},
{
title
:
'下单时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'订单状态'
,
dataIndex
:
'orderStatus'
,
key
:
'orderStatus'
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType'
,
key
:
'orderType'
,
},
]
export
const
exchangeGoodsModalChildTableColumn
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
key
:
'productId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
key
:
'unit'
,
},
{
title
:
'订单数量'
,
dataIndex
:
'purchaseCount'
,
key
:
'purchaseCount'
,
},
{
title
:
'采购单价'
,
dataIndex
:
'purchasePrice'
,
key
:
'purchasePrice'
,
},
{
title
:
'采购金额'
,
dataIndex
:
'purchaseAmount'
,
key
:
'purchaseAmount'
,
},
{
title
:
'已换货数量'
,
dataIndex
:
'replaceCount'
,
key
:
'replaceCount'
,
},
]
\ No newline at end of file
src/pages/editor/settingsPanel/propsSettings/components/GoodsSetting/index.tsx
View file @
259dff07
...
...
@@ -43,8 +43,12 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
[
goodsIds
,
setGoodsIds
]
=
useState
<
any
>
([])
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
const
[
filterParam
,
setFilterParam
]
=
useState
()
const
[
spinLoading
,
setSpinLoading
]
=
useState
<
boolean
>
(
false
)
const
[
newProps
,
setNewProps
]
=
useState
(
props
)
const
[
categoryResponseList
,
setCategoryResponseList
]
=
useState
<
any
>
([])
const
[
noSelectBrands
,
setNoSelectBrands
]
=
useState
<
any
[]
>
([])
const
changeNewProps
=
(
key
:
string
,
data
:
any
)
=>
{
const
newProps
=
{
...
props
}
newProps
[
key
]
=
data
...
...
@@ -52,6 +56,44 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
}
useEffect
(()
=>
{
fetchBrandsList
()
fetchCategoryList
()
},
[])
const
fetchCategoryList
=
()
=>
{
let
param
=
{
categoryId
:
categoryid
,
templateId
:
templateid
}
setSpinLoading
(
true
)
//@ts-ignore
PublicApi
.
getTemplatePlatformFindCategoryList
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
setSpinLoading
(
false
)
})
}
const
fetchBrandsList
=
()
=>
{
let
param
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
current
:
1
,
pageSize
:
100
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindBrandList
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
setNoSelectBrands
(
dataInfo
.
data
||
[])
}
})
}
useEffect
(()
=>
{
fetchGoodsList
()
},
[
filterParam
])
...
...
@@ -293,7 +335,9 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
className=
{
styles
.
mar_bot_0
}
>
<
Select
placeholder=
"品类"
style=
{
{
width
:
180
}
}
>
<
Select
.
Option
value=
"1"
>
1
</
Select
.
Option
>
{
categoryResponseList
.
map
((
item
,
index
)
=>
<
Select
.
Option
kye=
{
`select_category_item_${index}`
}
value=
{
item
.
categoryId
}
>
{
item
.
categoryName
}
</
Select
.
Option
>)
}
</
Select
>
</
Form
.
Item
>
</
Col
>
...
...
@@ -303,7 +347,9 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
className=
{
styles
.
mar_bot_0
}
>
<
Select
placeholder=
"品牌"
style=
{
{
width
:
180
}
}
>
<
Select
.
Option
value=
"1"
>
1
</
Select
.
Option
>
{
noSelectBrands
.
map
((
item
,
index
)
=>
(<
Select
.
Option
kye=
{
`select_brand_item_${index}`
}
value=
{
item
.
brandId
}
>
{
item
.
brandName
}
</
Select
.
Option
>))
}
</
Select
>
</
Form
.
Item
>
</
Col
>
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
259dff07
...
...
@@ -245,6 +245,9 @@ const CommodityDetail = (props) => {
* 加入进货单
*/
const
handleAddToPurchase
=
()
=>
{
if
(
!
checkoutUserInfo
())
{
return
}
if
(
!
selectCommodityId
)
{
message
.
destroy
()
message
.
info
(
"请选择商品属性"
)
...
...
@@ -302,10 +305,31 @@ const CommodityDetail = (props) => {
return
link
}
const
checkoutUserInfo
=
()
=>
{
const
userInfo
=
getAuth
()
if
(
userInfo
)
{
if
(
userInfo
.
memberRoleType
!==
2
)
{
message
.
info
(
'当前角色无法购买'
)
return
false
}
if
(
userInfo
.
memberId
===
commodityDetail
.
memberId
)
{
message
.
info
(
"不能购买自己的商品"
)
return
false
}
return
true
}
else
{
message
.
info
(
"请先登录"
)
return
false
}
}
/**
* 立即购买
*/
const
handleToBuy
=
(
priceType
:
COMMODITY_TYPE
=
COMMODITY_TYPE
.
prompt
)
=>
{
if
(
!
checkoutUserInfo
())
{
return
}
if
(
!
selectCommodityId
)
{
message
.
destroy
()
message
.
info
(
"请选择商品属性"
)
...
...
src/pages/lxMall/components/Filter/components/NewJoin/index.tsx
View file @
259dff07
...
...
@@ -8,6 +8,7 @@
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
import
ImageBox
from
'@/components/ImageBox'
import
styles
from
'./index.less'
interface
NewJoinPropsType
{
...
...
@@ -40,7 +41,7 @@ const NewJoin: React.FC<NewJoinPropsType> = (props) => {
newJoinShopList
&&
newJoinShopList
.
map
(
item
=>
(
<
div
className=
{
styles
.
new_join_list_item
}
key=
{
`new_join_list_item_${item.id}`
}
>
<
div
className=
{
styles
.
new_join_logo
}
>
<
img
src=
{
item
.
logo
}
/>
<
ImageBox
width=
{
32
}
height=
{
32
}
imgUrl=
{
item
.
logo
}
direction=
"column"
/>
</
div
>
<
div
className=
{
styles
.
new_join_name
}
>
<
a
href=
{
`/shop?shopId=${btoa(JSON.stringify({ shopId: item.id, memberId: item.memberId }))}`
}
>
...
...
src/pages/lxMall/shopList/list.tsx
View file @
259dff07
...
...
@@ -5,6 +5,7 @@ import { Rate } from 'antd'
import
shop_icon
from
'@/assets/imgs/shop_icon.png'
import
credit_icon
from
'@/assets/imgs/credit_icon.png'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
ImageBox
from
'@/components/ImageBox'
import
styles
from
'./list.less'
interface
CommodityListPropsType
{
...
...
@@ -46,7 +47,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
<
div
className=
{
styles
.
shop_list_left
}
>
<
div
className=
{
styles
.
shop_list_info
}
>
<
div
className=
{
styles
.
shop_list_info_imgbox
}
>
<
div
className=
{
styles
.
shop_list_info_imgbox_img
}
style=
{
{
backgroundImage
:
`url(${item.logo})`
}
}
></
div
>
<
ImageBox
width=
{
70
}
height=
{
70
}
imgUrl=
{
item
.
logo
}
direction=
"column"
/
>
</
div
>
<
div
className=
{
styles
.
shop_list_info_box
}
>
<
div
className=
{
styles
.
shop_list_info_name
}
>
...
...
src/pages/payandSettle/creditApplication/quotaMenage/index.tsx
View file @
259dff07
...
...
@@ -4,6 +4,7 @@ import { StandardTable } from 'god';
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
...
...
@@ -48,7 +49,7 @@ const QuotaMenage: React.FC = () => {
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'会员归属'
,
dataIndex
:
'
m
emberName'
,
dataIndex
:
'
parentM
emberName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
EyePreview
...
...
@@ -60,34 +61,34 @@ const QuotaMenage: React.FC = () => {
},
{
title
:
'会员类型'
,
dataIndex
:
'memberType'
,
dataIndex
:
'memberType
Name
'
,
align
:
'center'
,
},
{
title
:
'会员角色'
,
dataIndex
:
'memberRole'
,
dataIndex
:
'memberRole
Name
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'所属会员等级'
,
dataIndex
:
'memberLevel'
,
dataIndex
:
'memberLevel
Name
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'剩余可用额度(元)'
,
dataIndex
:
'
available
'
,
dataIndex
:
'
canUseQuota
'
,
align
:
'center'
,
},
{
title
:
'总额度/已用额度(元)'
,
dataIndex
:
'
count
'
,
dataIndex
:
'
quota
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
div
>
总额度:
{
text
}
</
div
>
<
div
>
已使用:
{
record
.
use
d
}
</
div
>
<
div
>
已使用:
{
record
.
use
Quota
}
</
div
>
</>
),
},
...
...
@@ -98,7 +99,7 @@ const QuotaMenage: React.FC = () => {
render
:
(
text
,
record
)
=>
(
<
Progress
type=
"circle"
percent=
{
40
}
percent=
{
Math
.
floor
(
record
.
useQuota
/
record
.
quota
)
}
strokeColor=
"#41CC9E"
strokeWidth=
{
12
}
width=
{
40
}
...
...
@@ -108,28 +109,41 @@ const QuotaMenage: React.FC = () => {
},
{
title
:
'还款状态'
,
dataIndex
:
'repay
mentStatus
'
,
dataIndex
:
'repay
StatusName
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"warnning"
title=
"逾期 3 天"
/>
<
StatusTag
type=
"warnning"
title=
{
text
}
/>
),
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
dataIndex
:
'status
Name
'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#41CC9E"
text=
"正常"
/>,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#41CC9E"
text=
{
text
}
/>,
},
];
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
fetchListData
=
(
params
:
any
)
=>
{
return
Promise
.
resolve
({
total
:
2
,
data
:
mock
,
const
{
status
=
0
,
rePayStatus
=
0
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditApplyPageCredit
({
status
,
rePayStatus
,
...
rest
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
};
...
...
@@ -156,7 +170,7 @@ const QuotaMenage: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
n
ame'
,
'
parentMemberN
ame'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
...
...
src/pages/payandSettle/creditApplication/quotaMenage/schema/index.ts
View file @
259dff07
...
...
@@ -16,7 +16,7 @@ export const listSearchSchema: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
n
ame
:
{
parentMemberN
ame
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
@@ -35,7 +35,7 @@ export const listSearchSchema: ISchema = {
columns
:
6
,
},
properties
:
{
re
payment
Status
:
{
re
Pay
Status
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
...
...
src/pages/systemSetting/collection/commodity.tsx
View file @
259dff07
...
...
@@ -78,13 +78,13 @@ const Commodity: React.FC = () => {
return
(
<
div
className=
{
styles
.
commodity_price
}
>
<
span
>
¥
</
span
>
<
label
>
{
commodity
.
min
}
</
label
>
<
label
>
{
commodity
.
min
===
commodity
.
max
?
numFormat
(
commodity
.
min
)
:
`${numFormat(commodity.min)}~${numFormat(commodity.max)}`
}
</
label
>
</
div
>
)
case
COMMODITY_TYPE
.
integral
:
return
(
<
div
className=
{
styles
.
commodity_point
}
>
{
numFormat
(
commodity
.
min
)
}
~
{
numFormat
(
commodity
.
max
)
}
积分
{
commodity
.
min
===
commodity
.
max
?
numFormat
(
commodity
.
min
)
:
`${numFormat(commodity.min)}~${numFormat(commodity.max)}`
}
积分
</
div
>
)
case
COMMODITY_TYPE
.
inquiry
:
...
...
@@ -104,9 +104,14 @@ const Commodity: React.FC = () => {
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
param
=
{
commodityId
:
detail
.
id
let
param
:
any
=
{
commodityId
:
detail
.
commodity
.
id
,
type
:
detail
.
type
}
if
([
3
,
4
,
5
].
includes
(
detail
.
type
))
{
param
.
channelMemberId
=
detail
.
channelMemberId
}
console
.
log
(
param
,
"param"
)
PublicApi
.
postSearchShopCommodityCollectDeleteCommodityCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchCollectCommodityList
()
...
...
@@ -160,7 +165,7 @@ const Commodity: React.FC = () => {
</
div
>
<
div
className=
{
cx
(
styles
.
commodity_list_item_item
)
}
>
<
div
className=
{
styles
.
collection_state_wrap
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
.
commodity
)
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
...
...
src/pages/systemSetting/collection/index.tsx
View file @
259dff07
...
...
@@ -15,7 +15,7 @@ const Collection: React.FC = () => {
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
collection_wrap
}
>
<
Tabs
defaultActiveKey=
"
shops
"
className=
{
styles
.
collection_tabs
}
>
<
Tabs
defaultActiveKey=
"
commodity
"
className=
{
styles
.
collection_tabs
}
>
<
TabPane
tab=
"商品收藏"
key=
"commodity"
>
<
Commodity
/>
</
TabPane
>
...
...
src/pages/transaction/saleOrder/orderPreview/index.tsx
View file @
259dff07
...
...
@@ -230,7 +230,7 @@ const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
{
label
:
'对应报价单号'
,
name
:
'quotationNo'
,
span
:
8
,
render
:
text
=>
<
Link
to=
{
'/'
}
>
{
text
}
</
Link
>
},
{
label
:
'订单摘要'
,
name
:
'orderThe'
,
span
:
8
},
{
label
:
'供应会员'
,
name
:
'supplyMembersName'
,
span
:
8
},
{
label
:
'下单模式'
,
name
:
'orderModel'
,
span
:
8
,
render
:
text
=>
GlobalConfig
.
web
.
orderMode
[
text
].
label
},
{
label
:
'下单模式'
,
name
:
'orderModel'
,
span
:
8
,
render
:
text
=>
GlobalConfig
.
web
.
orderMode
.
find
(
v
=>
v
.
value
===
text
)?.
label
||
''
},
{
label
:
'订单类型'
,
name
:
'type'
,
span
:
8
,
render
:
text
=>
orderTypeLabel
[
text
]
},
{
label
:
'下单时间'
,
name
:
'createTime'
,
span
:
8
,
render
:
text
=>
formatTimeString
(
text
)
},
{
label
:
'外部状态'
,
name
:
'externalState'
,
span
:
8
,
render
:
text
=>
<
StatusColors
type=
'out'
status=
{
text
}
/>
},
...
...
src/pages/transaction/stockSellStorage/bills/addBills/index.tsx
View file @
259dff07
...
...
@@ -520,8 +520,8 @@ const AddBills: React.FC<{}> = (props: any) => {
goodsId
:
item
.
id
,
itemName
:
item
.
name
,
specifications
:
item
.
type
,
category
:
item
.
customerCategory
.
name
,
brand
:
item
.
brand
.
name
,
category
:
item
.
customerCategory
?
item
.
customerCategory
.
name
:
''
,
brand
:
item
.
brand
?
item
.
brand
.
name
:
''
,
unit
:
item
.
unitName
,
costPrice
:
item
.
costPrice
,
product
:
undefined
,
...
...
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