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
436b13df
Commit
436b13df
authored
Dec 01, 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
f77c3000
680e09e8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
528 additions
and
587 deletions
+528
-587
demandPosts.ts
config/routes/tranactionRoute/demandPosts.ts
+2
-16
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
...ingsPanel/propsSettings/components/GoodsSetting/index.tsx
+21
-27
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+2
-1
index.tsx
...es/lxMall/components/Filter/components/Category/index.tsx
+14
-14
index.tsx
...Mall/components/Filter/components/CommodityType/index.tsx
+4
-4
index.tsx
src/pages/lxMall/order/index.tsx
+28
-25
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+20
-18
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
addGoods.tsx
...tion/enquirySubmit/addDemandOrder/components/addGoods.tsx
+1
-3
index.tsx
src/pages/transaction/enquirySubmit/addDemandOrder/index.tsx
+79
-151
baseForm.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/baseForm.tsx
+0
-0
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+0
-0
index.ts
src/store/filter/index.ts
+1
-1
No files found.
config/routes/tranactionRoute/demandPosts.ts
View file @
436b13df
...
...
@@ -23,16 +23,9 @@ export default [
},
// 待新建需求单 - 列表
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/
toAddSubmitList
'
,
path
:
'/memberCenter/tranactionAbility/enquirySubmit/
addDemandOrder
'
,
name
:
'toAddSubmitList'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit'
},
// 待新增需求单-新增
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList/add'
,
name
:
'addEnquiry'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit/detail'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/enquirySubmit/addDemandOrder'
},
// 待新增需求单-新增
{
...
...
@@ -48,13 +41,6 @@ export default [
component
:
'@/pages/transaction/enquirySubmit/addDemandOrder/addForm'
,
hideInMenu
:
true
,
},
// 待新增需求单-编辑
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList/edit'
,
name
:
'editEnquiry'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit/detail'
,
hideInMenu
:
true
,
},
// 待新建需求单 - 查看需求单号
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList/preview'
,
...
...
src/constants/index.ts
View file @
436b13df
...
...
@@ -294,10 +294,10 @@ export const ORDER_TYPE = ['',
'需求采购'
,
'现货采购'
,
'集采'
,
'积分兑换'
,
'渠道直采'
,
'渠道现货'
,
'渠道积分兑换'
,
'积分兑换'
,
'渠道积分兑换'
]
// 提货方式
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
436b13df
...
...
@@ -718,7 +718,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
valuePropName=
"checked"
>
<
Checkbox
>
允许使用会员折扣价购买
</
Checkbox
>
<
Checkbox
disabled=
{
planPrice
===
3
}
>
允许使用会员折扣价购买
</
Checkbox
>
</
Form
.
Item
>
</
Form
>
{
/* 批量设置按钮 */
}
...
...
src/pages/commodity/products/directChannel.tsx
View file @
436b13df
...
...
@@ -62,13 +62,14 @@ const DirectChannel: React.FC<{}> = () => {
title
:
'ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
60
},
{
title
:
'商品名称'
,
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'name'
],
key
:
'id'
,
className
:
'commonPickColor'
,
width
:
30
0
,
width
:
24
0
,
ellipsis
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`
}
...
...
@@ -77,12 +78,12 @@ const DirectChannel: React.FC<{}> = () => {
</
EyePreview
>
},
{
title
:
'品类'
,
title
:
'
商品
品类'
,
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'customerCategory'
,
'name'
],
key
:
'id'
,
},
{
title
:
'品牌'
,
title
:
'
商品
品牌'
,
dataIndex
:
[
'channelCommodity'
,
'commodity'
,
'brand'
,
'name'
],
key
:
'id'
,
},
...
...
@@ -151,7 +152,7 @@ const DirectChannel: React.FC<{}> = () => {
render
:
(
text
,
record
)
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
{
title
:
'状态'
,
title
:
'
商品
状态'
,
dataIndex
:
'status'
,
key
:
'id'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
...
...
src/pages/commodity/products/index.tsx
View file @
436b13df
...
...
@@ -68,23 +68,24 @@ const Products: React.FC<{}> = () => {
title
:
'ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
width
:
60
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
width
:
30
0
,
width
:
24
0
,
ellipsis
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
a
title=
{
text
}
onClick=
{
()
=>
handleSee
(
record
)
}
>
{
text
}
<
EyeOutlined
/></
a
>
},
{
title
:
'品类'
,
title
:
'
商品
品类'
,
dataIndex
:
[
'customerCategory'
,
'name'
],
key
:
'customerCategory.name'
,
},
{
title
:
'品牌'
,
title
:
'
商品
品牌'
,
dataIndex
:
[
'brand'
,
'name'
],
key
:
'brand.name'
,
},
...
...
@@ -149,7 +150,7 @@ const Products: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
text
&&
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
{
title
:
'
审核
状态'
,
title
:
'
商品
状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
...
...
@@ -199,6 +200,7 @@ const Products: React.FC<{}> = () => {
{
title
:
'操作'
,
dataIndex
:
'option'
,
width
:
160
,
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
}
];
...
...
src/pages/commodity/products/schema/channelSchema.tsx
View file @
436b13df
...
...
@@ -124,27 +124,27 @@ export const channelSchema: ISchema = {
// style: { width: '174px' },
},
},
priceTypeList
:
{
type
:
'string'
,
enum
:
[
{
label
:
'现货价格'
,
value
:
1
,
},
// {
// label: '价格需要询价',
// value: 2,
// },
{
label
:
'积分兑换商品'
,
value
:
3
,
}
],
'x-component-props'
:
{
placeholder
:
'产品定价'
,
// style: { width: '174px' },
},
},
//
priceTypeList: {
//
type: 'string',
//
enum: [
//
{
//
label: '现货价格',
//
value: 1,
//
},
//
// {
//
// label: '价格需要询价',
//
// value: 2,
//
// },
//
{
//
label: '积分兑换商品',
//
value: 3,
//
}
//
],
//
'x-component-props': {
//
placeholder: '产品定价',
//
// style: { width: '174px' },
//
},
//
},
'NO_NAME_FIELD_$2'
:
{
type
:
'object'
,
'x-component'
:
'layout'
,
...
...
src/pages/editor/settingsPanel/propsSettings/components/GoodsSetting/index.tsx
View file @
436b13df
...
...
@@ -33,7 +33,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
[
form
]
=
Form
.
useForm
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
operationType
,
setOprationType
]
=
useState
<
string
>
(
OPERATION_TYPE
.
list
)
// 操作类型:list:显示已选列表;select:选择列表
le
t
[
isHighSearch
,
setIsHighSearch
]
=
useState
(
false
)
cons
t
[
isHighSearch
,
setIsHighSearch
]
=
useState
(
false
)
const
{
templateid
,
categoryid
,
goodsList
=
[],
templateType
}
=
props
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
...
...
@@ -49,33 +49,27 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
[
categoryResponseList
,
setCategoryResponseList
]
=
useState
<
any
>
([])
const
[
noSelectBrands
,
setNoSelectBrands
]
=
useState
<
any
[]
>
([])
const
changeNewProps
=
(
key
:
string
,
data
:
any
)
=>
{
const
newProps
=
{
...
props
}
newProps
[
key
]
=
data
setNewProps
(
newProps
)
}
useEffect
(()
=>
{
fetchBrandsList
()
fetchCategoryList
()
},
[])
const
fetchCategoryList
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
categoryId
:
categoryid
,
templateId
:
templateid
}
setSpinLoading
(
true
)
//@ts-ignore
PublicApi
.
getTemplatePlatformFindCategoryList
(
param
).
then
(
res
=>
{
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
setSpinLoading
(
false
)
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
setCategoryResponseList
(
data
.
categoryBOList
||
[])
}
})
}
const
fetchBrandsList
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
...
...
@@ -83,7 +77,6 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
pageSize
:
100
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindBrandList
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
...
...
@@ -98,7 +91,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
},
[
filterParam
,
current
])
const
fetchGoodsList
=
()
=>
{
let
param
=
{
let
param
:
any
=
{
type
:
0
,
templateId
:
templateid
,
categoryId
:
categoryid
,
...
...
@@ -115,13 +108,14 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
getFn
=
PublicApi
.
getTemplateShopFindGoodsList
}
//@ts-ignore
setSpinLoading
(
true
)
getFn
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
dataInfo
=
res
.
data
setTotalCount
(
dataInfo
.
totalCount
)
setNoSelectGoods
(
dataInfo
.
data
||
[])
}
setSpinLoading
(
false
)
})
}
...
...
@@ -154,7 +148,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
handleSearch
=
()
=>
{
setCurrent
(
1
)
le
t
param
=
filterProps
(
form
.
getFieldsValue
())
cons
t
param
=
filterProps
(
form
.
getFieldsValue
())
setFilterParam
(
param
)
}
...
...
@@ -194,7 +188,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
// if (selectGoodsList.length <= 0) {
// message.error("请选择要推荐的商品")
// return
// } else
// } else
if
(
selectGoodsList
.
length
>
10
)
{
message
.
error
(
"最多只能推荐10件商品"
)
return
...
...
@@ -228,13 +222,13 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
saveGoods
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
templateId
:
templateid
,
categoryId
:
categoryid
,
}
le
t
ids
:
number
[]
=
[]
cons
t
ids
:
number
[]
=
[]
for
(
le
t
item
of
selectGoodsList
)
{
for
(
cons
t
item
of
selectGoodsList
)
{
ids
.
push
(
item
.
goodsId
)
}
param
.
goodsIds
=
ids
...
...
@@ -258,8 +252,8 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const
handleChangeOprationType
=
(
type
:
string
)
=>
{
setOprationType
(
type
)
le
t
keys
:
number
[]
=
[]
for
(
le
t
item
of
selectGoodsList
)
{
cons
t
keys
:
number
[]
=
[]
for
(
cons
t
item
of
selectGoodsList
)
{
keys
.
push
(
item
.
goodsId
)
}
setGoodsIds
(
keys
)
...
...
@@ -314,7 +308,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
</
Col
>
<
Col
>
<
Button
onClick=
{
()
=>
setIsHighSearch
(
isHighSearch
=
!
isHighSearch
)
}
>
高级筛选
{
isHighSearch
?
<
CaretUpOutlined
/>
:
<
CaretDownOutlined
/>
}
</
Button
>
<
Button
onClick=
{
()
=>
setIsHighSearch
(
!
isHighSearch
)
}
>
高级筛选
{
isHighSearch
?
<
CaretUpOutlined
/>
:
<
CaretDownOutlined
/>
}
</
Button
>
</
Col
>
<
Col
>
<
Button
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
...
...
@@ -336,7 +330,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
>
<
Select
placeholder=
"品类"
style=
{
{
width
:
180
}
}
>
{
categoryResponseList
.
map
((
item
,
index
)
=>
<
Select
.
Option
k
ye
=
{
`select_category_item_${index}`
}
value=
{
item
.
categoryId
}
>
{
item
.
categoryName
}
</
Select
.
Option
>)
categoryResponseList
.
map
((
item
,
index
)
=>
<
Select
.
Option
k
ey
=
{
`select_category_item_${index}`
}
value=
{
item
.
categoryId
}
>
{
item
.
categoryName
}
</
Select
.
Option
>)
}
</
Select
>
</
Form
.
Item
>
...
...
@@ -348,7 +342,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
>
<
Select
placeholder=
"品牌"
style=
{
{
width
:
180
}
}
>
{
noSelectBrands
.
map
((
item
,
index
)
=>
(<
Select
.
Option
k
ye
=
{
`select_brand_item_${index}`
}
value=
{
item
.
brandId
}
>
{
item
.
brandName
}
</
Select
.
Option
>))
noSelectBrands
.
map
((
item
,
index
)
=>
(<
Select
.
Option
k
ey
=
{
`select_brand_item_${index}`
}
value=
{
item
.
brandId
}
>
{
item
.
brandName
}
</
Select
.
Option
>))
}
</
Select
>
</
Form
.
Item
>
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
436b13df
...
...
@@ -501,7 +501,8 @@ const CommodityDetail = (props) => {
stockCount
:
stockCount
,
minOrder
:
commodityDetail
.
minOrder
,
commodityPic
:
attrAndValList
.
commodityPic
?
attrAndValList
.
commodityPic
[
0
]
:
commodityDetail
.
mainPic
,
attribute
:
attrAndValList
.
attributeAndValueList
attribute
:
attrAndValList
.
attributeAndValueList
,
isMemberPrice
:
commodityDetail
.
isMemberPrice
?
1
:
0
}
const
sessionKey
=
`
${
commodityDetail
.
id
}${
new
Date
().
getTime
()}
`
...
...
src/pages/lxMall/components/Filter/components/Category/index.tsx
View file @
436b13df
...
...
@@ -34,9 +34,9 @@ const Category: React.FC<CategoryPropsType> = (props) => {
setLastCategoryId
(
null
)
setSelectAttrbuteList
([])
}
else
{
le
t
initKeys
=
[]
cons
t
initKeys
=
[]
// let initAttrKeys = []
for
(
le
t
item
of
filterList
)
{
for
(
cons
t
item
of
filterList
)
{
if
(
item
.
type
===
FILTER_TYPE
.
category
)
{
initKeys
.
push
(
String
(
item
.
key
))
}
...
...
@@ -50,7 +50,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect
(()
=>
{
let
getCategoryListFn
le
t
param
:
any
=
{}
cons
t
param
:
any
=
{}
let
headers
=
{}
/**
* 根据不通过的页面类型,请求不同的品类接口
...
...
@@ -105,7 +105,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
useEffect
(()
=>
{
if
(
lastCategoryId
)
{
le
t
param
:
any
=
{
cons
t
param
:
any
=
{
categoryId
:
lastCategoryId
}
let
getAttributeFn
...
...
@@ -160,8 +160,8 @@ const Category: React.FC<CategoryPropsType> = (props) => {
if
(
!
list
)
{
return
[]
}
le
t
initExpandKeys
=
[]
le
t
result
:
any
=
list
.
map
(
item
=>
{
cons
t
initExpandKeys
=
[]
cons
t
result
:
any
=
list
.
map
(
item
=>
{
initExpandKeys
.
push
(
item
.
id
)
return
{
title
:
item
.
title
,
...
...
@@ -200,7 +200,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
setAttributeList
([])
onFilter
({
type
:
FILTER_TYPE
.
attribute
,
key
:
[]
,
key
:
null
,
title
:
``
})
}
...
...
@@ -217,12 +217,12 @@ const Category: React.FC<CategoryPropsType> = (props) => {
const
getDetailById
=
(
attrId
,
attrValId
,
state
=
2
)
=>
{
let
detail
=
{}
for
(
le
t
item
of
attributeList
)
{
for
(
cons
t
item
of
attributeList
)
{
if
(
item
.
id
===
attrId
)
{
if
(
state
===
1
)
{
detail
=
item
}
else
{
for
(
le
t
childItem
of
item
.
attributeValueList
)
{
for
(
cons
t
childItem
of
item
.
attributeValueList
)
{
if
(
childItem
.
value
===
attrValId
)
{
detail
=
childItem
}
...
...
@@ -235,7 +235,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
const
getSelectAttributeList
=
(
selectList
)
=>
{
let
ids
=
[]
for
(
le
t
item
of
selectList
)
{
for
(
cons
t
item
of
selectList
)
{
ids
=
[...
ids
,
...
item
.
customerAttributeValueList
.
map
(
childItem
=>
childItem
.
id
)]
}
return
ids
...
...
@@ -243,12 +243,12 @@ const Category: React.FC<CategoryPropsType> = (props) => {
const
handleChange
=
(
attrId
,
checkedList
)
=>
{
let
tempSelect
=
[...
initSelectAttributeList
]
le
t
attrInfo
:
any
=
getDetailById
(
attrId
,
attrId
,
1
)
le
t
tempItem
=
{
cons
t
attrInfo
:
any
=
getDetailById
(
attrId
,
attrId
,
1
)
cons
t
tempItem
=
{
customerAttributeId
:
attrId
,
customerAttributeName
:
attrInfo
.
name
,
customerAttributeValueList
:
checkedList
.
map
(
item
=>
{
le
t
detail
:
any
=
getDetailById
(
attrId
,
item
)
cons
t
detail
:
any
=
getDetailById
(
attrId
,
item
)
return
{
id
:
detail
.
value
,
name
:
detail
.
label
...
...
@@ -268,7 +268,7 @@ const Category: React.FC<CategoryPropsType> = (props) => {
tempSelect
.
push
(
tempItem
)
}
le
t
keys
=
getSelectAttributeList
(
tempSelect
)
cons
t
keys
=
getSelectAttributeList
(
tempSelect
)
setSelectAttrbuteList
(
keys
)
tempSelect
=
tempSelect
.
filter
(
item
=>
item
.
customerAttributeValueList
.
length
>
0
)
onFilter
({
...
...
src/pages/lxMall/components/Filter/components/CommodityType/index.tsx
View file @
436b13df
...
...
@@ -27,8 +27,8 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
if
(
isEmpty
(
filterList
))
{
setSelectKeys
([])
}
else
{
le
t
initKeys
=
[]
for
(
le
t
item
of
filterList
)
{
cons
t
initKeys
=
[]
for
(
cons
t
item
of
filterList
)
{
if
(
item
.
type
===
FILTER_TYPE
.
commodityType
)
{
initKeys
.
push
(
Number
(
item
.
key
))
}
...
...
@@ -54,7 +54,7 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
}
else
{
onFilter
({
type
:
FILTER_TYPE
.
commodityType
,
key
:
[]
,
key
:
false
,
title
:
''
})
}
...
...
@@ -62,7 +62,7 @@ const CommodityType: React.FC<CommodityTypePropsType> = (props) => {
const
getItemText
=
(
key
:
number
)
=>
{
let
result
=
""
for
(
le
t
item
of
styleOptions
)
{
for
(
cons
t
item
of
styleOptions
)
{
if
(
item
.
value
===
key
)
{
result
=
item
.
label
}
...
...
src/pages/lxMall/order/index.tsx
View file @
436b13df
...
...
@@ -73,11 +73,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
},
[])
const
initOrderInfo
=
async
()
=>
{
le
t
result
=
[]
cons
t
result
=
[]
const
sessionOrderInfo
:
any
=
await
getOrderInfo
(
spam_id
)
for
(
le
t
item
of
sessionOrderInfo
.
orderList
)
{
le
t
tempOrderList
=
[]
for
(
le
t
orderItem
of
item
.
orderList
)
{
for
(
cons
t
item
of
sessionOrderInfo
.
orderList
)
{
cons
t
tempOrderList
=
[]
for
(
cons
t
orderItem
of
item
.
orderList
)
{
let
resData
:
any
=
{}
if
(
orderItem
.
logistics
?.
sendAddress
)
{
try
{
...
...
@@ -103,17 +103,17 @@ const Order: React.FC<OrderPropsType> = (props) => {
// 是否选用电子合同
if
(
data
.
isElectronicContract
)
{
setElectronicContractId
(
data
.
electronicContractId
)
if
(
!!
sessionStorage
.
getItem
(
`contract
${
spam_id
}
`
))
{
if
(
sessionStorage
.
getItem
(
`contract
${
spam_id
}
`
))
{
setContractInfo
(
JSON
.
parse
(
sessionStorage
.
getItem
(
`contract
${
spam_id
}
`
)))
setIsElectronicContract
(
true
)
}
else
{
// 根据电子合同模板id获取生成电子合同
let
param
=
{
const
param
:
any
=
{
contractTemplateId
:
data
.
electronicContractId
,
signMemberId
:
userInfo
?.
memberId
,
orderNo
:
new
Date
().
getTime
()
}
//@ts-ignore
const
signRes
=
await
PublicApi
.
postOrderSignatureSignContractCreate
(
param
)
const
signData
:
any
=
signRes
.
data
if
(
signRes
.
code
===
1000
)
{
...
...
@@ -173,8 +173,8 @@ const Order: React.FC<OrderPropsType> = (props) => {
const
getCommodityAmount
=
()
=>
{
let
amount
=
0
for
(
le
t
item
of
orderInfo
.
orderList
)
{
for
(
le
t
orderItem
of
item
.
orderList
)
{
for
(
cons
t
item
of
orderInfo
.
orderList
)
{
for
(
cons
t
orderItem
of
item
.
orderList
)
{
amount
+=
(
orderItem
.
unitPrice
*
orderItem
.
count
)
}
}
...
...
@@ -187,10 +187,10 @@ const Order: React.FC<OrderPropsType> = (props) => {
const
getLogisticsFeeAnync
=
async
()
=>
{
if
(
selectAddressInfo
)
{
le
t
orderProductList
=
[]
for
(
le
t
item
of
orderInfo
.
orderList
)
{
for
(
le
t
orderItem
of
item
.
orderList
)
{
le
t
templateId
=
orderItem
.
logistics
?.
templateId
cons
t
orderProductList
=
[]
for
(
cons
t
item
of
orderInfo
.
orderList
)
{
for
(
cons
t
orderItem
of
item
.
orderList
)
{
cons
t
templateId
=
orderItem
.
logistics
?.
templateId
// 判断是否物流的方式和由买家承担费用并使用了运费模板
if
(
orderItem
.
logistics
?.
deliveryType
===
1
&&
orderItem
.
logistics
?.
carriageType
===
2
&&
orderItem
.
logistics
?.
useTemplate
&&
templateId
)
{
orderProductList
.
push
({
...
...
@@ -202,7 +202,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
}
if
(
orderProductList
.
length
>
0
)
{
le
t
params
:
any
=
{
cons
t
params
:
any
=
{
orderProductList
,
receiverAddressId
:
selectAddressInfo
.
id
}
...
...
@@ -210,7 +210,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
const
res
:
any
=
await
PublicApi
.
postLogisticsFreightTemplateCalFreightPrice
(
params
)
message
.
destroy
()
setLogisticsFee
(
Number
(
res
.
data
))
}
catch
(
error
)
{
}
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
}
}
...
...
@@ -261,7 +263,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
* 提交订单
*/
const
submitOrder
=
(
signatureLogId
?:
number
)
=>
{
le
t
params
:
any
=
{
cons
t
params
:
any
=
{
orderModel
:
getOrderMode
(),
// 下单模式
needTheInvoice
:
needTheInvoice
?
1
:
0
,
}
...
...
@@ -278,12 +280,12 @@ const Order: React.FC<OrderPropsType> = (props) => {
// params.addres = selectAddressInfo.address
}
le
t
orderProductRequests
=
[]
le
t
purchaseIds
=
[]
for
(
le
t
item
of
orderList
)
{
cons
t
orderProductRequests
=
[]
cons
t
purchaseIds
=
[]
for
(
cons
t
item
of
orderList
)
{
for
(
le
t
orderItem
of
item
.
orderList
)
{
le
t
temp
:
any
=
{}
for
(
cons
t
orderItem
of
item
.
orderList
)
{
cons
t
temp
:
any
=
{}
purchaseIds
.
push
(
orderItem
.
purchaseId
)
temp
.
imgUrl
=
orderItem
.
commodityPic
temp
.
productId
=
orderItem
.
id
...
...
@@ -299,6 +301,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
temp
.
minOrder
=
orderItem
.
minOrder
temp
.
memberId
=
orderInfo
.
supplyMembersId
temp
.
memberRoleId
=
orderInfo
.
supplyMembersRoleId
temp
.
isMemberPrice
=
orderItem
.
isMemberPrice
orderProductRequests
.
push
(
temp
)
}
}
...
...
@@ -316,7 +319,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
params
.
theInvoiceId
=
selectInvoiceInfo
.
id
params
.
theInvoiceInfo
=
selectInvoiceInfo
}
if
(
!!
orderInfo
.
purchaseOrder
)
{
if
(
orderInfo
.
purchaseOrder
)
{
params
.
idList
=
purchaseIds
params
.
productType
=
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
?
2
:
1
}
...
...
@@ -388,13 +391,13 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
const
handleSignModalConfirm
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
contractTemplateId
:
electronicContractId
,
contractName
:
contractInfo
.
contractName
,
contractUrl
:
contractInfo
.
contractUrl
,
}
setAgreeSignLoading
(
true
)
// @ts-ignore
PublicApi
.
postOrderSignatureOrderSettleSign
(
param
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
...
...
@@ -409,7 +412,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
const
pollingCheckStatus
=
(
signatureLogId
)
=>
{
le
t
param
=
{
cons
t
param
=
{
signatureLogId
}
PublicApi
.
getOrderSignatureOrderSettleSignDetail
(
param
).
then
(
res
=>
{
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
436b13df
...
...
@@ -89,8 +89,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 初始化进货单数据
* @param list
* @param initState
* @param list
* @param initState
*/
const
initPurchaseList
=
async
(
list
:
GetSearchShopPurchaseGetPurchaseListResponse
)
=>
{
let
result
=
[]
...
...
@@ -119,7 +119,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
price
:
isMemberPrice
?
Number
(
unitPrice
[
key
])
*
Number
(
parameter
)
:
unitPrice
[
key
]
})
})
item
.
commodityUnitPrice
[
'priceRange'
]
=
tempPriceRange
tempItem
.
orderList
=
[...
tempItem
.
orderList
,
item
]
tempResult
.
push
(
tempItem
)
...
...
@@ -234,8 +234,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 修改购买数量
* @param count
* @param id
* @param count
* @param id
*/
const
handleCountChange
=
(
count
:
number
,
id
:
number
,
type
:
string
)
=>
{
handleChangeFinishCount
(
count
,
id
)
...
...
@@ -273,8 +273,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 修改商品购买数量
* @param count
* @param id
* @param count
* @param id
*/
const
handleChangeFinishCount
=
(
count
,
id
)
=>
{
const
result
=
orderList
.
map
(
item
=>
{
...
...
@@ -291,8 +291,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 计算单个商品总价格
* @param priceRange
* @param count
* @param priceRange
* @param count
*/
const
computeItemPrice
=
(
priceRange
,
count
)
=>
{
count
=
Number
(
count
)
...
...
@@ -314,7 +314,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 删除进货单的商品
* @param id
* @param id
*/
const
handleDeleteItem
=
(
id
:
number
)
=>
{
Modal
.
confirm
({
...
...
@@ -387,7 +387,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 删除指定id的商品
* @param ids
* @param ids
*/
const
deleteListItems
=
(
ids
:
number
[])
=>
{
const
newOrderList
=
JSON
.
parse
(
JSON
.
stringify
(
orderList
))
...
...
@@ -436,8 +436,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 获取用户权益参数
* @param memberId
* @param memberRoleId
* @param memberId
* @param memberRoleId
*/
const
getMemberCredit
=
(
memberId
,
memberRoleId
)
=>
{
return
new
Promise
((
resolve
)
=>
{
...
...
@@ -455,10 +455,10 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
/**
* 获取支付方式
* @param memberId
* @param memberId
*/
const
getPayWayListByMemberId
=
(
memberId
:
number
)
=>
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
memberId
)
{
resolve
([])
return
...
...
@@ -469,6 +469,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
PublicApi
.
getPayPayWayList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
initPayWayList
(
res
.
data
))
}
else
{
resolve
([])
}
})
})
...
...
@@ -539,7 +541,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
purchaseIds
.
push
(
item
.
id
)
productIds
.
push
(
item
.
commodityUnitPrice
.
id
)
commonLogistics
=
item
.
commodityUnitPrice
.
commodity
.
logistics
if
(
item
.
commodityUnitPrice
.
commodity
.
logistics
.
deliveryType
===
1
)
{
hasLogistics
=
true
logisticsInfo
=
item
.
commodityUnitPrice
.
commodity
.
logistics
...
...
@@ -558,7 +560,8 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
brand
:
item
.
commodityUnitPrice
.
commodity
.
brand
.
name
,
commodityPic
:
item
.
commodityUnitPrice
.
commodity
.
mainPic
,
attribute
:
item
.
commodityUnitPrice
.
attributeAndValueList
,
stockCount
:
item
.
stockCount
||
0
stockCount
:
item
.
stockCount
||
0
,
isMemberPrice
:
item
.
commodityUnitPrice
.
commodity
.
isMemberPrice
?
1
:
0
}
if
(
item
.
commodityUnitPrice
.
commodity
.
isMemberPrice
)
{
...
...
@@ -582,7 +585,6 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
orderList
:
buyOrderlist
}]
}
buyOrderInfo
.
payWayList
=
await
getPayWayListByMemberId
(
selectItem
.
memberId
)
PublicApi
.
postOrderIsWorkFlow
({
productIds
,
memberId
:
selectItem
.
memberId
}).
then
(
res
=>
{
...
...
src/pages/repositories/schema/index.tsx
View file @
436b13df
...
...
@@ -472,6 +472,18 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
},
required
:
true
,
title
:
'分配仓位库存'
,
"x-rules"
:
[
{
validator
:
value
=>
{
return
value
>
Number
.
MAX_SAFE_INTEGER
},
message
:
'仓位库存数值已超出最大限度'
,
},
{
pattern
:
/^
\d
+
(\.\d{1,3})?
$/
,
message
:
'仓位库存数值仅限三位小数'
,
},
]
},
inventoryDeductWay
:
{
type
:
'radio'
,
...
...
src/pages/transaction/components/StatusColors/index.tsx
View file @
436b13df
...
...
@@ -104,6 +104,10 @@ const StatusColors:React.FC<StatusColorsProps> = (props) => {
const
{
status
,
type
}
=
props
const
statusText
=
typeMaps
[
type
]
const
statusShowColor
=
matchStatusColor
(
status
)
// 单独处理支付比例 确认到账的状态颜色
if
(
type
===
'payOut'
&&
status
===
3
)
{
return
(<
Tag
color=
"#41CC9E"
>
{
statusText
[
status
]
}
</
Tag
>)
}
return
(<
Tag
color=
{
statusShowColor
}
>
{
statusText
[
status
]
}
</
Tag
>)
}
...
...
src/pages/transaction/components/orderDeleveRecord/index.tsx
View file @
436b13df
...
...
@@ -11,145 +11,6 @@ import { history } from 'umi'
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
)
=>
{
...
...
@@ -163,7 +24,149 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const
dataRef
=
useRef
<
any
>
([])
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
[]
=
[
{
title
:
'发货批次'
,
...
...
src/pages/transaction/components/orderProductTable/index.tsx
View file @
436b13df
...
...
@@ -44,7 +44,8 @@ const RowStyle = styled(props => <Row style={{marginTop: 12}} justify='end' {...
const
modalPriceActions
=
createFormActions
()
// 总计金额联动框
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
)
...
...
@@ -84,7 +85,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
// }, [orderProductRequests])
return
<
RowStyle
>
<
Col
span=
{
2
}
>
<
div
>
合计金额
</
div
>
<
div
>
{
creditsCommodity
?
'合计所需积分'
:
'合计金额'
}
</
div
>
<
div
>
{
sum
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
...
...
@@ -93,7 +94,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
<
div
>
{
freight
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
<
div
>
总计金额
</
div
>
<
div
>
{
creditsCommodity
?
'总计所需积分'
:
'总计金额'
}
</
div
>
<
div
>
{
amountMoney
}
</
div
>
</
Col
>
{
/* <ModalForm
...
...
@@ -196,7 +197,7 @@ const EditableCell: React.FC<EditableCellProps> = ({
rules=
{
[
{
required
:
true
,
message
:
`
单价是必填的
`
,
message
:
`
此项为必填项
`
,
},
]
}
>
...
...
@@ -215,7 +216,8 @@ const EditableCell: React.FC<EditableCellProps> = ({
const
OrderProductTable
:
React
.
FC
<
OrderProductTableProps
>
=
({
editable
})
=>
{
const
{
ctl
,
data
,
preview
}
=
useContext
(
OrderDetailContext
)
const
{
orderProductRequests
=
[]
}
=
data
||
{}
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
productComponents
=
{
body
:
{
...
...
@@ -301,7 +303,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
key
:
'unit'
,
},
{
title
:
'单价(元)'
,
title
:
creditsCommodity
?
'所需积分'
:
'单价(元)'
,
dataIndex
:
'price'
,
align
:
'left'
,
key
:
'price'
...
...
@@ -314,7 +316,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
},
{
title
:
'采购数量'
,
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
...
...
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
436b13df
...
...
@@ -17,145 +17,6 @@ export interface OrderSaleRecordProps {
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
pathname
=
history
.
location
.
pathname
...
...
@@ -168,7 +29,148 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
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
[]
=
[
{
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
436b13df
...
...
@@ -85,7 +85,9 @@ const warehouseColumns: any[] = [
const
modalPriceActions
=
createFormActions
()
// 总计金额联动框
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
[
freePrice
,
setFreePrice
]
=
useState
<
number
>
(
freight
||
0
)
const
[
sum
,
setSum
]
=
useState
<
number
>
(
0
)
...
...
@@ -141,7 +143,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
return
<
RowStyle
>
<
Col
span=
{
2
}
>
<
div
>
合计金额
</
div
>
<
div
>
{
creditsCommodity
?
'合计所需积分'
:
'合计金额'
}
</
div
>
<
div
>
{
sum
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
...
...
@@ -149,7 +151,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
<
div
>
{
freePrice
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
<
div
>
总计金额
</
div
>
<
div
>
{
creditsCommodity
?
'总计所需积分'
:
'总计金额'
}
</
div
>
<
div
>
{
amountMoney
}
</
div
>
</
Col
>
<
ModalForm
...
...
@@ -267,11 +269,11 @@ const EditableCell: React.FC<EditableCellProps> = ({
rules=
{
[
{
required
:
true
,
message
:
`
单价是必填的
`
,
message
:
`
此项为必填项
`
,
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'
价格
数值仅限三位小数'
,
message
:
'数值仅限三位小数'
,
}
]
}
>
...
...
@@ -291,7 +293,8 @@ const EditableCell: React.FC<EditableCellProps> = ({
const
SaleOrderProductTable
:
React
.
FC
<
OrderProductTableProps
>
=
(
props
)
=>
{
const
{
ctl
,
data
}
=
useContext
(
OrderDetailContext
)
const
{
page_type
}
=
usePageStatus
()
const
{
orderProductRequests
=
[]
}
=
data
||
{}
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
[
warehouseVisible
,
setWarehouseVisible
]
=
useState
(
false
)
const
[
checkProductId
,
setCheckProductId
]
=
useState
(
0
)
// 选中的商品id
...
...
@@ -392,7 +395,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
key
:
'unit'
,
},
{
title
:
'单价(元)'
,
title
:
creditsCommodity
?
'所需积分'
:
'单价(元)'
,
dataIndex
:
'price'
,
align
:
'left'
,
key
:
'price'
,
...
...
@@ -406,7 +409,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
},
{
title
:
'采购数量'
,
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
...
...
src/pages/transaction/enquirySubmit/addDemandOrder/components/addGoods.tsx
View file @
436b13df
...
...
@@ -15,11 +15,10 @@ const layout: any = {
};
export
interface
faceSetData
{
set
?:
any
,
get
?:
Function
,
currentRef
:
any
}
const
AddGoods
:
React
.
FC
<
faceSetData
>
=
(
props
)
=>
{
const
{
set
,
get
,
currentRef
}
=
props
const
{
set
,
currentRef
}
=
props
const
[
form
]
=
Form
.
useForm
();
const
[
type
,
setType
]
=
useState
<
number
>
(
0
);
const
btnname
:
Array
<
string
>
=
[
'添加商品'
,
'选择货品'
,
'导入货品'
]
...
...
@@ -105,7 +104,6 @@ const AddGoods: React.FC<faceSetData> = (props) => {
settabledata
([...
newdata
]);
setidx
(
-
1
);
}
get
([...
tabledata
,
data
])
handleModal
(
type
);
}
/** 编辑商品 */
...
...
src/pages/transaction/enquirySubmit/
toAddSubmit
/index.tsx
→
src/pages/transaction/enquirySubmit/
addDemandOrder
/index.tsx
View file @
436b13df
This diff is collapsed.
Click to expand it.
src/pages/transaction/enquirySubmit/toAddSubmit/baseForm.tsx
deleted
100644 → 0
View file @
f77c3000
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
deleted
100644 → 0
View file @
f77c3000
This diff is collapsed.
Click to expand it.
src/store/filter/index.ts
View file @
436b13df
...
...
@@ -3,7 +3,7 @@ import { PublicApi } from '@/services/api'
import
{
FILTER_TYPE
}
from
'@/constants'
interface
FilterValueType
{
key
:
string
|
string
[]
|
number
;
key
:
any
;
title
:
string
;
type
:
FILTER_TYPE
;
}
...
...
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