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
linweijiong
jinfa-platform
Commits
1086753e
Commit
1086753e
authored
Aug 04, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹窗列表改为单选
parent
6b3a0258
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
61 deletions
+84
-61
global.less
src/global/styles/global.less
+8
-2
confirmModal.tsx
src/pages/logistics/components/confirmModal.tsx
+67
-44
orderSearchDetail.tsx
src/pages/logistics/components/orderSearchDetail.tsx
+1
-10
sumbitOrderModal.tsx
src/pages/logistics/components/sumbitOrderModal.tsx
+0
-0
addCompany.tsx
src/pages/logistics/list/addCompany.tsx
+5
-2
toOrderSubmitDetail.tsx
src/pages/logistics/logisticsSubmit/toOrderSubmitDetail.tsx
+3
-3
No files found.
src/global/styles/global.less
View file @
1086753e
...
...
@@ -142,4 +142,11 @@ h6 {
border: none;
background: none;
}
}
\ No newline at end of file
}
//addonAfter 有选择弹窗时
.input_addonAfter{
.ant-input-group-addon{
padding: 0 !important;
}
}
src/pages/logistics/components/confirmModal.tsx
View file @
1086753e
...
...
@@ -6,9 +6,9 @@ import {
FormEffectHooks
}
from
'@formily/antd'
import
{
Input
,
Radio
,
FormMegaLayout
}
from
'@formily/antd-components'
import
{
values
}
from
'mobx'
;
import
{
P
ublicApi
}
from
'@/services/api
'
export
interface
Params
{
import
{
PublicApi
}
from
'@/services/api'
import
{
P
ATTERN_MAPS
}
from
'@/constants/regExp
'
export
interface
Params
{
id
:
number
|
string
;
dialogVisible
:
boolean
;
onCancel
:
Function
;
...
...
@@ -16,33 +16,40 @@ export interface Params {
dontReceive
?:
boolean
;
//默认展示
}
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
const
{
onFieldChange$
}
=
FormEffectHooks
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
console
.
log
(
props
.
dialogVisible
)
const
handleCancel
=
()
=>
{
}
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
console
.
log
(
values
)
PublicApi
.
postLogisticsOrderWaitConfirmConfirm
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
useFormEffects
=
()
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFieldChange$
(
'status'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'remarkOption'
,
state
=>
{
if
(
value
==
3
){
const
{
setFieldState
}
=
createFormActions
()
onFieldChange$
(
'status'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'remark'
,
state
=>
{
if
(
value
==
3
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
setFieldState
(
'freightPrice'
,
state
=>
{
if
(
value
==
3
)
{
state
.
visible
=
false
}
else
{
}
else
{
state
.
visible
=
true
}
})
...
...
@@ -62,21 +69,23 @@ const comfirmDialog: React.FC<Params> = (props) => {
okText=
'确定'
cancelText=
'取消'
>
<
SchemaForm
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handletOk
(
values
)
}
initialValues=
{
{
status
:
3
}
}
<
SchemaForm
labelCol=
{
3
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handletOk
(
values
)
}
initialValues=
{
{
status
:
3
}
}
>
<
Field
enum=
{
[
{
label
:
'接受物流单'
,
value
:
3
},
{
label
:
'不接受物流单'
,
value
:
4
}
{
label
:
'接受物流单'
,
value
:
3
},
{
label
:
'不接受物流单'
,
value
:
4
}
]
}
name=
'status'
required
...
...
@@ -84,27 +93,41 @@ const comfirmDialog: React.FC<Params> = (props) => {
/>
{
props
.
dontReceive
&&
<
FormMegaLayout
name=
'remarkOption'
label=
'不接受原因'
full
required
labelCol=
{
2
}
labelAlign=
"top"
>
<
Field
name=
"remark"
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
placeholder
:
'在此输入你的内容,最多60个汉字'
}
}
x
-
rules=
{
value
=>
{
if
(
value
.
length
>
60
)
{
return
{
type
:
'warning'
,
message
:
'原因最多60个汉字'
}
}
}
}
/>
<>
<
Field
title=
'运费'
name=
"freightPrice"
x
-
component=
"Input"
required
x
-
component
-
props=
{
{
placeholder
:
'运费'
,
// addonBefore: ' '
}
}
x
-
rules
={{
pattern
:
PATTERN_MAPS
.
money
,
message
:'数字类型,币制为当前站点对应的币制,保留2位小数'
}}
/>
{
/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */
}
<
Field
title=
'不接受原因'
name=
"remark"
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
placeholder
:
'在此输入你的内容,最多60个汉字'
}
}
x
-
rules
={{
max
:60,
// maximum:10,//最大数值
message
:'原因最多60个汉字'
}}
/>
</
FormMegaLayout
>
</
>
}
</
SchemaForm
>
</
Modal
>
...
...
src/pages/logistics/components/orderSearchDetail.tsx
View file @
1086753e
...
...
@@ -275,14 +275,6 @@ const detailInfo: React.FC<{}> = () => {
resolve
(
res
.
data
)
}
})
// const queryResult = data.find(v => v.key === params.keywords);
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: dataInfo.detailList//dataInfo.logList
// });
// }, 1000);
});
};
...
...
@@ -483,9 +475,8 @@ const detailInfo: React.FC<{}> = () => {
{
item
.
key
===
'freight'
?
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
value
}
{
/* <Input addonBefore=" ¥ " defaultValue={100} /> */
}
{
dataInfo
.
status
<
3
?
'未报价'
:
item
.
value
}
</
div
>
:
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
value
}
...
...
src/pages/logistics/components/sumbitOrderModal.tsx
View file @
1086753e
This diff is collapsed.
Click to expand it.
src/pages/logistics/list/addCompany.tsx
View file @
1086753e
...
...
@@ -224,7 +224,7 @@ const company: React.FC<{}> = () => {
}
]
}
>
<
Input
className=
{
style
[
'selectBtn'
]
}
disabled
maxLength=
{
20
}
addonAfter=
{
selectBtn
}
/>
<
Input
className=
"input_addonAfter"
disabled
maxLength=
{
20
}
addonAfter=
{
selectBtn
}
/>
</
Form
.
Item
>
:
<
Form
.
Item
...
...
@@ -299,7 +299,10 @@ const company: React.FC<{}> = () => {
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
rowSelection=
{
rowSelection
}
rowSelection=
{
{
type
:
'radio'
,
...
rowSelection
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
/>
...
...
src/pages/logistics/logisticsSubmit/toOrderSubmitDetail.tsx
View file @
1086753e
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-03 1
6:48:12
* @LastEditTime: 2020-08-03 1
8:28:38
*/
import
React
,
{
Component
,
useEffect
,
useRef
,
useState
,
ReactNode
}
from
'react'
import
{
Card
,
Row
,
Col
,
Tabs
,
Button
,
Input
as
SelectInput
,
Badge
}
from
'antd'
...
...
@@ -357,12 +357,12 @@ const Deatail: React.FC<{}> = () => {
<
FormItem
name=
"digest"
label=
"单据摘要"
required
component=
{
Input
}
/>
<
FormItem
name=
"shipmentOrderCode"
label=
'对应发货单号'
>
<>
<
SelectInput
className=
{
style
[
'btn-wrap'
]
}
addonAfter=
{
selectBtn2
}
/>
<
SelectInput
className=
'input_addonAfter'
addonAfter=
{
selectBtn2
}
/>
</>
</
FormItem
>
<
FormItem
name=
"invoicesNo"
label=
'对应订单号/售后单'
>
<>
<
SelectInput
className=
{
style
[
'btn-wrap'
]
}
addonAfter=
{
selectBtn1
}
/>
<
SelectInput
className=
'input_addonAfter'
addonAfter=
{
selectBtn1
}
/>
</>
</
FormItem
>
...
...
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