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
3ab1a149
Commit
3ab1a149
authored
Apr 22, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 订单详情添加订单物料区块
parent
fc19db1e
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
314 additions
and
46 deletions
+314
-46
index.ts
config/routes/index.ts
+3
-3
CustomAddress.tsx
src/components/NiceForm/components/CustomAddress.tsx
+2
-2
MultAddress.tsx
src/components/NiceForm/components/MultAddress.tsx
+16
-3
index.ts
src/constants/index.ts
+1
-1
index.ts
...ement/callForBids/addRemarkBidCommittee/constant/index.ts
+26
-22
index.tsx
...s/procurement/callForBids/addRemarkBidCommittee/index.tsx
+9
-0
index.tsx
...es/procurement/callForBids/addRemarkBidTemplate/index.tsx
+5
-1
index.tsx
...ages/procurement/callForBids/remarkBidCommittee/index.tsx
+1
-1
useSelfTable.tsx
...ment/callForBids/remarkBidTemplate/model/useSelfTable.tsx
+12
-2
index.tsx
src/pages/procurement/tender/addTender/index.tsx
+11
-0
constant.ts
src/pages/transaction/_public/order/constant.ts
+3
-0
index.tsx
...pages/transaction/components/orderDetailSection/index.tsx
+11
-1
index.tsx
src/pages/transaction/components/orderProductTable/index.tsx
+101
-3
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+109
-5
index.tsx
...Order/orderCollect/components/productModalTable/index.tsx
+2
-1
usePaymentInfo.tsx
...ction/purchaseOrder/orderCollect/model/usePaymentInfo.tsx
+2
-1
No files found.
config/routes/index.ts
View file @
3ab1a149
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
// import AfterService from './afterServiceRoute' // 售后
// import AfterService from './afterServiceRoute' // 售后
// import HandlingRoute from './handlingRoute'; // 加工能力
// import HandlingRoute from './handlingRoute'; // 加工能力
import
asyncRoutes
from
'../router.config.json'
;
import
asyncRoutes
from
'../router.config.json'
;
import
ProcurementRoute
from
'./procurementRoute'
;
//
import ProcurementRoute from './procurementRoute';
// import { callForBidsRoute } from './procurementRoute/callForBids';
// import { callForBidsRoute } from './procurementRoute/callForBids';
// import { purchaseInquiryRoute } from './procurementRoute/purchaseInquiry';
// import { purchaseInquiryRoute } from './procurementRoute/purchaseInquiry';
// import contracRoute from './contracRoute';
// import contracRoute from './contracRoute';
...
@@ -57,12 +57,12 @@ const memberCenterRoute = {
...
@@ -57,12 +57,12 @@ const memberCenterRoute = {
// ShopRoute,
// ShopRoute,
// CommodityRoute,
// CommodityRoute,
// srm开发临时使用...
// srm开发临时使用...
ProcurementRoute
,
//
ProcurementRoute,
// // 合同能力
// // 合同能力
// contracRoute,
// contracRoute,
//...
//...
// AuthConfigRoute,
// AuthConfigRoute,
//
...asyncRoutes,
...
asyncRoutes
,
{
{
path
:
'/memberCenter/noAuth'
,
path
:
'/memberCenter/noAuth'
,
auth
:
false
,
auth
:
false
,
...
...
src/components/NiceForm/components/CustomAddress.tsx
View file @
3ab1a149
...
@@ -114,7 +114,7 @@ const MultAddress = (props) => {
...
@@ -114,7 +114,7 @@ const MultAddress = (props) => {
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
province
=
item
.
name
;
result
[
idx
].
province
=
item
.
name
;
// @
todo
编辑情况下 第一次不清空
// @ 编辑情况下 第一次不清空
if
(
!
cityAfterRef
.
current
)
{
if
(
!
cityAfterRef
.
current
)
{
result
[
idx
].
cityCode
=
null
;
result
[
idx
].
cityCode
=
null
;
result
[
idx
].
city
=
null
;
result
[
idx
].
city
=
null
;
...
@@ -140,7 +140,7 @@ const MultAddress = (props) => {
...
@@ -140,7 +140,7 @@ const MultAddress = (props) => {
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
result
[
idx
].
cityCode
=
val
;
result
[
idx
].
cityCode
=
val
;
result
[
idx
].
city
=
items
.
name
;
result
[
idx
].
city
=
items
.
name
;
// @
todo
编辑情况下 第一次不清空
// @ 编辑情况下 第一次不清空
if
(
!
areaAfterRef
.
current
)
{
if
(
!
areaAfterRef
.
current
)
{
result
[
idx
].
areaCode
=
null
;
result
[
idx
].
areaCode
=
null
;
result
[
idx
].
area
=
null
;
result
[
idx
].
area
=
null
;
...
...
src/components/NiceForm/components/MultAddress.tsx
View file @
3ab1a149
...
@@ -47,8 +47,7 @@ const MultAddress = (props) => {
...
@@ -47,8 +47,7 @@ const MultAddress = (props) => {
// 是否仅读
// 是否仅读
const
{
readOnly
=
null
}
=
props
.
props
const
{
readOnly
=
null
}
=
props
.
props
console
.
log
(
_v
,
'vvv'
)
// 处理表单提交置空触发错误角标提示
let
value
=
null
let
value
=
null
if
(
!
_v
.
length
)
{
if
(
!
_v
.
length
)
{
value
=
[{
provinceCode
:
null
,
province
:
null
,
cityCode
:
null
,
city
:
null
}]
value
=
[{
provinceCode
:
null
,
province
:
null
,
cityCode
:
null
,
city
:
null
}]
...
@@ -62,6 +61,7 @@ const MultAddress = (props) => {
...
@@ -62,6 +61,7 @@ const MultAddress = (props) => {
const
[
province
,
setprovince
]
=
useState
<
any
>
([]);
// 省列表
const
[
province
,
setprovince
]
=
useState
<
any
>
([]);
// 省列表
const
[
city
,
setcity
]
=
useState
<
any
>
([]);
// 市列表
const
[
city
,
setcity
]
=
useState
<
any
>
([]);
// 市列表
const
flag
=
useRef
<
boolean
>
(
true
)
const
flag
=
useRef
<
boolean
>
(
true
)
const
cityAfterRef
=
useRef
<
boolean
>
(
true
)
useEffect
(()
=>
{
useEffect
(()
=>
{
PublicApi
.
getManageAreaAll
().
then
(
res
=>
{
PublicApi
.
getManageAreaAll
().
then
(
res
=>
{
...
@@ -92,7 +92,10 @@ const MultAddress = (props) => {
...
@@ -92,7 +92,10 @@ const MultAddress = (props) => {
}
}
},
[
value
])
},
[
value
])
// 触发onChange改变值
/**
* 触发onChange改变值
* @param num (1省 2市)
* */
const
changeAddress
=
async
(
val
:
any
,
idx
:
number
,
num
:
number
)
=>
{
const
changeAddress
=
async
(
val
:
any
,
idx
:
number
,
num
:
number
)
=>
{
const
result
=
[...
value
]
const
result
=
[...
value
]
const
cityCode
:
Array
<
any
>
=
[]
const
cityCode
:
Array
<
any
>
=
[]
...
@@ -112,12 +115,22 @@ const MultAddress = (props) => {
...
@@ -112,12 +115,22 @@ const MultAddress = (props) => {
// 渲染省份option
// 渲染省份option
const
renderProvice
=
async
(
result
,
val
,
idx
)
=>
{
const
renderProvice
=
async
(
result
,
val
,
idx
)
=>
{
console
.
log
(
result
,
val
,
idx
)
await
province
.
forEach
(
item
=>
{
await
province
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
if
(
item
.
code
===
val
)
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
province
=
item
.
name
;
result
[
idx
].
province
=
item
.
name
;
// @todo 编辑情况下 result[idx]存在id ?第一次渲染回填值的时候不清空
// if(result[idx]?.i d&& ) {
// console.log(cityAfterRef.current, 1, item)
// result[idx].cityCode = null;
// result[idx].city = null;
// } else {
// console.log(cityAfterRef.current, 2, item)
// cityAfterRef.current = false;
// }
city
[
idx
]
=
{
citydata
:
res
.
data
}
city
[
idx
]
=
{
citydata
:
res
.
data
}
setcity
([...
city
])
setcity
([...
city
])
}
}
...
...
src/constants/index.ts
View file @
3ab1a149
...
@@ -611,7 +611,7 @@ export const DOC_STATUS = {
...
@@ -611,7 +611,7 @@ export const DOC_STATUS = {
[
DOC_STATUS_REVIEWED
]:
'已审核'
,
[
DOC_STATUS_REVIEWED
]:
'已审核'
,
};
};
//
订单类型
//
下单模式
export
enum
OrderModalType
{
export
enum
OrderModalType
{
/**
/**
...
...
src/pages/procurement/callForBids/addRemarkBidCommittee/constant/index.ts
View file @
3ab1a149
...
@@ -39,65 +39,69 @@ export const columnsSetMember: any[] = [
...
@@ -39,65 +39,69 @@ export const columnsSetMember: any[] = [
export
const
buildColumns
:
any
[]
=
[
export
const
buildColumns
:
any
[]
=
[
{
{
dataIndex
:
'id'
,
dataIndex
:
'id'
,
title
:
'ID'
,
align
:
'center'
,
className
:
'commonHide'
,
},
{
dataIndex
:
'id'
,
title
:
'序号'
,
title
:
'序号'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
r
,
t
,
i
)
=>
i
++
render
:
(
t
,
r
,
i
)
=>
++
i
},
},
{
{
dataIndex
:
'
nam
e'
,
dataIndex
:
'
typ
e'
,
align
:
'center'
,
align
:
'center'
,
title
:
'专家类型'
title
:
'专家类型'
,
key
:
'type'
},
},
{
{
dataIndex
:
'memberTypeName'
,
dataIndex
:
'speciality'
,
title
:
'专家专业级别'
,
title
:
'专家专业类别'
,
align
:
'center'
align
:
'center'
,
key
:
'speciality'
},
},
{
{
dataIndex
:
'
roleName
'
,
dataIndex
:
'
qualification
'
,
title
:
'专家资格证书'
,
title
:
'专家资格证书'
,
align
:
'center'
align
:
'center'
,
key
:
'qualification'
},
},
{
{
dataIndex
:
'
orderTh
e'
,
dataIndex
:
'
userJobTitl
e'
,
title
:
'专家专业职称'
,
title
:
'专家专业职称'
,
align
:
'center'
align
:
'center'
,
key
:
'userJobTitle'
},
},
{
{
dataIndex
:
'receiverName'
,
dataIndex
:
'receiverName'
,
title
:
'从事年限'
,
title
:
'从事年限'
,
align
:
'center'
align
:
'center'
,
key
:
'type'
},
},
{
{
dataIndex
:
'supplyMembersName'
,
dataIndex
:
'supplyMembersName'
,
title
:
'所属行业'
,
title
:
'所属行业'
,
align
:
'center'
align
:
'center'
,
key
:
'type'
},
},
{
{
dataIndex
:
'supplyMembersName'
,
dataIndex
:
'supplyMembersName'
,
title
:
'要求地区'
,
title
:
'要求地区'
,
align
:
'center'
align
:
'center'
,
key
:
'type'
},
},
{
{
dataIndex
:
'supplyMembersName'
,
dataIndex
:
'supplyMembersName'
,
title
:
'排除地区'
,
title
:
'排除地区'
,
align
:
'center'
align
:
'center'
,
key
:
'type'
},
},
{
{
dataIndex
:
'supplyMembersName'
,
dataIndex
:
'supplyMembersName'
,
title
:
'工作单位'
,
title
:
'工作单位'
,
align
:
'center'
align
:
'center'
,
key
:
'type'
},
},
{
{
dataIndex
:
'supplyMembersName'
,
dataIndex
:
'supplyMembersName'
,
title
:
'抽取人数'
,
title
:
'抽取人数'
,
align
:
'center'
align
:
'center'
,
key
:
'type'
},
},
// {
// {
// dataIndex: 'ctl',
// dataIndex: 'ctl',
...
...
src/pages/procurement/callForBids/addRemarkBidCommittee/index.tsx
View file @
3ab1a149
...
@@ -135,6 +135,15 @@ const AddRemarkBidCommittee:React.FC<AddRemarkBidCommitteeProps> = (props) => {
...
@@ -135,6 +135,15 @@ const AddRemarkBidCommittee:React.FC<AddRemarkBidCommitteeProps> = (props) => {
addSchemaAction
.
setFieldValue
(
'openTenderTime'
,
formatTimeString
(
selectRow
[
0
][
'openTenderTime'
]))
addSchemaAction
.
setFieldValue
(
'openTenderTime'
,
formatTimeString
(
selectRow
[
0
][
'openTenderTime'
]))
addSchemaAction
.
setFieldValue
(
'remarkTime'
,
`
${
formatTimeString
(
selectRow
[
0
][
'evaluationStartTime'
])}
~
${
formatTimeString
(
selectRow
[
0
][
'evaluationEndTime'
])}
`
)
addSchemaAction
.
setFieldValue
(
'remarkTime'
,
`
${
formatTimeString
(
selectRow
[
0
][
'evaluationStartTime'
])}
~
${
formatTimeString
(
selectRow
[
0
][
'evaluationEndTime'
])}
`
)
addSchemaAction
.
setFieldValue
(
'createTime'
,
formatTimeString
(
selectRow
[
0
][
'createTime'
]))
addSchemaAction
.
setFieldValue
(
'createTime'
,
formatTimeString
(
selectRow
[
0
][
'createTime'
]))
// 获取组件条件里面的评标专家库列表
PublicApi
.
getPurchaseExpertGetExpertList
({
current
:
'1'
,
pageSize
:
'999'
}).
then
(
res
=>
{
const
{
data
,
code
}
=
res
if
(
code
===
1000
)
{
addSchemaAction
.
setFieldValue
(
'conditionLists'
,
data
)
}
})
}
}
const
onConditonClick
=
()
=>
{
const
onConditonClick
=
()
=>
{
...
...
src/pages/procurement/callForBids/addRemarkBidTemplate/index.tsx
View file @
3ab1a149
...
@@ -3,7 +3,7 @@ import { history } from 'umi'
...
@@ -3,7 +3,7 @@ import { history } from 'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
ReutrnEle
from
'@/components/ReturnEle'
import
ReutrnEle
from
'@/components/ReturnEle'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
Button
,
Card
}
from
'antd'
import
{
Button
,
Card
,
message
}
from
'antd'
import
{
createFormActions
}
from
'@formily/antd'
import
{
createFormActions
}
from
'@formily/antd'
import
{
PlusOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
import
{
PlusOutlined
,
SaveOutlined
}
from
'@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
import
NiceForm
from
'@/components/NiceForm'
...
@@ -37,6 +37,10 @@ const AddRemarkBidTemplate:React.FC<AddRemarkBidTemplateProps> = (props) => {
...
@@ -37,6 +37,10 @@ const AddRemarkBidTemplate:React.FC<AddRemarkBidTemplateProps> = (props) => {
const
handleSubmit
=
async
(
value
)
=>
{
const
handleSubmit
=
async
(
value
)
=>
{
setBtnLoading
(
true
)
setBtnLoading
(
true
)
if
(
!
value
?.
templateContentList
?.
length
)
{
setBtnLoading
(
false
)
return
message
.
error
(
'请填写评标内容'
)
}
PublicApi
.
postPurchaseTemplateSaveOrUpdateTemplate
(
value
).
then
(
res
=>
{
PublicApi
.
postPurchaseTemplateSaveOrUpdateTemplate
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
history
.
goBack
()
...
...
src/pages/procurement/callForBids/remarkBidCommittee/index.tsx
View file @
3ab1a149
...
@@ -17,7 +17,7 @@ import '../../constants/index.less'
...
@@ -17,7 +17,7 @@ import '../../constants/index.less'
export
interface
RemarkBidCommitteeProps
{}
export
interface
RemarkBidCommitteeProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
get
OrderProcurementReviewedListOne
(
params
)
const
{
data
}
=
await
PublicApi
.
get
PurchaseExpertExtractGetExpertExtractList
(
params
)
return
data
return
data
}
}
...
...
src/pages/procurement/callForBids/remarkBidTemplate/model/useSelfTable.tsx
View file @
3ab1a149
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
Button
}
from
'antd'
import
{
Button
,
Popconfirm
}
from
'antd'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
EyePreview
from
'@/components/EyePreview'
...
@@ -83,7 +83,17 @@ export const useSelfTable = () => {
...
@@ -83,7 +83,17 @@ export const useSelfTable = () => {
key
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
render
:
(
text
,
record
)
=>
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/callForBids/remarkBidTemplate/edit?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/callForBids/remarkBidTemplate/edit?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleDelete
(
record
.
id
)
}
>
删除
</
Button
>
<
Popconfirm
title=
"确定要执行该操作?"
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
'link'
// onClick={() => handleDelete(record.id)}
>
删除
</
Button
>
</
Popconfirm
>
</>
</>
}
}
])
])
...
...
src/pages/procurement/tender/addTender/index.tsx
View file @
3ab1a149
...
@@ -114,6 +114,17 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
...
@@ -114,6 +114,17 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
setBtnLoading
(
false
)
setBtnLoading
(
false
)
return
message
.
error
(
'请先关联投标商品'
)
return
message
.
error
(
'请先关联投标商品'
)
}
}
// 校验单价
let
judgementByCount
=
params
.
submitTenderMateriel
?.
length
&&
params
.
submitTenderMateriel
.
map
(
item
=>
{
if
(
item
.
price
&&
typeof
item
.
taxRate
===
'number'
){
return
true
}
else
{
return
false
}
})
if
(
!
judgementByCount
||
judgementByCount
.
includes
(
false
)){
throw
new
Error
(
'请填写商品单价'
)
}
if
(
value
?.
id
)
params
.
id
=
value
.
id
if
(
value
?.
id
)
params
.
id
=
value
.
id
const
res
=
await
PublicApi
.
postPurchaseSubmitTenderSaveSubmitTender
(
params
)
const
res
=
await
PublicApi
.
postPurchaseSubmitTenderSaveSubmitTender
(
params
)
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/transaction/_public/order/constant.ts
View file @
3ab1a149
...
@@ -12,6 +12,9 @@ export const orderTypeLabel = ['',
...
@@ -12,6 +12,9 @@ export const orderTypeLabel = ['',
'渠道现货'
,
'渠道现货'
,
'积分兑换'
,
'积分兑换'
,
'渠道积分兑换'
,
'渠道积分兑换'
,
'采购询价合同下单'
,
'采购招标合同下单'
,
'采购竞价合同下单'
,
]
]
/**
/**
...
...
src/pages/transaction/components/orderDetailSection/index.tsx
View file @
3ab1a149
...
@@ -8,6 +8,7 @@ import OrderMergeInfo from '../../components/orderMergeInfo'
...
@@ -8,6 +8,7 @@ import OrderMergeInfo from '../../components/orderMergeInfo'
import
OrderDeleveRecord
from
'../../components/orderDeleveRecord'
import
OrderDeleveRecord
from
'../../components/orderDeleveRecord'
import
OrderTransformRecord
from
'../../components/orderTransformRecord'
import
OrderTransformRecord
from
'../../components/orderTransformRecord'
import
OrderSaleRecord
from
'../orderSaleRecord'
import
OrderSaleRecord
from
'../orderSaleRecord'
import
{
ORDER_TYPE2_BIDDING_CONTRACT
,
ORDER_TYPE2_ENQUIRY_CONTRACT
,
ORDER_TYPE2_TENDER_CONTRACT
}
from
'@/constants'
export
interface
OrderDetailSectionProps
{
export
interface
OrderDetailSectionProps
{
formContext
:
any
,
formContext
:
any
,
...
@@ -42,7 +43,16 @@ const OrderDetailSection:React.FC<OrderDetailSectionProps> = ({formContext, type
...
@@ -42,7 +43,16 @@ const OrderDetailSection:React.FC<OrderDetailSectionProps> = ({formContext, type
{
type
===
'saleOrder'
?
<
SaleOrderProductTable
/>
:
<
OrderProductTable
editable
/>
}
{
type
===
'saleOrder'
?
<
SaleOrderProductTable
/>
:
<
OrderProductTable
editable
/>
}
<
OrderPayTabs
/>
{
/* 采购合同下单不显示 支付信息栏 */
}
{
formContext
.
data
.
type
===
ORDER_TYPE2_ENQUIRY_CONTRACT
||
formContext
.
data
.
type
===
ORDER_TYPE2_BIDDING_CONTRACT
||
formContext
.
data
.
type
===
ORDER_TYPE2_TENDER_CONTRACT
?
null
:
<
OrderPayTabs
/>
}
<
OrderMergeInfo
/>
<
OrderMergeInfo
/>
...
...
src/pages/transaction/components/orderProductTable/index.tsx
View file @
3ab1a149
...
@@ -10,7 +10,7 @@ import ModalForm from '@/components/ModalForm'
...
@@ -10,7 +10,7 @@ import ModalForm from '@/components/ModalForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
createFormActions
}
from
'@formily/antd'
import
MellowCard
from
'@/components/MellowCard'
import
MellowCard
from
'@/components/MellowCard'
import
{
AddressPop
}
from
'../../purchaseOrder/orderCollect/components/productModalTable'
import
{
AddressPop
}
from
'../../purchaseOrder/orderCollect/components/productModalTable'
import
{
DELIVERY_TYPE
}
from
'@/constants'
import
{
DELIVERY_TYPE
,
OrderModalType
}
from
'@/constants'
export
interface
OrderProductTableProps
{
export
interface
OrderProductTableProps
{
editable
:
boolean
editable
:
boolean
...
@@ -218,6 +218,8 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
...
@@ -218,6 +218,8 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
const
{
ctl
,
data
,
preview
}
=
useContext
(
OrderDetailContext
)
const
{
ctl
,
data
,
preview
}
=
useContext
(
OrderDetailContext
)
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
// 合同下单模式
const
contractOrder
=
(
orderModel
===
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
||
orderModel
===
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
||
orderModel
===
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
)
const
productComponents
=
{
const
productComponents
=
{
body
:
{
body
:
{
...
@@ -272,6 +274,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
...
@@ -272,6 +274,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
})
})
};
};
// 订单商品
const
productInfoColumns
:
any
[]
=
[
const
productInfoColumns
:
any
[]
=
[
{
{
title
:
'ID'
,
title
:
'ID'
,
...
@@ -347,6 +350,101 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
...
@@ -347,6 +350,101 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
}
}
]
]
// 订单物料
const
materialInfo
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
className
:
'commonHide'
},
{
title
:
'物料编号'
,
dataIndex
:
'materialCode'
,
align
:
'center'
,
key
:
'materialCode'
,
},
{
title
:
'物料名称/规格'
,
dataIndex
:
'materialName'
,
align
:
'center'
,
key
:
'materialName'
,
render
:
(
t
,
r
)
=>
<>
{
t
}
/
{
r
.
materialType
}
</>
},
{
title
:
'品类'
,
dataIndex
:
'materialCategory'
,
align
:
'center'
,
key
:
'materialCategory'
,
},
{
title
:
'品牌'
,
dataIndex
:
'materialBrand'
,
align
:
'center'
,
key
:
'materialBrand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'关联报价商品ID/名称/规格/品类/品牌'
,
dataIndex
:
'materialId'
,
align
:
'center'
,
key
:
'materialId'
,
render
:
(
t
,
r
)
=>
`
${
t
}
/
${
r
.
productName
}
/
${
r
.
category
}
/
${
r
.
brand
}
`
},
{
title
:
'单价(元)'
,
dataIndex
:
'price'
,
align
:
'left'
,
key
:
'price'
,
},
{
title
:
'供方库存'
,
dataIndex
:
'inventory'
,
align
:
'center'
,
key
:
'inventory'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'含税'
,
dataIndex
:
'taxInclusive'
,
align
:
'center'
,
key
:
'taxInclusive'
,
render
:
(
t
,
r
)
=>
t
?
'是'
:
'否'
},
{
title
:
'税率'
,
dataIndex
:
'taxRate'
,
align
:
'center'
,
key
:
'taxRate'
,
},
{
title
:
'金额'
,
dataIndex
:
'money'
,
align
:
'center'
,
key
:
'money'
,
},
// 接口调用
{
title
:
'配送方式'
,
dataIndex
:
'logistics'
,
align
:
'center'
,
key
:
'logistics'
,
render
:
(
text
)
=>
(
text
&&
text
.
deliveryType
&&
text
.
deliveryType
===
2
)
?
<
AddressPop
pickInfo=
{
text
}
>
{
DELIVERY_TYPE
[
text
.
deliveryType
]
}
</
AddressPop
>
:
DELIVERY_TYPE
[
text
?.
deliveryType
]
}
]
const
columns
=
!
editable
?
productInfoColumns
:
productInfoColumns
.
map
(
col
=>
{
const
columns
=
!
editable
?
productInfoColumns
:
productInfoColumns
.
map
(
col
=>
{
...
@@ -365,9 +463,9 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
...
@@ -365,9 +463,9 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
};
};
});
});
return
(
return
(
<
MellowCard
title=
'订单商品'
style=
{
{
marginTop
:
24
}
}
bordered=
{
false
}
>
<
MellowCard
title=
{
contractOrder
?
'订单物料'
:
'订单商品'
}
style=
{
{
marginTop
:
24
}
}
bordered=
{
false
}
>
<
Table
<
Table
columns=
{
productInfoColumns
}
columns=
{
contractOrder
?
materialInfo
:
productInfoColumns
}
dataSource=
{
orderProductRequests
}
dataSource=
{
orderProductRequests
}
components=
{
productComponents
}
components=
{
productComponents
}
rowKey=
'id'
rowKey=
'id'
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
3ab1a149
...
@@ -13,7 +13,7 @@ import { usePageStatus } from '@/hooks/usePageStatus'
...
@@ -13,7 +13,7 @@ import { usePageStatus } from '@/hooks/usePageStatus'
import
ModalTable
from
'@/components/ModalTable'
import
ModalTable
from
'@/components/ModalTable'
import
{
formatTimeString
}
from
'@/utils'
import
{
formatTimeString
}
from
'@/utils'
import
{
AddressPop
}
from
'../../purchaseOrder/orderCollect/components/productModalTable'
import
{
AddressPop
}
from
'../../purchaseOrder/orderCollect/components/productModalTable'
import
{
DELIVERY_TYPE
,
SaleOrderInsideWorkStateTexts
}
from
'@/constants'
import
{
DELIVERY_TYPE
,
OrderModalType
,
SaleOrderInsideWorkStateTexts
}
from
'@/constants'
export
interface
OrderProductTableProps
{}
export
interface
OrderProductTableProps
{}
...
@@ -295,7 +295,9 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
@@ -295,7 +295,9 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
const
{
page_type
}
=
usePageStatus
()
const
{
page_type
}
=
usePageStatus
()
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
{
orderProductRequests
=
[],
orderModel
}
=
data
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
// 合同下单模式
const
contractOrder
=
(
orderModel
===
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
||
orderModel
===
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
||
orderModel
===
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
)
console
.
log
(
contractOrder
,
'fff'
)
const
[
warehouseVisible
,
setWarehouseVisible
]
=
useState
(
false
)
const
[
warehouseVisible
,
setWarehouseVisible
]
=
useState
(
false
)
const
[
checkProductId
,
setCheckProductId
]
=
useState
(
0
)
// 选中的商品id
const
[
checkProductId
,
setCheckProductId
]
=
useState
(
0
)
// 选中的商品id
const
warehouseRef
=
useRef
<
any
>
({})
const
warehouseRef
=
useRef
<
any
>
({})
...
@@ -367,6 +369,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
@@ -367,6 +369,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
setWarehouseVisible
(
true
)
setWarehouseVisible
(
true
)
}
}
// 订单商品列
const
productInfoColumns
:
any
[]
=
[
const
productInfoColumns
:
any
[]
=
[
{
{
title
:
'ID'
,
title
:
'ID'
,
...
@@ -445,11 +448,112 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
@@ -445,11 +448,112 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
dataIndex
:
'record'
,
dataIndex
:
'record'
,
align
:
'center'
,
align
:
'center'
,
key
:
'record'
,
key
:
'record'
,
// @todo 尚未实现, 需UI设计
render
:
(
_
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
handlePreviewWarehouse
(
record
)
}
>
查看
</
Button
>
render
:
(
_
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
handlePreviewWarehouse
(
record
)
}
>
查看
</
Button
>
},
},
]
]
// 订单物料
const
materialInfo
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
className
:
'commonHide'
},
{
title
:
'物料编号'
,
dataIndex
:
'materialCode'
,
align
:
'center'
,
key
:
'materialCode'
,
},
{
title
:
'物料名称/规格'
,
dataIndex
:
'materialName'
,
align
:
'center'
,
key
:
'materialName'
,
render
:
(
t
,
r
)
=>
<>
{
t
}
/
{
r
.
materialType
}
</>
},
{
title
:
'品类'
,
dataIndex
:
'materialCategory'
,
align
:
'center'
,
key
:
'materialCategory'
,
},
{
title
:
'品牌'
,
dataIndex
:
'materialBrand'
,
align
:
'center'
,
key
:
'materialBrand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
{
title
:
'关联报价商品ID/名称/规格/品类/品牌'
,
dataIndex
:
'materialId'
,
align
:
'center'
,
key
:
'materialId'
,
render
:
(
t
,
r
)
=>
`
${
t
}
/
${
r
.
productName
}
/
${
r
.
category
}
/
${
r
.
brand
}
`
},
{
title
:
'单价(元)'
,
dataIndex
:
'price'
,
align
:
'left'
,
key
:
'price'
,
},
{
title
:
'供方库存'
,
dataIndex
:
'inventory'
,
align
:
'center'
,
key
:
'inventory'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
key
:
'purchaseCount'
,
},
{
title
:
'含税'
,
dataIndex
:
'taxInclusive'
,
align
:
'center'
,
key
:
'taxInclusive'
,
render
:
(
t
,
r
)
=>
t
?
'是'
:
'否'
},
{
title
:
'税率'
,
dataIndex
:
'taxRate'
,
align
:
'center'
,
key
:
'taxRate'
,
},
{
title
:
'金额'
,
dataIndex
:
'money'
,
align
:
'center'
,
key
:
'money'
,
},
// 接口调用
{
title
:
'配送方式'
,
dataIndex
:
'logistics'
,
align
:
'center'
,
key
:
'logistics'
,
render
:
(
text
)
=>
(
text
&&
text
.
deliveryType
&&
text
.
deliveryType
===
2
)
?
<
AddressPop
pickInfo=
{
text
}
>
{
DELIVERY_TYPE
[
text
.
deliveryType
]
}
</
AddressPop
>
:
DELIVERY_TYPE
[
text
?.
deliveryType
]
},
{
title
:
'仓位库存扣减记录'
,
dataIndex
:
'record'
,
align
:
'center'
,
key
:
'record'
,
render
:
(
_
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
handlePreviewWarehouse
(
record
)
}
>
查看
</
Button
>
}
]
const
fetchWarehouseData
=
useCallback
(
async
(
params
)
=>
{
const
fetchWarehouseData
=
useCallback
(
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getWarehousePositionDeductionRecordList
({...
params
,
productId
:
String
(
checkProductId
)})
const
{
data
}
=
await
PublicApi
.
getWarehousePositionDeductionRecordList
({...
params
,
productId
:
String
(
checkProductId
)})
return
data
return
data
...
@@ -471,9 +575,9 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
@@ -471,9 +575,9 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
};
};
});
});
return
(
return
(
<
MellowCard
title=
'订单商品'
style=
{
{
marginTop
:
24
}
}
bordered=
{
false
}
>
<
MellowCard
title=
{
contractOrder
?
'订单物料'
:
'订单商品'
}
style=
{
{
marginTop
:
24
}
}
bordered=
{
false
}
>
<
Table
<
Table
columns=
{
columns
}
columns=
{
contractOrder
?
materialInfo
:
columns
}
dataSource=
{
orderProductRequests
.
sort
((
a
,
b
)
=>
a
.
id
-
b
.
id
)
}
dataSource=
{
orderProductRequests
.
sort
((
a
,
b
)
=>
a
.
id
-
b
.
id
)
}
components=
{
productComponents
}
components=
{
productComponents
}
rowKey=
'id'
rowKey=
'id'
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/productModalTable/index.tsx
View file @
3ab1a149
...
@@ -88,7 +88,7 @@ export const AddressPop = (props) => {
...
@@ -88,7 +88,7 @@ export const AddressPop = (props) => {
{
{
receiveInfo
&&
<>
receiveInfo
&&
<>
<
p
>
{
receiveInfo
.
shipperName
}
/
{
receiveInfo
.
phone
}
</
p
>
<
p
>
{
receiveInfo
.
shipperName
}
/
{
receiveInfo
.
phone
}
</
p
>
<
p
>
{
receiveInfo
.
provinceName
+
receiveInfo
.
cityName
+
receiveInfo
.
districtName
+
receiveInfo
.
address
}
</
p
>
<
p
>
{
receiveInfo
.
provinceName
+
receiveInfo
.
cityName
+
receiveInfo
.
districtName
+
receiveInfo
.
address
||
receiveInfo
.
fullAddress
}
</
p
>
</>
</>
}
}
</
div
>
</
div
>
...
@@ -162,6 +162,7 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
...
@@ -162,6 +162,7 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const
handleConfirmProduct
=
async
()
=>
{
const
handleConfirmProduct
=
async
()
=>
{
// 判断所选择的商品是否属于同一个工作流
// 判断所选择的商品是否属于同一个工作流
// @ts-ignore
const
res
=
await
PublicApi
.
postOrderIsWorkFlow
({
const
res
=
await
PublicApi
.
postOrderIsWorkFlow
({
memberId
:
rowSelectionCtl
.
selectRow
[
0
].
memberId
,
memberId
:
rowSelectionCtl
.
selectRow
[
0
].
memberId
,
memberRoleId
:
rowSelectionCtl
.
selectRow
[
0
].
memberRoleId
,
memberRoleId
:
rowSelectionCtl
.
selectRow
[
0
].
memberRoleId
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/usePaymentInfo.tsx
View file @
3ab1a149
...
@@ -81,7 +81,8 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
...
@@ -81,7 +81,8 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
},
[
orderProducts
])
},
[
orderProducts
])
const
getPayLists
=
(
memberId
,
memberRoleId
)
=>
{
const
getPayLists
=
(
memberId
,
memberRoleId
)
=>
{
PublicApi
.
getPayPayWayList
({
memberId
,
memberRoleId
}).
then
(
res
=>
{
// PublicApi.getPayPayWayList({memberId, memberRoleId}).then(res => {
PublicApi
.
getPayPayWayAccount
({
memberId
,
memberRoleId
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
const
newColumns
=
[...
columns
]
const
newColumns
=
[...
columns
]
...
...
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