@@ -30,7 +30,7 @@ | |||||
<input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | <input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="FundsApply"> | <div class="col-xs-6 lr-form-item" data-table="FundsApply"> | ||||
<div class="lr-form-item-title">备注</div> | |||||
<div class="lr-form-item-title">申报人</div> | |||||
<input id="Remark" type="text" class="form-control" /> | <input id="Remark" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
@@ -30,7 +30,7 @@ | |||||
<input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | <input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="FundsApply"> | <div class="col-xs-6 lr-form-item" data-table="FundsApply"> | ||||
<div class="lr-form-item-title">备注</div> | |||||
<div class="lr-form-item-title">申报人</div> | |||||
<input id="Remark" type="text" class="form-control" /> | <input id="Remark" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item"> | @*<div class="col-xs-12 lr-form-item"> | ||||
@@ -58,7 +58,7 @@ var bootstrap = function ($, learun) { | |||||
title: '申请', | title: '申请', | ||||
url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/Form', | url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/Form', | ||||
width: 860, | width: 860, | ||||
height: 750, | |||||
height: 780, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -90,7 +90,7 @@ var bootstrap = function ($, learun) { | |||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/Form?keyValue=' + keyValue, | ||||
width: 860, | width: 860, | ||||
height: 750, | |||||
height: 780, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -156,7 +156,7 @@ var bootstrap = function ($, learun) { | |||||
title: '查看', | title: '查看', | ||||
url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/FormView?keyValue=' + keyValue, | url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/FormView?keyValue=' + keyValue, | ||||
width: 860, | width: 860, | ||||
height: 720, | |||||
height: 730, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
} | } | ||||
@@ -193,7 +193,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
{ label: "申报人", name: "Remark", width: 100, align: "left" }, | |||||
{ label: "总金额", name: "SumAmount", width: 100, align: "left" }, | { label: "总金额", name: "SumAmount", width: 100, align: "left" }, | ||||
{ label: "人民币(大写)", name: "UpperAmount", width: 200, align: "left" }, | { label: "人民币(大写)", name: "UpperAmount", width: 200, align: "left" }, | ||||
{ | { | ||||
@@ -13,7 +13,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="FundsApplyDetail" > | <div class="col-xs-12 lr-form-item" data-table="FundsApplyDetail" > | ||||
<div class="lr-form-item-title">单价(元)<font face="宋体">*</font></div> | <div class="lr-form-item-title">单价(元)<font face="宋体">*</font></div> | ||||
<input id="Price" type="text" class="form-control calcul" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||||
<input id="Price" type="text" class="form-control calcul" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="FundsApplyDetail" > | <div class="col-xs-12 lr-form-item" data-table="FundsApplyDetail" > | ||||
<div class="lr-form-item-title">金额(元)</div> | <div class="lr-form-item-title">金额(元)</div> | ||||
@@ -20,6 +20,16 @@ var bootstrap = function ($, learun) { | |||||
$('.calcul').blur(function () { | $('.calcul').blur(function () { | ||||
var num = $('#Number').val(); | var num = $('#Number').val(); | ||||
var Price = $('#Price').val(); | var Price = $('#Price').val(); | ||||
if (!!Price) { | |||||
let regNeg = /^(0|[1-9]\d*|(0|[1-9]\d*)\.\d*[1-9])$/; | |||||
if (regNeg.test(Price)) { | |||||
$('#Price').val(parseFloat(Price).toFixed(2)); | |||||
} else { | |||||
$('#Price').val(''); | |||||
learun.alert.warning("单价必须为整数或小数(不能为负数)!"); | |||||
return false; | |||||
} | |||||
} | |||||
if (!!num && !!Price) { | if (!!num && !!Price) { | ||||
$('#Amount').val((parseInt(num) * parseFloat(Price)).toFixed(2)); | $('#Amount').val((parseInt(num) * parseFloat(Price)).toFixed(2)); | ||||
} | } | ||||