1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <form class="layui-form" lay-filter="charge-form-del" style="padding: 20px 30px 0 0;">
- <div class="layui-form-item">
- <label class="layui-form-label">车牌号</label>
- <div class="layui-input-inline">
- <input type="text" name="license" required lay-verify="required" autocomplete="off" class="layui-input" id="license" disabled="disabled">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">安检退款</label>
- <div class="layui-input-inline">
- <input type="text" name="Safe_receivable" required lay-verify="required|number" autocomplete="off" class="layui-input" id="Safe_receivable">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">环检退款</label>
- <div class="layui-input-inline">
- <input type="text" name="EP_receivable" required lay-verify="required|number" autocomplete="off" class="layui-input" id="EP_receivable">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">退款总计</label>
- <div class="layui-input-inline">
- <input type="text" name="cost" required lay-verify="required|number" autocomplete="off" class="layui-input" id="cost">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">备注</label>
- <div class="layui-input-block">
- <textarea type="text" name="remarks" autocomplete="off" class="layui-textarea" id="remarks"></textarea>
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-block">
- <button class="layui-btn" lay-submit="" lay-filter="LAY-charge-del-submit">确认</button>
- <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
- </div>
- </div>
- </form>
- <script>
- layui.use(['admin', 'form'], function() {
- var $ = layui.$
- , form = layui.form;
- $(function(){
- //输入框的值改变时触发
- $("#Safe_receivable").on("input",function(e){
- //获取input输入的值
- $('#cost').val(parseFloat($('#Safe_receivable').val()) + parseFloat($('#EP_receivable').val()));
- });
- });
- $(function(){
- //输入框的值改变时触发
- $("#EP_receivable").on("input",function(e){
- //获取input输入的值
- $('#cost').val(parseFloat($('#Safe_receivable').val()) + parseFloat($('#EP_receivable').val()));
- });
- });
- form.render(null, 'charge-form-del');
- })
- </script>
|