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
76fba132
Commit
76fba132
authored
Dec 18, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物流单选择商品传错id的问题
parent
9ebed4c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
136 deletions
+139
-136
index.tsx
src/pages/logistics/addLogistics/index.tsx
+5
-5
confirmModal.tsx
src/pages/logistics/components/confirmModal.tsx
+133
-131
addCompany.tsx
src/pages/logistics/list/addCompany.tsx
+1
-0
index.tsx
src/pages/transaction/inquiryQuote/schema/index.tsx
+0
-0
pendingReview.tsx
src/pages/transaction/inquiryQuote/schema/pendingReview.tsx
+0
-0
No files found.
src/pages/logistics/addLogistics/index.tsx
View file @
76fba132
...
...
@@ -186,7 +186,7 @@ const AddLogistics: React.FC<{}> = () => {
relevanceOrderCode
:
res
.
data
.
orderNo
,
voucherTime
:
res
.
data
.
transactionTime
,
externalState
:
res
.
data
.
state
,
shipmentOrderId
:
res
.
data
.
i
nvoicesTypeI
d
,
shipmentOrderId
:
res
.
data
.
id
,
relevanceOrderId
:
res
.
data
.
relevanceInvoicesId
,
}
form
.
setFieldsValue
(
obj
);
...
...
@@ -332,7 +332,7 @@ const AddLogistics: React.FC<{}> = () => {
case
1
:
case
2
:
case
3
:
PublicApi
.
getWarehouseInvoicesProductList
({
...
params
,
invoicesId
:
i
d
}).
then
((
res
:
any
)
=>
{
PublicApi
.
getWarehouseInvoicesProductList
({
...
params
,
invoicesId
:
query
.
shipmentOrderI
d
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
data
.
forEach
(
item
=>
{
item
.
category
=
item
.
categoryName
...
...
@@ -344,21 +344,21 @@ const AddLogistics: React.FC<{}> = () => {
})
break
;
case
4
:
PublicApi
.
getAsReplaceGoodsPageReturnCommodityByLogistics
({
...
params
,
dataId
:
i
d
}).
then
(
res
=>
{
PublicApi
.
getAsReplaceGoodsPageReturnCommodityByLogistics
({
...
params
,
dataId
:
query
.
relevanceOrderI
d
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
break
;
case
5
:
PublicApi
.
getAsReplaceGoodsPageReplaceCommodityByLogistics
({
...
params
,
dataId
:
id
}).
then
(
res
=>
{
PublicApi
.
getAsReplaceGoodsPageReplaceCommodityByLogistics
({
...
params
,
dataId
:
query
.
relevanceOrderId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
break
;
case
6
:
PublicApi
.
getAsReturnGoodsPageCommodityByLogistics
({
...
params
,
dataId
:
i
d
}).
then
(
res
=>
{
PublicApi
.
getAsReturnGoodsPageCommodityByLogistics
({
...
params
,
dataId
:
query
.
relevanceOrderI
d
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
src/pages/logistics/components/confirmModal.tsx
View file @
76fba132
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Button
,
Form
}
from
'antd'
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
Input
,
Radio
,
FormMegaLayout
,
NumberPicker
}
from
'@formily/antd-components'
import
{
PublicApi
}
from
'@/services/api'
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
export
interface
Params
{
id
:
number
|
string
;
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
freightPrice
?:
any
;
dontReceive
?:
boolean
;
//默认展示
}
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
console
.
log
(
props
.
dialogVisible
)
const
handleCancel
=
()
=>
{
}
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
if
(
props
.
freightPrice
)
{
value
.
freightPrice
=
props
.
freightPrice
}
PublicApi
.
postLogisticsOrderWaitConfirmConfirm
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
useFormEffects
=
()
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFieldChange$
(
'status'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'remark'
,
state
=>
{
if
(
value
==
4
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
setFieldState
(
'freightPrice'
,
state
=>
{
if
(
value
!=
4
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
})
}
return
(
<>
<
Modal
title=
'单据确认'
width=
{
800
}
visible=
{
props
.
dialogVisible
}
onOk=
{
()
=>
actions
.
submit
()
}
onCancel=
{
()
=>
props
.
onCancel
()
}
destroyOnClose
afterClose=
{
()
=>
actions
.
reset
()
}
okText=
'确定'
cancelText=
'取消'
>
<
SchemaForm
labelCol=
{
3
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
,
NumberPicker
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handletOk
(
values
)
}
initialValues=
{
{
status
:
4
}
}
>
<
Field
enum=
{
[
{
label
:
'接受物流单'
,
value
:
4
},
{
label
:
'不接受物流单'
,
value
:
3
}
]
}
name=
'status'
required
x
-
component=
"Radio"
/>
{
props
.
dontReceive
&&
<>
{
/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */
}
<
Field
title=
'不接受原因'
name=
"remark"
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
placeholder
:
'在此输入你的内容,最多60个汉字'
}
}
x
-
mega
-
prop=
{
{
labelAlign
:
'left'
}
}
x
-
rules=
{
{
max
:
60
,
// maximum:10,//最大数值
message
:
'原因最多60个汉字'
}
}
/>
</>
}
</
SchemaForm
>
</
Modal
>
</>
)
}
comfirmDialog
.
defaultProps
=
{
dontReceive
:
true
}
export
default
comfirmDialog
\ No newline at end of file
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Button
,
Form
}
from
'antd'
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
Input
,
Radio
,
FormMegaLayout
,
NumberPicker
}
from
'@formily/antd-components'
import
{
PublicApi
}
from
'@/services/api'
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
export
interface
Params
{
id
:
number
|
string
;
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
freightPrice
?:
any
;
dontReceive
?:
boolean
;
//默认展示
}
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
console
.
log
(
props
.
dialogVisible
)
const
handleCancel
=
()
=>
{
}
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
if
(
props
.
freightPrice
)
{
value
.
freightPrice
=
props
.
freightPrice
}
PublicApi
.
postLogisticsOrderWaitConfirmConfirm
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
}).
catch
(
error
=>
{
console
.
log
(
error
)
props
.
onOK
()
})
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
useFormEffects
=
()
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFieldChange$
(
'status'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'remark'
,
state
=>
{
if
(
value
==
4
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
setFieldState
(
'freightPrice'
,
state
=>
{
if
(
value
!=
4
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
})
}
return
(
<>
<
Modal
title=
'单据确认'
width=
{
800
}
visible=
{
props
.
dialogVisible
}
onOk=
{
()
=>
actions
.
submit
()
}
onCancel=
{
()
=>
props
.
onCancel
()
}
destroyOnClose
afterClose=
{
()
=>
actions
.
reset
()
}
okText=
'确定'
cancelText=
'取消'
>
<
SchemaForm
labelCol=
{
3
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
,
NumberPicker
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handletOk
(
values
)
}
initialValues=
{
{
status
:
4
}
}
>
<
Field
enum=
{
[
{
label
:
'接受物流单'
,
value
:
4
},
{
label
:
'不接受物流单'
,
value
:
3
}
]
}
name=
'status'
required
x
-
component=
"Radio"
/>
{
props
.
dontReceive
&&
<>
{
/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */
}
<
Field
title=
'不接受原因'
name=
"remark"
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
placeholder
:
'在此输入你的内容,最多60个汉字'
}
}
x
-
mega
-
prop=
{
{
labelAlign
:
'left'
}
}
x
-
rules=
{
{
max
:
60
,
// maximum:10,//最大数值
message
:
'原因最多60个汉字'
}
}
/>
</>
}
</
SchemaForm
>
</
Modal
>
</>
)
}
comfirmDialog
.
defaultProps
=
{
dontReceive
:
true
}
export
default
comfirmDialog
src/pages/logistics/list/addCompany.tsx
View file @
76fba132
...
...
@@ -180,6 +180,7 @@ const company: React.FC<parmas> = (props) => {
let
{
memberId
,
roleId
,
name
}
=
selectRow
menuForm
.
setFieldsValue
({
companyMemberId
:
memberId
,
companyRoleId
:
roleId
,
name
:
name
})
setsVisible
(
false
)
...
...
src/pages/transaction/inquiryQuote/schema/index.tsx
View file @
76fba132
This diff is collapsed.
Click to expand it.
src/pages/transaction/inquiryQuote/schema/pendingReview.tsx
View file @
76fba132
This diff is collapsed.
Click to expand it.
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