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
65615cbf
Commit
65615cbf
authored
Oct 20, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
5dc1400f
d92fdfad
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
921 additions
and
475 deletions
+921
-475
SmilingFace.tsx
src/components/NiceForm/components/SmilingFace.tsx
+1
-0
index.tsx
src/components/NiceForm/public/index.tsx
+0
-1
index.tsx
src/pages/afterService/components/InfoList/index.tsx
+3
-3
index.tsx
...eGoods/waitSubmitOrderList/components/basicInfo/index.tsx
+4
-3
index.tsx
...eGoods/waitSubmitOrderList/components/proofFile/index.tsx
+1
-1
index.less
.../waitSubmitOrderList/components/replaceAddress/index.less
+0
-0
index.tsx
...s/waitSubmitOrderList/components/replaceAddress/index.tsx
+28
-0
index.tsx
...ds/waitSubmitOrderList/components/returnAddress/index.tsx
+3
-3
detail.tsx
...afterService/exchangeGoods/waitSubmitOrderList/detail.tsx
+33
-11
search.tsx
src/pages/lxMall/commodity/search.tsx
+8
-7
auditModel.tsx
...transaction/confirmInquiryQuote/components/auditModel.tsx
+12
-4
details.tsx
...es/transaction/confirmInquiryQuote/components/details.tsx
+5
-1
index.tsx
...ransaction/confirmInquiryQuote/pendingReviewOne/index.tsx
+6
-6
index.tsx
...ransaction/confirmInquiryQuote/pendingReviewTwo/index.tsx
+6
-6
index.tsx
...s/transaction/confirmInquiryQuote/pendingSubmit/index.tsx
+6
-6
index.tsx
...saction/confirmInquiryQuote/pendingSubmitReview/index.tsx
+24
-9
index.tsx
...ages/transaction/confirmInquiryQuote/quoteOrder/index.tsx
+6
-6
productModal.tsx
...ges/transaction/enquirySubmit/components/productModal.tsx
+90
-90
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+17
-34
basicInfo.tsx
...ion/inquiryQuote/addInquiryOrder/components/basicInfo.tsx
+10
-17
enquiryGoods.tsx
.../inquiryQuote/addInquiryOrder/components/enquiryGoods.tsx
+1
-12
tradingConditions.tsx
...iryQuote/addInquiryOrder/components/tradingConditions.tsx
+9
-19
index.ts
...ansaction/stockSellStorage/bills/addBills/schema/index.ts
+3
-0
index.tsx
...s/transaction/stockSellStorage/warehouse/schema/index.tsx
+12
-12
index.tsx
src/pages/transaction/supplierEvaluation/analysis/index.tsx
+98
-34
index.tsx
...on/supplierEvaluation/components/EvaluationList/index.tsx
+3
-3
index.tsx
...action/supplierEvaluation/components/RecordList/index.tsx
+210
-41
index.ts
.../supplierEvaluation/components/RecordList/schema/index.ts
+4
-4
constans.tsx
src/pages/transaction/supplierEvaluation/constans.tsx
+20
-0
index.tsx
...saction/supplierEvaluation/unevaluated/evaluate/index.tsx
+146
-57
index.ts
...n/supplierEvaluation/unevaluated/evaluate/schema/index.ts
+11
-14
index.tsx
...ages/transaction/supplierEvaluation/unevaluated/index.tsx
+33
-49
index.tsx
...ansaction/supplierEvaluation/unevaluated/schema/index.tsx
+47
-22
utils.ts
src/pages/transaction/supplierEvaluation/utils.ts
+45
-0
index.tsx
src/utils/index.tsx
+16
-0
No files found.
src/components/NiceForm/components/SmilingFace.tsx
View file @
65615cbf
...
...
@@ -11,6 +11,7 @@ const SmilingFace: React.FC<SmilingFaceProps> = ({
let
node
=
null
;
switch
(
value
)
{
case
0
:
case
1
:
case
2
:
{
node
=
(
...
...
src/components/NiceForm/public/index.tsx
View file @
65615cbf
...
...
@@ -68,7 +68,6 @@ registerVirtualBox('controller-group', (_props) => {
// 左右两列布局
registerVirtualBox
(
'LeftRightLayout'
,
(
_props
)
=>
{
console
.
log
(
'_props'
,
_props
)
const
{
children
,
props
}
=
_props
;
const
leftItems
=
children
.
filter
(
child
=>
child
.
props
.
schema
[
'x-component-props'
]
&&
child
.
props
.
schema
[
'x-component-props'
].
position
===
'left'
...
...
src/pages/afterService/components/InfoList/index.tsx
View file @
65615cbf
...
...
@@ -10,16 +10,16 @@ interface dataListType {
}
interface
InfoListProps
{
data
:
dataListType
[]
options
:
dataListType
[]
}
const
InfoList
:
React
.
FC
<
InfoListProps
>
=
(
props
)
=>
{
const
{
data
=
[]
}
=
props
const
{
options
=
[]
}
=
props
return
(
<
div
className=
{
styles
.
info_list
}
>
{
data
&&
data
.
map
((
item
,
index
)
=>
(
options
&&
options
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
info_list_line
}
key=
{
`info_list_line_${index}`
}
>
<
div
className=
{
cx
(
styles
.
info_list_line_label
,
item
.
labelClassName
?
item
.
labelClassName
:
""
)
}
>
{
item
.
label
}{
item
.
required
&&
<
i
className=
{
styles
.
required
}
>
*
</
i
>
}
</
div
>
<
div
className=
{
styles
.
info_list_line_value
}
>
{
item
.
value
}
</
div
>
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/basicInfo/index.tsx
View file @
65615cbf
import
React
from
'react'
import
{
Input
}
from
'antd'
import
{
FormInstance
}
from
'antd/lib/form'
import
InfoList
from
'../../../../components/InfoList'
interface
BasicInfoProps
{
form
:
FormInstance
}
const
BasicInfo
:
React
.
FC
<
BasicInfoProps
>
=
(
props
)
=>
{
const
{
form
}
=
props
let
detailList
=
[
{
label
:
'申请单摘要'
,
...
...
@@ -38,7 +39,7 @@ const BasicInfo: React.FC<BasicInfoProps> = (props) => {
return
(
<
div
>
<
InfoList
data
=
{
detailList
}
/>
<
InfoList
options
=
{
detailList
}
/>
</
div
>
)
}
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/proofFile/index.tsx
View file @
65615cbf
...
...
@@ -128,7 +128,7 @@ const ProofFile: React.FC<ProofFilePropsType> = (props) => {
return
(
<
div
>
<
InfoList
data
=
{
detailList
}
/>
<
InfoList
options
=
{
detailList
}
/>
</
div
>
)
}
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/replaceAddress/index.less
0 → 100644
View file @
65615cbf
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/replaceAddress/index.tsx
0 → 100644
View file @
65615cbf
import
React
from
'react'
import
InfoList
from
'../../../../components/InfoList'
import
styles
from
'./index.less'
interface
ReplaceAddressPropsType
{
}
const
ReplaceAddress
:
React
.
FC
<
ReplaceAddressPropsType
>
=
(
props
)
=>
{
let
detailList
=
[
{
label
:
'换货收货地址'
,
labelClassName
:
styles
.
flexStart
,
value
:
<>
133
</>,
},
]
return
(
<
div
>
<
InfoList
options=
{
detailList
}
/>
</
div
>
)
}
export
default
ReplaceAddress
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/
a
ddress/index.tsx
→
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/
returnA
ddress/index.tsx
View file @
65615cbf
import
React
from
'react'
interface
AddressPropsType
{
interface
Return
AddressPropsType
{
}
const
Address
:
React
.
FC
<
AddressPropsType
>
=
(
props
)
=>
{
const
ReturnAddress
:
React
.
FC
<
Return
AddressPropsType
>
=
(
props
)
=>
{
return
(
<
div
>
...
...
@@ -13,4 +13,4 @@ const Address: React.FC<AddressPropsType> = (props) => {
)
}
export
default
Address
export
default
Return
Address
src/pages/afterService/exchangeGoods/waitSubmitOrderList/detail.tsx
View file @
65615cbf
import
React
,
{
useState
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
SaveOutlined
}
from
'@ant-design/icons'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
,
Helmet
}
from
'umi'
import
{
Button
,
Tabs
}
from
'antd'
import
{
Button
,
Tabs
,
Form
}
from
'antd'
import
ReutrnEle
from
'@/components/ReturnEle'
import
BasicInfo
from
'./components/basicInfo'
import
ExchangeGoods
from
'./components/exchangeGoods'
import
ProofFile
from
'./components/proofFile'
import
Log
from
'./components/log'
import
Address
from
'./components/address'
import
ReplaceAddress
from
'./components/replaceAddress'
import
ReturnAddress
from
'./components/returnAddress'
import
styles
from
'./detail.less'
interface
OrderDetailProps
{
...
...
@@ -19,8 +20,21 @@ interface OrderDetailProps {
const
{
TabPane
}
=
Tabs
const
OrderDetail
:
React
.
FC
<
OrderDetailProps
>
=
(
props
)
=>
{
const
{
type
}
=
props
.
match
.
params
const
{
location
}
=
props
const
[
form
]
=
Form
.
useForm
()
const
[
type
,
setType
]
=
useState
<
'add'
|
'edit'
|
'detail'
>
()
const
[
btnLoading
,
setBtnLoading
]
=
useState
<
boolean
>
(
false
)
const
[
tabActiveKey
,
setTabActiveKey
]
=
useState
<
string
>
(
'replaceAddress'
)
useEffect
(()
=>
{
getPathNameType
(
location
.
pathname
)
},
[])
const
getPathNameType
=
(
pathname
)
=>
{
let
typeArr
=
pathname
.
split
(
'/'
)
let
result
=
typeArr
[
typeArr
.
length
-
1
]
setType
(
result
)
}
const
getPageTitle
=
()
=>
{
switch
(
type
)
{
...
...
@@ -35,6 +49,11 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
}
}
const
handleSave
=
()
=>
{
}
return
(
<>
<
Helmet
>
...
...
@@ -44,16 +63,16 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
getPageTitle
()
}
extra=
{
[
<
Button
key=
"1"
onClick=
{
()
=>
{
}
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
extra=
{
type
!==
'detail'
?
[
<
Button
key=
"1"
onClick=
{
()
=>
handleSave
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>,
]
}
]
:
[]
}
>
<
div
className=
{
styles
.
detail_wrap
}
>
<
Tabs
type=
"card"
defaultActiveKey=
"proofFile"
className=
{
styles
.
detail_tabs
}
>
<
Tabs
type=
"card"
activeKey=
{
tabActiveKey
}
onChange=
{
(
key
)
=>
setTabActiveKey
(
key
)
}
className=
{
styles
.
detail_tabs
}
>
<
TabPane
tab=
"基本信息"
key=
"basicInfo"
>
<
BasicInfo
/>
<
BasicInfo
form=
{
form
}
/>
</
TabPane
>
<
TabPane
tab=
"换货商品"
key=
"exchangeGoods"
>
<
ExchangeGoods
/>
...
...
@@ -61,8 +80,11 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
<
TabPane
tab=
"举证附件"
key=
"proofFile"
>
<
ProofFile
/>
</
TabPane
>
<
TabPane
tab=
"换货收货地址"
key=
"address"
>
<
Address
/>
<
TabPane
tab=
"退货收货地址"
key=
"returnAddress"
>
<
ReturnAddress
/>
</
TabPane
>
<
TabPane
tab=
"换货收货地址"
key=
"replaceAddress"
>
<
ReplaceAddress
/>
</
TabPane
>
<
TabPane
tab=
"流转记录"
key=
"log"
>
<
Log
/>
...
...
src/pages/lxMall/commodity/search.tsx
View file @
65615cbf
...
...
@@ -4,7 +4,7 @@ import Filter from '../components/Filter'
import
{
FILTER_TYPE
}
from
'@/constants'
import
cx
from
'classnames'
import
{
history
}
from
'umi'
import
{
Pagination
}
from
'antd'
import
{
Pagination
,
message
}
from
'antd'
import
CommodityList
from
'./list'
import
SearchNoResult
from
'../components/SearchNoResult'
import
isEmpty
from
'lodash/isEmpty'
...
...
@@ -13,7 +13,7 @@ import { store } from '@/store'
import
{
PublicApi
}
from
'@/services/api'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
useLocalStore
,
observer
}
from
'mobx-react'
import
{
Ge
tSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
import
{
Pos
tSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
import
arrowDownIcon
from
'@/assets/imgs/arrow_down.png'
import
arrowDownActiveIcon
from
'@/assets/imgs/arrow_down_active.png'
import
styles
from
'./index.less'
...
...
@@ -52,7 +52,7 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
const
{
query
:
{
search
=
""
}
}
=
props
.
location
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
true
)
const
[
showType
,
setShowType
]
=
useState
<
number
>
(
1
)
// 展示方式:1:矩阵排列; 2:列表排列
const
[
commodityList
,
setCommodityList
]
=
useState
<
Ge
tSearchShopEnterpriseGetCommodityListResponseDetail
[]
>
([])
const
[
commodityList
,
setCommodityList
]
=
useState
<
Pos
tSearchShopEnterpriseGetCommodityListResponseDetail
[]
>
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
20
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
...
...
@@ -98,19 +98,19 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
let
getFn
;
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
ge
tSearchShopEnterpriseGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopEnterpriseGetCommodityList
break
case
LAYOUT_TYPE
.
shop
:
param
.
storeId
=
shopId
getFn
=
PublicApi
.
ge
tSearchShopStoreGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopStoreGetCommodityList
break
case
LAYOUT_TYPE
.
channel
:
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
ge
tSearchShopChannelGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
ge
tSearchShopChannelGetCommodityList
getFn
=
PublicApi
.
pos
tSearchShopChannelGetCommodityList
break
}
...
...
@@ -118,6 +118,7 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
getFn
&&
getFn
(
param
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
setCommodityList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
...
...
src/pages/transaction/confirmInquiryQuote/components/auditModel.tsx
View file @
65615cbf
...
...
@@ -36,8 +36,8 @@ const AuditModal: React.FC<Params> = (props) => {
value
.
id
=
props
.
id
switch
(
props
.
type
)
{
case
1
:
PublicApi
.
postOrder
ProductQuotationtToSubmit
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
PublicApi
.
postOrder
NotarizeEnquiryQuotedPriceAffirm
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
...
...
@@ -45,7 +45,7 @@ const AuditModal: React.FC<Params> = (props) => {
// 待审核报价单1级
case
2
:
PublicApi
.
postOrderNotarizeEnquiryQuotedPriceAudit
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
...
...
@@ -53,7 +53,15 @@ const AuditModal: React.FC<Params> = (props) => {
// 待审核报价单2级
case
3
:
PublicApi
.
postOrderNotarizeEnquiryQuotedPriceAuditTwo
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
break
;
// 确认询价报价-待提交审核报价单-提交审核
case
5
:
PublicApi
.
postOrderNotarizeEnquiryQuotedPriceSubmit
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
...
...
src/pages/transaction/confirmInquiryQuote/components/details.tsx
View file @
65615cbf
...
...
@@ -278,7 +278,11 @@ const Details: React.FC<{}> = () => {
useEffect
(()
=>
{
switch
(
Number
(
page_type
))
{
case
4
:
PublicApi
.
getOrderNotarizeEnquiryProductQuotationDetails
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setdata
(
res
.
data
)
}
})
break
;
default
:
PublicApi
.
getOrderNotarizeEnquiryQuotedPriceDetails
({
id
}).
then
(
res
=>
{
...
...
src/pages/transaction/confirmInquiryQuote/pendingReviewOne/index.tsx
View file @
65615cbf
...
...
@@ -42,12 +42,12 @@ const PendingReviewOne: React.FC<{}> = () => {
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
//
PublicApi.getOrderNotarizeEnquiryQuotedPriceAuditList({...params}).then(res => {
//
resolve(res.data)
//
})
setTimeout
(()
=>
{
resolve
(
data
)
},
500
)
PublicApi
.
getOrderNotarizeEnquiryQuotedPriceAuditList
({...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
//
setTimeout(() => {
//
resolve(data)
//
}, 500)
})
}
// 批量操作
...
...
src/pages/transaction/confirmInquiryQuote/pendingReviewTwo/index.tsx
View file @
65615cbf
...
...
@@ -42,12 +42,12 @@ const PendingReviewTwo: React.FC<{}> = () => {
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
//
PublicApi.getOrderNotarizeEnquiryQuotedPriceAuditListTwo({...params}).then(res => {
//
resolve(res.data)
//
})
setTimeout
(()
=>
{
resolve
(
data
)
},
500
)
PublicApi
.
getOrderNotarizeEnquiryQuotedPriceAuditListTwo
({...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
//
setTimeout(() => {
//
resolve(data)
//
}, 500)
})
}
// 批量操作
...
...
src/pages/transaction/confirmInquiryQuote/pendingSubmit/index.tsx
View file @
65615cbf
...
...
@@ -116,12 +116,12 @@ const PendingSubmit: React.FC<{}> = () => {
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
//
PublicApi.getOrderNotarizeEnquiryQuotedPriceAffirmList({ ...params }).then(res => {
//
resolve(res.data)
//
})
setTimeout
(()
=>
{
resolve
(
data
)
},
500
)
PublicApi
.
getOrderNotarizeEnquiryQuotedPriceAffirmList
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
//
setTimeout(() => {
//
resolve(data)
//
}, 500)
})
}
...
...
src/pages/transaction/confirmInquiryQuote/pendingSubmitReview/index.tsx
View file @
65615cbf
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
Button
,
Card
,
Space
,
Row
,
Col
}
from
'antd'
;
import
{
Button
,
Card
,
Space
,
Row
,
Col
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
StandardTable
}
from
'god'
;
import
{
filterInternalState
,
filterExternalState
}
from
'./../../common/statusList'
;
...
...
@@ -91,11 +91,26 @@ const PendingSubmitReview: React.FC<{}> = () => {
const
controllerBtns
=
<
Row
>
<
Col
span=
{
24
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
>
批量提交审核
</
Button
>
<
Button
onClick=
{
()
=>
handleSubmitAll
(
selectedRowKeys
)
}
>
批量提交审核
</
Button
>
</
Space
>
</
Col
>
</
Row
>
// 批量操作
const
handleSubmitAll
=
(
ids
:
number
[])
=>
{
if
(
selectRow
.
length
>
0
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postOrderNotarizeEnquiryQuotedPriceSubmitAll
({
ids
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
ref
.
current
.
reload
();
}
})
})
}
else
{
message
.
error
(
'请选择要操作的审核报价单!'
)
}
}
// 列表数据
const
data
=
{
// 模拟的数据
totalCount
:
6
,
...
...
@@ -125,12 +140,12 @@ const PendingSubmitReview: React.FC<{}> = () => {
}
const
fetchData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
//
PublicApi.getOrderNotarizeEnquiryQuotedPriceList({...params}).then(res => {
//
resolve(res.data)
//
})
setTimeout
(()
=>
{
resolve
(
data
)
},
500
)
PublicApi
.
getOrderNotarizeEnquiryQuotedPriceList
({...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
//
setTimeout(() => {
//
resolve(data)
//
}, 500)
})
}
const
handleModalOK
=
()
=>
{
...
...
src/pages/transaction/confirmInquiryQuote/quoteOrder/index.tsx
View file @
65615cbf
...
...
@@ -82,12 +82,12 @@ const EnquiryOrder: React.FC<{}> = (props) => {
}
const
fetchData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// PublicApi.getOrderNotarizeEnquiryQuotedPrice
List({...params}).then(res => {
//
resolve(res.data)
//
})
setTimeout
(()
=>
{
resolve
(
data
)
},
1000
)
PublicApi
.
getOrderNotarizeEnquiryProductQuotation
List
({...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
//
setTimeout(() => {
//
resolve(data)
//
}, 1000)
})
}
// 搜索
...
...
src/pages/transaction/enquirySubmit/components/productModal.tsx
View file @
65615cbf
...
...
@@ -5,12 +5,12 @@
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-11 16:51:28
*/
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Button
,
Form
,
Radio
,
AutoComplete
,
Tabs
,
Input
,
Select
,
Checkbox
}
from
'antd'
import
React
,
{
Component
,
useState
,
useEffect
,
Fragment
}
from
'react'
;
import
{
Modal
,
Button
,
Form
,
Radio
,
AutoComplete
,
Tabs
,
Input
,
Select
,
Checkbox
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
const
{
TabPane
}
=
Tabs
const
{
Option
}
=
Select
const
{
TextArea
}
=
Input
const
{
TextArea
}
=
Input
export
interface
Params
{
sourceData
:
Array
<
any
>
[],
...
...
@@ -39,14 +39,13 @@ const layout = {
* @return {type}
*/
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
// console.log('数据',props.sourceData)
const
[
form
]
=
Form
.
useForm
()
const
[
placeOfOriginList
,
setplaceOfOriginList
]
=
useState
([])
//产地
const
handleCancel
=
()
=>
{
}
const
handletOk
=
()
=>
{
form
.
validateFields
().
then
(
v
=>
{
console
.
log
(
'表单'
,
v
)
console
.
log
(
v
)
props
.
onOK
(
v
)
})
// if(props.type){
...
...
@@ -63,39 +62,40 @@ const comfirmDialog: React.FC<Params> = (props) => {
return
()
=>
{
}
},
[])
const
onChange
=
(
value
,
attrItem
)
=>
{
const
onChange
=
(
e
,
attrItem
)
=>
{
const
{
value
}
=
e
.
target
}
const
renderTabPanchildren
=
(
item
:
any
)
=>
{
return
(
<>
{
item
.
attributeList
.
map
((
attrItem
:
any
)
=>
{
const
options
=
attrItem
.
attributeValueList
.
map
((
item
:
any
)
=>
({
value
:
item
.
value
}))
return
(
<>
{
attrItem
.
type
===
1
&&
<
Form
.
Item
name=
{
attrItem
.
name
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
<
AutoComplete
style=
{
{
width
:
200
}
}
options=
{
options
}
placeholder=
"选择或输入"
filterOption=
{
(
inputValue
,
option
)
=>
option
.
value
.
toUpperCase
().
indexOf
(
inputValue
.
toUpperCase
())
!==
-
1
}
/>
{
/* <Select
{
item
.
attributeList
.
map
((
attrItem
:
any
)
=>
{
const
options
=
attrItem
.
attributeValueList
.
map
((
item
:
any
)
=>
({
value
:
item
.
value
}))
console
.
log
(
attrItem
,
10086
)
return
(
<
Fragment
key=
{
attrItem
.
id
}
>
{
attrItem
.
type
===
1
&&
<
Form
.
Item
name=
{
attrItem
.
name
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
<
AutoComplete
style=
{
{
width
:
200
}
}
options=
{
options
}
placeholder=
"选择或输入"
filterOption=
{
(
inputValue
,
option
)
=>
option
.
value
.
toUpperCase
().
indexOf
(
inputValue
.
toUpperCase
())
!==
-
1
}
/>
{
/* <Select
placeholder="请选择"
allowClear
onChange={(v)=>onChange(v, attrItem)}
...
...
@@ -106,58 +106,57 @@ const comfirmDialog: React.FC<Params> = (props) => {
))
}
</Select> */
}
</
Form
.
Item
>
}
{
attrItem
.
type
===
2
&&
<
Form
.
Item
label=
{
attrItem
.
name
}
name=
{
attrItem
.
id
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
{
/* <Checkbox.Group onChange={(v)=>
onChange(v, attrItem)}>
{
attrItem.customerAttributeValueList.length && attrItem.customerAttributeValueList.map((item: any, index: string) => (
<Checkbox key={item.id} value={item.id}>{item.value}</Checkbox>
))
}
</Checkbox.Group> */
}
</
Form
.
Item
>
}
{
attrItem
.
type
===
3
&&
<
Form
.
Item
name=
{
attrItem
.
id
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
{
/* <TextArea onChange={(v)=>onChange(v, attrItem)} maxLength={100} placeholder="最多输入100个字符" rows={4} /> */
}
</
Form
.
Item
>
}
</
>
)
})
}
</
Form
.
Item
>
}
{
attrItem
.
type
===
2
&&
<
Form
.
Item
label=
{
attrItem
.
name
}
name=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
<
Checkbox
.
Group
onChange=
{
(
v
)
=>
onChange
(
v
,
attrItem
)
}
>
{
attrItem
.
customerAttributeValueList
.
length
&&
attrItem
.
customerAttributeValueList
.
map
((
item
:
any
,
index
:
string
)
=>
(
<
Checkbox
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
value
}
</
Checkbox
>
))
}
</
Checkbox
.
Group
>
</
Form
.
Item
>
}
{
attrItem
.
type
===
3
&&
<
Form
.
Item
name=
{
attrItem
.
name
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
<
TextArea
onBlur=
{
(
v
)
=>
onChange
(
v
,
attrItem
)
}
maxLength=
{
100
}
placeholder=
"最多输入100个字符"
rows=
{
4
}
/>
</
Form
.
Item
>
}
</
Fragment
>
)
})
}
</>
)
}
return
(
<>
<
Modal
title=
{
props
.
mode
===
0
?
'新增商品'
:
'查看商品'
}
width=
{
800
}
visible=
{
props
.
dialogVisible
}
onOk=
{
()
=>
handletOk
()
}
onCancel=
{
()
=>
props
.
onCancel
()
}
destroyOnClose
afterClose=
{
()
=>
{
}
}
afterClose=
{
()
=>
form
.
resetFields
()
}
okText=
{
`确定`
}
cancelText=
'取消'
>
...
...
@@ -190,24 +189,25 @@ const comfirmDialog: React.FC<Params> = (props) => {
</
Form
.
Item
>
</
Tabs
.
TabPane
>
{
/**
* @description: 动态循环
* @param {type}
* @return {type}
*/
}
{
props
.
sourceData
.
length
>
0
&&
props
.
sourceData
.
map
((
attributeItem
:
any
)
=>
<>
<
TabPane
tab=
{
attributeItem
.
name
}
key=
{
attributeItem
.
id
}
>
{
renderTabPanchildren
(
attributeItem
)
}
</
TabPane
>
</>
)
/**
* @description: 动态循环
* @param {type}
* @return {type}
*/
}
{
props
.
sourceData
.
length
>
0
&&
props
.
sourceData
.
map
((
attributeItem
:
any
)
=>
{
console
.
log
(
attributeItem
,
10086
)
return
(
<
TabPane
tab=
{
attributeItem
.
name
}
key=
{
attributeItem
.
id
}
>
{
renderTabPanchildren
(
attributeItem
)
}
</
TabPane
>
)
})
}
<
Tabs
.
TabPane
tab=
'采购数量'
key=
"tab-7"
>
<
Form
.
Item
label=
'单位'
...
...
@@ -216,7 +216,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
>
<
Input
placeholder=
''
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'采购数量'
name=
'purchaseQuantity'
...
...
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
View file @
65615cbf
...
...
@@ -27,7 +27,7 @@ import { history } from 'umi'
import
{
LinkOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
MinusOutlined
,
MinusCircleOutlined
}
from
'@ant-design/icons'
import
{
Row
,
Col
,
Card
,
Button
,
Table
,
Popconfirm
,
Radio
,
DatePicker
,
Form
,
Spin
,
Select
,
Switch
,
Cascader
,
Tabs
,
Input
,
Tooltip
,
Space
Form
,
Spin
,
Select
,
Switch
,
Cascader
,
Tabs
,
Input
,
Tooltip
,
Space
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
moment
from
'moment'
...
...
@@ -301,7 +301,6 @@ const Detail: React.FC<{}> = () => {
params
.
categoryId
=
categoryId
let
codeList
=
tabForm
.
getFieldValue
(
'requisitionFormAddress'
)
||
[]
if
(
categoryId
&&
otherList
.
length
!=
0
)
{
console
.
log
(
'codeList'
,
codeList
)
params
.
areaRequestList
=
codeList
.
map
((
v
:
any
)
=>
{
if
(
Array
.
isArray
(
v
))
{
...
...
@@ -314,7 +313,6 @@ const Detail: React.FC<{}> = () => {
let
productList
=
[]
productSource
.
forEach
((
v
)
=>
{
// console.log('v',v)
let
item
:
any
=
{}
Object
.
keys
(
v
).
forEach
(
child
=>
{
otherList
.
forEach
((
j
:
any
)
=>
{
...
...
@@ -331,7 +329,6 @@ const Detail: React.FC<{}> = () => {
params
.
attributeList
=
[...
productList
]
params
.
current
=
1
params
.
pageSize
=
20
console
.
log
(
'params'
,
JSON
.
stringify
(
params
))
PublicApi
.
postOrderSystemMatchingMemberInitializeList
(
params
...
...
@@ -354,6 +351,7 @@ const Detail: React.FC<{}> = () => {
PublicApi
.
getProductPlatformGetCategoryById
({
id
:
seletCategoryId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
data
=
res
.
data
console
.
log
(
data
,
10086
)
settabData
([
data
])
//转成数组
let
da
=
[]
// data.forEach((item: any) => {
...
...
@@ -366,7 +364,6 @@ const Detail: React.FC<{}> = () => {
align
:
'center'
,
render
:
(
text
:
any
)
=>
{
const
name
=
v
.
attributeValueList
.
filter
(
v
=>
v
.
id
==
text
).
map
(
v
=>
v
.
value
)
console
.
log
(
'name'
,
name
)
return
(
<>
{
name
.
length
>
0
?
name
[
0
]
:
text
}
</>
)
...
...
@@ -389,7 +386,6 @@ const Detail: React.FC<{}> = () => {
* @return {type}
*/
const
onCustomerCategoryChange
=
(
value
:
any
,
options
:
any
)
=>
{
console
.
log
(
3112
,
value
,
options
)
let
seletCategoryId
=
value
[
value
.
length
-
1
]
setcategoryId
(
seletCategoryId
)
setseletCategoryNameList
(
options
)
...
...
@@ -398,7 +394,6 @@ const Detail: React.FC<{}> = () => {
}
else
{
sethaschangeCategory
(
false
)
}
console
.
log
(
seletCategoryId
,
'seleellele'
)
initCreatePro
(
seletCategoryId
)
}
...
...
@@ -457,7 +452,6 @@ const Detail: React.FC<{}> = () => {
align
:
'center'
,
render
:
(
text
:
any
,
records
,
index
)
=>
<
Switch
defaultChecked=
{
text
?
true
:
false
}
size=
"small"
onChange=
{
(
checked
)
=>
{
console
.
log
(
checked
);
dockingList
[
index
].
state
=
checked
?
1
:
0
setdockingList
([...
dockingList
])
}
}
/>
...
...
@@ -537,7 +531,12 @@ const Detail: React.FC<{}> = () => {
const
handleOptionBtn
=
(
type
:
any
)
=>
{
switch
(
type
)
{
case
1
:
setdialogVisible
(
true
)
if
(
Object
.
keys
(
tabData
).
length
>
0
)
{
setdialogVisible
(
true
)
}
else
{
message
.
error
(
'请选择商品品类!'
)
}
break
;
case
2
:
setVisibleChannelMember
(
true
)
...
...
@@ -610,7 +609,7 @@ const Detail: React.FC<{}> = () => {
*/
if
(
id
)
{
PublicApi
.
getOrderRequisitionFormDetails
({
id
:
id
}).
then
(
res
=>
{
PublicApi
.
getOrderRequisitionFormDetails
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
data
=
res
.
data
let
areaCodeList
=
[]
...
...
@@ -627,8 +626,9 @@ const Detail: React.FC<{}> = () => {
}
//品类
if
(
data
.
productCategory
)
{
setcustomerCategoryId
([
data
.
productCategory
.
key
])
initCreatePro
(
data
.
productCategory
.
key
,
false
)
//生产弹窗
console
.
log
(
10086
,
'============'
)
setcustomerCategoryId
([
data
.
productCategory
.
id
])
initCreatePro
(
data
.
productCategory
.
id
,
false
)
//生产弹窗
}
...
...
@@ -638,9 +638,8 @@ const Detail: React.FC<{}> = () => {
setinitialValues
(
data
)
tabForm
.
resetFields
()
console
.
log
(
'platType'
,
platType
)
//需求单对接列表
PublicApi
.
getOrderRequisitionFormDemandDockingList
({
id
:
id
}).
then
(
res
=>
{
PublicApi
.
getOrderRequisitionFormDemandDockingList
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
.
data
if
(
_plattype
==
2
)
{
//系统匹配
...
...
@@ -679,14 +678,12 @@ const Detail: React.FC<{}> = () => {
key
:
key
,
align
:
'center'
})
// console.log('key',key,child,child[key])
obj
[
key
]
=
child
[
key
]
})
});
}
source
.
push
(
obj
)
})
console
.
log
([...
source
])
setotherList
([...
otherColumnkey
])
//生成列
setproductSource
([...
source
])
}
...
...
@@ -759,7 +756,6 @@ const Detail: React.FC<{}> = () => {
list
.
push
(
item
)
}
else
{
areaParams
.
forEach
((
v
,
childIndex
)
=>
{
console
.
log
(
'v'
,
v
)
if
(
v
.
key
==
index
)
{
areaParams
.
splice
(
childIndex
,
1
,
item
)
}
else
{
...
...
@@ -770,10 +766,8 @@ const Detail: React.FC<{}> = () => {
}
setAreaParams
([...
areaParams
,
...
list
])
console
.
log
(
'list'
,
[...
areaParams
,
...
list
],
'area'
)
}
const
changePlatform
=
(
e
:
any
)
=>
{
console
.
log
(
'e'
,
e
.
target
.
value
)
setplatType
(
e
.
target
.
value
)
if
(
e
.
target
.
value
==
2
)
{
//调用需求单
...
...
@@ -802,7 +796,6 @@ const Detail: React.FC<{}> = () => {
*/
const
handleSubmitTabForm
=
()
=>
{
tabForm
.
validateFields
().
then
(
values
=>
{
// console.log('valiue', values)
if
(
id
)
{
if
(
!
haschangeCategory
)
{
//不做处理
...
...
@@ -862,7 +855,6 @@ const Detail: React.FC<{}> = () => {
})
item
.
productAttributeJson
=
JSON
.
stringify
([...
_otherList
])
productList
.
push
(
item
)
console
.
log
(
'item'
,
item
)
})
// values['voucherTime'] = null
values
[
'memberIds'
]
=
[]
// memberRowCtl.selectedRowKeys
...
...
@@ -878,9 +870,7 @@ const Detail: React.FC<{}> = () => {
values
[
'demandDockings'
]
=
[]
values
[
'requisitionFormProducts'
]
=
[...
productList
]
console
.
log
(
'productList'
,
productList
)
values
[
'type'
]
=
platType
console
.
log
((
JSON
.
stringify
(
values
)))
let
bb
=
tabForm
.
getFieldValue
(
'requisitionFormAddress'
)
let
objList
=
[]
...
...
@@ -938,24 +928,21 @@ const Detail: React.FC<{}> = () => {
* @return {type}
*/
const
handleSubmit
=
(
values
:
any
)
=>
{
console
.
log
(
'弹窗内容'
,
values
)
let
item
=
{}
// Object.keys(values).forEach((key) => {
// item[key] = values[key]
// })
let
list
=
[]
console
.
log
(
'item'
,
item
)
//先循环所有 再循环有值的
otherList
.
forEach
((
vitem
:
any
)
=>
{
Object
.
keys
(
values
).
forEach
((
key
)
=>
{
console
.
log
(
'key'
,
key
)
if
(
vitem
.
title
==
key
)
{
console
.
log
(
'vitem.title:'
,
vitem
.
title
)
console
.
log
(
'value'
,
values
[
vitem
.
title
])
item
[
key
]
=
values
[
vitem
.
title
]
console
.
log
(
values
,
'详情页面1'
)
}
else
{
item
[
key
]
=
values
[
key
]
console
.
log
(
values
,
'详情页面2'
)
}
})
})
...
...
@@ -971,7 +958,6 @@ const Detail: React.FC<{}> = () => {
'quotationAsTime'
:
fieldsValue
[
'quotationAsTime'
].
format
(
'YYYY-MM-DD HH:mm'
)
};
console
.
log
(
'Received values of form: '
,
values
);
}
const
isChecked
=
(
id
)
=>
{
...
...
@@ -985,7 +971,6 @@ const Detail: React.FC<{}> = () => {
}
if
(
goodIds
.
includes
(
id
))
{
const
newValue
=
findItemAndDelete
(
goodIds
,
id
)
console
.
log
(
'new'
,
newValue
)
setgoodIds
([...
newValue
])
}
else
{
setgoodIds
([...
goodIds
,
id
])
...
...
@@ -998,9 +983,7 @@ const Detail: React.FC<{}> = () => {
* @return {type}
*/
const
switchState
=
(
text
,
record
,
index
)
=>
{
console
.
log
(
66
,
text
,
record
,
index
)
return
<
Switch
defaultChecked=
{
text
?
true
:
false
}
size=
"small"
onChange=
{
(
checked
)
=>
{
console
.
log
(
checked
);
memberList
[
index
].
state
=
checked
setmemberList
([...
memberList
])
}
}
/>
...
...
@@ -1095,7 +1078,7 @@ const Detail: React.FC<{}> = () => {
</
Tooltip
>
</
span
>
}
key=
{
field
.
key
}
key=
{
index
}
>
<
Form
.
Item
{
...
field
}
...
...
@@ -1176,7 +1159,7 @@ const Detail: React.FC<{}> = () => {
</
TabPane
>
<
TabPane
tab=
"添加商品"
key=
'2'
>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
handleOptionBtn
(
1
)
}
type=
'dashed'
>
添加商品
</
Button
>
<
Table
dataSource=
{
productSource
}
columns=
{
equiryColumns
}
pagination=
{
pagination
}
/>
<
Table
rowKey=
{
"id"
}
dataSource=
{
productSource
}
columns=
{
equiryColumns
}
pagination=
{
pagination
}
/>
</
TabPane
>
<
TabPane
tab=
"交易条件"
key=
'3'
>
<
Row
>
...
...
src/pages/transaction/inquiryQuote/addInquiryOrder/components/basicInfo.tsx
View file @
65615cbf
...
...
@@ -96,17 +96,10 @@ const BasicInfo: React.FC<queryProps> = (props) => {
levelTag
:
'倔强铂金'
}]
const
fetchMemberList
=
async
(
params
)
=>
{
// const res = await PublicApi.getMemberManageLowerMerchantProviderPage(params)
// return res.data
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
memberId
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
PublicApi
.
getMemberManageLowerMerchantProviderPage
({...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
});
}
// 选择会员弹框结束
...
...
@@ -166,25 +159,25 @@ const BasicInfo: React.FC<queryProps> = (props) => {
<
Form
.
Item
label=
'报价单摘要'
name=
'details'
rules=
{
[{
required
:
true
,
message
:
'请输入询价单摘要'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'对应询价单号'
name=
'
memberName
'
rules=
{
[{
required
:
true
,
message
:
'请选择被询价会员'
}]
}
>
<
Form
.
Item
label=
'对应询价单号'
name=
'
inquiryListNo
'
rules=
{
[{
required
:
true
,
message
:
'请选择被询价会员'
}]
}
>
<
Search
value=
{
memberList
.
length
>
0
?
memberList
[
0
].
name
:
undefined
}
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setVisibleChannelMember
(
true
)
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'报价单号'
name=
'
orderNumber
'
>
<
Form
.
Item
label=
'报价单号'
name=
'
quotationNo
'
>
<
span
>
{
Object
.
keys
(
editData
).
length
>
0
?
editData
.
inquiryListNo
:
'-'
}
</
span
>
</
Form
.
Item
>
<
Form
.
Item
label=
'询价会员'
name=
'
ti
me'
>
<
Form
.
Item
label=
'询价会员'
name=
'
memberNa
me'
>
<
span
>
{
Object
.
keys
(
editData
).
length
>
0
?
editData
.
voucherTime
:
'-'
}
</
span
>
</
Form
.
Item
>
<
Form
.
Item
label=
'报价截止时间'
name=
'
orderNumber
'
>
<
Form
.
Item
label=
'报价截止时间'
name=
'
quotationAsTime
'
>
<
span
>
{
Object
.
keys
(
editData
).
length
>
0
?
editData
.
inquiryListNo
:
'-'
}
</
span
>
</
Form
.
Item
>
<
Form
.
Item
label=
'单据时间'
name=
'
t
ime'
>
<
Form
.
Item
label=
'单据时间'
name=
'
voucherT
ime'
>
<
span
>
{
Object
.
keys
(
editData
).
length
>
0
?
editData
.
voucherTime
:
'-'
}
</
span
>
</
Form
.
Item
>
<
Form
.
Item
label=
'外部状态'
name=
'external'
>
<
Form
.
Item
label=
'外部状态'
name=
'external
State
'
>
<
span
>
{
Object
.
keys
(
editData
).
length
>
0
?
<
StatusColors
status=
{
editData
.
inquiryListNo
}
type=
'out'
/>
:
'-'
}
</
span
>
</
Form
.
Item
>
<
Form
.
Item
label=
'内部状态'
name=
'inter
nal
'
>
<
Form
.
Item
label=
'内部状态'
name=
'inter
iorState
'
>
<
span
>
{
Object
.
keys
(
editData
).
length
>
0
?
quoteOrderInternalState
(
editData
.
inquiryListNo
)
:
'-'
}
</
span
>
</
Form
.
Item
>
</
Form
>
...
...
src/pages/transaction/inquiryQuote/addInquiryOrder/components/enquiryGoods.tsx
View file @
65615cbf
...
...
@@ -205,18 +205,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
}]
const
fetchGoodsList
=
async
(
params
)
=>
{
// const res = await PublicApi.getMemberManageLowerProviderPage(params)
// return res.data
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
data
,
params
)
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
data
,
});
},
1000
);
});
}
// 选择会员弹框结束
...
...
src/pages/transaction/inquiryQuote/addInquiryOrder/components/tradingConditions.tsx
View file @
65615cbf
...
...
@@ -79,37 +79,27 @@ const TradingConditions: React.FC<queryProps> = (props) => {
>
<
Row
gutter=
{
70
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'
交付日期'
name=
'deliveryTime'
rules=
{
[{
required
:
true
,
message
:
'请选择交付日期
'
}]
}
>
<
DatePicker
format=
"YYYY-MM-DD HH:mm:ss"
/>
<
Form
.
Item
label=
'
最小起订'
name=
'minimumOrder'
rules=
{
[{
required
:
true
,
message
:
'请输入最小起订
'
}]
}
>
<
Input
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'交付地址'
name=
'fullAddress'
rules=
{
[{
required
:
true
,
message
:
'请选择交付地址'
}]
}
>
<
Select
>
{
address
.
map
(
v
=>
(
<
Select
.
Option
key=
{
v
.
id
}
value=
{
v
.
id
}
>
{
v
.
fullAddress
}
</
Select
.
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
'报价截止时间'
name=
'quotationAsTime'
rules=
{
[{
required
:
true
,
message
:
'请选择报价截止时间'
}]
}
>
<
DatePicker
format=
"YYYY-MM-DD HH:mm:ss"
/>
<
Form
.
Item
label=
'交付说明'
name=
'offer'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'
报价要求'
name=
'offer
'
>
<
Form
.
Item
label=
'
付款说明'
name=
'paymentType
'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'
付款方式'
name=
'paymentType
'
>
<
Form
.
Item
label=
'
税费说明'
name=
'taxes
'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'
税费要求'
name=
'taxe
s'
>
<
Form
.
Item
label=
'
物流说明'
name=
'logistic
s'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'
物流要求'
name=
'logistics
'
>
<
Form
.
Item
label=
'
包装说明'
name=
'packRequire
'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'包装要求'
name=
'packRequire'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'其他要求'
name=
'otherRequire'
>
<
Form
.
Item
label=
'其他说明'
name=
'otherRequire'
>
<
Input
.
TextArea
placeholder=
'最长100个字符,50个汉字'
/>
</
Form
.
Item
>
</
Col
>
...
...
src/pages/transaction/stockSellStorage/bills/addBills/schema/index.ts
View file @
65615cbf
...
...
@@ -449,6 +449,9 @@ export const addBillSchema: ISchema = {
enum
:
[],
'x-component-props'
:
{
allowClear
:
true
,
style
:
{
width
:
100
,
},
},
'x-rules'
:
[
{
...
...
src/pages/transaction/stockSellStorage/warehouse/schema/index.tsx
View file @
65615cbf
...
...
@@ -101,25 +101,25 @@ export const warehouseDetailSchema: ISchema = {
title
:
'仓库名称'
,
'x-component-props'
:
{
placeholder
:
'请输入'
,
},
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请输入仓库名称'
,
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
20
,
}
],
required
:
true
,
},
MEGA_LAYOUT1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
label
:
'仓库
名称
'
,
label
:
'仓库
地址
'
,
wrapperCol
:
24
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请输入仓库名称'
,
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
20
,
}
],
},
properties
:
{
MEGA_LAYOUT1_1
:
{
...
...
src/pages/transaction/supplierEvaluation/analysis/index.tsx
View file @
65615cbf
import
React
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Tabs
,
Row
,
Col
,
Button
}
from
'antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
{
Pie
}
from
'@/components/Charts'
;
import
Mood
from
'@/components/Mood'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
searchSchema
}
from
'./schema'
;
import
Shelves
from
'../components/Shelves'
;
import
RecordList
from
'../components/RecordList'
;
import
styles
from
'./index.less'
;
const
{
TabPane
}
=
Tabs
;
const
receivedFormActions
=
createFormActions
();
const
sentFormActions
=
createFormActions
();
const
PAGE_SIZE
=
10
;
interface
ReceivedSearch
{
/**
* 评价星级(1-5)
*/
star
:
string
/**
* 交易时间开始
*/
dealTimeStart
:
string
/**
* 交易时间结束
*/
dealTimeEnd
:
string
/**
* 评价方名称
*/
memberName
:
string
};
const
Analysis
:
React
.
FC
=
()
=>
{
const
[
historyPage
,
setHistoryPage
]
=
useState
(
1
);
const
[
historySize
,
setHistorySize
]
=
useState
(
PAGE_SIZE
);
const
[
receivedPage
,
setReceivedPage
]
=
useState
(
1
);
const
[
receivedSize
,
setReceivedSize
]
=
useState
(
PAGE_SIZE
);
const
[
receivedSearchVal
,
setReceivedSearchVal
]
=
useState
<
ReceivedSearch
>
({
star
:
'0'
,
dealTimeStart
:
''
,
dealTimeEnd
:
''
,
memberName
:
''
,
});
const
[
receivedList
,
setReceivedList
]
=
useState
([]);
// 获取评价汇总
const
getTradeSummary
=
()
=>
{
PublicApi
.
getMemberCommentSupplyCountSupplyTradeSummary
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
}
});
};
// 获取评价记录
const
getTradeHistory
=
()
=>
{
PublicApi
.
getMemberCommentSupplyCountSupplyTradeHistoryPage
({
memberId
:
'0'
,
validateId
:
'0'
,
starLevel
:
null
,
current
:
`
${
historyPage
}
`
,
pageSize
:
`
${
historySize
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
}
});
};
// 获取收到的评价列表
const
getReceivedList
=
()
=>
{
PublicApi
.
getMemberCommentSupplySupplyTradeHistoryPage
({
...
receivedSearchVal
,
current
:
`
${
receivedPage
}
`
,
pageSize
:
`
${
receivedSize
}
`
,
}).
then
(
res
=>
{
});
};
const
evaluateColumns
:
EditableColumns
[]
=
[
{
title
:
' '
,
...
...
@@ -89,6 +152,29 @@ const Analysis: React.FC = () => {
},
];
const
handleTabsChange
=
key
=>
{
console
.
log
(
'key'
,
key
)
switch
(
key
)
{
case
'1'
:
{
break
;
}
case
'2'
:
{
break
;
}
case
'3'
:
{
break
;
}
default
:
break
;
}
};
return
(
<
PageHeaderWrapper
>
<
MellowCard
...
...
@@ -96,7 +182,10 @@ const Analysis: React.FC = () => {
padding
:
'0 24px 24px'
,
}
}
>
<
Tabs
className=
{
styles
.
tabs
}
>
<
Tabs
className=
{
styles
.
tabs
}
onChange=
{
handleTabsChange
}
>
<
TabPane
tab=
"概览"
key=
"1"
>
<
Shelves
title=
"评价统计"
>
<
Row
gutter=
{
24
}
>
...
...
@@ -128,39 +217,14 @@ const Analysis: React.FC = () => {
<
Shelves
title=
"评价记录"
>
<
RecordList
list=
{
[]
}
/>
<
div
style=
{
{
padding
:
'24px 0'
,
textAlign
:
'center'
,
}
}
>
<
Button
>
查看更多评论
</
Button
>
</
div
>
</
Shelves
>
</
TabPane
>
<
TabPane
tab=
"收到的评价"
key=
"2"
>
<
NiceForm
actions=
{
receivedFormActions
}
onSubmit=
{
values
=>
{}
}
effects=
{
(
$
,
actions
)
=>
{
}
}
schema=
{
searchSchema
}
/>
<
TabPane
tab=
"收到的评价"
key=
"2"
>
<
RecordList
list=
{
[]
}
/>
</
TabPane
>
<
TabPane
tab=
"发出的评价"
key=
"3"
>
<
NiceForm
actions=
{
sentFormActions
}
onSubmit=
{
values
=>
{}
}
effects=
{
(
$
,
actions
)
=>
{
}
}
schema=
{
searchSchema
}
/>
<
TabPane
tab=
"发出的评价"
key=
"3"
>
<
RecordList
list=
{
[]
}
/>
</
TabPane
>
</
Tabs
>
...
...
src/pages/transaction/supplierEvaluation/components/EvaluationList/index.tsx
View file @
65615cbf
...
...
@@ -141,9 +141,9 @@ const EvaluationList = props => {
<
img
src=
{
item
.
good
?
item
.
good
.
pic
:
''
}
/>
</
div
>
<
div
className=
"goodInfo-right"
>
<
div
className=
"goodInfo-title"
>
进口头层黄牛皮荔枝纹/红色/XL
</
div
>
<
div
className=
"goodInfo-desc"
>
20 平方英尺
</
div
>
<
div
className=
"goodInfo-price"
>
¥ 400.00
</
div
>
<
div
className=
"goodInfo-title"
>
{
item
.
good
.
productName
}
</
div
>
<
div
className=
"goodInfo-desc"
>
{
item
.
good
.
purchaseCount
||
''
}
</
div
>
<
div
className=
"goodInfo-price"
>
{
`¥ ${item.good.price}`
}
</
div
>
</
div
>
</
div
>
</
Col
>
...
...
src/pages/transaction/supplierEvaluation/components/RecordList/index.tsx
View file @
65615cbf
import
React
from
'react'
;
import
{
Button
,
Rate
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Rate
,
Spin
}
from
'antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
searchSchema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
PAGE_SIZE
=
10
;
export
interface
Search
{
/**
* 评价星级(1-5)
*/
star
:
string
/**
* 交易时间开始
*/
dealTimeStart
:
string
/**
* 交易时间结束
*/
dealTimeEnd
:
string
/**
* 评价方名称
*/
memberName
:
string
};
export
interface
ListParams
extends
Search
{
/**
* 当前页
*/
current
:
string
/**
* 每页行数
*/
pageSize
:
string
};
export
interface
RecordItem
{
/**
* 记录id
*/
id
:
number
/**
* 评价星级(1-5)
*/
star
:
number
/**
* 评价内容
*/
comment
:
string
/**
* 商品信息
*/
product
:
string
/**
* 备注(订单号)
*/
remark
:
string
/**
* 交易时间
*/
dealTime
:
{}
/**
* 评价方
*/
memberName
:
string
};
export
interface
RecordRes
{
data
:
RecordItem
[];
totalCount
:
number
;
};
interface
RecordListProps
{
list
:
[]
;
fetchList
:
(
params
:
ListParams
)
=>
Promise
<
RecordRes
>
;
};
const
RecordList
:
React
.
FC
<
RecordListProps
>
=
()
=>
{
const
RecordList
:
React
.
FC
<
RecordListProps
>
=
({
fetchList
,
})
=>
{
const
[
hasMore
,
setHasMore
]
=
useState
(
false
);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
size
,
setSize
]
=
useState
(
PAGE_SIZE
);
const
[
searchVal
,
setSearchVal
]
=
useState
<
Search
>
({
star
:
'0'
,
dealTimeStart
:
''
,
dealTimeEnd
:
''
,
memberName
:
''
,
});
const
[
receivedList
,
setReceivedList
]
=
useState
<
RecordRes
>
({
data
:
[],
totalCount
:
0
});
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 获取列表数据
const
getRecordList
=
():
Promise
<
RecordRes
>
=>
{
if
(
!
fetchList
)
{
return
Promise
.
reject
();
}
setLoading
(
true
);
return
new
Promise
((
resolve
,
reject
)
=>
{
fetchList
({
...
searchVal
,
current
:
`
${
page
}
`
,
pageSize
:
`
${
size
}
`
,
}).
then
(
res
=>
{
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
}).
finally
(()
=>
{
setLoading
(
false
);
});
});
};
useEffect
(()
=>
{
getRecordList
().
then
(
res
=>
{
setReceivedList
(
res
);
});
},
[]);
// 查询列表
const
handleSearch
=
values
=>
{
setPage
(
1
);
setSearchVal
(
values
);
getRecordList
().
then
(
res
=>
{
setReceivedList
(
res
);
});
};
// 加载更多
const
handleLoadMore
=
()
=>
{
if
(
!
hasMore
||
loading
)
{
return
;
}
setSize
(
size
+
1
);
getRecordList
().
then
(
res
=>
{
setReceivedList
({
...
receivedList
,
data
:
receivedList
.
data
.
concat
(
res
.
data
),
});
});
};
return
(
<
ul
className=
{
styles
.
record
}
>
<
li
className=
{
styles
[
'record-item'
]
}
>
<
div
className=
{
styles
[
'record-item-good'
]
}
>
<
div
className=
{
styles
[
'record-item-good-name'
]
}
>
进口头层黄牛皮荔枝纹/红色/XL
</
div
>
<
div
>
<
span
className=
{
styles
[
'record-item-good-price'
]
}
>
¥400.00
</
span
>
<
span
className=
{
styles
[
'record-item-good-desc'
]
}
>
20 平方英尺
</
span
>
<>
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
handleSearch
}
effects=
{
(
$
,
actions
)
=>
{
}
}
schema=
{
searchSchema
}
/>
<
ul
className=
{
styles
.
record
}
>
<
li
className=
{
styles
[
'record-item'
]
}
>
<
div
className=
{
styles
[
'record-item-good'
]
}
>
<
div
className=
{
styles
[
'record-item-good-name'
]
}
>
进口头层黄牛皮荔枝纹/红色/XL
</
div
>
<
div
>
<
span
className=
{
styles
[
'record-item-good-price'
]
}
>
¥400.00
</
span
>
<
span
className=
{
styles
[
'record-item-good-desc'
]
}
>
20 平方英尺
</
span
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
[
'record-item-extra'
]
}
>
<
div
className=
{
styles
[
'record-item-extra-item'
]
}
>
<
div
className=
{
styles
[
'record-item-extra-item-label'
]
}
>
交易时间:
</
div
>
<
div
className=
{
styles
[
'record-item-extra-item-control'
]
}
>
2020-05-20 17:09
</
div
>
<
div
className=
{
styles
[
'record-item-extra'
]
}
>
<
div
className=
{
styles
[
'record-item-extra-item'
]
}
>
<
div
className=
{
styles
[
'record-item-extra-item-label'
]
}
>
交易时间:
</
div
>
<
div
className=
{
styles
[
'record-item-extra-item-control'
]
}
>
2020-05-20 17:09
</
div
>
</
div
>
<
div
className=
{
styles
[
'record-item-extra-item'
]
}
>
<
div
className=
{
styles
[
'record-item-extra-item-label'
]
}
>
评价方:
</
div
>
<
div
className=
{
styles
[
'record-item-extra-item-control'
]
}
>
温州龙昌手袋有限公司
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
[
'record-item-extra-item'
]
}
>
<
div
className=
{
styles
[
'record-item-extra-item-label'
]
}
>
评价方:
</
div
>
<
div
className=
{
styles
[
'record-item-extra-item-control'
]
}
>
温州龙昌手袋有限公司
</
div
>
<
div
className=
{
styles
[
'record-item-comment'
]
}
>
<
Rate
value=
{
2
}
disabled
/>
<
div
className=
{
styles
[
'record-item-comment-main'
]
}
>
付款准时,合作愉快。付款准时,合作愉快。付款准时,合作愉快。付款准时,合作愉快。付款准时…
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
[
'record-item-comment'
]
}
>
<
Rate
value=
{
2
}
disabled
/>
<
div
className=
{
styles
[
'record-item-comment-main'
]
}
>
付款准时,合作愉快。付款准时,合作愉快。付款准时,合作愉快。付款准时,合作愉快。付款准时…
<
div
className=
{
styles
[
'record-item-actions'
]
}
>
<
Button
type=
"link"
>
查看
</
Button
>
</
div
>
</
li
>
</
ul
>
{
(
hasMore
&&
!
loading
)
&&
(
<
div
style=
{
{
padding
:
'24px 0'
,
textAlign
:
'center'
,
}
}
>
<
Button
onClick=
{
handleLoadMore
}
>
查看更多评论
</
Button
>
</
div
>
<
div
className=
{
styles
[
'record-item-actions'
]
}
>
<
Button
type=
"link"
>
查看
</
Button
>
)
}
{
loading
&&
(
<
div
style=
{
{
padding
:
'24px 0'
,
textAlign
:
'center'
,
}
}
>
<
Spin
/>
</
div
>
</
li
>
</
ul
>
)
}
</>
);
};
...
...
src/pages/transaction/supplierEvaluation/
analysis
/schema/index.ts
→
src/pages/transaction/supplierEvaluation/
components/RecordList
/schema/index.ts
View file @
65615cbf
/*
* @Author: XieZhiXiong
* @Date: 2020-
09-22 20:34:49
* @Date: 2020-
10-19 18:08:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-
09-22 20:52:53
* @LastEditTime: 2020-
10-19 18:09:31
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -28,7 +28,7 @@ export const searchSchema: ISchema = {
},
},
},
'[
startDate, endDate
]'
:
{
'[
dealTimeStart, dealTimeEnd
]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
...
...
@@ -40,7 +40,7 @@ export const searchSchema: ISchema = {
},
},
},
n
ame
:
{
memberN
ame
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
src/pages/transaction/supplierEvaluation/constans.tsx
View file @
65615cbf
import
{
PurchaseOrderOutWorkState
,
SaleOrderInsideWorkState
,
}
from
'@/constants'
;
// 订单外部状态 StatusTag map
export
const
ORDER_INNER_STATUS_TYPE
=
{
[
PurchaseOrderOutWorkState
.
FINISH_ORDER
]:
'success'
,
};
// 订单内部状态 Tag badge map
export
const
ORDER_INNER_STATUS_BADGE_COLOR
=
{
[
SaleOrderInsideWorkState
.
FILLING_ORDER
]:
'#00B37A'
,
};
// 订单内部状态 text
export
const
ORDER_INNER_STATUS_TXT_FINISHING
=
{
[
SaleOrderInsideWorkState
.
FILLING_ORDER
]:
'已完成'
,
};
\ No newline at end of file
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/index.tsx
View file @
65615cbf
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
PageHeader
,
Descriptions
,
...
...
@@ -11,9 +11,13 @@ import { FormOutlined } from '@ant-design/icons';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetOrderPurchaseOrderDetailsResponse
}
from
'@/services/OrderApi'
;
import
{
normalizeFiledata
}
from
'@/utils'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
normalizeUnevaluatedList
}
from
'../../utils'
;
import
{
evaluateSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
EvaluationList
from
'../../components/EvaluationList'
;
...
...
@@ -21,10 +25,88 @@ import styles from './index.less';
const
formActions
=
createFormActions
();
interface
Unevaluated
{
good
:
{
pic
:
string
,
name
:
string
,
price
:
string
,
desc
:
string
,
};
star
:
number
;
comment
:
string
;
picture
:
string
[];
smile
:
number
;
};
interface
OrderInfo
extends
GetOrderPurchaseOrderDetailsResponse
{
unevaluatedList
:
Unevaluated
[];
};
const
EvaluateOrder
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
OrderInfo
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
getOrderInfo
=
()
=>
{
setInfoLoading
(
true
);
PublicApi
.
getOrderPurchaseOrderDetails
({
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
orderProductRequests
}
=
res
.
data
;
setOrderInfo
({
...
res
.
data
,
unevaluatedList
:
normalizeUnevaluatedList
(
orderProductRequests
),
});
}
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
useEffect
(()
=>
{
getOrderInfo
();
},
[]);
const
handleSubmit
=
values
=>
{
console
.
log
(
'values'
,
values
);
setSubmitLoading
(
true
);
const
payload
=
values
.
map
(
item
=>
{
const
{
comment
,
good
,
picture
,
star
,
}
=
item
;
return
{
memberId
:
orderInfo
.
supplyMembersId
,
roleId
:
'暂无'
,
memberName
:
orderInfo
.
supplyMembersName
,
star
,
comment
,
product
:
JSON
.
stringify
(
good
),
remark
:
orderInfo
.
orderNo
,
orderId
:
orderInfo
.
id
,
dealTime
:
orderInfo
.
createTime
,
dealCount
:
good
.
purchaseCount
,
price
:
good
.
price
,
totalPrice
:
orderInfo
.
sumPrice
,
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
data
).
filter
(
Boolean
),
};
});
PublicApi
.
postMemberCommentSupplyOrderTradeSubmit
({
commentSubmitDetailList
:
payload
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
beforeUpload
=
file
=>
{
...
...
@@ -50,62 +132,69 @@ const EvaluateOrder: React.FC = () => {
);
return
(
<
PageHeaderWrapper
title=
{
<>
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<
AvatarWrap
info=
{
{
aloneTxt
:
'单'
,
name
:
'订单号:DPTY12'
}
}
/>
}
extra=
{
(
<>
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
发布
</
Button
>
</>
)
}
>
<
Descriptions
size=
"small"
column=
{
3
}
style=
{
{
padding
:
'0 32px'
,
}
}
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
title=
{
<>
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<
AvatarWrap
info=
{
{
aloneTxt
:
'单'
,
name
:
orderInfo
?.
orderNo
,
}
}
/>
}
extra=
{
(
<>
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
disabled=
{
!
orderInfo
||
!
orderInfo
.
id
}
loading=
{
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
发布
</
Button
>
</>
)
}
>
<
Descriptions
.
Item
label=
"采购会员"
>
BPTY12
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"下单时间"
span=
{
2
}
>
2020-08-25 08:49
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
}
>
<
NiceForm
actions=
{
formActions
}
expressionScope=
{
{
UploadTip
,
beforeUpload
,
}
}
onSubmit=
{
handleSubmit
}
components=
{
{
EvaluationList
,
}
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
}
}
schema=
{
evaluateSchema
}
/>
</
PageHeaderWrapper
>
<
Descriptions
size=
"small"
column=
{
3
}
style=
{
{
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"采购会员"
>
{
'暂无'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"下单时间"
span=
{
2
}
>
{
orderInfo
?.
createTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
</>
}
>
<
NiceForm
actions=
{
formActions
}
initialValues=
{
{
comments
:
orderInfo
?
orderInfo
.
unevaluatedList
:
[],
}
}
expressionScope=
{
{
UploadTip
,
beforeUpload
,
}
}
onSubmit=
{
handleSubmit
}
components=
{
{
EvaluationList
,
}
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
}
}
schema=
{
evaluateSchema
}
/>
</
PageHeaderWrapper
>
</
Spin
>
);
};
...
...
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/schema/index.ts
View file @
65615cbf
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-
09-29 16:40:00
* @LastEditTime: 2020-
10-19 16:23:24
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -14,14 +14,7 @@ export const evaluateSchema: ISchema = {
comments
:
{
type
:
'array'
,
'x-component'
:
'EvaluationList'
,
default
:
[
{
name
:
'杰尼'
,
age
:
24
,
small
:
1
,
star2
:
0
,
},
],
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
...
...
@@ -50,28 +43,32 @@ export const evaluateSchema: ISchema = {
'x-component'
:
'Rating'
,
'x-component-props'
:
{
allowHalf
:
false
,
},
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择满意程度'
,
},
],
},
comment
:
{
type
:
'string'
,
title
:
'评价'
,
required
:
true
,
'x-component'
:
'TextArea'
,
'x-component-props'
:
{
rows
:
4
,
},
},
},
picture
:
{
type
:
'string'
,
title
:
'图片'
,
required
:
true
,
'x-component'
:
'Upload'
,
'x-component-props'
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
'/
test
/'
,
prefix
:
'/
supplierEvaluation
/'
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
...
...
src/pages/transaction/supplierEvaluation/unevaluated/index.tsx
View file @
65615cbf
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Button
}
from
'antd'
;
import
{
Link
}
from
'umi'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
Link
}
from
'umi'
;
import
{
ORDER_TYPE2
,
SaleOrderInsideWorkStateTexts
,
PayOutWorkStateTexts
}
from
'@/constants'
;
import
{
ORDER_INNER_STATUS_TYPE
,
ORDER_INNER_STATUS_BADGE_COLOR
,
ORDER_INNER_STATUS_TXT_FINISHING
,
}
from
'../constans'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
...
...
@@ -16,29 +22,6 @@ import styles from './index.less';
const
formActions
=
createFormActions
();
const
mock
=
[
{
orderNo
:
'DPTY12'
,
abstract
:
'进口头层黄牛皮荔枝纹'
,
member
:
'广州白马皮具交易有限公司'
,
created
:
'2020-09-22 11:16:00'
,
amount
:
'¥ 50,000.00'
,
orderType
:
'现货采购'
,
outerStatusName
:
'已完成'
,
innerStatusName
:
'已完成'
,
},
{
orderNo
:
'DPTY13'
,
abstract
:
'进口头层黄牛皮荔枝纹'
,
member
:
'广州白马皮具交易有限公司'
,
created
:
'2020-09-22 11:16:00'
,
amount
:
'¥ 50,000.00'
,
orderType
:
'现货采购'
,
outerStatusName
:
'已完成'
,
innerStatusName
:
'已完成'
,
},
];
const
Unevaluated
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
...
...
@@ -58,48 +41,50 @@ const Unevaluated: React.FC = () => {
},
{
title
:
'订单摘要'
,
dataIndex
:
'abstract'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'采购会员'
,
dataIndex
:
'member'
,
dataIndex
:
'member
Name
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'下单时间'
,
dataIndex
:
'create
d
'
,
dataIndex
:
'create
Time
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'订单总额'
,
dataIndex
:
'
amount
'
,
dataIndex
:
'
sumPrice
'
,
align
:
'center'
,
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType'
,
align
:
'center'
,
dataIndex
:
'type'
,
align
:
'center'
,
render
:
text
=>
ORDER_TYPE2
[
text
],
},
{
title
:
'外部状态'
,
dataIndex
:
'
outerStatusNam
e'
,
dataIndex
:
'
externalStat
e'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"
warnning
"
title=
"已完成"
/>
<
StatusTag
type=
"
success
"
title=
"已完成"
/>
),
},
{
title
:
'内部状态'
,
dataIndex
:
'
innerStatusNam
e'
,
dataIndex
:
'
purchaseOrderInteriorStat
e'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#
606266
"
text=
"已完成"
/>,
render
:
(
text
,
record
)
=>
<
Badge
color=
"#
41CC9E
"
text=
"已完成"
/>,
},
{
title
:
'操作'
,
...
...
@@ -107,7 +92,7 @@ const Unevaluated: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Link
to=
{
`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated/evaluate`
}
>
<
Link
to=
{
`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated/evaluate
?id=${record.id}
`
}
>
<
Button
type=
"link"
>
...
...
@@ -122,17 +107,20 @@ const Unevaluated: React.FC = () => {
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
fetchListData
=
(
params
:
any
)
=>
{
return
Promise
.
resolve
({
total
:
2
,
data
:
mock
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderEvaluatedList
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
};
// 初始化高级筛选选项
const
fetchSelectOptions
=
async
()
=>
{
return
{};
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -154,10 +142,6 @@ const Unevaluated: React.FC = () => {
'name'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'innerStatus'
,
'outerStatus'
],
fetchSelectOptions
,
);
}
}
schema=
{
listSearchSchema
}
/>
...
...
src/pages/transaction/supplierEvaluation/unevaluated/schema/index.tsx
View file @
65615cbf
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
import
{
ORDER_TYPE2_INQUIRY
,
ORDER_TYPE2_DEMAND
,
ORDER_TYPE2_SPOT
,
ORDER_TYPE2_CENTRALIZED
,
ORDER_TYPE2_POINTS
,
ORDER_TYPE2_CHANNEL_DIRECT
,
ORDER_TYPE2_CHANNEL_SPOT
,
ORDER_TYPE2_CHANNEL_POINTS
,
ORDER_TYPE2
,
}
from
'@/constants'
;
export
const
listSearchSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -28,7 +38,7 @@ export const listSearchSchema: ISchema = {
columns
:
6
,
},
properties
:
{
memberTypeId
:
{
supplyMembersName
:
{
type
:
'string'
,
default
:
undefined
,
'x-component-props'
:
{
...
...
@@ -48,30 +58,45 @@ export const listSearchSchema: ISchema = {
orderType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
enum
:
[
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_INQUIRY
],
value
:
ORDER_TYPE2_INQUIRY
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_DEMAND
],
value
:
ORDER_TYPE2_DEMAND
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_SPOT
],
value
:
ORDER_TYPE2_SPOT
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_CENTRALIZED
],
value
:
ORDER_TYPE2_CENTRALIZED
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_POINTS
],
value
:
ORDER_TYPE2_POINTS
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_CHANNEL_DIRECT
],
value
:
ORDER_TYPE2_CHANNEL_DIRECT
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_CHANNEL_SPOT
],
value
:
ORDER_TYPE2_CHANNEL_SPOT
,
},
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_CHANNEL_POINTS
],
value
:
ORDER_TYPE2_CHANNEL_POINTS
,
},
],
'x-component-props'
:
{
placeholder
:
'订单类型'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
src/pages/transaction/supplierEvaluation/utils.ts
0 → 100644
View file @
65615cbf
/*
* @Author: XieZhiXiong
* @Date: 2020-10-19 16:02:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-19 17:10:42
* @Description:
*/
// 初始化待评价列表
export
const
normalizeUnevaluatedList
=
(
arr
:
{[
key
:
string
]:
any
}[])
=>
{
const
ret
=
[];
if
(
!
Array
.
isArray
(
arr
))
{
return
ret
;
}
arr
.
forEach
(
item
=>
{
const
atom
=
{
good
:
{
pic
:
''
,
quantity
:
item
.
productAttributeJson
||
''
,
productId
:
item
.
productId
,
orderId
:
item
.
orderId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
price
:
item
.
price
,
memberPrice
:
item
.
memberPrice
,
purchaseCount
:
item
.
purchaseCount
,
// 采购数量
taxInclusive
:
item
.
taxInclusive
,
money
:
item
.
money
,
inventory
:
item
.
inventory
,
productAttributeJson
:
item
.
productAttributeJson
,
},
star
:
0
,
// 评分星星
comment
:
''
,
// 评价
picture
:
[],
smile
:
1
,
// 笑脸
};
ret
.
push
(
atom
);
});
return
ret
;
};
\ No newline at end of file
src/utils/index.tsx
View file @
65615cbf
...
...
@@ -444,6 +444,22 @@ export const normalizeFiledata = url => {
};
};
/**
* 检查是否还有更多
* @param {Number} curPage 当前页码
* @param {Number} curSize 当前页数
* @param {Number} dataLen 当前数据长度
* @param {Number} dataTotal 数据总长度
*/
export
const
checkMore
=
(
curPage
,
curSize
,
dataLen
,
dataTotal
)
=>
{
let
hasMore
=
true
;
if
(
!
dataLen
||
dataLen
+
(
curPage
-
1
)
*
curSize
>=
+
dataTotal
)
{
hasMore
=
false
;
}
return
hasMore
;
};
export
default
{
isArray
,
isObject
,
...
...
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