业绩明细:月份选完自动查询(月份选择器补值变更事件 + 筛选栏自动提交)
This commit is contained in:
parent
8a67c7d768
commit
530c9858ec
@ -1769,6 +1769,20 @@
|
||||
});
|
||||
var differenceSelect = form.querySelector('[name="difference_state"]');
|
||||
if (differenceSelect) { differenceSelect.addEventListener('change', schedule); }
|
||||
|
||||
// 月份选完即查询:月份是自定义选择器(选完只改隐藏值),这里接上自动提交筛选表单,
|
||||
// 省掉「选完月份再点查询」这一步;清空 / 本月按钮同属值变更,一并自动查询。
|
||||
var monthInput = form.querySelector('[data-inventory-month-value]');
|
||||
if (monthInput) {
|
||||
monthInput.addEventListener('change', function () {
|
||||
window.clearTimeout(timer);
|
||||
if (typeof form.requestSubmit === 'function') {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
schedule();
|
||||
})();
|
||||
</script>
|
||||
@ -2497,6 +2511,8 @@
|
||||
if (date) viewYear = date.year;
|
||||
render();
|
||||
close();
|
||||
// 通知使用方「月份已选好」:筛选栏可以据此自动查询,不用再点一次「查询」。
|
||||
valueInput.dispatchEvent(new Event('change', { bubbles: true }));
|
||||
};
|
||||
|
||||
label.textContent = formatLabel(valueInput.value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user