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
44bd470c
Commit
44bd470c
authored
Dec 29, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
09830307
18e35102
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
182 additions
and
87 deletions
+182
-87
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+6
-2
index.tsx
...ges/afterService/components/RefundModal/Balance/index.tsx
+4
-1
index.tsx
...ages/afterService/components/RefundModal/Credit/index.tsx
+68
-20
index.tsx
...terService/components/RefundModal/UploadVoucher/index.tsx
+14
-13
index.tsx
src/pages/afterService/components/RefundModal/index.tsx
+19
-6
index.tsx
src/pages/afterService/components/ReturnDetailInfo/index.tsx
+30
-4
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+5
-0
index.tsx
...Service/returnApplication/components/DetailInfo/index.tsx
+2
-0
index.tsx
...afterService/returnManage/components/DetailInfo/index.tsx
+2
-0
index.tsx
src/pages/commodity/products/index.tsx
+1
-1
index.tsx
...dSettle/creditApplication/components/DetailInfo/index.tsx
+2
-2
index.tsx
src/pages/payandSettle/creditManage/quotaMenage/index.tsx
+1
-1
useOrderDetail.tsx
...ages/transaction/_public/order/effects/useOrderDetail.tsx
+0
-2
index.tsx
...ages/transaction/components/createElectronModal/index.tsx
+4
-4
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+4
-4
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+0
-1
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+1
-1
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+8
-8
usePaymentInfo.tsx
...ction/purchaseOrder/orderCollect/model/usePaymentInfo.tsx
+0
-2
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+2
-1
index.tsx
...pages/transaction/stockSellStorage/bills/schema/index.tsx
+9
-14
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
44bd470c
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-2
4 10:32:10
* @LastEditTime: 2020-12-2
9 11:32:18
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -248,7 +248,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
});
if
(
!
payload
.
length
)
{
this
.
setState
({
loading
:
false
});
this
.
setState
({
dataSource
:
orderListRes
,
loading
:
false
,
});
return
;
}
...
...
@@ -575,6 +578,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
</
Button
>
</
div
>
}
destroyOnClose
>
<
div
className=
{
styles
.
order
}
>
<
div
className=
{
styles
[
'order-head'
]
}
>
...
...
src/pages/afterService/components/RefundModal/Balance/index.tsx
View file @
44bd470c
...
...
@@ -41,7 +41,10 @@ const Balance: React.FC<BalanceProps> = ({
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
getPayAssetAccountGetUserBalance
=
()
=>
{
setLoading
(
false
);
if
(
!
purchaserId
||
!
purchaserRoleId
)
{
return
;
}
setLoading
(
true
);
PublicApi
.
getPayAssetAccountGetChildUserBalance
({
childMemberId
:
`
${
purchaserId
}
`
,
childMemberRoleId
:
`
${
purchaserRoleId
}
`
,
...
...
src/pages/afterService/components/RefundModal/Credit/index.tsx
View file @
44bd470c
import
React
,
{
useState
}
from
'react'
;
import
{
Descriptions
,
Space
,
Button
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Descriptions
,
Space
,
Button
,
Spin
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
interface
bankAccount
{
id
:
number
,
name
:
string
,
bankAccount
:
string
,
bankDeposit
:
string
,
memberId
:
number
,
interface
Credit
{
quota
:
number
,
useQuota
:
number
,
canUseQuota
:
number
,
isUsable
:
number
,
};
interface
BalanceProps
{
...
...
@@ -26,6 +26,22 @@ interface BalanceProps {
* 弹窗提交 loading
*/
submitLoading
:
boolean
;
/**
* 采购商id
*/
purchaserId
:
number
,
/**
* 采购商角色id
*/
purchaserRoleId
:
number
,
/**
* 供应商id
*/
supplierId
:
number
,
/**
* 供应商角色id
*/
supplierRoleId
:
number
,
};
const
Credit
:
React
.
FC
<
BalanceProps
>
=
({
...
...
@@ -33,23 +49,55 @@ const Credit: React.FC<BalanceProps> = ({
handleConfirm
,
value
,
submitLoading
,
purchaserId
,
purchaserRoleId
,
supplierId
,
supplierRoleId
,
})
=>
{
const
[
bankAccount
,
setBankAccount
]
=
useState
<
bankAccount
>
({
id
:
0
,
name
:
''
,
bankAccount
:
''
,
bankDeposit
:
''
,
memberId
:
0
,
const
[
credit
,
setCredit
]
=
useState
<
Credit
>
({
quota
:
0
,
useQuota
:
0
,
canUseQuota
:
0
,
isUsable
:
0
,
});
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
getMemberCredit
=
()
=>
{
if
(
!
purchaserId
||
!
purchaserRoleId
||
!
supplierId
||
!
supplierRoleId
)
{
return
;
}
setLoading
(
true
);
PublicApi
.
getPayCreditGetMemberCredit
({
memberId
:
`
${
purchaserId
}
`
,
roleId
:
`
${
purchaserRoleId
}
`
,
parentMemberId
:
`
${
supplierId
}
`
,
parentMemberRoleId
:
`
${
supplierRoleId
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCredit
(
res
.
data
);
}
}).
finally
(()
=>
{
setLoading
(
false
);
});
};
useEffect
(()
=>
{
getMemberCredit
();
},
[]);
return
(
<
>
<
Spin
spinning=
{
loading
}
>
<
Descriptions
title=
"授信额度信息"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"总授信额度"
>
¥
500000.00
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"已用授信额度"
>
¥
500000.00
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"可用授信额度"
>
¥
500000.00
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"总授信额度"
>
¥
{
credit
.
quota
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"已用授信额度"
>
¥
{
credit
.
useQuota
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"可用授信额度"
>
¥
{
credit
.
canUseQuota
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"当前退款金额"
>
<
span
style=
{
{
color
:
'#EF6260'
}
}
>
¥
6000.00
</
span
>
<
span
style=
{
{
color
:
'#EF6260'
}
}
>
¥
{
value
.
refundAmount
}
</
span
>
</
Descriptions
.
Item
>
</
Descriptions
>
...
...
@@ -67,7 +115,7 @@ const Credit: React.FC<BalanceProps> = ({
</
Button
>
</
Space
>
</
div
>
</
>
</
Spin
>
)
};
...
...
src/pages/afterService/components/RefundModal/UploadVoucher/index.tsx
View file @
44bd470c
...
...
@@ -7,10 +7,11 @@ import { uploadVoucherModalSchema } from './schema';
const
uploadVoucherFormActions
=
createFormActions
();
interface
b
ankAccount
{
interface
B
ankAccount
{
name
:
string
,
bankAccount
:
string
,
bankDeposit
:
string
,
id
:
number
,
};
interface
UploadVoucherProps
{
...
...
@@ -48,22 +49,23 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
purchaserId
,
purchaserRoleId
,
})
=>
{
const
[
bankAccount
,
setBankAccount
]
=
useState
<
b
ankAccount
>
({
const
[
bankAccount
,
setBankAccount
]
=
useState
<
B
ankAccount
>
({
name
:
''
,
bankAccount
:
''
,
bankDeposit
:
''
,
id
:
0
,
});
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 获取对公账户信息
const
getSettleAccounts
CorporateAccountConfig
=
(
memberId
:
number
,
memberRoleId
:
number
)
=>
{
if
(
!
memberId
||
!
memb
erRoleId
)
{
const
getSettleAccounts
GetMemberAccountConfig
=
(
)
=>
{
if
(
!
purchaserId
||
!
purchas
erRoleId
)
{
return
;
}
setLoading
(
true
);
PublicApi
.
getSettleAccounts
Corporate
AccountConfig
({
memberId
:
`
${
memb
erId
}
`
,
memberRoleId
:
`
${
memb
erRoleId
}
`
,
PublicApi
.
getSettleAccounts
GetMember
AccountConfig
({
memberId
:
`
${
purchas
erId
}
`
,
roleId
:
`
${
purchas
erRoleId
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setBankAccount
(
res
.
data
);
...
...
@@ -74,11 +76,10 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
};
useEffect
(()
=>
{
getSettleAccounts
CorporateAccountConfig
(
purchaserId
,
purchaserRoleId
);
getSettleAccounts
GetMemberAccountConfig
(
);
},
[]);
const
beforeUploadVoucher
=
file
=>
{
console
.
log
(
file
.
size
)
if
(
file
.
size
/
1024
>
200
)
{
message
.
warning
(
'图片大小超过200K'
);
return
Promise
.
reject
();
...
...
@@ -86,17 +87,17 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
};
const
handleUploadVoucherSubmit
=
values
=>
{
const
{
fileList
=
[]
}
=
values
;
const
{
fileList
=
[]
,
id
,
...
rest
}
=
values
;
if
(
handleConfirm
)
{
if
(
!
bankAccount
||
!
bankAccount
.
name
)
{
if
(
!
bankAccount
||
!
bankAccount
.
id
)
{
message
.
error
(
'没有收款账户相关信息,无法退款'
);
return
;
}
handleConfirm
({
...
value
,
payProve
:
{
...
values
,
...
rest
,
fileList
:
fileList
.
map
(
item
=>
item
.
status
===
'done'
&&
({
name
:
item
.
name
,
proveUrl
:
item
.
data
.
url
,
...
...
@@ -110,7 +111,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
<
Spin
spinning=
{
loading
}
>
<
NiceForm
previewPlaceholder=
""
initialValues
=
{
bankAccount
}
value
=
{
bankAccount
}
effects=
{
(
$
,
{
setFieldState
})
=>
{
}
}
...
...
src/pages/afterService/components/RefundModal/index.tsx
View file @
44bd470c
...
...
@@ -41,6 +41,13 @@ const RefundModal: React.FC<RefundModalProps> = ({
value
,
submitLoading
,
})
=>
{
const
{
purchaserId
,
purchaserRoleId
,
supplierId
,
supplierRoleId
,
...
rest
}
=
value
;
const
tempMap
=
{
uploadVoucher
:
{
...
...
@@ -49,9 +56,9 @@ const RefundModal: React.FC<RefundModalProps> = ({
render
:
()
=>
(
<
Suspense
fallback=
{
null
}
>
<
UploadVoucher
value=
{
value
}
purchaserId=
{
value
.
purchaserId
}
purchaserRoleId=
{
value
.
purchaserRoleId
}
value=
{
rest
}
purchaserId=
{
purchaserId
}
purchaserRoleId=
{
purchaserRoleId
}
handleConfirm=
{
handleConfirm
}
handleModalVisible=
{
handleModalVisible
}
submitLoading=
{
submitLoading
}
...
...
@@ -65,7 +72,9 @@ const RefundModal: React.FC<RefundModalProps> = ({
render
:
()
=>
(
<
Suspense
fallback=
{
null
}
>
<
Balance
value=
{
value
}
value=
{
rest
}
purchaserId=
{
purchaserId
}
purchaserRoleId=
{
purchaserRoleId
}
handleConfirm=
{
handleConfirm
}
handleModalVisible=
{
handleModalVisible
}
submitLoading=
{
submitLoading
}
...
...
@@ -79,7 +88,11 @@ const RefundModal: React.FC<RefundModalProps> = ({
render
:
()
=>
(
<
Suspense
fallback=
{
null
}
>
<
Credit
value=
{
value
}
value=
{
rest
}
purchaserId=
{
purchaserId
}
purchaserRoleId=
{
purchaserRoleId
}
supplierId=
{
supplierId
}
supplierRoleId=
{
supplierRoleId
}
handleConfirm=
{
handleConfirm
}
handleModalVisible=
{
handleModalVisible
}
submitLoading=
{
submitLoading
}
...
...
@@ -93,7 +106,7 @@ const RefundModal: React.FC<RefundModalProps> = ({
render
:
()
=>
(
<
Suspense
fallback=
{
null
}
>
<
COD
value=
{
value
}
value=
{
rest
}
handleConfirm=
{
handleConfirm
}
handleModalVisible=
{
handleModalVisible
}
submitLoading=
{
submitLoading
}
...
...
src/pages/afterService/components/ReturnDetailInfo/index.tsx
View file @
44bd470c
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-2
8 13:53:00
* @LastEditTime: 2020-12-2
9 11:00:22
* @Description: 退款明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -66,6 +66,14 @@ interface ReturnDetailInfoProps {
* 采购商角色id
*/
purchaserRoleId
:
number
,
/**
* 供应商id
*/
supplierId
:
number
,
/**
* 供应商角色id
*/
supplierRoleId
:
number
,
};
const
ReturnDetailInfo
:
React
.
FC
<
ReturnDetailInfoProps
>
=
({
...
...
@@ -76,6 +84,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
innerStatus
,
purchaserId
,
purchaserRoleId
,
supplierId
,
supplierRoleId
,
})
=>
{
const
[
visibleResult
,
setVisibleResult
]
=
useState
(
false
);
const
[
notReceivedLoading
,
setNotReceivedLoading
]
=
useState
(
false
);
...
...
@@ -159,21 +169,37 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
case
PAY_CHANNEL_BALANCE
:
{
setModalName
(
'balance'
);
setRefundModalVisible
(
true
);
setRefundModalValue
({
id
,
refundAmount
:
amount
});
setRefundModalValue
({
id
,
refundAmount
:
amount
,
purchaserId
,
purchaserRoleId
,
});
break
;
};
// 线下支付
case
PAY_CHANNEL_OFFLINE
:
{
setModalName
(
'uploadVoucher'
);
setRefundModalVisible
(
true
);
setRefundModalValue
({
id
,
purchaserId
,
purchaserRoleId
});
setRefundModalValue
({
id
,
purchaserId
,
purchaserRoleId
,
});
break
;
};
// 授信支付
case
PAY_CHANNEL_CREDIT
:
{
setModalName
(
'credit'
);
setRefundModalVisible
(
true
);
setRefundModalValue
({
id
,
refundAmount
:
amount
});
setRefundModalValue
({
id
,
refundAmount
:
amount
,
purchaserId
,
purchaserRoleId
,
supplierId
,
supplierRoleId
,
});
break
;
};
// 货到付款
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
44bd470c
...
...
@@ -29,6 +29,7 @@ const addSchemaAction = createFormActions();
const
{
onFormInputChange$
,
onFormInit$
,
onFieldInputChange$
,
}
=
FormEffectHooks
;
interface
BillsFormProps
{
...
...
@@ -528,6 +529,10 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
});
}
});
onFieldInputChange$
(
'supplierMember'
).
subscribe
(()
=>
{
setGoodsValue
([]);
});
}
}
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
...
...
src/pages/afterService/returnApplication/components/DetailInfo/index.tsx
View file @
44bd470c
...
...
@@ -418,6 +418,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
innerStatus=
{
detailInfo
?.
innerStatus
}
purchaserId=
{
detailInfo
?.
memberId
}
purchaserRoleId=
{
detailInfo
?.
roleId
}
supplierId=
{
detailInfo
?.
parentMemberId
}
supplierRoleId=
{
detailInfo
?.
parentMemberRoleId
}
isPurchaser
/>
</
Suspense
>
...
...
src/pages/afterService/returnManage/components/DetailInfo/index.tsx
View file @
44bd470c
...
...
@@ -465,6 +465,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
innerStatus=
{
detailInfo
?.
innerStatus
}
purchaserId=
{
detailInfo
?.
memberId
}
purchaserRoleId=
{
detailInfo
?.
roleId
}
supplierId=
{
detailInfo
?.
parentMemberId
}
supplierRoleId=
{
detailInfo
?.
parentMemberRoleId
}
/>
</
Suspense
>
</
Col
>
...
...
src/pages/commodity/products/index.tsx
View file @
44bd470c
...
...
@@ -390,7 +390,7 @@ const Products: React.FC<{}> = () => {
const
onChangeUpShop
=
(
values
)
=>
{
// 判断上架之前是否有店铺 有即可以上下架
if
(
judgeShopRef
.
current
){
PublicApi
.
getTemplate
ShopFind
Shop
({
PublicApi
.
getTemplate
WebMemberShopWebFindCurrMember
Shop
({
memberId
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'auth'
)).
memberId
,
memberRoleId
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'auth'
)).
memberRoleId
}).
then
(
res
=>
{
...
...
src/pages/payandSettle/creditApplication/components/DetailInfo/index.tsx
View file @
44bd470c
...
...
@@ -103,12 +103,12 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
PublicApi
.
postPayCreditApplyAddCreditApply
({
applyId
:
+
id
,
creditId
:
creditId
?
+
creditId
:
0
,
fileList
:
fileList
.
map
((
item
:
any
)
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
data
})),
fileList
:
fileList
.
map
((
item
:
any
)
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
data
.
url
})),
...
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
history
.
replace
(
'/memberCenter/payandSettle/creditApplication/quotaPrSubmit'
);
},
800
);
}
}).
finally
(()
=>
{
...
...
src/pages/payandSettle/creditManage/quotaMenage/index.tsx
View file @
44bd470c
...
...
@@ -190,7 +190,7 @@ const QuotaMenage: React.FC = () => {
{
/* 授信状态为 正常 时可申请调额 */
}
{
(
record
.
status
===
CREDIT_STATUS_NORMAL
&&
record
.
isCanApply
!!
record
.
isCanApply
)
&&
(
<
Button
type=
"link"
...
...
src/pages/transaction/_public/order/effects/useOrderDetail.tsx
View file @
44bd470c
...
...
@@ -64,8 +64,6 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
setPaylist
(
data
)
}
else
{
message
.
error
(
res
.
message
)
}
})
}
...
...
src/pages/transaction/components/createElectronModal/index.tsx
View file @
44bd470c
...
...
@@ -186,8 +186,8 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
expressionScope=
{
{
electronBtn
}
}
effects=
{
async
(
$
,
actions
)
=>
{
// $('onFormInit').subscribe(
() =>
{
effects=
{
(
$
,
actions
)
=>
{
$
(
'onFormInit'
).
subscribe
(
async
()
=>
{
if
(
data
.
isElectronicContract
===
1
)
{
// useAsyncSelect('contractTemplateId', async () => (await PublicApi.getOrderSelectListContractTemplate()).data, ['name', 'id']).then(()=>
{
// actions.setFieldValue("contractTemplateId", data.contractTemplateId)
...
...
@@ -205,7 +205,7 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
}
}
else
{
actions
.
setFieldState
(
'usingElectronicContracts'
,
state
=>
{
//
state.value = 0
state
.
value
=
0
state
.
props
[
"x-component-props"
]
=
{
disabled
:
true
}
...
...
@@ -215,7 +215,7 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
$
(
'onFieldValueChange'
,
'contractTemplateId'
).
subscribe
(
state
=>
{
// console.log(state.props)
})
//
})
})
}
}
/>
)
...
...
src/pages/transaction/components/orderPayModal/index.tsx
View file @
44bd470c
...
...
@@ -161,9 +161,10 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
history
.
goBack
()
},
1000
)
}
}
else
{
message
.
error
(
res
.
message
)
}
// else {
// message.error(res.message)
// }
})
}
}
...
...
@@ -189,8 +190,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCreditInfo
(
res
.
data
)
}
else
{
message
.
error
(
res
.
message
)
}
setIsSpin
(
false
)
})
...
...
@@ -288,6 +287,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setOpenTimer
(
0
)
}
setCode
(
''
)
mobilePayFlag
.
current
=
0
}
const
handleSubmitPay
=
async
()
=>
{
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
44bd470c
...
...
@@ -101,7 +101,6 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
// 总计金额
useEffect
(()
=>
{
console
.
log
((
sumPrice
*
1000
)
/
1000
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
,
'iiiiii'
)
setAmountMoney
(()
=>
(
sumPrice
*
1000
)
/
1000
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
)
},
[
sum
,
freePrice
,
sumPrice
])
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
44bd470c
...
...
@@ -184,7 +184,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
},
{}),
isMemberPrice
:
v
.
isMemberPrice
,
purchaseCount
:
v
.
count
,
money
:
v
.
count
*
v
.
unitPrice
,
money
:
v
.
memberDiscount
?
(
v
.
count
*
1000
*
v
.
unitPrice
*
100
*
v
.
memberDiscount
*
100
)
/
10000000
:
(
v
.
count
*
1000
*
v
.
unitPrice
*
100
)
/
100000
,
productId
:
v
.
id
,
memberId
:
initValue
.
supplyMembersId
,
// 添加 memberId 字段
commodityId
:
v
.
id
,
// 添加commodityId用于判断是商品价格是使用price字段还是unitPrice字段(也可判断是报价订单还是其他)
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
44bd470c
...
...
@@ -212,35 +212,35 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// theInvoiceInfo: value.theInvoiceInfo
}
// 校验是否选择支付渠道/支付比例
let
judgementByPay
=
params
.
paymentInformationResponses
.
map
(
item
=>
{
let
judgementByPay
=
params
.
paymentInformationResponses
?.
length
&&
params
.
paymentInformationResponses
.
map
(
item
=>
{
if
(
item
.
channel
&&
item
.
payWay
){
return
true
}
else
{
return
false
}
})
if
(
judgementByPay
.
includes
(
false
)){
if
(
!
judgementByPay
||
judgementByPay
.
includes
(
false
)){
throw
new
Error
(
'请选择支付方式或支付渠道'
)
}
let
judgementByRatio
=
params
.
paymentInformationResponses
.
map
(
item
=>
{
if
(
Number
(
item
.
payRatio
)
>
0
&&
Number
(
item
.
payRatio
)
<
100
){
let
judgementByRatio
=
params
.
paymentInformationResponses
?.
length
&&
params
.
paymentInformationResponses
.
map
(
item
=>
{
if
(
Number
(
item
.
payRatio
)
>
0
&&
Number
(
item
.
payRatio
)
<
=
100
){
return
true
}
else
{
return
false
}
})
if
(
judgementByRatio
.
includes
(
false
)){
throw
new
Error
(
'请正确填写支付比例
(0-100范围内)
'
)
if
(
!
judgementByRatio
||
judgementByRatio
.
includes
(
false
)){
throw
new
Error
(
'请正确填写支付比例'
)
}
// 校验采购数量
let
judgementByCount
=
params
.
orderProductRequests
.
map
(
item
=>
{
let
judgementByCount
=
params
.
orderProductRequests
?.
length
&&
params
.
orderProductRequests
.
map
(
item
=>
{
if
(
item
.
purchaseCount
){
return
true
}
else
{
return
false
}
})
if
(
judgementByCount
.
includes
(
false
)){
if
(
!
judgementByCount
||
judgementByCount
.
includes
(
false
)){
throw
new
Error
(
'请填写商品采购数量'
)
}
// logistics render字段字符串化
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/usePaymentInfo.tsx
View file @
44bd470c
...
...
@@ -116,8 +116,6 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
paywayData
.
current
=
data
restrictArrivalPay
(
newColumns
,
orderProducts
)
setColumns
(
newColumns
)
}
else
{
message
.
error
(
res
.
message
)
}
})
}
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
44bd470c
...
...
@@ -168,7 +168,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
// 单据数量,需要判断是 入库 还是 发货 单 匹配对应的字段值
productCount
:
transforDirection
(
rest
.
invoicesTypeId
)
?
item
.
storageCount
:
item
.
shipmentQuantity
,
product
:
item
.
productId
,
amount
:
`¥
${(
+
item
.
productCount
*
item
.
price
).
toFixed
(
2
)}
`
,
amount
:
`¥
${(
transforDirection
(
rest
.
invoicesTypeId
)
?
item
.
storageCount
:
item
.
shipmentQuantity
*
item
.
price
).
toFixed
(
2
)}
`
,
extraData
:
{
productName
:
item
.
productName
,
deliveryType
,
...
...
@@ -1657,6 +1657,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
<
Card
>
<
NiceForm
value=
{
billInfo
}
previewPlaceholder=
" "
expressionScope=
{
{
TableAddButton
,
renderListTableRemove
,
...
...
src/pages/transaction/stockSellStorage/bills/schema/index.tsx
View file @
44bd470c
...
...
@@ -66,31 +66,26 @@ export const billsSchema: ISchema = {
invoicesType
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择单据类型'
,
placeholder
:
'单据类型'
,
allowClear
:
true
,
},
enum
:
[],
},
inventory
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择对应仓库'
,
placeholder
:
'对应仓库'
,
allowClear
:
true
,
},
enum
:
[],
},
transactionTime
:
{
'[startTransactionTime, endTransactionTime]'
:
{
type
:
'string'
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'请选择交易时间'
,
},
enum
:
[
{
label
:
'今天'
,
value
:
1
},
{
label
:
'一周内'
,
value
:
2
},
{
label
:
'一个月内'
,
value
:
3
},
{
label
:
'三个月内'
,
value
:
4
},
{
label
:
'六个月内'
,
value
:
5
},
{
label
:
'一年内'
,
value
:
6
},
{
label
:
'一年前'
,
value
:
7
},
],
placeholder
:
'交易时间'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
...
...
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