|
@@ -502,7 +502,14 @@ $(document).ready(() => {
|
|
|
});
|
|
|
// 自定义金额变更并提交
|
|
|
$('#calc_zdy').on('blur', function () {
|
|
|
- const newValue = parseFloat($(this).val());
|
|
|
+ let newValue = parseFloat($(this).val());
|
|
|
+ // 判断输入位数,并自动四舍五入
|
|
|
+ newValue = ZhCalc.round(newValue, decimal.tp);
|
|
|
+ $('#calc_zdy').val(newValue);
|
|
|
+ if (isNaN(newValue)) {
|
|
|
+ toastr.error('请输入正确的金额');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
const zdy = _.find(ex_calc, { code: 'zdy' });
|
|
|
if (zdy.value === newValue) {
|
|
|
return;
|
|
@@ -541,6 +548,15 @@ $(document).ready(() => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ $.divResizer({
|
|
|
+ select: '#main-resize',
|
|
|
+ callback: function () {
|
|
|
+ materialExponentSpread.refresh();
|
|
|
+ const height = $('#material-exponent-spread').height();
|
|
|
+ setLocalCache('material_exponent2_' + materialID, height);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 展开收起月信息价并浏览器记住本期展开收起
|
|
|
$('a', '.right-nav').bind('click', function () {
|
|
|
//const main = $('#main-view'), tool = $('#tools-view');
|
|
@@ -574,4 +590,14 @@ $(document).ready(() => {
|
|
|
showSideTools(tab.hasClass('active'));
|
|
|
materialExponentSpread.refresh();
|
|
|
}
|
|
|
+ if (getLocalCache('material_exponent2_' + materialID)) {
|
|
|
+ $('#material-exponent-spread').height(getLocalCache('material_exponent2_' + materialID));
|
|
|
+ var cHeader = getObjHeight($(".c-header"));
|
|
|
+ var sjs1 = getObjHeight($('.sjs-height-1'));
|
|
|
+ $(".bcontent-wrap").height($(window).height()-cHeader-sjs1-90+53);
|
|
|
+ materialExponentSpread.refresh();
|
|
|
+ }
|
|
|
+ function getObjHeight(select) {
|
|
|
+ return select.length > 0 ? select.height() : 0;
|
|
|
+ }
|
|
|
});
|