feat:【antd】【erp 系统】sale 重构代码风格(修复“优惠后金额”未计算的问题)
This commit is contained in:
@@ -162,6 +162,15 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
formatter: erpPriceInputFormatter,
|
||||
disabled: true,
|
||||
},
|
||||
dependencies: {
|
||||
triggerFields: ['totalPrice', 'otherPrice'],
|
||||
componentProps: (values) => {
|
||||
const totalPrice = values.totalPrice || 0;
|
||||
const otherPrice = values.otherPrice || 0;
|
||||
values.discountedPrice = totalPrice - otherPrice;
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldName: 'otherPrice',
|
||||
|
||||
Reference in New Issue
Block a user