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
shenshaokai
jinfa-platform
Commits
7a9592eb
Commit
7a9592eb
authored
Jan 05, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
a9f11ed9
f65e49a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
123 deletions
+145
-123
index.ts
src/components/ModalTable/schema/index.ts
+20
-2
basicInfo.tsx
...ction/goodsOffer/addEnquiryOrder/components/basicInfo.tsx
+16
-11
enquiryGoods.tsx
.../inquiryQuote/addInquiryOrder/components/enquiryGoods.tsx
+1
-1
tradingConditions.tsx
...iryQuote/addInquiryOrder/components/tradingConditions.tsx
+107
-108
details.tsx
src/pages/transaction/inquiryQuote/components/details.tsx
+1
-1
No files found.
src/components/ModalTable/schema/index.ts
View file @
7a9592eb
...
...
@@ -34,7 +34,16 @@ export const productModalByMemberSchema: ISchema = {
"x-component-props"
:
{
placeholder
:
'请选择品类'
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch
:
PublicApi
.
getProductSelectGetMemberCategory
,
fetchSearch
:
()
=>
{
let
merber
=
sessionStorage
.
getItem
(
'memberInfo'
);
let
meberInfo
=
JSON
.
parse
(
merber
)
return
new
Promise
(
resolve
=>
{
PublicApi
.
getProductSelectGetMemberCategory
({
name
:
''
,
...
meberInfo
}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
10086
)
resolve
(
res
)
})
})
},
style
:
{
width
:
160
}
...
...
@@ -45,7 +54,16 @@ export const productModalByMemberSchema: ISchema = {
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGetMemberBrand
,
fetchSearch
:
()
=>
{
let
merber
=
sessionStorage
.
getItem
(
'memberInfo'
);
let
meberInfo
=
JSON
.
parse
(
merber
)
return
new
Promise
(
resolve
=>
{
PublicApi
.
getProductSelectGetMemberBrand
({
name
:
''
,
...
meberInfo
}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
10086
)
resolve
(
res
)
})
})
},
style
:
{
width
:
160
}
...
...
src/pages/transaction/goodsOffer/addEnquiryOrder/components/basicInfo.tsx
View file @
7a9592eb
...
...
@@ -7,7 +7,7 @@ import { ISchema } from '@formily/antd';
import
ModalTable
from
'@/components/ModalTable'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
import
{
quoteOrderInternalState
,
inquiryQuoteOuterState
}
from
'../../../common/tableStatusList'
;
import
{
quoteOrderInternalState
,
inquiryQuoteOuterState
}
from
'../../../common/tableStatusList'
;
import
moment
from
'moment'
;
const
layout
:
any
=
{
...
...
@@ -44,6 +44,11 @@ const BasicInfo: React.FC<queryProps> = (props) => {
memberRoleId
:
memberRowCtl
.
selectRow
[
0
].
roleId
,
memberRoleName
:
memberRowCtl
.
selectRow
[
0
].
roleName
}
sessionStorage
.
setItem
(
'memberInfo'
,
JSON
.
stringify
({
memberId
:
memberRowCtl
.
selectRow
[
0
].
memberId
,
memberRoleId
:
memberRowCtl
.
selectRow
[
0
].
roleId
,
}))
setmemberId
(
memberRowCtl
.
selectRow
[
0
].
memberId
)
setroleId
(
memberRowCtl
.
selectRow
[
0
].
roleId
)
setmemberName
(
memberRowCtl
.
selectRow
[
0
].
name
);
...
...
@@ -95,17 +100,17 @@ const BasicInfo: React.FC<queryProps> = (props) => {
const
fetchMemberList
=
async
(
params
)
=>
{
console
.
log
(
params
)
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberManagePlatformProviderPage
({
...
params
}).
then
(
res
=>
{
PublicApi
.
getMemberManagePlatformProviderPage
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
});
}
// 选择会员弹框结束
useEffect
(()
=>
{
if
(
memberName
)
{
basicform
.
setFieldsValue
({
'memberId'
:
memberId
?
memberId
:
undefined
})
if
(
memberName
)
{
basicform
.
setFieldsValue
({
'memberId'
:
memberId
?
memberId
:
undefined
})
}
},[
memberName
])
},
[
memberName
])
/************* 页面的一些操作start *************/
// 拿到表单数据
...
...
@@ -120,7 +125,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
}
})
}).
catch
(
errorInfo
=>
{
resolve
({
state
:
false
})
resolve
({
state
:
false
})
})
})
}
...
...
@@ -136,10 +141,10 @@ const BasicInfo: React.FC<queryProps> = (props) => {
currentRef
.
current
=
userAction
;
}
}
},[])
},
[])
useEffect
(()
=>
{
if
(
Object
.
keys
(
editData
).
length
>
0
)
{
if
(
Object
.
keys
(
editData
).
length
>
0
)
{
basicform
.
setFieldsValue
({
details
:
editData
.
details
,
})
...
...
@@ -161,8 +166,8 @@ const BasicInfo: React.FC<queryProps> = (props) => {
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'被询价会员'
name=
'memberId'
rules=
{
[{
required
:
true
,
message
:
'请选择被询价会员'
}]
}
>
<
Search
disabled=
{
type
===
3
}
value=
{
memberName
?
memberName
:
undefined
}
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setVisibleChannelMember
(
true
)
}
/>
{
memberName
&&
<
Button
type=
'link'
onClick=
{
()
=>
window
.
open
(
`/shop?shopId=${btoa(JSON.stringify({
memberId, roleId
}))}`
)
}
>
查看会员详情
</
Button
>
}
<
Search
disabled=
{
type
===
3
||
type
===
2
}
value=
{
memberName
?
memberName
:
undefined
}
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setVisibleChannelMember
(
true
)
}
/>
{
memberName
&&
<
Button
type=
'link'
onClick=
{
()
=>
window
.
open
(
`/shop?shopId=${btoa(JSON.stringify({
memberId, roleId
}))}`
)
}
>
查看会员详情
</
Button
>
}
</
Form
.
Item
>
<
Form
.
Item
label=
'询价单号'
name=
'orderNumber'
>
<
span
>
{
(
Object
.
keys
(
editData
).
length
>
0
&&
editData
.
inquiryListNo
)
?
editData
.
inquiryListNo
:
'-'
}
</
span
>
...
...
@@ -184,7 +189,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
cancel=
{
handleCancelAddMember
}
visible=
{
visibleChannelMember
}
forceRender=
{
visibleChannelMember
}
resetModal=
{
{
destroyOnClose
:
true
,
forceRender
:
true
}
}
resetModal=
{
{
destroyOnClose
:
true
,
forceRender
:
true
}
}
columns=
{
columnsSetMember
}
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberList
(
params
)
}
...
...
src/pages/transaction/inquiryQuote/addInquiryOrder/components/enquiryGoods.tsx
View file @
7a9592eb
...
...
@@ -21,7 +21,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
const
countMoney
=
(
num
:
any
,
money
:
any
)
=>
{
let
price
:
ReactNode
=
null
;
price
=
(
Number
(
money
)
*
1
)
/
Number
(
num
);
return
Number
(
price
).
toFixed
(
4
);
return
Number
(
price
).
toFixed
(
2
);
}
/**输入框输入 */
...
...
src/pages/transaction/inquiryQuote/addInquiryOrder/components/tradingConditions.tsx
View file @
7a9592eb
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Form
,
Input
,
Row
,
Col
,
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
interface
queryProps
{
currentRef
?:
any
,
editData
:
any
}
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'174px'
}
},
wrapperCol
:
{
span
:
24
},
labelAlign
:
"left"
};
const
TradingConditions
:
React
.
FC
<
queryProps
>
=
(
props
)
=>
{
const
{
currentRef
,
editData
}
=
props
;
const
[
TradingConditionsForm
]
=
Form
.
useForm
();
const
hadnleValidateFields
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
TradingConditionsForm
.
validateFields
().
then
(
values
=>
{
resolve
({
state
:
true
,
data
:
{
minimumOrder
:
values
.
minimumOrder
,
offer
:
values
.
offer
,
paymentType
:
values
.
paymentType
,
taxes
:
values
.
taxes
,
logistics
:
values
.
logistics
,
packRequire
:
values
.
logistics
,
otherRequire
:
values
.
logistics
,
}
})
}).
catch
(
errorInfo
=>
{
console
.
log
(
errorInfo
)
})
})
}
useEffect
(()
=>
{
if
(
currentRef
)
{
const
userAction
=
{
validateFields
:
()
=>
hadnleValidateFields
()
}
if
(
currentRef
&&
typeof
currentRef
===
'function'
)
{
currentRef
(
userAction
);
}
if
(
currentRef
&&
typeof
currentRef
!==
'function'
)
{
currentRef
.
current
=
userAction
;
}
}
},
[])
useEffect
(()
=>
{
// 编辑时回显的数据
if
(
Object
.
keys
(
editData
).
length
>
0
)
{
console
.
log
(
editData
,
10086
)
TradingConditionsForm
.
setFieldsValue
({
paymentType
:
editData
.
paymentType
,
taxes
:
editData
.
taxes
,
logistics
:
editData
.
logistics
,
packRequire
:
editData
.
packRequire
,
otherRequire
:
editData
.
otherRequire
,
offer
:
editData
.
offer
,
minimumOrder
:
editData
.
minimumOrder
})
}
},
[
editData
])
return
(
<
Form
{
...
layout
}
form=
{
TradingConditionsForm
}
className=
{
styles
.
revise_style
}
>
<
Row
gutter=
{
70
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'最小起订'
name=
'minimumOrder'
rules=
{
[{
required
:
true
,
message
:
'请输入最小起订'
}]
}
>
<
Input
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'交付说明'
name=
'offer'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'付款说明'
name=
'paymentType'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'税费说明'
name=
'taxes'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'物流说明'
name=
'logistics'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'包装说明'
name=
'packRequire'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'其他说明'
name=
'otherRequire'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
)
}
export
default
TradingConditions
\ No newline at end of file
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Form
,
Input
,
Row
,
Col
,
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
interface
queryProps
{
currentRef
?:
any
,
editData
:
any
}
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'174px'
}
},
wrapperCol
:
{
span
:
24
},
labelAlign
:
"left"
};
const
TradingConditions
:
React
.
FC
<
queryProps
>
=
(
props
)
=>
{
const
{
currentRef
,
editData
}
=
props
;
const
[
TradingConditionsForm
]
=
Form
.
useForm
();
const
hadnleValidateFields
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
TradingConditionsForm
.
validateFields
().
then
(
values
=>
{
resolve
({
state
:
true
,
data
:
{
minimumOrder
:
values
.
minimumOrder
,
deliveryInstructions
:
values
.
deliveryInstructions
,
paymentType
:
values
.
paymentType
,
taxes
:
values
.
taxes
,
logistics
:
values
.
logistics
,
packRequire
:
values
.
logistics
,
otherRequire
:
values
.
logistics
,
}
})
}).
catch
(
errorInfo
=>
{
console
.
log
(
errorInfo
)
})
})
}
useEffect
(()
=>
{
if
(
currentRef
)
{
const
userAction
=
{
validateFields
:
()
=>
hadnleValidateFields
()
}
if
(
currentRef
&&
typeof
currentRef
===
'function'
)
{
currentRef
(
userAction
);
}
if
(
currentRef
&&
typeof
currentRef
!==
'function'
)
{
currentRef
.
current
=
userAction
;
}
}
},
[])
useEffect
(()
=>
{
// 编辑时回显的数据
if
(
Object
.
keys
(
editData
).
length
>
0
)
{
console
.
log
(
editData
,
10086
)
TradingConditionsForm
.
setFieldsValue
({
paymentType
:
editData
.
paymentType
,
taxes
:
editData
.
taxes
,
logistics
:
editData
.
logistics
,
packRequire
:
editData
.
packRequire
,
otherRequire
:
editData
.
otherRequire
,
deliveryInstructions
:
editData
.
deliveryInstructions
,
minimumOrder
:
editData
.
minimumOrder
})
}
},
[
editData
])
return
(
<
Form
{
...
layout
}
form=
{
TradingConditionsForm
}
className=
{
styles
.
revise_style
}
>
<
Row
gutter=
{
70
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'最小起订'
name=
'minimumOrder'
rules=
{
[{
required
:
true
,
message
:
'请输入最小起订'
}]
}
>
<
Input
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'交付说明'
name=
'deliveryInstructions'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'付款说明'
name=
'paymentType'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'税费说明'
name=
'taxes'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'物流说明'
name=
'logistics'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'包装说明'
name=
'packRequire'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'其他说明'
name=
'otherRequire'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
)
}
export
default
TradingConditions
src/pages/transaction/inquiryQuote/components/details.tsx
View file @
7a9592eb
...
...
@@ -180,7 +180,7 @@ const Details: React.FC<parmas> = (props) => {
title
:
'其他报价说明'
,
leftElem
:
[
{
title
:
'最小起订'
,
key
:
''
,
value
:
data
.
minimumOrder
},
{
title
:
'交付说明'
,
key
:
''
,
value
:
data
.
fullAddres
s
},
{
title
:
'交付说明'
,
key
:
''
,
value
:
data
.
deliveryInstruction
s
},
{
title
:
'付款说明'
,
key
:
''
,
value
:
data
.
paymentType
}
],
centerElem
:
[
...
...
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