|
@@ -41,9 +41,14 @@ $(function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- $('#tender-list input[type="text"]').change(function () {
|
|
|
+ $('#tender-list input[type="number"]').change(function () {
|
|
|
const ftid = $(this).data('ftid');
|
|
|
const value = $(this).val() || 0;
|
|
|
+ // 判断只能输入数字,支持负数和小数
|
|
|
+ if (!/^-?\d+(\.\d+)?$/.test(value)) {
|
|
|
+ toastr.error('请输入正确的金额');
|
|
|
+ return;
|
|
|
+ }
|
|
|
postData(window.location.pathname + '/update', {postType: 'update-hb_tp', postData: { node: ftid, hb_tp: parseFloat(value) }}, function (result) {
|
|
|
// window.location.reload();
|
|
|
});
|