How to modify this code
How to modify this code
When I enter form (not required for modification), when I enter pir1 or pairs values, the SUMPIR1 value is automatically equal to pir1 value multiplied by pairs value,How to modify this code, thanks
~~
{
label: "订单数量:",
name: "pairs"
},
{
label: "客户单价:",
name: "pir1"
},
{
label: "工厂价格:",
name: "pir2"
},
{
label: "客户总款:",
name: "sumpir1"
},
~~
This question has an accepted answers - jump to answer
Answers
SORRY,I update the correct CODE,When adding, I can get the required value through the interface,
Because I want to be able to modify the calculation result when I add a new record, but not in this way, I want to automatically generate a value in the form when I enter the first two fields. If I want to modify the calculation result value, I can also modify it before I submit it
.........
@colin Help me ,thanks
It sounds like you want to bind an
input
event listener to thepir1
input element and take some action that will update the other fields - e.g.:I don't think I've entirely understood the logic you want to apply in the function, but hopefully that will point you in the right direction.
Allan
Thank. That's all right