正常价格减去折扣后的销售价格
$('#product_row').find('#r_price,#p_discount').on('keyup',function (e) {
$regular_price = $('#r_price').val() ;
$sale_discount = $('#p_discount').val() ;
$sale_price = ( $regular_price - $sale_discount ) ;
$('#s_price').val($sale_price);
console.log($sale_price);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="product_row">
<div class="form-group">
<label>
Price
<b class="text-danger">*</b>
</label>
<input
id="r_price"
type="number"
name="regular_price"
class="form-control"
required
placeholder="0"
/>
</div>
<div class="form-group">
<label> Discount </label>
<input
id="p_discount"
type="number"
name="discount"
class="form-control"
placeholder="0"
/>
</div>
<div class="form-group">
<label>
Sale Price
<b class="text-danger">*</b>
</label>
<input
id="s_price"
type="number"
name="sale_price"
class="form-control"
readonly
/>
</div>
</div>