提交 4c623817 authored 作者: chengye's avatar chengye

test

上级 2e37bb30
......@@ -155,13 +155,28 @@
</div>
</div>
{if $em.rule.pricing_type == 2}
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
实缴电费
</label>
<div class="layui-input-inline">
<input type="text" id="amount" name="amount" autocomplete="off" class="layui-input" value="{$useage.amount}" {if $useage.amount } disabled="disabled" {/if}>
</div>
<div class="layui-form-mid layui-word-aux">
</div>
</div>
</div>
{/if}
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
单价
</label>
<div class="layui-input-inline">
<input type="text" id="price" name="price" autocomplete="off" class="layui-input" {if $em.useage.price } disabled="disabled" {/if} value="{$em.useage.price|default=''}">
<input type="text" id="price" name="price" autocomplete="off" class="layui-input" {if $em.useage.price || $em.rule.pricing_type == 2 } disabled="disabled" {/if} value="{$em.useage.price|default=''}">
</div>
<div class="layui-form-mid layui-word-aux">
......@@ -310,6 +325,15 @@
$('#repo_numb').val( $rNum/$level )
}
})
$('#amount').change(function(){
if($('#repo_numb').val() == '') {
layMsg('本次抄表必须大于上次抄表读数',5);
return;
}
var $price = $('#amount').val() / $('#repo_numb').val();
$('#price').val($price.toFixed(4))
})
});
</script>
{/block}
\ No newline at end of file
......@@ -151,19 +151,7 @@
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label">
实缴电费
</label>
<div class="layui-input-inline">
<input type="text" id="amount" name="amount" autocomplete="off" class="layui-input" value="{$useage.amount}">
</div>
<div class="layui-form-mid layui-word-aux">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论