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
76cd49aa
Commit
76cd49aa
authored
Nov 08, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理取消中止请购单id异常
parent
114de94f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
128 deletions
+40
-128
index.tsx
src/pages/transaction/components/orderDeleveRecord/index.tsx
+3
-1
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+14
-16
useSelfTable.tsx
...n/purchaseOrder/firstApprovedOrder/model/useSelfTable.tsx
+1
-4
index.ts
...ansaction/purchaseOrder/orderCollectCash/effects/index.ts
+1
-1
index.tsx
...ages/transaction/purchaseOrder/orderCollectCash/index.tsx
+1
-2
index.ts
...ransaction/purchaseOrder/orderCollectCash/schema/index.ts
+1
-80
index.tsx
...rCollectRequisition/components/memberModalTable/index.tsx
+0
-1
index.tsx
...derCollectRequisition/components/theInvoiceList/index.tsx
+0
-2
index.tsx
...ansaction/purchaseOrder/orderCollectRequisition/index.tsx
+0
-3
index.tsx
...saction/purchaseRequisition/increaseRequisition/index.tsx
+1
-3
index.tsx
src/pages/transaction/purchaseRequisition/index.tsx
+18
-15
No files found.
src/pages/transaction/components/orderDeleveRecord/index.tsx
View file @
76cd49aa
...
...
@@ -441,7 +441,9 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
// @todo 待对接确认收货提交收货凭证
setLoading
(
true
)
receiveActions
.
submit
().
then
(
async
({
values
}:
any
)
=>
{
values
.
receiveBill
=
values
.
receiveBill
[
0
][
'data'
]
if
(
values
.
receiveBill
&&
values
.
receiveBill
[
0
])
{
values
.
receiveBill
=
values
.
receiveBill
[
0
][
'data'
]
}
const
result
=
await
PublicApi
.
postOrderBuyerValidateReceiveConfirm
(
values
)
if
(
result
.
code
===
1000
)
{
receiveActions
.
reset
()
...
...
src/pages/transaction/components/orderPayModal/index.tsx
View file @
76cd49aa
...
...
@@ -184,17 +184,15 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setPayStep
(
1
)
setQrLoading
(
true
)
handleSubmitPay
()
}
// else if(checked.id === 1) {
// console.log('选择了支付宝支付')
// // 生成支付宝扫码支付
// mobilePayFlag.current = 6
// setCurrent(6)
// setPayStep(1)
// setQrLoading(true)
// handleSubmitPay()
// }
else
if
(
checked
.
id
===
100
)
{
}
else
if
(
checked
.
id
===
1
)
{
console
.
log
(
'选择了支付宝支付'
)
// 生成支付宝扫码支付
mobilePayFlag
.
current
=
6
setCurrent
(
6
)
setPayStep
(
1
)
setQrLoading
(
true
)
handleSubmitPay
()
}
else
if
(
checked
.
id
===
100
)
{
console
.
log
(
'选择了账期结算模式'
)
setCurrent
(
100
)
setPayStep
(
1
)
...
...
@@ -204,7 +202,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setPayStep
(
1
)
}
else
{
message
.
error
(
'暂只支持线下支付、授信额度支付、余额支付、货到付款、微信、账期月结支付方式'
)
message
.
error
(
'暂只支持线下支付、授信额度支付、余额支付、货到付款、微信、
支付宝、
账期月结支付方式'
)
}
}
else
{
message
.
error
(
'请先选择支付方式'
)
...
...
@@ -294,14 +292,14 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
return
message
.
error
(
'请先完成对公账户配置'
)
}
const
res
=
await
run
(
params
,
mobilePayFlag
.
current
===
4
?
{
ctlType
:
"none"
}
:
null
)
const
res
=
await
run
(
params
,
(
mobilePayFlag
.
current
===
4
||
mobilePayFlag
.
current
===
6
)
?
{
ctlType
:
"none"
}
:
null
)
if
(
res
.
code
===
1000
)
{
if
(
mobilePayFlag
.
current
!==
4
)
{
// 非微信
history
.
goBack
()
}
else
{
if
(
mobilePayFlag
.
current
===
4
||
mobilePayFlag
.
current
===
6
)
{
// 微信 支付宝
setQrCodeInfo
({
...
qrCodeInfo
,
generateCharacter
:
res
.
data
.
codeUrl
})
setTradeNo
(
res
.
data
.
tradeNo
)
setQrLoading
(
false
)
}
else
{
history
.
goBack
()
}
}
else
{
setCode
(
''
)
...
...
src/pages/transaction/purchaseOrder/firstApprovedOrder/model/useSelfTable.tsx
View file @
76cd49aa
import
React
,
{
useRef
}
from
'react'
import
{
useRef
}
from
'react'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
...
...
@@ -11,8 +10,6 @@ export const useSelfTable = () => {
const
handleSubmit
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/firstApprovedOrder/detail?id=
${
record
.
orderId
}
`
)
// await PublicApi.postOrderQuotationBeReviewed({id})
// ref.current.reload()
}
const
secondColumns
:
any
[]
=
baseOrderListColumns
().
concat
([
{
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/effects/index.ts
View file @
76cd49aa
...
...
@@ -202,7 +202,7 @@ export const searchCustomerCategoryOptionEffect = (ctx: any, mctx: any, fieldNam
const
params
:
any
=
{}
params
[
'memberId'
]
=
ctx
.
getFieldValue
(
'vendorMemberId'
)
params
[
'memberRoleId'
]
=
ctx
.
getFieldValue
(
'vendorRoleId'
)
mctx
.
getFieldState
(
fieldName
,
state
=>
{
mctx
.
getFieldState
(
fieldName
,
()
=>
{
PublicApi
.
getProductCustomerGetMemberCustomerCategoryTree
(
params
).
then
(
res
=>
{
mctx
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/index.tsx
View file @
76cd49aa
...
...
@@ -118,10 +118,9 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = () => {
const
{
pageStatus
,
id
,
page_type
=
'0'
,
modelType
,
}
=
usePageStatus
()
const
[
initFormSchema
,
setInitFormSchema
]
=
useState
<
any
>
(()
=>
({...
mergeAllSchemas
[
page_type
]
}))
const
[
initFormSchema
,
setInitFormSchema
]
=
useState
<
any
>
(()
=>
({...
mergeAllSchemas
}))
const
[
initFormValue
,
setInitFormValue
]
=
useState
<
any
>
(()
=>
{
let
resultState
=
{}
if
(
modelType
)
{
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/schema/index.ts
View file @
76cd49aa
...
...
@@ -169,13 +169,6 @@ export const payInfo: ISchema = {
columns
:
"{{paymentColumns}}"
,
components
:
"{{paymentComponents}}"
},
// default: [
// {
// payCount: 1,
// id: 1,
// payRatio: 123
// }
// ]
}
}
}
...
...
@@ -197,7 +190,6 @@ const submitInfo: ISchema = {
labelAlign
:
'left'
,
grid
:
true
,
columns
:
2
,
// full: true
},
properties
:
{
FLEX_LAYOUT_LEFT
:
{
...
...
@@ -233,11 +225,6 @@ const submitInfo: ISchema = {
deliveryAddresId
:
{
type
:
'string'
,
"x-component"
:
'SelectAddress'
,
// "x-mega-props": {
// style: {
// full: true
// }
// },
"x-component-props"
:
{
dataSource
:
[],
times
:
0
,
...
...
@@ -333,43 +320,6 @@ const ortherInfo: ISchema = {
}
}
// 新增订单详情
export
const
orderDetailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
}
}
// 一级审核详情
export
const
auditOneSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
}
}
// 新增时使用的schema
export
const
orderAddSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -388,37 +338,8 @@ export const orderAddSchema: ISchema = {
}
}
// 确认电子合同
export
const
orderElectronicSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
}
}
// 根据传入的query参数 判断当前使用哪个schema
export
const
mergeAllSchemas
=
{
// 新增订单详情
"-1"
:
orderDetailSchema
,
0
:
orderAddSchema
,
// 一级审核详情
1
:
auditOneSchema
,
// 二级审核详情
2
:
auditOneSchema
,
// 待提交订单详情
3
:
orderDetailSchema
,
// 电子合同详情
4
:
orderElectronicSchema
,
// 订单支付
5
:
orderDetailSchema
...
orderAddSchema
,
}
src/pages/transaction/purchaseOrder/orderCollectRequisition/components/memberModalTable/index.tsx
View file @
76cd49aa
...
...
@@ -29,7 +29,6 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
const
handleConfirm
=
()
=>
{
const
rowItem
=
rowSelectionCtl
.
selectRow
[
0
]
console
.
log
(
rowItem
,
'row'
)
if
(
rowItem
)
{
schemaAction
.
setFieldValue
(
'vendorRoleId'
,
rowItem
.
roleId
)
schemaAction
.
setFieldValue
(
'vendorMemberId'
,
rowItem
.
memberId
)
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/components/theInvoiceList/index.tsx
View file @
76cd49aa
...
...
@@ -49,7 +49,6 @@ const TheInvoiceList = (props: ISchemaFieldComponentProps) => {
showMore
,
useValue
:
target
})
// console.log('isObject', target)
mutators
.
change
(
target
)
}
else
{
let
target
=
dataSource
.
length
?
dataSource
.
find
(
v
=>
v
.
id
===
value
)
:
value
...
...
@@ -58,7 +57,6 @@ const TheInvoiceList = (props: ISchemaFieldComponentProps) => {
showMore
,
useValue
:
target
})
// console.log('notObject', target)
mutators
.
change
(
target
)
}
}
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/index.tsx
View file @
76cd49aa
...
...
@@ -104,7 +104,6 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
setInitFormValue
(()
=>
procurmentRenderInit
(
data
))
setTimeout
(()
=>
{
addSchemaAction
.
setFieldValue
(
'products'
,
_orderProductRequests
)
// addSchemaAction.setFieldValue('requisition', {...data.requisition})
},
1000
)
setFormLoading
(
false
)
})
...
...
@@ -312,7 +311,6 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
// editable={pageStatus !== PageStatus.PREVIEW}
value=
{
initFormValue
}
actions=
{
addSchemaAction
}
schema=
{
initFormSchema
}
...
...
@@ -322,7 +320,6 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
TheInvoiceList
,
}
}
effects=
{
(
$
,
ctx
)
=>
{
// useAsyncSelect('orderMode', fetchOrderMode, ['text', 'id'])
$
(
'onFormMount'
).
subscribe
(()
=>
{
if
(
id
||
modelType
)
{
ctx
.
setFieldState
(
'orderMode'
,
state
=>
{
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/index.tsx
View file @
76cd49aa
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
Button
,
C
ard
,
C
ol
,
message
,
Row
}
from
'antd'
import
{
Button
,
Col
,
message
,
Row
}
from
'antd'
import
{
createFormActions
,
registerVirtualBox
,
useFormSpy
}
from
'@formily/antd'
import
{
SaveOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
...
...
@@ -158,7 +158,6 @@ const IncreaseRequisition:React.FC<{}> = () => {
/>
<
FormDetailWrapper
>
{
/* <Card> */
}
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
...
...
@@ -186,7 +185,6 @@ const IncreaseRequisition:React.FC<{}> = () => {
help
,
}
}
/>
{
/* </Card> */
}
</
FormDetailWrapper
>
</
FormDetailContext
.
Provider
>
...
...
src/pages/transaction/purchaseRequisition/index.tsx
View file @
76cd49aa
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
Card
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -31,6 +31,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
const
ref
=
useRef
<
any
>
({})
const
destoryRef
=
useRef
<
any
>
({})
const
pauseRef
=
useRef
<
any
>
({})
const
[
curentId
,
setCurrentId
]
=
useState
<
number
>
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postPurchaseRequisitionCancel
)
const
{
run
:
runPause
,
loading
:
loadingEnd
}
=
useHttpRequest
(
PublicApi
.
postPurchaseRequisitionPause
)
...
...
@@ -44,7 +45,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
// 提交取消
const
handleSubmit
=
()
=>
{
destroyActions
.
submit
().
then
(
async
({
values
}:
any
)
=>
{
const
result
=
await
run
({
...
values
})
const
result
=
await
run
({
...
values
,
id
:
curentId
})
if
(
result
.
code
===
1000
)
{
destroyActions
.
reset
()
destoryRef
.
current
.
setVisible
(
false
)
...
...
@@ -58,7 +59,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
// 提交中止
const
handleSubmitPause
=
()
=>
{
pauseActions
.
submit
().
then
(
async
({
values
}:
any
)
=>
{
const
result
=
await
runPause
({
...
values
})
const
result
=
await
runPause
({
...
values
,
id
:
curentId
})
if
(
result
.
code
===
1000
)
{
pauseRef
.
current
.
setVisible
(
false
)
setTimeout
(()
=>
{
...
...
@@ -70,12 +71,14 @@ const RequestBill: React.FC<RequestBillProps> = () => {
const
handleCancel
=
(
r
)
=>
{
destoryRef
.
current
.
setVisible
(
true
)
destroyActions
.
setFieldValue
(
'id'
,
r
.
id
)
setCurrentId
(
r
.
id
)
// destroyActions.setFieldValue('id', r.id)
}
const
handleSuspend
=
(
r
)
=>
{
pauseRef
.
current
.
setVisible
(
true
)
pauseActions
.
setFieldValue
(
'id'
,
r
.
id
)
setCurrentId
(
r
.
id
)
// pauseActions.setFieldValue('id', r.id)
}
/** 参照后台数据生成 */
...
...
@@ -157,11 +160,11 @@ const RequestBill: React.FC<RequestBillProps> = () => {
labelAlign
:
'top'
,
},
properties
:
{
id
:
{
type
:
'number'
,
title
:
'当前id'
,
visible
:
false
,
},
//
id:
{
//
type: 'number',
//
title: '当前id',
//
visible: false,
//
},
reason
:
{
type
:
'textarea'
,
"x-component-props"
:
{
...
...
@@ -202,11 +205,11 @@ const RequestBill: React.FC<RequestBillProps> = () => {
labelAlign
:
'top'
,
},
properties
:
{
id
:
{
type
:
'number'
,
title
:
'当前id'
,
visible
:
false
,
},
//
id:
{
//
type: 'number',
//
title: '当前id',
//
visible: false,
//
},
reason
:
{
type
:
'textarea'
,
"x-component-props"
:
{
...
...
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