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
8cfe7028
Commit
8cfe7028
authored
Sep 06, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(商品询价): 修复bug
parent
adb1511c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
index.tsx
src/components/AddressSelect/index.tsx
+2
-0
addForm.tsx
...saction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
+2
-2
basicInfo.tsx
...bility/inquiryOffer/waitAddOffer/components/basicInfo.tsx
+2
-0
productQuote.tsx
...ity/inquiryOffer/waitAddOffer/components/productQuote.tsx
+4
-3
add.tsx
...isticsAbility/logisticsAdminister/freightTemplate/add.tsx
+15
-12
No files found.
src/components/AddressSelect/index.tsx
View file @
8cfe7028
...
@@ -204,6 +204,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
...
@@ -204,6 +204,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
},
[]);
},
[]);
const
handleVisibleDrawer
=
(
flag
?:
boolean
)
=>
{
const
handleVisibleDrawer
=
(
flag
?:
boolean
)
=>
{
if
(
flag
)
{
editAddressId
.
current
=
null
;
}
// 解决点击编辑然后关掉弹窗再进来新增变成编辑的问题
setVisibleDrawer
(
!!
flag
);
setVisibleDrawer
(
!!
flag
);
};
};
...
@@ -539,6 +540,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
...
@@ -539,6 +540,7 @@ const AddressSelect: React.FC<IProps> = (props) => {
width=
{
800
}
width=
{
800
}
onClose=
{
()
=>
handleVisibleDrawer
(
false
)
}
onClose=
{
()
=>
handleVisibleDrawer
(
false
)
}
visible=
{
visibleDrawer
}
visible=
{
visibleDrawer
}
destroyOnClose
footer=
{
footer=
{
<
div
<
div
style=
{
{
style=
{
{
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
View file @
8cfe7028
...
@@ -50,7 +50,6 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
...
@@ -50,7 +50,6 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
if
(
res
.
code
!==
1000
)
{
if
(
res
.
code
!==
1000
)
{
return
return
}
}
setDataSource
(
res
.
data
);
PublicApi
.
getTransactionProductInquiryDetails
({
id
:
res
.
data
.
inquiryListId
.
toString
()
}).
then
(
resolve
=>
{
PublicApi
.
getTransactionProductInquiryDetails
({
id
:
res
.
data
.
inquiryListId
.
toString
()
}).
then
(
resolve
=>
{
if
(
resolve
.
code
!==
1000
)
{
if
(
resolve
.
code
!==
1000
)
{
return
return
...
@@ -73,7 +72,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
...
@@ -73,7 +72,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
warn
(
error
)
console
.
warn
(
error
)
})
})
setDataSource
(
res
.
data
);
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
warn
(
error
)
console
.
warn
(
error
)
})
})
...
@@ -152,6 +151,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
...
@@ -152,6 +151,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
inquiryListProductRequests
.
forEach
((
item
:
any
)
=>
{
inquiryListProductRequests
.
forEach
((
item
:
any
)
=>
{
item
.
money
=
count
(
item
.
purchaseCount
,
item
.
price
)
item
.
money
=
count
(
item
.
purchaseCount
,
item
.
price
)
})
})
setDataSource
(
resolve
.
data
)
setProductQuote
(
inquiryListProductRequests
);
setProductQuote
(
inquiryListProductRequests
);
form
.
setFieldsValue
({
form
.
setFieldsValue
({
"inquiryListProductRequests"
:
inquiryListProductRequests
,
"inquiryListProductRequests"
:
inquiryListProductRequests
,
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/basicInfo.tsx
View file @
8cfe7028
...
@@ -88,6 +88,8 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
...
@@ -88,6 +88,8 @@ const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = (props: any) => {
}
}
},
[
inq
])
},
[
inq
])
console
.
log
(
context
,
96
)
return
(
return
(
<
Card
<
Card
id=
"basicInfoLayout"
id=
"basicInfoLayout"
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/productQuote.tsx
View file @
8cfe7028
...
@@ -38,7 +38,7 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
...
@@ -38,7 +38,7 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
setDataSource
([...
dataSource
]);
setDataSource
([...
dataSource
]);
}
}
const
handleJump
=
(
data
:
any
)
=>
{
const
handleJump
=
(
data
:
any
)
=>
{
window
.
open
(
`
${
ENTERPRISE_CENTER_URL
}
/shop/
${
data
.
memberId
}
_
${
data
.
memberRoleId
}
/inquiry/detail/
${
data
.
commodityId
}
`
)
window
.
open
(
`
${
ENTERPRISE_CENTER_URL
}
/shop/
${
data
.
memberId
}
_
${
data
.
memberRoleId
}
/inquiry/detail/
${
data
.
commodityId
}
`
)
}
}
...
@@ -218,7 +218,7 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
...
@@ -218,7 +218,7 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
rules=
{
[{
required
:
true
,
message
:
"请添加商品"
}]
}
rules=
{
[{
required
:
true
,
message
:
"请添加商品"
}]
}
>
>
<
Table
<
Table
rowKey=
"productId"
rowKey=
{
(
record
)
=>
record
.
productId
}
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
dataSource
}
dataSource=
{
dataSource
}
pagination=
{
false
}
pagination=
{
false
}
...
@@ -228,10 +228,11 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
...
@@ -228,10 +228,11 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
title=
'历史报价'
title=
'历史报价'
visible=
{
visible
}
visible=
{
visible
}
onClose=
{
()
=>
setVisible
(
false
)
}
onClose=
{
()
=>
setVisible
(
false
)
}
destroyOnClose
>
>
<
StandardTable
<
StandardTable
columns=
{
hitoryColumns
}
columns=
{
hitoryColumns
}
tableProps=
{
{
rowKey
:
'
productI
d'
}
}
tableProps=
{
{
rowKey
:
'
i
d'
}
}
fetchTableData=
{
fetchTableData
}
fetchTableData=
{
fetchTableData
}
/>
/>
</
Drawer
>
</
Drawer
>
...
...
src/pages/transaction/logisticsAbility/logisticsAdminister/freightTemplate/add.tsx
View file @
8cfe7028
...
@@ -37,6 +37,13 @@ export interface ListType {
...
@@ -37,6 +37,13 @@ export interface ListType {
const
actions
=
createFormActions
()
const
actions
=
createFormActions
()
const
diaLogForm
:
React
.
FC
<
ListProps
>
=
(
props
)
=>
{
const
diaLogForm
:
React
.
FC
<
ListProps
>
=
(
props
)
=>
{
const
{
query
:
{
id
,
},
pathname
,
}
=
history
.
location
;
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
formIsHalfFilledOut
,
setFormIsHalfFilledOut
]
=
useState
(
true
)
const
[
formIsHalfFilledOut
,
setFormIsHalfFilledOut
]
=
useState
(
true
)
const
[
provinceList
,
setProvinceList
]
=
useState
([])
const
[
provinceList
,
setProvinceList
]
=
useState
([])
const
[
editable
,
setEditable
]
=
useState
<
boolean
>
(
true
)
const
[
editable
,
setEditable
]
=
useState
<
boolean
>
(
true
)
...
@@ -48,14 +55,11 @@ const diaLogForm: React.FC<ListProps> = (props) => {
...
@@ -48,14 +55,11 @@ const diaLogForm: React.FC<ListProps> = (props) => {
* @return:
* @return:
*/
*/
useEffect
(()
=>
{
useEffect
(()
=>
{
let
{
id
,
isSee
}
=
history
.
location
.
query
let
_title
=
(
path
===
'detail'
)
?
'查看'
:
let
_title
=
history
.
location
.
query
.
isSee
?
'查看'
:
Number
(
id
)
===
0
?
'新建'
:
'编辑'
Number
(
id
)
===
0
?
'新建'
:
'编辑'
if
(
history
.
location
.
query
.
isSee
)
{
if
(
path
===
'detail'
)
{
setEditable
(
false
)
setEditable
(
false
)
}
}
// console.log(id,typeof id,history.location.query.isSee,typeof history.location.query.isSee)
setHeaderTitle
(
`
${
_title
}
运费模板`
)
setHeaderTitle
(
`
${
_title
}
运费模板`
)
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
'100000'
}).
then
(
res
=>
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
'100000'
}).
then
(
res
=>
{
let
list
=
[]
let
list
=
[]
...
@@ -82,20 +86,19 @@ const diaLogForm: React.FC<ListProps> = (props) => {
...
@@ -82,20 +86,19 @@ const diaLogForm: React.FC<ListProps> = (props) => {
})
})
}
}
if
(
isSee
)
{
if
(
path
===
'detail'
)
{
setFormIsHalfFilledOut
(
false
)
setFormIsHalfFilledOut
(
false
)
}
}
},
[])
},
[])
const
FormSumbit
=
(
values
:
any
)
=>
{
const
FormSumbit
=
(
values
:
any
)
=>
{
let
id
=
history
.
location
.
query
.
id
let
value
=
{
...
values
}
let
value
=
{
...
values
}
if
(
value
.
designateList
.
length
===
1
&&
JSON
.
stringify
(
value
.
designateList
[
0
])
===
'{}'
)
{
if
(
value
.
designateList
.
length
===
1
&&
JSON
.
stringify
(
value
.
designateList
[
0
])
===
'{}'
)
{
delete
value
.
designateList
delete
value
.
designateList
}
}
if
(
!
id
)
{
if
(
!
id
)
{
PublicApi
.
postLogisticsFreightTemplateAdd
(
value
).
then
(
res
=>
{
PublicApi
.
postLogisticsFreightTemplateAdd
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
history
.
goBack
()
},
1000
)
},
1000
)
...
@@ -107,7 +110,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
...
@@ -107,7 +110,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}
else
{
}
else
{
value
.
id
=
Number
(
id
)
value
.
id
=
Number
(
id
)
PublicApi
.
postLogisticsFreightTemplateUpdate
(
value
).
then
(
res
=>
{
PublicApi
.
postLogisticsFreightTemplateUpdate
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
history
.
goBack
()
},
1000
)
},
1000
)
...
@@ -285,7 +288,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
...
@@ -285,7 +288,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
placeholder
:
'最长60个字符,30个汉字'
placeholder
:
'最长60个字符,30个汉字'
}
}
}
}
x
-
rules=
{
{
x
-
rules=
{
{
max
:
30
max
:
30
}
}
}
}
/>
/>
</
FormMegaLayout
>
</
FormMegaLayout
>
...
@@ -397,7 +400,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
...
@@ -397,7 +400,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Card
>
</
Card
>
<
Prompt
when=
{
formIsHalfFilledOut
}
message=
"您还有未保存的内容,是否确定要离开"
/>
<
Prompt
when=
{
formIsHalfFilledOut
}
message=
"您还有未保存的内容,是否确定要离开"
/>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
)
)
}
}
...
...
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