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
b9e486a5
Commit
b9e486a5
authored
Dec 01, 2020
by
GuanHua
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
a8ff1c0b
1288f304
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
356 additions
and
327 deletions
+356
-327
index.ts
src/constants/index.ts
+2
-2
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+1
-1
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+5
-4
index.tsx
src/pages/commodity/products/index.tsx
+6
-4
channelSchema.tsx
src/pages/commodity/products/schema/channelSchema.tsx
+21
-21
index.tsx
src/pages/repositories/schema/index.tsx
+12
-0
index.tsx
src/pages/transaction/components/StatusColors/index.tsx
+4
-0
index.tsx
src/pages/transaction/components/orderDeleveRecord/index.tsx
+143
-140
index.tsx
src/pages/transaction/components/orderProductTable/index.tsx
+9
-7
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+142
-140
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+11
-8
No files found.
src/constants/index.ts
View file @
b9e486a5
...
@@ -294,10 +294,10 @@ export const ORDER_TYPE = ['',
...
@@ -294,10 +294,10 @@ export const ORDER_TYPE = ['',
'需求采购'
,
'需求采购'
,
'现货采购'
,
'现货采购'
,
'集采'
,
'集采'
,
'积分兑换'
,
'渠道直采'
,
'渠道直采'
,
'渠道现货'
,
'渠道现货'
,
'渠道积分兑换'
,
'积分兑换'
,
'渠道积分兑换'
]
]
// 提货方式
// 提货方式
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
b9e486a5
...
@@ -718,7 +718,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
...
@@ -718,7 +718,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
}
valuePropName=
"checked"
valuePropName=
"checked"
>
>
<
Checkbox
>
允许使用会员折扣价购买
</
Checkbox
>
<
Checkbox
disabled=
{
planPrice
===
3
}
>
允许使用会员折扣价购买
</
Checkbox
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
{
/* 批量设置按钮 */
}
{
/* 批量设置按钮 */
}
...
...
src/pages/commodity/products/directChannel.tsx
View file @
b9e486a5
...
@@ -62,13 +62,14 @@ const DirectChannel: React.FC<{}> = () => {
...
@@ -62,13 +62,14 @@ const DirectChannel: React.FC<{}> = () => {
title
:
'ID'
,
title
:
'ID'
,
dataIndex
:
'id'
,
dataIndex
:
'id'
,
key
:
'id'
,
key
:
'id'
,
width
:
60
},
},
{
{
title
:
'商品名称'
,
title
:
'商品名称'
,
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'name'
],
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'name'
],
key
:
'id'
,
key
:
'id'
,
className
:
'commonPickColor'
,
className
:
'commonPickColor'
,
width
:
30
0
,
width
:
24
0
,
ellipsis
:
true
,
ellipsis
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
EyePreview
render
:
(
text
:
any
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`
}
url=
{
`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`
}
...
@@ -77,12 +78,12 @@ const DirectChannel: React.FC<{}> = () => {
...
@@ -77,12 +78,12 @@ const DirectChannel: React.FC<{}> = () => {
</
EyePreview
>
</
EyePreview
>
},
},
{
{
title
:
'品类'
,
title
:
'
商品
品类'
,
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'customerCategory'
,
'name'
],
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'customerCategory'
,
'name'
],
key
:
'id'
,
key
:
'id'
,
},
},
{
{
title
:
'品牌'
,
title
:
'
商品
品牌'
,
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'brand'
,
'name'
],
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'brand'
,
'name'
],
key
:
'id'
,
key
:
'id'
,
},
},
...
@@ -151,7 +152,7 @@ const DirectChannel: React.FC<{}> = () => {
...
@@ -151,7 +152,7 @@ const DirectChannel: React.FC<{}> = () => {
render
:
(
text
,
record
)
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
render
:
(
text
,
record
)
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
},
{
{
title
:
'状态'
,
title
:
'
商品
状态'
,
dataIndex
:
'status'
,
dataIndex
:
'status'
,
key
:
'id'
,
key
:
'id'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
{
...
...
src/pages/commodity/products/index.tsx
View file @
b9e486a5
...
@@ -68,23 +68,24 @@ const Products: React.FC<{}> = () => {
...
@@ -68,23 +68,24 @@ const Products: React.FC<{}> = () => {
title
:
'ID'
,
title
:
'ID'
,
dataIndex
:
'id'
,
dataIndex
:
'id'
,
key
:
'id'
,
key
:
'id'
,
width
:
60
},
},
{
{
title
:
'商品名称'
,
title
:
'商品名称'
,
dataIndex
:
'name'
,
dataIndex
:
'name'
,
key
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
className
:
'commonPickColor'
,
width
:
30
0
,
width
:
24
0
,
ellipsis
:
true
,
ellipsis
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
a
title=
{
text
}
onClick=
{
()
=>
handleSee
(
record
)
}
>
{
text
}
<
EyeOutlined
/></
a
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
a
title=
{
text
}
onClick=
{
()
=>
handleSee
(
record
)
}
>
{
text
}
<
EyeOutlined
/></
a
>
},
},
{
{
title
:
'品类'
,
title
:
'
商品
品类'
,
dataIndex
:
[
'customerCategory'
,
'name'
],
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory.name'
,
key
:
'customerCategory.name'
,
},
},
{
{
title
:
'品牌'
,
title
:
'
商品
品牌'
,
dataIndex
:
[
'brand'
,
'name'
],
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand.name'
,
key
:
'brand.name'
,
},
},
...
@@ -149,7 +150,7 @@ const Products: React.FC<{}> = () => {
...
@@ -149,7 +150,7 @@ const Products: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
text
&&
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
render
:
(
text
:
any
,
record
:
any
)
=>
text
&&
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
},
{
{
title
:
'
审核
状态'
,
title
:
'
商品
状态'
,
dataIndex
:
'status'
,
dataIndex
:
'status'
,
key
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
{
...
@@ -199,6 +200,7 @@ const Products: React.FC<{}> = () => {
...
@@ -199,6 +200,7 @@ const Products: React.FC<{}> = () => {
{
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'option'
,
dataIndex
:
'option'
,
width
:
160
,
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
}
}
];
];
...
...
src/pages/commodity/products/schema/channelSchema.tsx
View file @
b9e486a5
...
@@ -124,27 +124,27 @@ export const channelSchema: ISchema = {
...
@@ -124,27 +124,27 @@ export const channelSchema: ISchema = {
// style: { width: '174px' },
// style: { width: '174px' },
},
},
},
},
priceTypeList
:
{
//
priceTypeList: {
type
:
'string'
,
//
type: 'string',
enum
:
[
//
enum: [
{
//
{
label
:
'现货价格'
,
//
label: '现货价格',
value
:
1
,
//
value: 1,
},
//
},
// {
//
// {
// label: '价格需要询价',
//
// label: '价格需要询价',
// value: 2,
//
// value: 2,
// },
//
// },
{
//
{
label
:
'积分兑换商品'
,
//
label: '积分兑换商品',
value
:
3
,
//
value: 3,
}
//
}
],
//
],
'x-component-props'
:
{
//
'x-component-props': {
placeholder
:
'产品定价'
,
//
placeholder: '产品定价',
// style: { width: '174px' },
//
// style: { width: '174px' },
},
//
},
},
//
},
'NO_NAME_FIELD_$2'
:
{
'NO_NAME_FIELD_$2'
:
{
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'layout'
,
'x-component'
:
'layout'
,
...
...
src/pages/repositories/schema/index.tsx
View file @
b9e486a5
...
@@ -472,6 +472,18 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
...
@@ -472,6 +472,18 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
},
},
required
:
true
,
required
:
true
,
title
:
'分配仓位库存'
,
title
:
'分配仓位库存'
,
"x-rules"
:
[
{
validator
:
value
=>
{
return
value
>
Number
.
MAX_SAFE_INTEGER
},
message
:
'仓位库存数值已超出最大限度'
,
},
{
pattern
:
/^
\d
+
(\.\d{1,3})?
$/
,
message
:
'仓位库存数值仅限三位小数'
,
},
]
},
},
inventoryDeductWay
:
{
inventoryDeductWay
:
{
type
:
'radio'
,
type
:
'radio'
,
...
...
src/pages/transaction/components/StatusColors/index.tsx
View file @
b9e486a5
...
@@ -104,6 +104,10 @@ const StatusColors:React.FC<StatusColorsProps> = (props) => {
...
@@ -104,6 +104,10 @@ const StatusColors:React.FC<StatusColorsProps> = (props) => {
const
{
status
,
type
}
=
props
const
{
status
,
type
}
=
props
const
statusText
=
typeMaps
[
type
]
const
statusText
=
typeMaps
[
type
]
const
statusShowColor
=
matchStatusColor
(
status
)
const
statusShowColor
=
matchStatusColor
(
status
)
// 单独处理支付比例 确认到账的状态颜色
if
(
type
===
'payOut'
&&
status
===
3
)
{
return
(<
Tag
color=
"#41CC9E"
>
{
statusText
[
status
]
}
</
Tag
>)
}
return
(<
Tag
color=
{
statusShowColor
}
>
{
statusText
[
status
]
}
</
Tag
>)
return
(<
Tag
color=
{
statusShowColor
}
>
{
statusText
[
status
]
}
</
Tag
>)
}
}
...
...
src/pages/transaction/components/orderDeleveRecord/index.tsx
View file @
b9e486a5
...
@@ -11,145 +11,6 @@ import { history } from 'umi'
...
@@ -11,145 +11,6 @@ import { history } from 'umi'
export
interface
OrderDeleveRecordProps
{}
export
interface
OrderDeleveRecordProps
{}
const
outOrderCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
},
{
title
:
'单价'
,
dataIndex
:
'unitPrice'
,
align
:
'center'
,
key
:
'unitPrice'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'含税'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
render
:
()
=>
'是'
},
{
title
:
'金额'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'已发货'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'未发货'
,
dataIndex
:
'notDelivered'
,
align
:
'center'
,
key
:
'notDelivered'
,
},
{
title
:
'已收货'
,
dataIndex
:
'goodsReceived'
,
align
:
'center'
,
key
:
'goodsReceived'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
const
sideChildrenCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'发货数量'
,
dataIndex
:
'deliverGoodsCount'
,
align
:
'center'
,
key
:
'deliverGoodsCount'
,
},
{
title
:
'入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
key
:
'storageCount'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
// 订单发货记录
// 订单发货记录
const
OrderDeleveRecord
:
React
.
FC
<
OrderDeleveRecordProps
>
=
(
props
)
=>
{
const
OrderDeleveRecord
:
React
.
FC
<
OrderDeleveRecordProps
>
=
(
props
)
=>
{
...
@@ -163,7 +24,149 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
...
@@ -163,7 +24,149 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const
dataRef
=
useRef
<
any
>
([])
const
dataRef
=
useRef
<
any
>
([])
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
orderReceivingStatisticsResponses
,
orderDeliveryDetailsResponses
}
=
data
const
{
orderReceivingStatisticsResponses
,
orderDeliveryDetailsResponses
,
orderModel
}
=
data
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
outOrderCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
},
{
title
:
creditsCommodity
?
'所需积分'
:
'单价'
,
dataIndex
:
'unitPrice'
,
align
:
'center'
,
key
:
'unitPrice'
,
},
{
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'含税'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
render
:
()
=>
'是'
},
{
title
:
creditsCommodity
?
'所需积分小计'
:
'金额'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'已发货'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'未发货'
,
dataIndex
:
'notDelivered'
,
align
:
'center'
,
key
:
'notDelivered'
,
},
{
title
:
'已收货'
,
dataIndex
:
'goodsReceived'
,
align
:
'center'
,
key
:
'goodsReceived'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
const
sideChildrenCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'发货数量'
,
dataIndex
:
'deliverGoodsCount'
,
align
:
'center'
,
key
:
'deliverGoodsCount'
,
},
{
title
:
'入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
key
:
'storageCount'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
const
sideOrderCols
:
any
[]
=
[
const
sideOrderCols
:
any
[]
=
[
{
{
title
:
'发货批次'
,
title
:
'发货批次'
,
...
...
src/pages/transaction/components/orderProductTable/index.tsx
View file @
b9e486a5
...
@@ -44,7 +44,8 @@ const RowStyle = styled(props => <Row style={{marginTop: 12}} justify='end' {...
...
@@ -44,7 +44,8 @@ const RowStyle = styled(props => <Row style={{marginTop: 12}} justify='end' {...
const
modalPriceActions
=
createFormActions
()
const
modalPriceActions
=
createFormActions
()
// 总计金额联动框
// 总计金额联动框
export
const
MoneyTotalBox
=
({
dataSource
,
preview
})
=>
{
export
const
MoneyTotalBox
=
({
dataSource
,
preview
})
=>
{
const
{
orderProductRequests
=
[],
deliveryAddressInfo
,
freight
=
0
,
sumPrice
,
amount
}
=
dataSource
||
{}
const
{
orderProductRequests
=
[],
deliveryAddressInfo
,
freight
=
0
,
sumPrice
,
amount
,
orderModel
}
=
dataSource
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
// 合计金额, 如果后端有传则用后端数据
// 合计金额, 如果后端有传则用后端数据
const
sum
=
amount
||
orderProductRequests
.
reduce
((
prev
,
next
)
=>
prev
+
parseInt
((
next
.
money
||
0
)),
0
)
const
sum
=
amount
||
orderProductRequests
.
reduce
((
prev
,
next
)
=>
prev
+
parseInt
((
next
.
money
||
0
)),
0
)
...
@@ -84,7 +85,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
...
@@ -84,7 +85,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
// }, [orderProductRequests])
// }, [orderProductRequests])
return
<
RowStyle
>
return
<
RowStyle
>
<
Col
span=
{
2
}
>
<
Col
span=
{
2
}
>
<
div
>
合计金额
</
div
>
<
div
>
{
creditsCommodity
?
'合计所需积分'
:
'合计金额'
}
</
div
>
<
div
>
{
sum
}
</
div
>
<
div
>
{
sum
}
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
2
}
>
<
Col
span=
{
2
}
>
...
@@ -93,7 +94,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
...
@@ -93,7 +94,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
<
div
>
{
freight
}
</
div
>
<
div
>
{
freight
}
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
2
}
>
<
Col
span=
{
2
}
>
<
div
>
总计金额
</
div
>
<
div
>
{
creditsCommodity
?
'总计所需积分'
:
'总计金额'
}
</
div
>
<
div
>
{
amountMoney
}
</
div
>
<
div
>
{
amountMoney
}
</
div
>
</
Col
>
</
Col
>
{
/* <ModalForm
{
/* <ModalForm
...
@@ -196,7 +197,7 @@ const EditableCell: React.FC<EditableCellProps> = ({
...
@@ -196,7 +197,7 @@ const EditableCell: React.FC<EditableCellProps> = ({
rules=
{
[
rules=
{
[
{
{
required
:
true
,
required
:
true
,
message
:
`
单价是必填的
`
,
message
:
`
此项为必填项
`
,
},
},
]
}
]
}
>
>
...
@@ -215,7 +216,8 @@ const EditableCell: React.FC<EditableCellProps> = ({
...
@@ -215,7 +216,8 @@ const EditableCell: React.FC<EditableCellProps> = ({
const
OrderProductTable
:
React
.
FC
<
OrderProductTableProps
>
=
({
editable
})
=>
{
const
OrderProductTable
:
React
.
FC
<
OrderProductTableProps
>
=
({
editable
})
=>
{
const
{
ctl
,
data
,
preview
}
=
useContext
(
OrderDetailContext
)
const
{
ctl
,
data
,
preview
}
=
useContext
(
OrderDetailContext
)
const
{
orderProductRequests
=
[]
}
=
data
||
{}
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
productComponents
=
{
const
productComponents
=
{
body
:
{
body
:
{
...
@@ -301,7 +303,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
...
@@ -301,7 +303,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
key
:
'unit'
,
key
:
'unit'
,
},
},
{
{
title
:
'单价(元)'
,
title
:
creditsCommodity
?
'所需积分'
:
'单价(元)'
,
dataIndex
:
'price'
,
dataIndex
:
'price'
,
align
:
'left'
,
align
:
'left'
,
key
:
'price'
key
:
'price'
...
@@ -314,7 +316,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
...
@@ -314,7 +316,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
},
},
{
{
title
:
'采购数量'
,
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
align
:
'center'
,
key
:
'purchaseCount'
,
key
:
'purchaseCount'
,
...
...
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
b9e486a5
...
@@ -17,145 +17,6 @@ export interface OrderSaleRecordProps {
...
@@ -17,145 +17,6 @@ export interface OrderSaleRecordProps {
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
const
outOrderCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
},
{
title
:
'单价'
,
dataIndex
:
'unitPrice'
,
align
:
'center'
,
key
:
'unitPrice'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'含税'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
render
:
()
=>
'是'
},
{
title
:
'金额'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'已发货'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'未发货'
,
dataIndex
:
'notDelivered'
,
align
:
'center'
,
key
:
'notDelivered'
,
},
{
title
:
'已收货'
,
dataIndex
:
'goodsReceived'
,
align
:
'center'
,
key
:
'goodsReceived'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
const
sideChildrenCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'发货数量'
,
dataIndex
:
'deliverGoodsCount'
,
align
:
'center'
,
key
:
'deliverGoodsCount'
,
},
{
title
:
'入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
key
:
'storageCount'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
// 订单发货记录
// 订单发货记录
const
OrderSaleRecord
:
React
.
FC
<
OrderSaleRecordProps
>
=
(
props
)
=>
{
const
OrderSaleRecord
:
React
.
FC
<
OrderSaleRecordProps
>
=
(
props
)
=>
{
const
pathname
=
history
.
location
.
pathname
const
pathname
=
history
.
location
.
pathname
...
@@ -168,7 +29,148 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -168,7 +29,148 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 用于储存已经修改过的订单id
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
const
dataRef
=
useRef
<
any
>
([])
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
orderReceivingStatisticsResponses
,
orderDeliveryDetailsResponses
}
=
data
const
{
orderReceivingStatisticsResponses
,
orderDeliveryDetailsResponses
,
orderModel
}
=
data
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
outOrderCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
},
{
title
:
creditsCommodity
?
'所需积分'
:
'单价'
,
dataIndex
:
'unitPrice'
,
align
:
'center'
,
key
:
'unitPrice'
,
},
{
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'含税'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
render
:
()
=>
'是'
},
{
title
:
creditsCommodity
?
'所需积分小计'
:
'金额'
,
dataIndex
:
'price'
,
align
:
'center'
,
key
:
'price'
,
},
{
title
:
'已发货'
,
dataIndex
:
'delivered'
,
align
:
'center'
,
key
:
'delivered'
,
},
{
title
:
'未发货'
,
dataIndex
:
'notDelivered'
,
align
:
'center'
,
key
:
'notDelivered'
,
},
{
title
:
'已收货'
,
dataIndex
:
'goodsReceived'
,
align
:
'center'
,
key
:
'goodsReceived'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
const
sideChildrenCols
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'发货数量'
,
dataIndex
:
'deliverGoodsCount'
,
align
:
'center'
,
key
:
'deliverGoodsCount'
,
},
{
title
:
'入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
key
:
'storageCount'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
key
:
'differenceCount'
,
},
]
const
sideOrderCols
:
any
[]
=
[
const
sideOrderCols
:
any
[]
=
[
{
{
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
b9e486a5
...
@@ -85,7 +85,9 @@ const warehouseColumns: any[] = [
...
@@ -85,7 +85,9 @@ const warehouseColumns: any[] = [
const
modalPriceActions
=
createFormActions
()
const
modalPriceActions
=
createFormActions
()
// 总计金额联动框
// 总计金额联动框
export
const
MoneyTotalBox
=
({
dataSource
,
isEditData
})
=>
{
export
const
MoneyTotalBox
=
({
dataSource
,
isEditData
})
=>
{
const
{
orderProductRequests
=
[],
receiverAddressId
,
freight
,
amount
}
=
dataSource
||
{}
const
{
orderProductRequests
=
[],
receiverAddressId
,
freight
,
amount
,
orderModel
}
=
dataSource
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
modelRef
=
useRef
<
any
>
({})
const
modelRef
=
useRef
<
any
>
({})
const
[
freePrice
,
setFreePrice
]
=
useState
<
number
>
(
freight
||
0
)
const
[
freePrice
,
setFreePrice
]
=
useState
<
number
>
(
freight
||
0
)
const
[
sum
,
setSum
]
=
useState
<
number
>
(
0
)
const
[
sum
,
setSum
]
=
useState
<
number
>
(
0
)
...
@@ -141,7 +143,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
...
@@ -141,7 +143,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
return
<
RowStyle
>
return
<
RowStyle
>
<
Col
span=
{
2
}
>
<
Col
span=
{
2
}
>
<
div
>
合计金额
</
div
>
<
div
>
{
creditsCommodity
?
'合计所需积分'
:
'合计金额'
}
</
div
>
<
div
>
{
sum
}
</
div
>
<
div
>
{
sum
}
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
2
}
>
<
Col
span=
{
2
}
>
...
@@ -149,7 +151,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
...
@@ -149,7 +151,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
<
div
>
{
freePrice
}
</
div
>
<
div
>
{
freePrice
}
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
2
}
>
<
Col
span=
{
2
}
>
<
div
>
总计金额
</
div
>
<
div
>
{
creditsCommodity
?
'总计所需积分'
:
'总计金额'
}
</
div
>
<
div
>
{
amountMoney
}
</
div
>
<
div
>
{
amountMoney
}
</
div
>
</
Col
>
</
Col
>
<
ModalForm
<
ModalForm
...
@@ -267,11 +269,11 @@ const EditableCell: React.FC<EditableCellProps> = ({
...
@@ -267,11 +269,11 @@ const EditableCell: React.FC<EditableCellProps> = ({
rules=
{
[
rules=
{
[
{
{
required
:
true
,
required
:
true
,
message
:
`
单价是必填的
`
,
message
:
`
此项为必填项
`
,
},
},
{
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'
价格
数值仅限三位小数'
,
message
:
'数值仅限三位小数'
,
}
}
]
}
]
}
>
>
...
@@ -291,7 +293,8 @@ const EditableCell: React.FC<EditableCellProps> = ({
...
@@ -291,7 +293,8 @@ const EditableCell: React.FC<EditableCellProps> = ({
const
SaleOrderProductTable
:
React
.
FC
<
OrderProductTableProps
>
=
(
props
)
=>
{
const
SaleOrderProductTable
:
React
.
FC
<
OrderProductTableProps
>
=
(
props
)
=>
{
const
{
ctl
,
data
}
=
useContext
(
OrderDetailContext
)
const
{
ctl
,
data
}
=
useContext
(
OrderDetailContext
)
const
{
page_type
}
=
usePageStatus
()
const
{
page_type
}
=
usePageStatus
()
const
{
orderProductRequests
=
[]
}
=
data
||
{}
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
[
warehouseVisible
,
setWarehouseVisible
]
=
useState
(
false
)
const
[
warehouseVisible
,
setWarehouseVisible
]
=
useState
(
false
)
const
[
checkProductId
,
setCheckProductId
]
=
useState
(
0
)
// 选中的商品id
const
[
checkProductId
,
setCheckProductId
]
=
useState
(
0
)
// 选中的商品id
...
@@ -392,7 +395,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
@@ -392,7 +395,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
key
:
'unit'
,
key
:
'unit'
,
},
},
{
{
title
:
'单价(元)'
,
title
:
creditsCommodity
?
'所需积分'
:
'单价(元)'
,
dataIndex
:
'price'
,
dataIndex
:
'price'
,
align
:
'left'
,
align
:
'left'
,
key
:
'price'
,
key
:
'price'
,
...
@@ -406,7 +409,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
@@ -406,7 +409,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
},
},
{
{
title
:
'采购数量'
,
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
align
:
'center'
,
key
:
'purchaseCount'
key
:
'purchaseCount'
...
...
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