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
3a238dbf
Commit
3a238dbf
authored
Nov 05, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
e658a699
a96ed87d
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
221 additions
and
44 deletions
+221
-44
index.less
src/components/ImagePreview/index.less
+20
-0
index.tsx
src/components/ImagePreview/index.tsx
+33
-0
index.tsx
src/components/ModalTable/index.tsx
+9
-5
index.ts
src/components/ModalTable/schema/index.ts
+61
-0
orderSearchDetail.tsx
src/pages/logistics/components/orderSearchDetail.tsx
+1
-1
toOrderSubmitDetail.tsx
src/pages/logistics/logisticsSubmit/toOrderSubmitDetail.tsx
+1
-0
list.tsx
src/pages/lxMall/purchaseOnline/list.tsx
+2
-2
index.tsx
...ages/transaction/components/createElectronModal/index.tsx
+13
-2
index.tsx
...ages/transaction/components/orderPayResultModal/index.tsx
+6
-3
index.tsx
...ction/enquiryOffer/components/inquiryModalTable/index.tsx
+4
-2
detail.tsx
src/pages/transaction/enquiryOffer/toAddSubmit/detail.tsx
+3
-1
enquiryGoods.tsx
...on/goodsOffer/addEnquiryOrder/components/enquiryGoods.tsx
+1
-1
details.tsx
src/pages/transaction/goodsOffer/components/details.tsx
+2
-2
auditModel.tsx
src/pages/transaction/inquiryQuote/components/auditModel.tsx
+2
-2
details.tsx
src/pages/transaction/inquiryQuote/components/details.tsx
+18
-16
index.tsx
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
+42
-4
index.ts
.../transaction/purchaseOrder/readyFileOrder/schema/index.ts
+2
-2
index.tsx
...pages/transaction/saleOrder/readyReturnDocument/index.tsx
+1
-1
No files found.
src/components/ImagePreview/index.less
0 → 100644
View file @
3a238dbf
.imgPreviewWrapper {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100vw;
height: 100vh;
z-index: 9999;
background: #000;
}
.imgPreview {
max-width: 100%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
\ No newline at end of file
src/components/ImagePreview/index.tsx
0 → 100644
View file @
3a238dbf
import
React
,
{
useState
,
useEffect
}
from
'react'
import
styles
from
'./index.less'
export
interface
ImagePreviewProps
{
src
:
string
,
currentRef
?:
any
}
const
ImagePreview
:
React
.
FC
<
ImagePreviewProps
>
=
({
src
,
currentRef
})
=>
{
const
[
state
,
setState
]
=
useState
(
false
)
useEffect
(()
=>
{
if
(
currentRef
)
{
currentRef
.
current
=
{
toggle
}
}
},
[])
const
toggle
=
()
=>
{
setState
(
!
state
)
}
return
state
&&
(
<
div
className=
{
styles
.
imgPreviewWrapper
}
onClick=
{
toggle
}
>
<
img
src=
{
src
}
className=
{
styles
.
imgPreview
}
/>
</
div
>
)
}
ImagePreview
.
defaultProps
=
{}
export
default
ImagePreview
\ No newline at end of file
src/components/ModalTable/index.tsx
View file @
3a238dbf
...
...
@@ -3,7 +3,7 @@ import {StandardTable} from 'god'
import
NestTable
from
'@/components/NestTable'
import
{
IStandardTableProps
}
from
'god/dist/src/standard-table'
import
{
Row
,
Col
,
Modal
}
from
'antd'
import
{
productModalSchema
,
productModalByMemberSchema
,
memberModalSchema
,
inquirySchema
,
demandSchema
,
enquirySchema
,
mergeOrderSchema
,
goodsModalSchema
}
from
'./schema'
import
{
productModalSchema
,
productModalByMemberSchema
,
memberModalSchema
,
inquirySchema
,
demandSchema
,
enquirySchema
,
mergeOrderSchema
,
goodsModalSchema
,
demandNumberSchema
}
from
'./schema'
import
Search
from
'../NiceForm/components/Search'
import
SearchSelect
from
'../NiceForm/components/SearchSelect'
import
Submit
from
'../NiceForm/components/Submit'
...
...
@@ -18,16 +18,17 @@ export interface ModalTableProps extends IStandardTableProps<any> {
cancel
?(),
visible
?:
boolean
,
resetModal
?:
object
,
modalType
?:
'productByDefault'
|
'productByMember'
|
'memberByDefault'
|
'inquiryByDefault'
|
'demandByDefault'
|
'enquiryModel'
|
'MergeOrderByDefault'
|
'goodsModalSchema'
|
'none'
,
modalType
?:
'productByDefault'
|
'productByMember'
|
'memberByDefault'
|
'inquiryByDefault'
|
'demandByDefault'
|
'enquiryModel'
|
'MergeOrderByDefault'
|
'goodsModalSchema'
|
'
demandNumberSchema'
|
'
none'
,
useNestTable
?:
boolean
,
// 是否使用嵌套表格
nestColumns
?:
any
[],
nestTableProps
?:
any
,
// fix: 新增参数, 为true时每次开启弹窗都会重新reload接口
forceRender
?:
boolean
forceRender
?:
boolean
,
searchName
?:
string
}
const
ModalTable
:
React
.
FC
<
ModalTableProps
>
=
(
props
)
=>
{
const
{
width
=
704
,
modalTitle
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
modalType
=
'none'
,
forceRender
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
,
...
resetTable
}
=
props
const
{
width
=
704
,
modalTitle
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
modalType
=
'none'
,
forceRender
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
,
searchName
,
...
resetTable
}
=
props
const
selfRef
=
currentRef
||
useRef
<
any
>
({})
useEffect
(()
=>
{
if
(
visible
&&
forceRender
)
{
...
...
@@ -72,6 +73,9 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
case
'goodsModalSchema'
:
{
return
goodsModalSchema
}
case
'demandNumberSchema'
:
{
return
demandNumberSchema
}
case
'none'
:
{
return
{}
}
...
...
@@ -111,7 +115,7 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
searchName
?
searchName
:
'name'
,
FORM_FILTER_PATH
,
);
}
...
...
src/components/ModalTable/schema/index.ts
View file @
3a238dbf
...
...
@@ -466,4 +466,64 @@ export const mergeOrderSchema: ISchema = {
}
}
}
}
// 需求报价,选择对应需求单号
export
const
demandNumberSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
requisitionFormNo
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'需求单号'
,
align
:
'flex-left'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
style
:
{
marginRight
:
0
}
},
colStyle
:
{
marginTop
:
20
,
},
},
properties
:
{
demandMembers
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求会员'
,
}
},
details
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'需求单摘要'
,
}
},
"[startVoucherTime,endVoucherTime]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
'单据时间(全部)'
,
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
\ No newline at end of file
src/pages/logistics/components/orderSearchDetail.tsx
View file @
3a238dbf
...
...
@@ -304,7 +304,7 @@ const detailInfo: React.FC<{}> = () => {
</>
}
extra=
{
isextraOption
&&
dataInfo
.
status
===
2
&&
<>
<
Button
onClick=
{
()
=>
setvisible
(
true
)
}
>
<
StopOutlined
/>
...
...
src/pages/logistics/logisticsSubmit/toOrderSubmitDetail.tsx
View file @
3a238dbf
...
...
@@ -320,6 +320,7 @@ const Deatail: React.FC<{}> = () => {
pageSize
:
'100000'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
.
data
,
100086
)
let
v
=
res
.
data
.
data
.
filter
(
v
=>
v
.
id
==
query
.
orderDeliveryDetailsId
).
map
(
v
=>
v
)
let
{
memberName
,
fullAddress
,
deliveryAddresId
}
=
v
[
0
]
||
{}
actions
.
setFieldValue
(
'receiverName'
,
memberName
)
...
...
src/pages/lxMall/purchaseOnline/list.tsx
View file @
3a238dbf
...
...
@@ -31,7 +31,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
commodityList
.
map
((
item
,
index
)
=>
(
<
div
key=
{
item
.
id
}
className=
{
cx
(
styles
.
purchase_list_item
,
styles
.
row
)
}
>
<
div
className=
{
styles
.
purchase_list_item_title
}
>
<
Link
to=
{
`/memberCenter/tranactionAbility/enquiry
Submit/viewEnquiryDetail
?id=${item.id}`
}
>
{
item
.
details
}
</
Link
>
<
Link
to=
{
`/memberCenter/tranactionAbility/enquiry
Offer/toAddSubmitList/rfq/preview
?id=${item.id}`
}
>
{
item
.
details
}
</
Link
>
</
div
>
<
div
className=
{
styles
.
purchase_list_item_info_box
}
>
<
div
className=
{
styles
.
purchase_list_item_info_line
}
>
...
...
@@ -61,7 +61,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
<
span
className=
{
styles
.
credit_text
}
>
{
item
.
memberCreditDcore
||
0
}
</
span
>
</
div
>
<
div
className=
{
styles
.
quoted_price_btn
}
>
<
Link
to=
{
`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/
add
?id=${item.id}`
}
>
立即报价
</
Link
>
<
Link
to=
{
`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/
quote
?id=${item.id}`
}
>
立即报价
</
Link
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/transaction/components/createElectronModal/index.tsx
View file @
3a238dbf
...
...
@@ -126,7 +126,7 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
const
{
run
:
submitRun
,
loading
:
submitLoading
}
=
useHttpRequest
(
PublicApi
.
postOrderSubmittedReviewOrder
)
const
createElectron
=
async
()
=>
{
const
contractTemplateId
=
schemaActions
.
getFieldValue
(
'contractTemplateId'
)
if
(
!
contractTemplateId
)
{
if
(
data
.
isElectronicContract
===
1
&&
!
contractTemplateId
)
{
message
.
error
(
'请先选择电子合同模板'
)
return
;
}
...
...
@@ -181,7 +181,18 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
electronBtn
}
}
effects=
{
(
$
,
actions
)
=>
{
useAsyncSelect
(
'contractTemplateId'
,
async
()
=>
(
await
PublicApi
.
getOrderSelectListContractTemplate
()).
data
,
[
'name'
,
'id'
])
$
(
'onFormInit'
).
subscribe
(()
=>
{
if
(
data
.
isElectronicContract
===
1
)
{
useAsyncSelect
(
'contractTemplateId'
,
async
()
=>
(
await
PublicApi
.
getOrderSelectListContractTemplate
()).
data
,
[
'name'
,
'id'
])
}
else
{
actions
.
setFieldState
(
'usingElectronicContracts'
,
state
=>
{
state
.
value
=
2
state
.
props
[
"x-component-props"
]
=
{
disabled
:
true
}
})
}
})
}
}
/>
)
...
...
src/pages/transaction/components/orderPayResultModal/index.tsx
View file @
3a238dbf
import
React
,
{
useState
,
useEffect
,
useContext
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useContext
,
useRef
}
from
'react'
import
{
Modal
,
List
,
Avatar
,
Button
,
Space
}
from
'antd'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
...
...
@@ -7,6 +7,7 @@ import { PublicApi } from '@/services/api'
import
{
history
,
Link
}
from
'umi'
import
OverflowText
from
'@/components/OverflowText'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
ImagePreview
from
'@/components/ImagePreview'
export
interface
OrderPayResultModalProps
{
type
:
'default'
|
'preview'
,
...
...
@@ -14,12 +15,13 @@ export interface OrderPayResultModalProps {
}
const
OrderPayResultModal
:
React
.
FC
<
OrderPayResultModalProps
>
=
({
type
,
currentRef
})
=>
{
const
imgRef
=
useRef
<
any
>
({})
const
{
data
}
=
useContext
(
OrderDetailContext
)
const
{
id
}
=
usePageStatus
()
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
canCtlData
=
data
?.
paymentInformationResponses
.
find
(
v
=>
v
.
externalState
===
PayOutWorkState
.
READY_CONFIRM_RESULT
)
||
{}
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderConfirmedPaymentResultsOrder
)
const
transData
=
canCtlData
.
payOrderUrls
?.
split
(
','
)
||
[]
const
transData
=
canCtlData
.
payOrderUrls
?
JSON
.
parse
(
canCtlData
.
payOrderUrls
)
:
[]
useEffect
(()
=>
{
if
(
currentRef
)
{
currentRef
.
current
=
{
...
...
@@ -62,10 +64,11 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
itemLayout=
"horizontal"
dataSource=
{
transData
||
[]
}
renderItem=
{
(
item
:
string
)
=>
(
<
List
.
Item
style=
{
{
fontSize
:
12
}
}
extra=
{
<
a
href=
{
item
}
target=
'_blank'
>
预览
</
a
>
}
>
<
List
.
Item
style=
{
{
fontSize
:
12
}
}
extra=
{
<
Button
type=
'link'
onClick=
{
imgRef
.
current
.
toggle
}
>
预览
</
Button
>
}
>
<
OverflowText
style=
{
{
flex
:
'.9'
}
}
>
{
item
}
</
OverflowText
>
<
ImagePreview
src=
{
item
}
currentRef=
{
imgRef
}
/>
</
List
.
Item
>
)
}
/>
...
...
src/pages/transaction/enquiryOffer/components/inquiryModalTable/index.tsx
View file @
3a238dbf
...
...
@@ -17,7 +17,7 @@ export interface InquiryModalTableProps extends ModalTableProps {
* @return {type}
*/
const
fetchEqData
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderQuotationRequisitionForm
List
({...
params
,
externalState
:
2
});
const
res
=
await
PublicApi
.
getOrderQuotationRequisitionForm
No
({...
params
,
externalState
:
2
});
return
res
.
data
}
const
formTime
=
(
text
)
=>
{
...
...
@@ -85,6 +85,7 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
props
.
confirmModal
(
item
)
setVisible
(
false
)
}
return
(
<
ModalTable
modalTitle=
'选择需求单'
...
...
@@ -94,7 +95,8 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
cancel=
{
()
=>
setVisible
(
false
)
}
fetchTableData=
{
(
params
)
=>
fetchEqData
(
params
)
}
rowSelection=
{
rowSelection
}
modalType=
'inquiryByDefault'
modalType=
'demandNumberSchema'
searchName=
'requisitionFormNo'
tableProps=
{
{
rowKey
:
'id'
}
}
...
...
src/pages/transaction/enquiryOffer/toAddSubmit/detail.tsx
View file @
3a238dbf
...
...
@@ -570,7 +570,9 @@ const Detail: React.FC<{}> = () => {
* @return {type}
*/
const
pathname
=
history
.
location
.
pathname
if
(
pathname
===
"/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add"
&&
id
)
{
const
pathType
=
pathname
.
split
(
'/'
);
const
quote
=
pathType
[
pathType
.
length
-
1
];
if
(
quote
===
"quote"
&&
id
)
{
PublicApi
.
getOrderQuotationRequisitionFormDetails
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
data
=
res
.
data
...
...
src/pages/transaction/goodsOffer/addEnquiryOrder/components/enquiryGoods.tsx
View file @
3a238dbf
...
...
@@ -152,7 +152,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
const
{
value
}
=
e
.
target
goodsList
.
forEach
(
v
=>
{
if
(
v
.
productId
===
id
)
{
v
.
purchase
Quantity
=
value
v
.
purchase
Count
=
value
}
})
getGoodsList
(
goodsList
)
// 返回给父级
...
...
src/pages/transaction/goodsOffer/components/details.tsx
View file @
3a238dbf
...
...
@@ -314,7 +314,7 @@ const Details: React.FC<parmas> = (props) => {
extra=
{
<>
{
(
action
===
true
&&
(
Number
(
page_type
)
===
2
||
Number
(
page_type
)
===
3
)
&&
(
data
.
interiorState
===
2
||
data
.
interiorState
===
3
))
&&
(
action
&&
(
Number
(
page_type
)
===
2
||
Number
(
page_type
)
===
3
)
&&
(
data
.
interiorState
===
2
||
data
.
interiorState
===
3
))
&&
<>
<
Button
type=
'primary'
className=
{
style
[
'saveBtn'
]
}
onClick=
{
()
=>
{
setvisible
(
true
)
}
}
>
<
CheckSquareOutlined
/>
单据审核
...
...
@@ -322,7 +322,7 @@ const Details: React.FC<parmas> = (props) => {
</>
}
{
(
action
===
true
&&
Number
(
page_type
)
===
6
&&
data
.
interiorState
===
1
)
&&
(
action
&&
Number
(
page_type
)
===
6
&&
data
.
interiorState
===
1
)
&&
<
Button
className=
{
style
[
'saveBtn'
]
}
onClick=
{
()
=>
setvisible
(
true
)
}
>
<
CheckSquareOutlined
/>
提交
</
Button
>
...
...
src/pages/transaction/inquiryQuote/components/auditModel.tsx
View file @
3a238dbf
...
...
@@ -33,7 +33,7 @@ const AuditModal: React.FC<Params> = (props) => {
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
value
.
id
=
Number
(
props
.
id
)
switch
(
props
.
type
)
{
case
1
:
PublicApi
.
postOrderProductQuotationtToSubmit
(
value
).
then
(
res
=>
{
...
...
@@ -56,7 +56,7 @@ const AuditModal: React.FC<Params> = (props) => {
}
})
break
;
case
4
:
case
6
:
PublicApi
.
postOrderProductQuotationtSubmit
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
...
...
src/pages/transaction/inquiryQuote/components/details.tsx
View file @
3a238dbf
...
...
@@ -38,7 +38,7 @@ const Details: React.FC<parmas> = (props) => {
const
{
pathname
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
2
];
const
[
view
,
setview
]
=
useState
<
Number
>
(
1
);
const
[
show
,
setshow
]
=
useState
<
Boolean
>
(
false
)
// 模拟数据
const
[
data
,
setdata
]
=
useState
<
any
>
([]);
const
format
=
(
text
)
=>
{
...
...
@@ -257,7 +257,8 @@ const Details: React.FC<parmas> = (props) => {
}
// 详情请求
useEffect
(()
=>
{
if
(
type
===
'rfq'
)
{
console
.
log
(
page_type
,
10086
)
if
(
type
===
'rfq'
)
{
// 代表的是查看询价
setview
(
1
)
PublicApi
.
getOrderProductInquiryDetails
({
id
}).
then
(
res
=>
{
...
...
@@ -265,7 +266,7 @@ const Details: React.FC<parmas> = (props) => {
setdata
(
res
.
data
)
}
})
}
else
{
}
else
if
(
type
===
'quote'
)
{
// 代表的是查看报价
setview
(
2
)
PublicApi
.
getOrderProductQuotationDetails
({
id
}).
then
(
res
=>
{
...
...
@@ -273,6 +274,14 @@ const Details: React.FC<parmas> = (props) => {
setdata
(
res
.
data
)
}
})
}
else
{
setshow
(
true
)
setview
(
2
)
PublicApi
.
getOrderProductQuotationDetails
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setdata
(
res
.
data
)
}
})
}
},
[])
...
...
@@ -347,18 +356,13 @@ const Details: React.FC<parmas> = (props) => {
extra=
{
<>
{
(
Number
(
page_type
)
===
4
&&
data
.
interiorState
===
1
)
&&
<>
<
Button
>
<
StopOutlined
/>
审核不通过
</
Button
>
<
Button
className=
{
style
[
'saveBtn'
]
}
>
<
CheckSquareOutlined
/>
审核通过
</
Button
>
</>
((
page_type
===
2
||
page_type
===
3
||
page_type
===
6
)
&&
show
)
&&
<
Button
type=
'primary'
className=
{
style
[
'saveBtn'
]
}
onClick=
{
()
=>
setvisible
(
true
)
}
>
<
CheckSquareOutlined
/>
单据审核
</
Button
>
}
{
(
Number
(
page_type
)
===
1
&&
data
.
externalState
===
1
&&
data
.
interiorState
===
3
)
&&
(
page_type
===
1
&&
show
)
&&
<
Button
className=
{
style
[
'saveBtn'
]
}
onClick=
{
()
=>
setvisible
(
true
)
}
>
<
CheckSquareOutlined
/>
提交
</
Button
>
...
...
@@ -382,7 +386,7 @@ const Details: React.FC<parmas> = (props) => {
{
headerWrapperData
&&
headerWrapperData
.
map
(
item
=>
(
<
div
key=
{
item
.
name
}
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
{
item
.
label
}
:
</
div
>
<
div
>
{
analyticalFn
(
item
.
name
,
item
.
value
)
}
</
div
>
<
div
>
{
analyticalFn
(
item
.
name
,
item
.
value
)
}
</
div
>
</
div
>
))
}
</
div
>
...
...
@@ -549,5 +553,4 @@ const Details: React.FC<parmas> = (props) => {
</
PageHeaderWrapper
>
)
}
export
default
Details
\ No newline at end of file
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
View file @
3a238dbf
import
React
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -12,6 +12,9 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
{
DatePicker
}
from
'@formily/antd-components'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
// 待归档订单
...
...
@@ -25,15 +28,38 @@ const fetchTableData = async (params) => {
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
columns
columns
,
ref
,
rowSelection
,
rowSelectionCtl
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderFiledOrderAddAll
)
const
handleSubmitBatch
=
async
()
=>
{
if
(
rowSelectionCtl
.
selectRow
.
length
===
0
)
{
message
.
error
(
'请先勾选订单'
)
return
;
}
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
purchaseOrderInteriorState
!==
PurchaseOrderInsideWorkState
.
FILLING_ORDER
)
if
(
canBitch
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
ref
.
current
.
reload
()
}
}
else
{
message
.
error
(
'只能批量提交内部状态为待确认归档的订单'
)
}
}
return
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
rowKey=
{
'orderNo'
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
...
...
@@ -53,6 +79,18 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
DateRangePicker
:
DatePicker
.
RangePicker
,
Submit
}
},
layouts
:
{
order
:
2
,
span
:
16
}
}
}
formilyChilds=
{
{
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
layouts
:
{
span
:
8
}
}
}
/>
...
...
src/pages/transaction/purchaseOrder/readyFileOrder/schema/index.ts
View file @
3a238dbf
...
...
@@ -12,7 +12,7 @@ export const tableListSchema: ISchema = {
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-
start
'
,
align
:
'flex-
end
'
,
},
},
[
FORM_FILTER_PATH
]:
{
...
...
@@ -21,7 +21,7 @@ export const tableListSchema: ISchema = {
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
margin
Righ
t
:
20
margin
Lef
t
:
20
}
},
properties
:
{
...
...
src/pages/transaction/saleOrder/readyReturnDocument/index.tsx
View file @
3a238dbf
...
...
@@ -33,7 +33,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelection
,
rowSelectionCtl
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
SubmittedReviewOrderOne
All
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
OfOrdersToBeFiled
All
)
const
handleSubmitBatch
=
async
()
=>
{
if
(
rowSelectionCtl
.
selectRow
.
length
===
0
)
{
...
...
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