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
linweijiong
jinfa-platform
Commits
0619d24d
Commit
0619d24d
authored
Sep 13, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 新增b2b订单和订单支付涉及接口字段变更
parent
8982efb4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
13 deletions
+48
-13
CustomAddress.tsx
src/components/NiceForm/components/CustomAddress.tsx
+11
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+1
-0
index.ts
...pages/procurement/tender/addBidRegister/constant/index.ts
+2
-2
index.tsx
src/pages/procurement/tender/addBidRegister/index.tsx
+3
-0
index.ts
src/pages/procurement/tender/addBidRegister/schema/index.ts
+1
-1
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+4
-2
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+4
-3
index.tsx
...nsaction/purchaseOrder/orderCollectB2b/constant/index.tsx
+8
-0
ruleSetting.tsx
...s/transaction/transactionRules/components/ruleSetting.tsx
+9
-1
usePaymentTable.tsx
...es/transaction/transactionRules/model/usePaymentTable.tsx
+5
-3
No files found.
src/components/NiceForm/components/CustomAddress.tsx
View file @
0619d24d
...
...
@@ -35,7 +35,7 @@ width: 100%;
const
{
Option
}
=
Select
const
MultAddress
=
(
props
)
=>
{
const
{
value
,
mutators
}
=
props
const
{
value
:
_v
,
mutators
}
=
props
const
{
placeholder
=
[],
...
...
@@ -43,6 +43,16 @@ const MultAddress = (props) => {
...
rest
}
=
props
.
props
[
"x-component-props"
]
||
{}
// 处理表单提交置空触发错误角标提示
let
value
=
null
if
(
!
_v
||
!
_v
.
length
)
{
value
=
[{
provinceCode
:
null
,
province
:
null
,
cityCode
:
null
,
city
:
null
,
areaCode
:
null
,
area
:
null
}]
}
else
if
(
value
?.
length
&&
!
value
[
0
][
'provinceCode'
]
&&
!
value
[
0
][
'province'
]
&&
!
value
[
0
][
'cityCode'
]
&&
!
value
[
0
][
'city'
]
&&
!
value
[
0
][
'areaCode'
]
&&
!
value
[
0
][
'area'
])
{
mutators
.
change
([])
}
else
{
value
=
_v
}
const
[
code
,
setcode
]
=
useState
<
any
>
([]);
const
[
province
,
setprovince
]
=
useState
<
any
>
([]);
// 省列表
const
[
city
,
setcity
]
=
useState
<
any
>
([]);
// 市列表
...
...
src/pages/commodity/products/addProducts.tsx
View file @
0619d24d
...
...
@@ -282,6 +282,7 @@ const AddProducts: React.FC<{}> = (props) => {
_params
.
minOrder
=
productInfoByEdit
.
minOrder
_params
.
priceType
=
productInfoByEdit
.
priceType
_params
.
isMemberPrice
=
productInfoByEdit
.
isMemberPrice
_params
.
taxRate
=
productInfoByEdit
.
taxRate
}
if
(
clickTabIndex
.
indexOf
(
"6"
)
===
-
1
)
// 商品描述
_params
.
commodityRemark
=
productInfoByEdit
.
commodityRemark
...
...
src/pages/procurement/tender/addBidRegister/constant/index.ts
View file @
0619d24d
...
...
@@ -18,8 +18,8 @@ export const fieldTransformRender = (params) => {
result
[
'submitTenderOutStatus'
]
=
params
.
submitTenderOutStatusValue
result
[
'submitTenderInStatus'
]
=
params
.
submitTenderInStatusValue
// 给地址控件赋初值
result
[
'tenderAddress'
]
=
[{
provinceCode
:
null
,
province
:
null
,
cityCode
:
null
,
city
:
null
,
areaCode
:
null
,
area
:
null
}]
//
//
给地址控件赋初值
//
result['tenderAddress'] = [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }]
return
result
}
...
...
src/pages/procurement/tender/addBidRegister/index.tsx
View file @
0619d24d
...
...
@@ -45,11 +45,14 @@ const AddBidRegister:React.FC<AddBidRegisterProps> = (props) => {
},
[
id
])
const
handleSubmit
=
async
(
value
)
=>
{
setBtnLoading
(
true
)
const
result
=
formDataTransformParams
(
value
)
PublicApi
.
postPurchaseSubmitTenderSubmitTenderRegister
(
result
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
}).
finally
(()
=>
{
setBtnLoading
(
false
)
})
}
...
...
src/pages/procurement/tender/addBidRegister/schema/index.ts
View file @
0619d24d
...
...
@@ -240,7 +240,7 @@ export const formSchema: ISchema = {
placeholder
:
'选择单位地址'
,
warningText
:
'请完善所在地区'
,
},
default
:
[{
provinceCode
:
null
,
province
:
null
,
cityCode
:
null
,
city
:
null
,
areaCode
:
null
,
area
:
null
}],
//
default: [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }],
required
:
true
,
},
address
:
{
...
...
src/pages/transaction/components/orderPayModal/index.tsx
View file @
0619d24d
...
...
@@ -50,6 +50,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderBuyerValidatePay
)
const
[
settleAccountsError
,
setSettleAccountsError
]
=
useState
<
boolean
>
(
true
)
const
[
paymentAmount
,
setPaymentAmount
]
=
useState
<
string
>
()
const
[
tradeNo
,
setTradeNo
]
=
useState
<
string
>
()
// 需要轮询支付结果的交易号
useEffect
(()
=>
{
if
(
currentRef
)
{
...
...
@@ -105,7 +106,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const
pollPayResult
=
()
=>
{
if
(
qrCodeInfo
.
qrUrl
)
{
// @ts-ignore
PublicApi
.
getOrderBuyerValidatePayResult
({
orderId
:
id
,
batchNo
:
currentPaymentInfo
.
batchNo
}).
then
(
res
=>
{
PublicApi
.
getOrderBuyerValidatePayResult
({
orderId
:
id
,
batchNo
:
currentPaymentInfo
.
batchNo
,
tradeNo
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
if
(
data
&&
data
.
paySuccess
)
{
...
...
@@ -297,7 +298,8 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
if
(
mobilePayFlag
.
current
!==
4
)
{
// 非微信
history
.
goBack
()
}
else
{
setQrCodeInfo
({
...
qrCodeInfo
,
generateCharacter
:
res
.
data
})
setQrCodeInfo
({
...
qrCodeInfo
,
generateCharacter
:
res
.
data
.
codeUrl
})
setTradeNo
(
res
.
data
.
tradeNo
)
setQrLoading
(
false
)
}
}
else
{
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
0619d24d
...
...
@@ -110,7 +110,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
let
free
=
modalPriceActions
.
getFieldValue
(
'freePrice'
)
setFreePrice
(
Number
(
free
||
0
))
// 执行修改订单运费
PublicApi
.
postOrderProductPriceUpdate
({
orderId
:
dataSource
.
i
d
,
price
:
free
,
type
:
2
}).
then
(
res
=>
{
PublicApi
.
postOrderProductPriceUpdate
({
orderId
:
dataSource
.
orderI
d
,
price
:
free
,
type
:
2
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
modelRef
.
current
.
setVisible
(
false
)
reloadFormData
()
...
...
@@ -307,7 +307,8 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
const
warehouseRef
=
useRef
<
any
>
({})
// 判断是否可操作当前表格
const
isEditData
=
false
const
isEditData
=
true
const
productComponents
=
{
body
:
{
row
:
EditableRow
,
...
...
@@ -357,7 +358,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...
row
,
});
// 执行修改订单价格
PublicApi
.
postOrderProductPriceUpdate
({
orderId
:
data
.
i
d
,
orderDetailsId
:
row
.
id
,
price
:
row
.
price
,
type
:
1
}).
then
(
res
=>
{
PublicApi
.
postOrderProductPriceUpdate
({
orderId
:
data
.
orderI
d
,
orderDetailsId
:
row
.
id
,
price
:
row
.
price
,
type
:
1
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
reloadFormData
()
}
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/constant/index.tsx
View file @
0619d24d
...
...
@@ -73,6 +73,10 @@ export const procurementRenderField = (data) => {
// 冗余shopId orderMode查询支付方式使用
shopId
:
data
.
shopId
,
orderMode
:
data
.
orderMode
,
// 转换上游字段
upperMemberId
:
item
.
supplyMemberId
,
upperMemberName
:
item
.
supplyMemberName
,
upperMemberRoleId
:
item
.
supplyRoleId
,
}
})
}
...
...
@@ -90,6 +94,10 @@ export const procurementProcessField = (value) => {
logisticsTemplateId
:
item
.
logistics
.
templateId
,
weight
:
item
.
logistics
.
weight
,
stockId
:
item
.
upperCommoditySkuId
,
// 上游字段
supplyMemberId
:
item
.
upperMemberId
,
supplyRoleId
:
item
.
upperMemberRoleId
,
supplyMemberName
:
item
.
upperMemberName
,
}
})
return
value
...
...
src/pages/transaction/transactionRules/components/ruleSetting.tsx
View file @
0619d24d
...
...
@@ -263,7 +263,15 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
addSchemaAction
.
setFieldValue
(
'baseProcessId'
,
data
.
baseProcessId
)
addSchemaAction
.
setFieldValue
(
'allProducts'
,
data
.
allProducts
)
if
(
data
.
payments
.
length
)
{
addSchemaAction
.
setFieldValue
(
'payments'
,
[...
data
.
payments
])
const
{
payments
}
=
data
const
source
=
payments
.
map
(
item
=>
({
...
item
,
nodes
:
item
.
nodes
.
map
(
_item
=>
({
...
_item
,
serialNo
:
item
.
serialNo
}))
}))
addSchemaAction
.
setFieldValue
(
'payments'
,
source
)
}
if
(
data
.
processType
===
1
)
{
addSchemaAction
.
setFieldState
(
'expireHours'
,
state
=>
{
...
...
src/pages/transaction/transactionRules/model/usePaymentTable.tsx
View file @
0619d24d
...
...
@@ -45,12 +45,14 @@ export const usePaymentTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const
handleSave
=
row
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
newData
=
[...
ctx
.
getFieldValue
(
'payments'
)];
const
newData
=
[...
ctx
.
getFieldValue
(
'payments'
)]
console
.
log
(
newData
,
row
)
const
paymentIndex
=
newData
.
findIndex
(
item
=>
row
.
serialNo
===
item
.
serialNo
)
console
.
log
(
paymentIndex
)
const
nodeItem
=
newData
[
paymentIndex
][
'nodes'
]
console
.
log
(
nodeItem
)
const
nodeIndex
=
nodeItem
.
findIndex
(
item
=>
row
.
batchNo
===
item
.
batchNo
)
console
.
log
(
nodeIndex
)
nodeItem
.
splice
(
nodeIndex
,
1
,
{
...
nodeItem
[
nodeIndex
],
...
row
,
...
...
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