|
@@ -41,16 +41,27 @@ $(function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- $('#tender-list input[type="number"]').change(function () {
|
|
|
+ $('#tender-list input[type="text"]').change(function () {
|
|
|
const ftid = $(this).data('ftid');
|
|
|
+ if (!ftid) {
|
|
|
+ toastr.error('获取资金划拨标段信息失败');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const ftInfo = _.find(tenderList, { id: parseInt(ftid) });
|
|
|
+ if (!ftInfo) {
|
|
|
+ toastr.error('获取资金划拨信息失败');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const value = $(this).val() || 0;
|
|
|
// 判断只能输入数字,支持负数和小数
|
|
|
if (!/^-?\d+(\.\d+)?$/.test(value)) {
|
|
|
toastr.error('请输入正确的金额');
|
|
|
+ $(this).val(ftInfo.hb_tp);
|
|
|
return;
|
|
|
}
|
|
|
postData(window.location.pathname + '/update', {postType: 'update-hb_tp', postData: { node: ftid, hb_tp: parseFloat(value) }}, function (result) {
|
|
|
// window.location.reload();
|
|
|
+ ftInfo.hb_tp = parseFloat(value);
|
|
|
});
|
|
|
});
|
|
|
|