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
c549a696
Commit
c549a696
authored
Oct 28, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
39730bde
069925a8
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
491 additions
and
352 deletions
+491
-352
menu.ts
src/locales/zh-CN/menu.ts
+2
-0
index.ts
src/module/productModule/index.ts
+3
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+6
-4
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+36
-29
addCompany.tsx
src/pages/logistics/list/addCompany.tsx
+8
-1
checkDetail.tsx
...dSettle/amountAccountManage/checkWithdraw/checkDetail.tsx
+73
-21
index.tsx
.../payandSettle/amountAccountManage/checkWithdraw/index.tsx
+41
-12
index.tsx
...dSettle/amountAccountManage/memberAccountManage/index.tsx
+4
-3
memberAccountDetail.tsx
...AccountManage/memberAccountManage/memberAccountDetail.tsx
+3
-1
index.tsx
...ayandSettle/amountAccountManage/paymentWithdraw/index.tsx
+2
-1
accountDetail.tsx
...yandSettle/capitalAccounts/accountLists/accountDetail.tsx
+6
-5
applyWithdraw.tsx
...yandSettle/capitalAccounts/accountLists/applyWithdraw.tsx
+3
-2
index.less
...ages/payandSettle/capitalAccounts/accountLists/index.less
+14
-14
index.tsx
...pages/payandSettle/capitalAccounts/accountLists/index.tsx
+6
-5
constant.ts
src/pages/payandSettle/constant.ts
+14
-5
index.tsx
...dSettle/creditApplication/components/DetailInfo/index.tsx
+29
-18
index.tsx
...editApplication/components/QuotaApplicationInfo/index.tsx
+6
-21
index.ts
...plication/components/QuotaApplicationInfo/schema/index.ts
+2
-2
index.tsx
...s/payandSettle/creditApplication/quotaFormQuery/index.tsx
+1
-1
apply.tsx
...ages/payandSettle/creditApplication/quotaMenage/apply.tsx
+2
-2
index.tsx
...tion/quotaMenage/detail/components/IntroduceRow/index.tsx
+10
-3
index.tsx
...ages/payandSettle/creditApplication/quotaMenage/index.tsx
+1
-1
tableStatusList.tsx
src/pages/transaction/common/tableStatusList.tsx
+2
-0
detail.tsx
src/pages/transaction/enquiryOffer/components/detail.tsx
+51
-48
index.tsx
src/pages/transaction/enquiryOffer/components/index.tsx
+159
-150
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+2
-1
index.ts
src/store/product/index.ts
+5
-0
index.tsx
src/utils/index.tsx
+0
-1
No files found.
src/locales/zh-CN/menu.ts
View file @
c549a696
...
...
@@ -224,6 +224,8 @@ export default {
'menu.tranactionAbility.stockSellStorage.inventory'
:
'库存'
,
'menu.tranactionAbility.transactionRules'
:
'交易规则'
,
'menu.tranactionAbility.addRule'
:
'新建交易规则'
,
'menu.tranactionAbility.editRule'
:
'编辑交易规则'
,
'menu.tranactionAbility.ruleDetail'
:
'交易规则详情'
,
// 需求发布 2020-10-26修改
'menu.tranactionAbility.enquirySubmit'
:
'需求发布'
,
...
...
src/module/productModule/index.ts
View file @
c549a696
import
{
GetProductGoodsGetGoodsListResponseDetail
,
GetProductCommodityGetCommodityResponse
}
from
'@/services'
;
import
{
GetProductGoodsGetGoodsListResponseDetail
,
GetProductCommodityGetCommodityResponse
}
from
'@/services
/ProductApi
'
;
export
interface
IBasicFormParam
{
brandId
:
number
;
...
...
@@ -65,6 +65,7 @@ export interface IProductModule {
productAttributeAndImageParams
:
any
[];
//价格属性包含图片的传输数据
areaOption
:
any
[];
// 省市数据
currentPageInStore
:
IPage
;
tabClickItem
:
any
[];
setAttributeLists
(
lists
:
any
[]):
void
;
setProductName
(
name
:
string
):
void
;
...
...
@@ -79,4 +80,5 @@ export interface IProductModule {
setAreaOption
(
datas
:
any
[]):
void
;
setProductInfoByEdit
(
data
:
GetProductCommodityGetCommodityResponse
):
void
;
setCurrentPageInStore
(
data
:
IPage
):
void
;
setTabClickItem
(
data
:
any
):
void
;
}
src/pages/commodity/products/addProducts.tsx
View file @
c549a696
...
...
@@ -50,7 +50,8 @@ const AddProducts: React.FC<{}> = (props) => {
isAllAttributePic
,
productInfoByEdit
,
selectCategoryId
,
clearPartData
clearPartData
,
setTabClickItem
}
=
ProductStore
useEffect
(()
=>
{
...
...
@@ -161,7 +162,7 @@ const AddProducts: React.FC<{}> = (props) => {
// 移除描述中的[]
let
_productDescription
=
{
...
productDescription
}
for
(
let
i
in
_productDescription
){
if
(
_productDescription
[
i
].
length
===
0
){
if
(
_productDescription
[
i
]
?
.
length
===
0
){
delete
_productDescription
[
i
]
}
}
...
...
@@ -304,13 +305,12 @@ const AddProducts: React.FC<{}> = (props) => {
}
console
.
log
(
e
,
'e'
)
}).
catch
(
error
=>
{
console
.
log
(
error
,
'_error'
)
setIsDisableSaveBtn
(
false
)
if
(
error
.
messge
)
message
.
error
(
error
.
message
)
else
message
.
error
(
error
.
errorFields
[
0
].
errors
.
toString
())
console
.
log
(
error
,
'_error'
)
})
}
catch
(
e
)
{
setIsDisableSaveBtn
(
false
)
...
...
@@ -330,6 +330,8 @@ const AddProducts: React.FC<{}> = (props) => {
const
callback
=
(
key
:
any
)
=>
{
setClickTabIndex
([...
clickTabIndex
,
key
])
// 点击项存入store 用于后续编辑步骤判断 是直接点击进去某个子模块还是已经进入子模块 从而采用缓存数据还是采用接口返回的编辑数据
setTabClickItem
([...
clickTabIndex
,
key
])
}
return
(<
PageHeaderWrapper
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
c549a696
...
...
@@ -69,6 +69,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
getPriceAttributeFormParamsByEdit
,
selectCategoryId
,
productAttributeAndImageParams
,
tabClickItem
}
=
ProductStore
_tableDataSource
=
useMemo
(()
=>
tableDataSource
,
[
tableDataSource
])
// 保持最新值
...
...
@@ -193,7 +194,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
let
{
_attributeNameArr
,
_attributeValueArr
,
_temp_attributeObjArr
,
_temp_attributeValObjArr
}
=
needObject
//
console.log(_priceAttribute, _attributeNameArr, _attributeValueArr, _temp_attributeObjArr, _temp_attributeValObjArr, selectedGoods, '---constructimg---') // 编辑直接进入价格设置 都为空数组
console
.
log
(
_priceAttribute
,
_attributeNameArr
,
_attributeValueArr
,
_temp_attributeObjArr
,
_temp_attributeValObjArr
,
selectedGoods
,
'---constructimg---'
)
// 编辑直接进入价格设置 都为空数组
if
(
selectedGoods
.
length
>
0
){
// 编辑情况下 select货品列表可能会采用接口数据
_col
.
push
({
...
...
@@ -211,32 +212,34 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
</
Select
>
</>
})
}
else
if
(
history
.
location
.
query
?.
id
){
// 此时没有货品并且处于编辑状态 取接口返回的数据
let
_goods
:
any
[]
=
Object
.
values
(
productInfoByEdit
.
unitPriceAndPicList
.
map
(
_
=>
_
.
goods
))
if
(
_goods
.
indexOf
(
null
)
===-
1
){
let
goodsInApi
:
any
=
Object
.
values
(
_goods
.
reduce
((
item
,
next
)
=>
{
item
[
next
.
id
]
=
next
return
item
},{}))
if
(
goodsInApi
.
length
>
0
){
// *9.12*
_col
.
push
({
title
:
'对应货品'
,
dataIndex
:
'对应货品'
,
key
:
'对应货品'
,
width
:
360
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
<
Select
style=
{
{
width
:
'100%'
}
}
defaultValue=
{
text
}
onChange=
{
(
v
)
=>
{
tableSelelctChange
(
v
,
record
)
}
}
>
{
goodsInApi
.
map
(
_item
=>
(
<
Option
key=
{
_item
.
id
}
value=
{
_item
.
id
}
>
{
_item
.
code
}
/
{
_item
.
name
}
/
{
_item
.
type
}
/¥
{
_item
.
costPrice
}
</
Option
>
))
}
</
Select
>
</>
})
}
}
}
/** 注释原因:编辑时操作货品 没有更新价格属性表格中的货品选项 */
// else if(history.location.query?.id){ // 此时没有货品并且处于编辑状态 取接口返回的数据
// let _goods: any[] = Object.values(productInfoByEdit.unitPriceAndPicList.map(_ => _.goods))
// if(_goods.indexOf(null)===-1){
// let goodsInApi : any = Object.values(_goods.reduce((item, next)=>{
// item[next.id] = next
// return item
// },{}))
// if(goodsInApi.length > 0){
// _col.push({
// title: '对应货品',
// dataIndex: '对应货品',
// key: '对应货品',
// width: 360,
// render: (text: any, record: any) => <>
// <Select style={{width:'100%'}} defaultValue={text} onChange={(v)=> {tableSelelctChange(v, record) }}>
// {
// goodsInApi.map(_item => (
// <Option key={_item.id} value={_item.id}>{_item.code}/{_item.name}/{_item.type}/¥{_item.costPrice}</Option>
// ))
// }
// </Select>
// </>
// })
// }
// }
// }
if
(
_attributeNameArr
?.
length
>
0
){
_attributeNameArr
.
map
(
_attr
=>
{
...
...
@@ -276,7 +279,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setColumns
(
_col
)
// 生成表格data
// 生成表格data
Source
let
combineArray
=
SKUCombine
(
_attributeValueArr
)
setCombineAttributeArray
(
combineArray
)
setAttributeObjArr
(
_temp_attributeObjArr
)
...
...
@@ -292,8 +295,12 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
})
:
_tempObj
[
_attributeNameArr
[
i
]
||
_attributeNameArr
[
0
]]
=
_rowArr
// 当一项变动的时候 找_attributeNameArr可能会找不到 找不到的情况下置为索引0的那项
if
(
history
.
location
.
query
?.
id
){
// 编辑的时候,先指定数据中的货品id,如果是重新组合的不存在id就使用选择的货品中的第一个,如果没有置为0;同理,不存在单价就置为{}
// _tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
_tempObj
[
'对应货品'
]
=
productInfoByEdit
.
unitPriceAndPicList
[
i
]?.
goods
?.
id
||
selectedGoods
[
0
]?.
id
||
0
_tempObj
[
'单价'
]
=
productInfoByEdit
.
unitPriceAndPicList
[
i
]?.
unitPrice
||
{}
console
.
log
(
_tableDataSource
,
'编辑构建table数据的时候'
)
console
.
log
(
tabClickItem
,
'store中的点项'
)
// 通过store中的点击项可以判断当前表格的数据是采用接口返回的全局编辑数据还是子模块的局部缓存数据
}
else
{
_tempObj
[
'对应货品'
]
=
selectedGoods
.
length
>
0
?
selectedGoods
[
0
].
id
:
0
_tempObj
[
'单价'
]
=
{}
...
...
@@ -307,7 +314,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_tempObj
[
'单价'
]
=
productInfoByEdit
?.
unitPriceAndPicList
[
0
]?.
unitPrice
||
{}
_tableData
.
push
(
_tempObj
)
}
//
console.log(_tableData, '_tableData') // 只有一项 变动情况下表格数据的key获取不到
console
.
log
(
_tableData
,
'_tableData'
)
// 只有一项 变动情况下表格数据的key获取不到
_tableDataSource
=
_tableData
// 有前面tab变动引起的二次构建 需要清空价格数据
if
(
updateFlag
.
current
){
...
...
@@ -450,7 +457,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
_tableDataSource
=
newTabeData
setTableDataSource
(
_tableDataSource
)
//
console.log(_tableDataSource, curretSetPriceRow, v, isBatchSetting, 'setPriceOk')
console
.
log
(
_tableDataSource
,
curretSetPriceRow
,
v
,
isBatchSetting
,
'setPriceOk'
)
})
}
...
...
src/pages/logistics/list/addCompany.tsx
View file @
c549a696
...
...
@@ -340,9 +340,16 @@ const company: React.FC<parmas> = (props) => {
<
Button
loading=
{
loading
}
onClick=
{
handleSubmitAllSetting
}
type=
"primary"
style=
{
{
marginTop
:
32
,
marginBottom
:
16
,
marginRight
:
24
}
}
>
保存
</
Button
>
<
Button
onClick=
{
handleCancel
}
style=
{
{
marginTop
:
32
,
marginBottom
:
16
}
}
>
<
Popconfirm
title=
"未保存,是否确定执行这个操作?"
onConfirm=
{
handleCancel
}
okText=
"是"
cancelText=
"否"
>
<
Button
style=
{
{
marginTop
:
32
,
marginBottom
:
16
}
}
>
取消
</
Button
>
</
Popconfirm
>
</
Col
>
</
Row
>
</
Col
>
...
...
src/pages/payandSettle/amountAccountManage/checkWithdraw/checkDetail.tsx
View file @
c549a696
...
...
@@ -8,18 +8,52 @@ import StatusTag from '@/components/StatusTag'
import
cx
from
'classnames'
import
moment
from
'moment'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
statusMap
}
from
'../../constant'
import
{
memberStatusMap
,
operationMap
,
statusMap
}
from
'../../constant'
import
{
CheckSquareOutlined
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetSettleAccountsCorporateAccountConfigResponse
}
from
'@/services/SettleApi'
import
{
StandardTable
}
from
'god'
const
{
Step
}
=
Steps
;
const
{
TextArea
}
=
Input
;
const
CheckDetail
:
React
.
FC
<
{}
>
=
()
=>
{
const
refTrade
=
useRef
<
any
>
({})
const
[
checkForm
]
=
Form
.
useForm
();
const
[
visibleModal
,
setVisibleModal
]
=
useState
<
boolean
>
(
false
)
const
[
dealRecord
,
setDealRecord
]
=
useState
<
any
>
()
const
[
checkStatus
,
setCheckStatus
]
=
useState
<
number
>
(
4
)
const
[
disableCheck
,
setDisableCheck
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
const
[
details
,
setDetails
]
=
useState
<
any
>
({
accountBalance
:
0
,
lockBalance
:
0
})
const
[
bankDetail
,
setBankDetail
]
=
useState
<
GetSettleAccountsCorporateAccountConfigResponse
>
()
useEffect
(()
=>
{
getAccountInfo
()
},
[])
const
{
detailinfo
}
=
history
.
location
.
query
let
urlParams
:
any
=
JSON
.
parse
(
atob
(
detailinfo
))
const
getAccountInfo
=
async
()
=>
{
let
res
=
await
PublicApi
.
getPayMemberAssetAccountGetMemberAssetAccount
({
id
:
urlParams
.
id
})
const
{
code
,
data
}
=
res
setDetails
(
data
)
if
(
code
===
1000
)
{
let
bankRes
=
await
PublicApi
.
getSettleAccountsCorporateAccountConfig
({
memberId
:
data
.
memberId
+
''
})
setBankDetail
(
bankRes
.
data
)
}
}
// 获取提现处理记录
const
fetchTradeData
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayMemberAssetAccountGetCashOutRecordList
({
tradeCode
:
urlParams
.
tradeCode
,
...
params
}).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -37,16 +71,13 @@ const CheckDetail: React.FC<{}> = () => {
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
`
${
operationMap
[
r
.
operation
][
'operator'
]}
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'交易项目'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
},
{
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
operationMap
[
t
][
'title'
]
},
{
title
:
'状态'
,
...
...
@@ -67,7 +98,18 @@ const CheckDetail: React.FC<{}> = () => {
const
handleOK
=
()
=>
{
checkForm
.
validateFields
().
then
(
values
=>
{
console
.
log
(
values
,
'value'
)
setConfirmLoading
(
true
)
// @ts-ignore
PublicApi
.
postPayMemberAssetAccountCheck
({
id
:
urlParams
.
id
,...
values
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDisableCheck
(
true
)
console
.
log
(
res
.
data
)
console
.
log
(
values
,
res
.
data
,
'value'
)
}
else
{
setDisableCheck
(
false
)
}
setVisibleModal
(
false
)
})
})
}
...
...
@@ -95,7 +137,7 @@ const CheckDetail: React.FC<{}> = () => {
>
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"外部流转"
>
<
Steps
progressDot
current=
{
0
}
>
<
Steps
progressDot
current=
{
1
}
>
<
Step
title=
"申请提现"
description=
"采购商"
/>
<
Step
title=
"审核提现"
description=
"平台"
/>
<
Step
title=
"支付提现"
description=
"平台"
/>
...
...
@@ -114,16 +156,18 @@ const CheckDetail: React.FC<{}> = () => {
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'flex-end'
}
}
>
<
InputNumber
disabled=
{
true
}
defaultValue=
{
0
}
defaultValue=
{
urlParams
.
amount
}
formatter=
{
value
=>
`${value}`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
parser=
{
value
=>
value
.
replace
(
/
\$\s?
|
(
,*
)
/g
,
''
)
}
className=
{
styles
[
'statistic-input'
]
}
precision=
{
2
}
min=
{
0
}
/>
</
div
>
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
最多可以提现:¥
10,000.00
最多可以提现:¥
{
((
details
.
accountBalance
*
100
-
details
.
lockBalance
*
100
)
/
100
).
toFixed
(
2
)
}
</
span
>
</
div
>
</
div
>
...
...
@@ -136,7 +180,7 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户归属:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
广州数商云网络科技有限公司
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
bankDetail
?.
name
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -144,7 +188,7 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
银行账号:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
6214 7812 3456 7891 1234
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
bankDetail
?.
bankAccount
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -152,7 +196,7 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
开户行:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
中国建设银行广州市分行营业部
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
bankDetail
?.
bankDeposit
}
</
p
>
</
Col
>
</
Row
>
</
div
>
...
...
@@ -169,12 +213,12 @@ const CheckDetail: React.FC<{}> = () => {
<
div
className=
{
styles
.
statistic
}
>
<
div
className=
{
styles
[
'statistic-title'
]
}
>
可用余额(元):
</
div
>
<
div
className=
{
styles
[
'statistic-amount'
]
}
>
{
`
100000
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
{
`
${((details.accountBalance*100 - details.lockBalance*100)/100).toFixed(2)}
`
.
replace
(
/
\B(?=(\d
{3}
)
+
(?!\d))
/g
,
','
)
}
</
div
>
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
温州市龙昌皮具有限公司
{
details
?.
memberName
}
</
span
>
</
div
>
</
div
>
...
...
@@ -187,7 +231,7 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户归属:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
广州数商云网络科技有限公司
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
parentMemberName
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -195,7 +239,7 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户余额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
10,000
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
accountBalance
?.
toFixed
(
2
)
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -203,7 +247,7 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
锁定金额(元):
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
>
0.00
</
p
>
<
p
className=
{
styles
.
rightInfo
}
>
{
details
?.
lockBalance
?.
toFixed
(
2
)
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -211,7 +255,10 @@ const CheckDetail: React.FC<{}> = () => {
<
p
className=
{
styles
.
rightTitle
}
>
账户状态:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
className=
{
styles
.
rightInfo
}
><
StatusTag
type=
"success"
title=
"正常"
/></
p
>
{
details
?.
accountStatus
&&
<
StatusTag
title=
{
memberStatusMap
[
details
.
accountStatus
][
'title'
]
}
type=
{
memberStatusMap
[
details
.
accountStatus
][
'type'
]
}
/>
}
</
Col
>
</
Row
>
</
div
>
...
...
@@ -221,7 +268,11 @@ const CheckDetail: React.FC<{}> = () => {
</
Space
>
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"提现处理记录"
>
<
Table
dataSource=
{
dealRecord
}
columns=
{
columns
}
/>
<
StandardTable
columns=
{
columns
}
currentRef=
{
refTrade
}
fetchTableData=
{
(
params
:
any
)
=>
fetchTradeData
(
params
)
}
/>
</
Card
>
</
Space
>
<
Modal
...
...
@@ -229,6 +280,7 @@ const CheckDetail: React.FC<{}> = () => {
visible=
{
visibleModal
}
onOk=
{
handleOK
}
onCancel=
{
handleCancel
}
confirmLoading=
{
confirmLoading
}
>
<
Form
layout=
"vertical"
...
...
@@ -252,7 +304,7 @@ const CheckDetail: React.FC<{}> = () => {
</
Form
.
Item
>
{
checkStatus
===
3
&&
<
Form
.
Item
name=
"
checkR
emark"
name=
"
r
emark"
label=
{
'审核不通过原因'
}
rules=
{
[
{
...
...
src/pages/payandSettle/amountAccountManage/checkWithdraw/index.tsx
View file @
c549a696
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
Card
,
Space
,
Button
,
}
from
'antd'
import
{
history
}
from
'umi'
import
{
Card
,
Space
,
Button
,
Modal
,
message
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
...
...
@@ -9,17 +10,20 @@ import { createFormActions, FormEffectHooks } from '@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
searchSchema
}
from
'./schema'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
EyePreview
from
'@/components/EyePreview'
import
{
DatePicker
}
from
'@formily/antd-components'
import
StatusTag
from
'@/components/StatusTag'
import
{
accountStatusMap
,
memberS
tatusMap
}
from
'../../constant'
import
{
s
tatusMap
}
from
'../../constant'
import
moment
from
'moment'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
const
{
confirm
}
=
Modal
const
formActions
=
createFormActions
();
const
CheckWithdraw
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
withdrawRowSelection
,
withdrawRowCtl
]
=
useRowSelectionTable
()
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -28,7 +32,7 @@ const CheckWithdraw: React.FC<{}> = () => {
key
:
'memberAssetAccount'
,
className
:
'commonPickColor'
,
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.id}`
}
url=
{
`/memberCenter/payandSettle/amountAccountManage/memberAccountManage/detail?id=${record.
memberAssetAccount.
id}`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -45,8 +49,9 @@ const CheckWithdraw: React.FC<{}> = () => {
},
{
title
:
'提现金额(元)'
,
dataIndex
:
'memberRoleName'
,
key
:
'memberRoleName'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
t
.
toFixed
(
2
)
},
{
title
:
'提现申请时间'
,
...
...
@@ -55,10 +60,10 @@ const CheckWithdraw: React.FC<{}> = () => {
render
:
(
t
,
r
)
=>
moment
(
t
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
{
title
:
'
会员
状态'
,
dataIndex
:
'
memberS
tatus'
,
key
:
'
memberS
tatus'
,
render
:
(
t
,
r
)
=>
(<
StatusTag
title=
{
memberStatusMap
[
t
][
'title'
]
}
type=
{
memberS
tatusMap
[
t
][
'type'
]
}
/>)
title
:
'状态'
,
dataIndex
:
'
s
tatus'
,
key
:
'
s
tatus'
,
render
:
(
t
,
r
)
=>
(<
StatusTag
title=
{
statusMap
[
t
][
'title'
]
}
type=
{
s
tatusMap
[
t
][
'type'
]
}
/>)
},
{
title
:
'操作'
,
...
...
@@ -78,11 +83,34 @@ const CheckWithdraw: React.FC<{}> = () => {
}
const
clickUp
=
(
r
:
any
)
=>
{
console
.
log
(
'通过'
)
let
params
=
{
tradeCode
:
r
.
tradeCode
,
id
:
r
.
memberAssetAccount
.
id
,
amount
:
r
.
tradeMoney
}
history
.
push
(
`/memberCenter/payandSettle/amountAccountManage/checkWithdraw/detail?detailinfo=
${
btoa
(
JSON
.
stringify
(
params
))}
`
)
}
const
handleBatchCheck
=
()
=>
{
console
.
log
(
'批量通过'
)
if
(
withdrawRowCtl
.
selectedRowKeys
.
length
>
0
){
confirm
({
title
:
'确定要执行批量审核操作?'
,
icon
:
<
ExclamationCircleOutlined
/>,
onOk
()
{
PublicApi
.
postPayMemberAssetAccountBatchCheck
({
idList
:
withdrawRowCtl
.
selectedRowKeys
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
},
okType
:
'danger'
,
onCancel
()
{
console
.
log
(
'Cancel'
);
},
okText
:
'确定'
,
cancelText
:
'取消'
})
}
else
{
message
.
error
(
'请先选择对应项目进行操作!'
)
}
}
const
controllerBtns
=
(
...
...
@@ -100,6 +128,7 @@ const CheckWithdraw: React.FC<{}> = () => {
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
"id"
}
}
rowSelection=
{
withdrawRowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
...
...
src/pages/payandSettle/amountAccountManage/memberAccountManage/index.tsx
View file @
c549a696
...
...
@@ -14,7 +14,7 @@ import EyePreview from '@/components/EyePreview'
import
{
DatePicker
}
from
'@formily/antd-components'
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
import
StatusTag
from
'@/components/StatusTag'
import
{
accountStatusMap
,
memberStatusMap
}
from
'../../constant'
import
{
account
MemberType
,
account
StatusMap
,
memberStatusMap
}
from
'../../constant'
import
LevelBrand
from
'@/pages/member/components/LevelBrand'
import
{
validatorByte
}
from
'@/utils/regExp'
import
{
GetPayMemberAssetAccountGetMemberAssetAccountListResponseDetail
}
from
'@/services/PayApi'
...
...
@@ -44,8 +44,9 @@ const AccountLists: React.FC<{}> = () => {
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
dataIndex
:
'memberType'
,
key
:
'memberType'
,
render
:
(
t
,
r
)
=>
accountMemberType
[
t
]
},
{
title
:
'会员角色'
,
...
...
src/pages/payandSettle/amountAccountManage/memberAccountManage/memberAccountDetail.tsx
View file @
c549a696
...
...
@@ -8,7 +8,7 @@ import StatusTag from '@/components/StatusTag'
import
cx
from
'classnames'
import
moment
from
'moment'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
memberStatusMap
,
moveStatusMap
,
statusMap
}
from
'../../constant'
import
{
memberStatusMap
,
moveStatusMap
,
operationMap
,
statusMap
}
from
'../../constant'
import
{
SettingOutlined
,
StopOutlined
}
from
'@ant-design/icons'
import
{
validatorByte
}
from
'@/utils/regExp'
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -79,11 +79,13 @@ const AccountDetail: React.FC<{}> = () => {
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
`
${
operationMap
[
r
.
operation
][
'operator'
]}
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'交易项目'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
t
,
r
)
=>
operationMap
[
t
][
'title'
]
},
{
title
:
'状态'
,
...
...
src/pages/payandSettle/amountAccountManage/paymentWithdraw/index.tsx
View file @
c549a696
...
...
@@ -47,6 +47,7 @@ const PaymentWithdraw: React.FC<{}> = () => {
title
:
'提现金额(元)'
,
dataIndex
:
'memberRoleName'
,
key
:
'memberRoleName'
,
render
:
(
t
,
r
)
=>
`¥
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'提现申请时间'
,
...
...
@@ -71,7 +72,7 @@ const PaymentWithdraw: React.FC<{}> = () => {
console
.
log
(
params
)
return
new
Promise
((
resolve
,
reject
)
=>
{
let
obj
=
{
...
params
}
PublicApi
.
getPayMemberAssetAccountGet
Check
CashOutList
(
obj
).
then
(
res
=>
{
PublicApi
.
getPayMemberAssetAccountGet
Pay
CashOutList
(
obj
).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
src/pages/payandSettle/capitalAccounts/accountLists/accountDetail.tsx
View file @
c549a696
...
...
@@ -78,12 +78,13 @@ const AccountDetail: React.FC<{}> = () => {
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
`
${
operationMap
[
r
.
operation
][
'operator'
]}
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'交易项目'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
t
,
r
)
=>
operationMap
[
t
]
render
:
(
t
,
r
)
=>
operationMap
[
t
]
[
'title'
]
},
{
title
:
'状态'
,
...
...
@@ -107,8 +108,8 @@ const AccountDetail: React.FC<{}> = () => {
},
{
title
:
'操作角色'
,
dataIndex
:
'parentMemberRoleName'
,
key
:
'
parentMemberRoleName
'
,
dataIndex
:
[
'memberAssetAccount'
,
'parentMemberRoleName'
]
,
key
:
'
id
'
,
},
{
title
:
'状态'
,
...
...
@@ -138,7 +139,6 @@ const AccountDetail: React.FC<{}> = () => {
];
const
handleConfirm
=
()
=>
{
setIsBtnLoading
(
true
)
schemaActions
.
submit
()
}
...
...
@@ -148,6 +148,7 @@ const AccountDetail: React.FC<{}> = () => {
const
handleSubmit
=
(
value
)
=>
{
// 提交重置
setIsBtnLoading
(
true
)
let
parasm
=
{
memberAssetAccountId
:
pageId
,
money
:
Number
(
value
.
money
),
...
...
@@ -188,7 +189,7 @@ const AccountDetail: React.FC<{}> = () => {
</
div
>
<
div
className=
{
styles
[
'repayment-end'
]
}
>
<
span
className=
{
styles
[
'repayment-time'
]
}
>
{
details
?.
m
emberName
}
{
details
?.
parentM
emberName
}
</
span
>
</
div
>
</
div
>
...
...
src/pages/payandSettle/capitalAccounts/accountLists/applyWithdraw.tsx
View file @
c549a696
...
...
@@ -31,7 +31,7 @@ const AccountDetail: React.FC<{}> = () => {
let
res
=
await
PublicApi
.
getPayAssetAccountGetAssetAccount
({
id
})
const
{
code
,
data
}
=
res
setDetails
(
data
)
if
(
code
===
1000
){
if
(
code
===
1000
)
{
let
bankRes
=
await
PublicApi
.
getSettleAccountsCorporateAccountConfig
({
memberId
:
data
.
memberId
+
''
})
setBankDetail
(
bankRes
.
data
)
}
...
...
@@ -62,12 +62,13 @@ const AccountDetail: React.FC<{}> = () => {
title
:
'交易金额(元)'
,
dataIndex
:
'tradeMoney'
,
key
:
'tradeMoney'
,
render
:
(
t
,
r
)
=>
`
${
operationMap
[
r
.
operation
][
'operator'
]}
${
t
.
toFixed
(
2
)}
`
},
{
title
:
'交易项目'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
t
,
r
)
=>
operationMap
[
t
]
render
:
(
t
,
r
)
=>
operationMap
[
t
]
[
'title'
]
},
{
title
:
'状态'
,
...
...
src/pages/payandSettle/capitalAccounts/accountLists/index.less
View file @
c549a696
...
...
@@ -41,20 +41,20 @@
font-weight: 500;
}
&-input {
display: block;
width: 180px;
line-height: 40px;
padding: 8px 0;
font-size: 32px;
font-weight: 500;
color: #fff;
background: none;
border-top: none;
border-right: none;
border-left: none;
border-image: initial;
outline: none;
border-bottom: 1px solid #fff;
display: block
!important
;
width: 180px
!important
;
line-height: 40px
!important
;
padding: 8px 0
!important
;
font-size: 32px
!important
;
font-weight: 500
!important
;
color: #fff
!important
;
background: none
!important
;
border-top: none
!important
;
border-right: none
!important
;
border-left: none
!important
;
border-image: initial
!important
;
outline: none
!important
;
border-bottom: 1px solid #fff
!important
;
}
}
...
...
src/pages/payandSettle/capitalAccounts/accountLists/index.tsx
View file @
c549a696
...
...
@@ -12,7 +12,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'
import
EyePreview
from
'@/components/EyePreview'
import
{
DatePicker
}
from
'@formily/antd-components'
import
StatusTag
from
'@/components/StatusTag'
import
{
accountStatusMap
,
memberStatusMap
,
memberLevelTypeMap
}
from
'../../constant'
import
{
accountStatusMap
,
memberStatusMap
,
memberLevelTypeMap
,
accountMemberType
}
from
'../../constant'
import
LevelBrand
from
'@/pages/member/components/LevelBrand'
const
formActions
=
createFormActions
();
...
...
@@ -23,8 +23,8 @@ const AccountLists: React.FC<{}> = () => {
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'账户归属'
,
dataIndex
:
'
m
emberName'
,
key
:
'
m
emberName'
,
dataIndex
:
'
parentM
emberName'
,
key
:
'
parentM
emberName'
,
className
:
'commonPickColor'
,
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/payandSettle/capitalAccounts/accountLists/detail?id=${record.id}`
}
...
...
@@ -34,8 +34,9 @@ const AccountLists: React.FC<{}> = () => {
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
dataIndex
:
'memberType'
,
key
:
'memberType'
,
render
:
(
t
,
r
)
=>
accountMemberType
[
t
]
},
{
title
:
'会员角色'
,
...
...
src/pages/payandSettle/constant.ts
View file @
c549a696
...
...
@@ -130,9 +130,17 @@ export const memberLevelTypeMap = {
// 操作项目
export
const
operationMap
=
{
'1'
:
'账户充值'
,
'2'
:
'账户提现'
,
'3'
:
'订单支付'
,
'4'
:
'订单退款'
,
'5'
:
'订单返利'
'1'
:
{
title
:
'账户充值'
,
operator
:
'+'
},
'2'
:
{
title
:
'账户提现'
,
operator
:
'-'
},
'3'
:
{
title
:
'订单支付'
,
operator
:
'-'
},
'4'
:
{
title
:
'订单退款'
,
operator
:
'+'
},
'5'
:
{
title
:
'订单返利'
,
operator
:
'+'
}
}
// 会员类型
export
const
accountMemberType
=
{
'1'
:
'企业会员'
,
'2'
:
'企业个人会员'
,
'3'
:
'渠道会员'
,
'4'
:
'渠道个人会员'
,
}
\ No newline at end of file
src/pages/payandSettle/creditApplication/components/DetailInfo/index.tsx
View file @
c549a696
...
...
@@ -13,10 +13,11 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetPayCreditApplyGetApplyDetailResponse
}
from
'@/services/PayApi'
;
import
{
CREDIT_INNER_STATUS
,
CREDIT_OUTER_STATUS
}
from
'@/constants'
;
import
{
CREDIT_INNER_STATUS
,
CREDIT_OUTER_STATUS
,
CREDIT_STATUS
}
from
'@/constants'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
CREDIT_STATUS_TAG_MAP
,
CREDIT_OUTER_STATUS_TAG_MAP
,
CREDIT_OUTER_STATUS_BADGE_MAP
}
from
'../../../constant'
;
import
{
normalizeFiledata
,
FileData
}
from
'@/utils'
;
const
OuterCirculation
=
React
.
lazy
(()
=>
import
(
'../OuterCirculation'
));
const
QuotaApplicationInfo
=
React
.
lazy
(()
=>
import
(
'../QuotaApplicationInfo'
));
...
...
@@ -41,6 +42,8 @@ interface QuotaValues {
billDay
:
number
|
null
;
// 申请还款周期
repayPeriod
:
number
|
null
;
// 申请附件
fileList
:
FileData
[];
};
const
DetailInfo
:
React
.
FC
<
DetailInfoProps
>
=
({
...
...
@@ -54,24 +57,28 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
applyQuota
:
null
,
billDay
:
null
,
repayPeriod
:
null
,
fileList
:
[],
});
const
[
infoLoading
,
setInfoloading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
// 获取授信详情
const
getQuotaInfo
=
()
=>
{
if
(
!
id
)
{
return
;
}
setInfoloading
(
true
);
PublicApi
.
getPayCreditApplyGetApplyDetail
({
id
,
applyId
:
id
,
creditId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setQuotaInfo
(
res
.
data
);
setQuotaValues
({
applyQuota
:
res
.
data
.
applyQuota
,
billDay
:
res
.
data
.
billDay
,
repayPeriod
:
res
.
data
.
repayPeriod
,
applyQuota
:
res
.
data
.
apply
.
applyQuota
,
billDay
:
res
.
data
.
apply
.
billDay
,
repayPeriod
:
res
.
data
.
apply
.
repayPeriod
,
fileList
:
res
.
data
.
apply
.
fileList
?
res
.
data
.
apply
.
fileList
.
map
(
item
=>
normalizeFiledata
(
item
.
fileUrl
))
:
[],
});
}
}).
finally
(()
=>
{
...
...
@@ -90,10 +97,13 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const
handleSubmit
=
()
=>
{
setSubmitLoading
(
true
);
const
{
fileList
,
...
rest
}
=
quotaValues
;
PublicApi
.
postPayCreditApplyAddCreditApply
({
applyId
:
+
id
,
creditId
:
creditId
?
+
creditId
:
0
,
...
quotaValues
,
fileList
:
fileList
.
map
(
item
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
url
})),
...
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
@@ -117,7 +127,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<
AvatarWrap
info=
{
{
aloneTxt
:
'单'
,
name
:
`申请单号:${quotaInfo && quotaInfo.
applyNo ? quotaInfo
.applyNo : ''}`
,
name
:
`申请单号:${quotaInfo && quotaInfo.
member ? quotaInfo.member
.applyNo : ''}`
,
}
}
extra=
{
quotaInfo
&&
quotaInfo
.
member
?
quotaInfo
.
member
.
levelTag
||
''
:
''
}
/>
...
...
@@ -143,20 +153,20 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
padding
:
'0 32px'
,
}
}
>
<
Descriptions
.
Item
label=
"会员归属"
>
{
'暂无'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员归属"
>
{
quotaInfo
?.
member
?.
parentMemberName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员类型"
>
{
quotaInfo
?.
member
?.
memberTypeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员角色名称"
>
{
quotaInfo
?.
member
?.
roleName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"会员状态"
>
<
StatusTag
type=
{
CREDIT_STATUS_TAG_MAP
[
quotaInfo
&&
quotaInfo
.
member
?
quotaInfo
.
member
.
status
||
1
:
1
]
}
title=
{
quotaInfo
&&
quotaInfo
.
member
?
quotaInfo
.
member
.
status
||
1
:
1
}
type=
{
CREDIT_STATUS_TAG_MAP
[
quotaInfo
&&
quotaInfo
.
member
?
quotaInfo
.
member
.
status
:
'default'
]
}
title=
{
quotaInfo
&&
quotaInfo
.
member
?
CREDIT_STATUS
[
quotaInfo
.
member
.
status
]
:
''
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"外部状态"
>
<
StatusTag
type=
{
CREDIT_OUTER_STATUS_TAG_MAP
[
quotaInfo
?.
outerStatus
]
}
title=
{
CREDIT_OUTER_STATUS
[
quotaInfo
?
.
outerStatus
]
}
/>
<
StatusTag
type=
{
CREDIT_OUTER_STATUS_TAG_MAP
[
quotaInfo
?.
member
.
outerStatus
]
}
title=
{
CREDIT_OUTER_STATUS
[
quotaInfo
?.
member
.
outerStatus
]
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
CREDIT_OUTER_STATUS_BADGE_MAP
[
quotaInfo
?.
innerStatus
]
}
text=
{
CREDIT_INNER_STATUS
[
quotaInfo
?
.
innerStatus
]
}
/>
<
Badge
color=
{
CREDIT_OUTER_STATUS_BADGE_MAP
[
quotaInfo
?.
member
.
innerStatus
]
}
text=
{
CREDIT_INNER_STATUS
[
quotaInfo
?.
member
.
innerStatus
]
}
/>
</
Descriptions
.
Item
>
</
Descriptions
>
</
PageHeader
>
...
...
@@ -166,25 +176,26 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<
Suspense
fallback=
{
null
}
>
<
OuterCirculation
steps=
{
quotaInfo
&&
quotaInfo
.
outer
VerifyRecord
List
?
quotaInfo
.
outer
VerifyRecord
List
.
map
(
item
=>
({
title
:
item
.
operat
e
,
quotaInfo
&&
quotaInfo
.
outer
Task
List
?
quotaInfo
.
outer
Task
List
.
map
(
item
=>
({
title
:
item
.
taskNam
e
,
description
:
item
.
roleName
,
}))
:
[]
}
current=
{
0
}
current=
{
quotaInfo
&&
quotaInfo
.
outerTaskList
?
quotaInfo
&&
quotaInfo
.
outerTaskList
.
findIndex
(
item
=>
item
.
isExecute
===
0
)
:
0
}
/>
</
Suspense
>
<
Suspense
fallback=
{
null
}
>
<
QuotaApplicationInfo
quotaInfo=
{
{
originalQuota
:
quotaInfo
?.
originalQuota
,
originalQuota
:
quotaInfo
?.
apply
.
originalQuota
,
applyQuota
:
quotaValues
.
applyQuota
,
billDay
:
quotaValues
.
billDay
,
repayPeriod
:
quotaValues
.
repayPeriod
,
applyTime
:
quotaInfo
?.
applyTime
,
applyTime
:
quotaInfo
?.
apply
.
applyTime
,
fileList
:
quotaValues
.
fileList
,
}
}
verify=
{
quotaInfo
&&
quotaInfo
.
verify
?
{
...
...
src/pages/payandSettle/creditApplication/components/QuotaApplicationInfo/index.tsx
View file @
c549a696
...
...
@@ -11,6 +11,7 @@ import {
}
from
'antd'
;
import
{
FormOutlined
,
RightCircleFilled
}
from
'@ant-design/icons'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
FileData
}
from
'@/utils'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
editModalSchema
}
from
'./schema'
;
...
...
@@ -33,8 +34,10 @@ interface QuotaApplicationInfo {
billDay
:
number
,
// 申请还款周期
repayPeriod
:
number
,
//
//
申请时间
// 申请时间
applyTime
:
string
,
// 申请附件
fileList
:
FileData
[];
},
// 授信审批信息
verify
:
{
...
...
@@ -189,26 +192,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
</
div
>
<
Upload
defaultFileList=
{
[
{
uid
:
'1'
,
name
:
'xxx.png'
,
status
:
'done'
,
url
:
'http://www.baidu.com/xxx.png'
,
},
{
uid
:
'2'
,
name
:
'yyy.png'
,
status
:
'done'
,
url
:
'http://www.baidu.com/yyy.png'
,
},
{
uid
:
'3'
,
name
:
'zzz.png'
,
status
:
'done'
,
url
:
'http://www.baidu.com/zzz.png'
,
},
]
}
fileList=
{
quotaInfo
.
fileList
}
disabled
/>
</
Col
>
...
...
@@ -261,6 +245,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
>
<
NiceForm
previewPlaceholder=
""
initialValues=
{
quotaInfo
}
effects=
{
(
$
,
actions
)
=>
{
const
{
setFieldState
,
setFieldValue
}
=
actions
;
...
...
src/pages/payandSettle/creditApplication/components/QuotaApplicationInfo/schema/index.ts
View file @
c549a696
...
...
@@ -101,7 +101,7 @@ export const editModalSchema: ISchema = {
},
],
},
attachmen
t
:
{
fileLis
t
:
{
type
:
'string'
,
title
:
'申请附件'
,
'x-component'
:
'Upload'
,
...
...
@@ -112,7 +112,7 @@ export const editModalSchema: ISchema = {
prefix
:
'/creditApplication/applicationAttachment/'
,
},
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.
png, .jp
g, .jpeg'
,
accept
:
'.
xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .pn
g, .jpeg'
,
},
'x-rules'
:
[
{
...
...
src/pages/payandSettle/creditApplication/quotaFormQuery/index.tsx
View file @
c549a696
...
...
@@ -36,7 +36,7 @@ const QuotaFormQuery: React.FC = () => {
render
:
(
text
,
record
)
=>
(
<>
<
EyePreview
url=
{
`/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail?id=${record.id}`
}
url=
{
`/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail?id=${record.id}
&creditId=${record.creditId}
`
}
>
{
text
}
</
EyePreview
>
...
...
src/pages/payandSettle/creditApplication/quotaMenage/apply.tsx
View file @
c549a696
...
...
@@ -3,11 +3,11 @@ import { usePageStatus } from '@/hooks/usePageStatus';
import
DetailInfo
from
'../components/DetailInfo'
;
const
QuotaMenageApply
:
React
.
FC
=
()
=>
{
const
{
i
d
,
creditId
}
=
usePageStatus
();
const
{
applyI
d
,
creditId
}
=
usePageStatus
();
return
(
<
DetailInfo
id=
{
i
d
}
id=
{
applyI
d
}
creditId=
{
creditId
}
target=
"/memberCenter/payandSettle/creditApplication/quotaMenage/history"
isEdit
...
...
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/IntroduceRow/index.tsx
View file @
c549a696
...
...
@@ -67,6 +67,10 @@ export interface BillDetailData {
* 最后还款日期
*/
lastRepayDate
:
string
/**
* 收款人Id
*/
memberId
:
number
};
export
interface
BillRecordParams
extends
RecordParams
{
...
...
@@ -162,7 +166,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
id
:
`
${
id
}
`
,
}).
then
(
res
=>
{
this
.
setState
({
billInfo
:
res
});
// this.getSettleAccountsCorporateAccountConfig(
);
this
.
getSettleAccountsCorporateAccountConfig
(
res
.
memberId
);
}).
finally
(()
=>
{
this
.
setState
({
billInfoLoading
:
false
});
});
...
...
@@ -170,7 +174,10 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
};
// 获取对公账户信息
getSettleAccountsCorporateAccountConfig
=
(
payee
:
string
)
=>
{
getSettleAccountsCorporateAccountConfig
=
(
payee
:
number
)
=>
{
if
(
!
payee
)
{
return
;
}
PublicApi
.
getSettleAccountsCorporateAccountConfig
({
memberId
:
payee
,
}).
then
(
res
=>
{
...
...
@@ -256,7 +263,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
const
{
payProveList
}
=
values
;
const
{
repaymentValues
,
billId
,
bankAccount
}
=
this
.
state
;
if
(
!
bankAccount
.
id
||
!
bankAccount
.
memberId
)
{
if
(
!
bankAccount
||
!
bankAccount
.
id
||
!
bankAccount
.
memberId
)
{
message
.
error
(
'没有还款账户相关信息,无法还款'
);
return
;
}
...
...
src/pages/payandSettle/creditApplication/quotaMenage/index.tsx
View file @
c549a696
...
...
@@ -35,7 +35,7 @@ const QuotaMenage: React.FC = () => {
const
handleJumpApply
=
record
=>
{
// 跳转申请页面
history
.
push
(
`/memberCenter/payandSettle/creditApplication/quotaMenage/apply?
id=
${
record
.
id
}
`
);
history
.
push
(
`/memberCenter/payandSettle/creditApplication/quotaMenage/apply?
creditId=
${
record
.
id
}
&applyId=0
`
);
};
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
...
...
src/pages/transaction/common/tableStatusList.tsx
View file @
c549a696
...
...
@@ -72,6 +72,7 @@ export const enquirySearchexternalState = (text:any) => {
/****** *********************** 报价单 ************************** */
//内部
// 内部状态:1.新增需求单 2.审核需求单一级 3.审核需求单二级 4.提交需求单 5.完成 6.审核不通过 7.取消报价单
export
const
enquiryOfferSearchInteriorState
=
(
text
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
text
===
1
?
component
=
<
Badge
status=
'default'
text=
"新增报价单"
/>:
...
...
@@ -94,6 +95,7 @@ export const enquiryOfferSearchexternalState = (text:any) => {
// text === 5 ? component = <Badge status='success' text="完成" />:
// text === 6 ? component = <Badge status='error' text="审核不通过" />:
// component = <Badge status="default" text="取消报价单" />
// 外部状态:1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
text
===
1
?
component
=
<
span
style=
{
statuStyle
.
default
}
>
待提交需求单
</
span
>:
text
===
2
?
component
=
<
span
style=
{
statuStyle
.
default
}
>
审核需求单
</
span
>:
text
===
3
?
component
=
<
span
style=
{
statuStyle
.
confirm
}
>
待提交报价单
</
span
>:
...
...
src/pages/transaction/enquiryOffer/components/detail.tsx
View file @
c549a696
...
...
@@ -6,7 +6,7 @@
* @LastEditTime: 2020-09-28 16:05:49
*/
import
React
,
{
Component
,
useEffect
,
useState
,
ReactNode
,
useRef
}
from
'react'
;
import
{
Row
,
Col
,
Modal
,
Table
,
Tooltip
,
Input
,
Select
,
Switch
,
Button
,
Popconfirm
,
Card
,
Tag
,
Badge
,
Steps
,
Tabs
,
}
from
'antd'
import
{
Row
,
Col
,
Modal
,
Table
,
Tooltip
,
Input
,
Select
,
Switch
,
Button
,
Popconfirm
,
Card
,
Tag
,
Badge
,
Steps
,
Tabs
,
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
EyeOutlined
,
ClockCircleOutlined
,
UpOutlined
,
DownOutlined
,
StopOutlined
,
CheckSquareOutlined
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
...
...
@@ -15,13 +15,15 @@ import { ColumnType } from 'antd/lib/table/interface'
import
ConfirmModal
from
'./confirmModal'
import
{
history
}
from
'umi'
import
{
PublicApi
}
from
'@/services/api'
import
{
getAuth
}
from
'@/utils/auth'
import
{
PageStatus
,
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
dockingColumn
,
externalColumn
,
interiorColumn
}
from
'../../common/detailFormColumnType'
import
{
getAuth
}
from
'@/utils/auth'
import
{
PageStatus
,
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
dockingColumn
,
externalColumn
,
interiorColumn
}
from
'../../common/detailFormColumnType'
import
moment
from
'moment'
import
style
from
'./index.less'
import
{
enquiryOfferSearchInteriorState
,
enquiryOfferSearchexternalState
}
from
'../../common/tableStatusList'
import
{
enquiryOfferSearchInteriorState
,
enquiryOfferSearchexternalState
}
from
'../../common/tableStatusList'
import
statuStyle
from
'../../common/colorTag'
import
RroductModal
from
'../components/productModal'
...
...
@@ -70,20 +72,20 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
const
proRef
=
useRef
<
any
>
({})
const
[
mode
,
setmode
]
=
useState
(
0
)
const
[
eqInfo
,
seteqInfo
]
=
useState
({
purchaseNuit
:
''
,
purchaseQuantity
:
null
,
modelList
:[]
purchaseNuit
:
''
,
purchaseQuantity
:
null
,
modelList
:
[]
})
//报价明细里的规格列表
let
[
dataInfo
,
setdataInfo
]
=
useState
<
any
>
({
status
:
''
,
externalState
:
0
,
interiorState
:
0
,
externalRequisitionFormStateResponses
:[],
interiorRequisitionFormStateResponses
:[],
requisitionFormAddress
:[]
externalRequisitionFormStateResponses
:
[],
interiorRequisitionFormStateResponses
:
[],
requisitionFormAddress
:
[]
})
const
[
shipperAddress
,
setshipperAddress
]
=
useState
(
''
)
const
{
pageStatus
,
id
}
=
usePageStatus
()
const
{
pageStatus
,
id
}
=
usePageStatus
()
//PageStatus:{0: "ADD", 1: "EDIT", 2: "PREVIEW", ADD: 0, EDIT: 1, PREVIEW: 2}0: "ADD"1: "EDIT"2: "PREVIEW"ADD: 0EDIT: 1PREVIEW: 2} 1
let
_title
=
pageStatus
===
PageStatus
.
PREVIEW
?
'查看'
:
id
?
'编辑'
:
'新建'
let
[
visible
,
setvisible
]
=
useState
(
false
)
...
...
@@ -152,12 +154,12 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
base
:
{
title
:
'其他报价说明'
,
leftElem
:
[
{
title
:
'最小起订'
,
key
:
''
,
value
:
dataInfo
.
minimumOrder
},
{
title
:
'最小起订'
,
key
:
''
,
value
:
dataInfo
.
minimumOrder
},
{
title
:
'交付说明'
,
key
:
''
,
value
:
dataInfo
.
deliveryInstructions
},
{
title
:
'付款说明'
,
key
:
''
,
value
:
dataInfo
.
paymentInstruction
}
],
centerElem
:
[
{
title
:
'税费说明'
,
key
:
''
,
value
:
dataInfo
.
taxation
},
{
title
:
'税费说明'
,
key
:
''
,
value
:
dataInfo
.
taxation
},
{
title
:
'物流说明'
,
key
:
''
,
value
:
dataInfo
.
logisticsInstructions
},
{
title
:
'包装说明'
,
key
:
''
,
value
:
dataInfo
.
packingInstruction
},
],
...
...
@@ -245,7 +247,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
* @return {type}
*/
const
optionChild
=
(
text
,
record
,
index
)
=>
{
return
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
'/home'
)
}
/>
return
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
'/home'
)
}
/>
}
/**
...
...
@@ -263,7 +265,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
dataIndex
:
'productName'
,
key
:
'productName'
,
align
:
'left'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
setRroductinitialValues
(
records
)
setdialogVisible
(
true
)
setmode
(
2
)
...
...
@@ -305,14 +307,14 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
dataIndex
:
'price'
,
key
:
'price'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
¥
{
text
}
</>
render
:
(
text
,
record
)
=>
<>
¥
{
text
}
</>
},
{
title
:
'金额'
,
dataIndex
:
'totalPrice'
,
key
:
'totalPrice'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
¥
{
(
record
.
purchaseQuantity
&&
record
.
price
)
?
render
:
(
text
,
record
)
=>
<>
¥
{
(
record
.
purchaseQuantity
&&
record
.
price
)
?
record
.
purchaseQuantity
*
record
.
price
:
''
}
</>
}
]
...
...
@@ -325,9 +327,9 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
},
[])
const
init
=
()
=>
{
PublicApi
.
getOrderQuotationDetails
({
id
:
id
}).
then
(
res
=>
{
let
{
data
}
=
res
if
(
pagetype
==
2
)
{
if
(
data
.
interiorState
===
3
)
{
//一级的审核通过变为2级的待审核
let
{
data
}
=
res
if
(
pagetype
==
2
)
{
if
(
data
.
interiorState
===
3
)
{
//一级的审核通过变为2级的待审核
data
.
interiorState
=
2
}
}
...
...
@@ -336,12 +338,12 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
// interiorStateList = [...data.interiorRequisitionFormStateResponses]
if
(
pagetype
==
1
||
pagetype
==
2
)
{
if
(
data
.
interiorState
===
2
)
{
if
(
pagetype
==
1
||
pagetype
==
2
)
{
if
(
data
.
interiorState
===
2
)
{
setIsextraOption
(
true
)
}
}
else
if
(
pagetype
==
3
)
{
if
(
data
.
externalState
==
1
)
{
}
else
if
(
pagetype
==
3
)
{
if
(
data
.
externalState
==
3
&&
data
.
interiorState
==
4
)
{
setIsextraOption
(
true
)
}
}
...
...
@@ -358,8 +360,8 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
})
PublicApi
.
getOrderQuotationParticulars
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
.
data
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
.
data
setproductSource
([...
data
])
}
})
...
...
@@ -425,7 +427,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
const
externalTextState
=
(
text
)
=>
{
let
name
=
''
dataInfo
.
externalQuotationStateResponses
.
forEach
(
element
=>
{
if
(
element
.
state
===
text
)
{
if
(
element
.
state
===
text
)
{
name
=
element
.
operationalProcess
}
})
...
...
@@ -440,7 +442,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
const
interiorTextState
=
(
text
)
=>
{
let
name
=
''
dataInfo
.
interiorQuotationStateResponses
.
forEach
(
element
=>
{
if
(
element
.
state
===
text
)
{
if
(
element
.
state
===
text
)
{
name
=
element
.
operationalProcess
}
})
...
...
@@ -462,7 +464,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
* @param {type}
* @return {type}
*/
const
fetchDockingData
=
async
(
params
)
=>
{
const
fetchDockingData
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getOrderRequisitionFormDemandDockingList
(
params
);
return
res
.
data
}
...
...
@@ -474,22 +476,22 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
*/
const
handleModalOK
=
()
=>
{
setvisible
(
false
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
},
1000
)
}
const
interiorData
=
[
{
operationTime
:
1598853606806
operationTime
:
1598853606806
}
]
const
handlediaSubmit
=
(
type
:
number
)
=>
{
if
(
type
==
1
)
{
//提交需求单
PublicApi
.
postOrder
SubmitRequisitionForm
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
const
handlediaSubmit
=
(
type
:
number
)
=>
{
if
(
type
==
1
)
{
//提交需求单
PublicApi
.
postOrder
QuotationSubmission
({
id
:
Number
(
id
),
state
:
1
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
},
1000
)
}
})
}
...
...
@@ -502,17 +504,18 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
*/
const
getOrderProductAll
=
(
id
)
=>
{
setrequisitionFormId
(
id
)
//需求id
PublicApi
.
getOrderRequisitionFormProductAll
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
||
{}
let
{
purchaseNuit
,
purchaseQuantity
}
=
data
[
0
]
PublicApi
.
getOrderRequisitionFormProductAll
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
||
{}
let
{
purchaseNuit
,
purchaseQuantity
}
=
data
[
0
]
let
list
=
data
.
map
(
v
=>
v
.
model
)
setRroductinitialValues
({
...
RroductinitialValues
,
purchaseNuit
:
purchaseNuit
,
purchaseQuantity
:
purchaseQuantity
})
seteqInfo
({...
eqInfo
,
modelList
:
list
seteqInfo
({
...
eqInfo
,
modelList
:
list
})
}
...
...
@@ -724,7 +727,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
Tabs
type=
"line"
defaultActiveKey=
'1'
>
<
TabPane
tab=
'外部流转记录'
key=
"1"
>
<
Table
rowKey=
{
'id'
}
dataSource=
{
dataInfo
.
externalRequisitionFormResponses
||
[]
}
columns=
{
externalColumn
(
formTime
,
externalTextState
)
}
/>
<
Table
rowKey=
{
'id'
}
dataSource=
{
dataInfo
.
externalRequisitionFormResponses
||
[]
}
columns=
{
externalColumn
(
formTime
,
externalTextState
)
}
/>
</
TabPane
>
<
TabPane
tab=
'内部流转记录'
key=
"2"
>
{
/* <StandardTable
...
...
@@ -734,7 +737,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
fetchTableData={(params: any) => fetchData(params)}
/> */
}
<
Table
rowKey=
{
'id'
}
dataSource=
{
dataInfo
.
interiorQuotationLogResponses
||
[]
}
columns=
{
interiorColumn
(
formTime
,
interiorTextState
)
}
/>
<
Table
rowKey=
{
'id'
}
dataSource=
{
dataInfo
.
interiorQuotationLogResponses
||
[]
}
columns=
{
interiorColumn
(
formTime
,
interiorTextState
)
}
/>
{
/* pagination={pagination} */
}
</
TabPane
>
</
Tabs
>
...
...
@@ -747,7 +750,7 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
id=
{
id
}
dialogVisible=
{
visible
}
onCancel=
{
()
=>
setvisible
(
false
)
}
onOK=
{
handleModalOK
}
onOK=
{
handleModalOK
}
/>
<
RroductModal
dialogVisible=
{
dialogVisible
}
...
...
src/pages/transaction/enquiryOffer/components/index.tsx
View file @
c549a696
...
...
@@ -10,7 +10,7 @@
* @param {type}
* @return {type}
*/
import
React
,
{
ReactNode
,
useRef
,
useState
,
useEffect
}
from
'react'
;
import
React
,
{
ReactNode
,
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
...
...
@@ -24,7 +24,7 @@ import {
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PlusOutlined
,
DownOutlined
,
DeleteOutlined
PlusOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
...
...
@@ -34,30 +34,30 @@ import {
}
from
'god/dist/src/standard-table/TableController'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
enquiryOfferSearchInteriorState
,
enquiryOfferSearchexternalState
}
from
'../../common/tableStatusList'
import
{
enquiryOfferSearchInteriorState
,
enquiryOfferSearchexternalState
}
from
'../../common/tableStatusList'
import
statuStyle
from
'../../common/colorTag'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
timeRange
}
from
'@/utils/index'
import
{
timeRange
}
from
'@/utils/index'
import
moment
from
'moment'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
commonEnquieryOfferSchema
}
from
'../schema'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
values
,
action
}
from
'mobx'
;
/**
* @description:
按页面来 type一级为1 二级为2 待提交报价单3
* @description:
type: 1.待审核1级,2.待审核2级,3.待提交报价单
* @param {type}
* @return {type}
*/
export
interface
listParams
{
export
interface
listParams
{
type
:
number
;
des
?:
string
;
}
const
formActions
=
createFormActions
();
const
List
:
React
.
FC
<
listParams
>
=
(
props
)
=>
{
const
List
:
React
.
FC
<
listParams
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
more
,
setmore
]
=
useState
(
false
)
const
[
selectRow
,
setSelectRow
]
=
useState
([])
...
...
@@ -66,14 +66,14 @@ const List:React.FC<listParams> = (props) => {
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
fetchData
=
async
(
params
:
any
)
=>
{
if
(
props
.
type
===
1
)
{
//一级
if
(
props
.
type
===
1
)
{
//一级
const
res
=
await
PublicApi
.
getOrderQuotationToAuditList
(
params
);
return
res
.
data
}
else
if
(
props
.
type
===
2
)
{
//二级
}
else
if
(
props
.
type
===
2
)
{
//二级
const
res
=
await
PublicApi
.
getOrderQuotationToAuditTwoList
(
params
);
return
res
.
data
}
else
if
(
props
.
type
===
3
)
{
//待提交报价单
else
if
(
props
.
type
===
3
)
{
//待提交报价单
const
res
=
await
PublicApi
.
getOrderQuotationReviewedoList
(
params
);
return
res
.
data
}
...
...
@@ -84,21 +84,21 @@ const List:React.FC<listParams> = (props) => {
* @param {type} type: 1 需求发布 2报价 可以根据props.type处理
* @return {type}
*/
const
handleToDetail
=
(
type
,
id
)
=>
{
if
(
props
.
type
===
1
)
{
if
(
type
===
1
)
{
const
handleToDetail
=
(
type
,
id
)
=>
{
if
(
props
.
type
===
1
)
{
if
(
type
===
1
)
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/enquiryOne/rfq/preview?id=
${
id
}
`
)
}
else
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/enquiryOne/demand/preview?id=
${
id
}
`
)
}
}
else
if
(
props
.
type
===
2
)
{
if
(
type
===
1
)
{
}
else
if
(
props
.
type
===
2
)
{
if
(
type
===
1
)
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/enquiryTwo/rfq/preview?id=
${
id
}
`
)
}
else
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/enquiryTwo/demand/preview?id=
${
id
}
`
)
}
}
else
if
(
props
.
type
===
3
)
{
if
(
type
===
1
)
{
}
else
if
(
props
.
type
===
3
)
{
if
(
type
===
1
)
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/toSubmit/rfq/preview?id=
${
id
}
`
)
}
else
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/toSubmit/demand/preview?id=
${
id
}
`
)
...
...
@@ -107,165 +107,174 @@ const List:React.FC<listParams> = (props) => {
}
const
columns
:
ColumnType
<
any
>
[]
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'报价单号'
,
key
:
'quotationNo'
,
dataIndex
:
'quotationNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
handleToDetail
(
2
,
records
.
id
)
title
:
'报价单号'
,
key
:
'quotationNo'
,
dataIndex
:
'quotationNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
handleToDetail
(
2
,
records
.
id
)
}
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'需求单号'
,
key
:
'requisitionFormNo'
,
dataIndex
:
'requisitionFormNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
handleToDetail
(
1
,
records
.
requisitionId
)
//需求单id
title
:
'需求单号'
,
key
:
'requisitionFormNo'
,
dataIndex
:
'requisitionFormNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
handleToDetail
(
1
,
records
.
requisitionId
)
//需求单id
}
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'报价单摘要'
,
key
:
'quotationSummary'
,
dataIndex
:
'quotationSummary'
,
align
:
'left'
title
:
'报价单摘要'
,
key
:
'quotationSummary'
,
dataIndex
:
'quotationSummary'
,
align
:
'left'
},
{
title
:
'需求会员'
,
key
:
'demandMembers'
,
dataIndex
:
'demandMembers'
,
align
:
'left'
title
:
'需求会员'
,
key
:
'demandMembers'
,
dataIndex
:
'demandMembers'
,
align
:
'left'
},
{
title
:
'报价截至时间'
,
key
:
'quotationAsTime'
,
dataIndex
:
'quotationAsTime'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
format
(
text
)
title
:
'报价截至时间'
,
key
:
'quotationAsTime'
,
dataIndex
:
'quotationAsTime'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
format
(
text
)
},
{
title
:
'单据时间'
,
key
:
'documentsTime'
,
dataIndex
:
'documentsTime'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
format
(
text
)
title
:
'单据时间'
,
key
:
'documentsTime'
,
dataIndex
:
'documentsTime'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
format
(
text
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
align
:
'center'
,
render
:
(
text
:
any
,
reconds
)
=>
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
align
:
'center'
,
render
:
(
text
:
any
,
reconds
)
=>
enquiryOfferSearchexternalState
(
text
)
// {
// let component: ReactNode = null
// if (text == 3) {
// component = <><span style={statuStyle.warn}>审核不通过需求单</span></>
// }else if (text == 1) {
// component = <><span style={statuStyle.default}>待提交需求单</span></>
// }
// return component
// }
},
{
title
:
'内部状态'
,
key
:
'interiorState'
,
dataIndex
:
'interiorState'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
title
:
'内部状态'
,
key
:
'interiorState'
,
dataIndex
:
'interiorState'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
enquiryOfferSearchInteriorState
(
text
)
},
{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
align
:
'center'
,
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
align
:
'center'
,
render
:
(
_
:
any
,
record
:
any
)
=>
{
return
(
<>
{
(
props
.
type
===
1
||
props
.
type
===
2
)
?
(
<>
{
/* 待审核一级 */
}
{
props
.
type
===
1
&&
(
{
props
.
type
===
1
&&
<
Button
type=
"link"
onClick=
{
()
=>
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=$
{
props
.
type
}
&
id
=
$
{
record
.
id
}
`)
history.push(`
/
memberCenter
/
tranactionAbility
/
enquiryOffer
/
enquiryOne
/
detail
?
id
=
$
{
record
.
id
}
`)
}
>
审核
</
Button
>
)
}
{
/* 待审核二级 */
}
{
props
.
type
===
2
&&
(
disabled=
{
record
.
interiorState
!==
2
&&
record
.
interiorState
!==
6
}
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/enquiryOne/detail?id=${record.id}`
)
}
>
审核
</
Button
>
}
{
props
.
type
===
2
&&
<
Button
type=
"link"
onClick=
{
()
=>
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=$
{
props
.
type
}
&
id
=
$
{
record
.
id
}
`)
history.push(`
/
memberCenter
/
tranactionAbility
/
enquiryOffer
/
enquiryTwo
/
detail
?
id
=
$
{
record
.
id
}
`)
}
>
审核
</
Button
>
)
}
</>
)
:
(
<>
{
/* 待提交 */
}
{
(
props
.
type
===
3
&&
record
.
externalState
===
1
)
&&
(
disabled=
{
record
.
interiorState
!==
3
&&
record
.
interiorState
!==
6
}
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/enquiryTwo/detail?id=${record.id}`
)
}
>
审核
</
Button
>
}
{
props
.
type
===
3
&&
<
Button
type=
"link"
onClick=
{
()
=>
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=$
{
props
.
type
}
&
id
=
$
{
record
.
id
}
`)
history.push(`
/
memberCenter
/
tranactionAbility
/
enquiryOffer
/
toSubmit
/
detail
?
id
=
$
{
record
.
id
}
`)
}
>
提交
</
Button
>
)
}
{
(
record
.
externalState
===
1
&&
record
.
interiorState
===
1
)
&&
(
<>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
([
record
.
id
])
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
</>
)
}
</>
)
}
disabled=
{
record
.
externalState
!==
3
&&
record
.
interiorState
!==
4
}
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/enquiryOffer/toSubmit/detail?id=${record.id}`
)
}
>
提交
</
Button
>
}
</>
// <>
// {
// (props.type === 1 || props.type === 2) ? (
// <>
// {/* 待审核一级 */}
// {props.type === 1 && (
// <Button
// type="link"
// onClick={() =>
// // history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/enquiryOne/detail?id=${record.id}`)
// }
// >
// 审核
// </Button>
// )}
// {/* 待审核二级 */}
// {props.type === 2 && (
// <Button
// type="link"
// onClick={() =>
// // history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/enquiryTwo/detail?id=${record.id}`)
// }
// >
// 审核
// </Button>
// )}
// </>
// ) : (
// <>
// {/* 待提交 */}
// {
// (props.type === 3 && record.externalState === 1) && (
// <Button
// type="link"
// onClick={() =>
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/toSubmit/detail?id=${record.id}`)
// }
// >
// 提交
// </Button>
// )
// }
// {
// (record.externalState === 1 && record.interiorState === 1) && (
// <>
// <Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete([record.id])}>
// <Button type='link'>
// 删除
// </Button>
// </Popconfirm>
// <Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
// <Button type='link'>提交</Button>
// </Popconfirm>
// </>
// )
// }
// </>
// )
// }
// </>
)
}
},
]
]
useEffect
(()
=>
{
},[])
useEffect
(()
=>
{
},
[])
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const
handleDelete
=
(
arr
:
number
[]
|
string
[])
=>
{
const
handleDelete
=
(
arr
:
number
[]
|
string
[])
=>
{
PublicApi
.
postOrderRequisitionFormDeleteAll
({
ids
:
arr
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
...
...
@@ -273,18 +282,18 @@ const List:React.FC<listParams> = (props) => {
//批量提交
const
handleSubmitAll
=
(
ids
:
number
[])
=>
{
if
(
ids
.
length
===
0
)
{
if
(
ids
.
length
===
0
)
{
return
}
if
(
props
.
type
===
1
)
{
//一级
if
(
props
.
type
===
1
)
{
//一级
PublicApi
.
postOrderQuotationDocumentsBulkReview
({
ids
:
ids
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
else
if
(
props
.
type
===
2
)
{
//二级
}
else
if
(
props
.
type
===
2
)
{
//二级
PublicApi
.
postOrderQuotationDocumentsBulkReviewTwo
({
ids
:
ids
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
else
if
(
props
.
type
===
3
)
{
//待提交审核
}
else
if
(
props
.
type
===
3
)
{
//待提交审核
PublicApi
.
postOrderQuotationBulkQuotationSubmission
({
ids
:
ids
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
...
...
@@ -297,23 +306,23 @@ const List:React.FC<listParams> = (props) => {
ref
.
current
.
reload
()
})
}
const
handleSumbit
=
(
values
:
any
)
=>
{
if
(
values
.
voucherTime
)
{
const
handleSumbit
=
(
values
:
any
)
=>
{
if
(
values
.
voucherTime
)
{
values
.
startVoucherTime
=
timeRange
(
values
.
voucherTime
).
st
values
.
endVoucherTime
=
timeRange
(
values
.
voucherTime
).
et
delete
values
.
voucherTime
}
console
.
log
(
'values'
,
values
)
console
.
log
(
'values'
,
values
)
ref
.
current
.
reload
(
values
)
}
const
menu
=
(
<
Menu
onClick=
{
()
=>
handleDelete
(
selectedRowKeys
)
}
>
<
Menu
.
Item
key=
'1'
icon=
{
<
DeleteOutlined
/>
}
>
<
Menu
.
Item
key=
'1'
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
</
Menu
.
Item
>
</
Menu
>
)
const
handleBatchDel
=
(
e
:
any
)
=>
{
const
handleBatchDel
=
(
e
:
any
)
=>
{
}
const
rowSelection
=
{
...
...
@@ -328,10 +337,10 @@ const List:React.FC<listParams> = (props) => {
<
Col
span=
{
24
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
onClick=
{
()
=>
handleSubmitAll
(
selectedRowKeys
)
}
>
{
(
props
.
type
==
1
||
props
.
type
==
2
)
?
'批量提交审核'
:
'批量审核通过'
}
{
(
props
.
type
==
1
||
props
.
type
==
2
)
?
'批量提交审核'
:
'批量审核通过'
}
</
Button
>
{
(
props
.
type
!==
1
&&
props
.
type
!==
2
&&
props
.
type
!==
3
)
&&
(
props
.
type
!==
1
&&
props
.
type
!==
2
&&
props
.
type
!==
3
)
&&
<>
<
Dropdown
.
Button
overlay=
{
menu
}
...
...
@@ -352,15 +361,15 @@ const List:React.FC<listParams> = (props) => {
<
StandardTable
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
tableProps=
{
{
rowKew
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
rowSelection=
{
rowSelection
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
handleSumbit
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'quotationNo'
,
FORM_FILTER_PATH
)
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'quotationNo'
,
FORM_FILTER_PATH
)
}
}
expressionScope=
{
{
controllerBtns
...
...
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
View file @
c549a696
...
...
@@ -862,7 +862,8 @@ const Detail: React.FC<{}> = () => {
otherList
.
forEach
(
j
=>
{
let
otherItem
:
any
=
{}
if
(
child
===
j
.
title
)
{
otherItem
[
child
]
=
v
[
child
]
otherItem
[
child
]
=
v
[
child
].
split
(
'/'
);
console
.
log
(
v
[
child
],
'我要这里做修改'
)
_otherList
.
push
(
otherItem
)
}
})
...
...
src/store/product/index.ts
View file @
c549a696
...
...
@@ -16,6 +16,7 @@ class ProductStore implements IProductModule {
@
observable
public
productDescription
:
IDecsParams
;
@
observable
public
isAllAttributePic
:
boolean
=
true
;
// 是否所有属性共用
@
observable
public
currentPageInStore
:
IPage
=
{
current
:
null
,
pageSize
:
null
};
// 页码相关
@
observable
public
tabClickItem
:
any
[]
=
[];
// tab标签页点击项
/** 计算操作 **/
// 加工接口返回的数据,用户编辑回显数据
...
...
@@ -193,6 +194,10 @@ class ProductStore implements IProductModule {
this
.
currentPageInStore
=
data
}
@
action
.
bound
public
setTabClickItem
(
data
:
any
)
{
this
.
tabClickItem
=
data
}
}
...
...
src/utils/index.tsx
View file @
c549a696
...
...
@@ -445,7 +445,6 @@ export interface FileData {
};
// 初始化 Upload 数据
export
function
normalizeFiledata
<
T
>
(
url
:
T
):
T
export
function
normalizeFiledata
(
url
:
string
):
FileData
export
function
normalizeFiledata
(
url
:
any
):
any
{
if
(
!
url
)
{
...
...
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