diff --git a/static/js/app.js b/static/js/app.js index a901e1a..534e41f 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -18044,6 +18044,34 @@ function updateFormalQty(productCode, val) { }); } +// 待下单详情:在不改变原输入框宽度的情况下,完整查看成品/包材下单备注。 +window.openPendingRemarkViewer = function(trigger, title) { + var wrapper = trigger && trigger.closest ? trigger.closest('.pending-remark-field') : null; + var input = wrapper ? wrapper.querySelector('input, textarea') : null; + var remark = input ? input.value : ''; + var oldViewer = document.getElementById('pendingRemarkViewer'); + if (oldViewer) oldViewer.remove(); + + var overlay = document.createElement('div'); + overlay.id = 'pendingRemarkViewer'; + overlay.style.cssText = 'position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100002;display:flex;align-items:center;justify-content:center;padding:20px'; + overlay.innerHTML = + '
'; + overlay.querySelector('textarea').value = remark; + overlay.onclick = function(e) { if (e.target === overlay) overlay.remove(); }; + document.body.appendChild(overlay); + overlay.querySelector('textarea').focus(); +}; + function pendingDetail(productCode) { var item = null; _pendingItems.forEach(function(i) { @@ -18118,7 +18146,13 @@ function pendingDetail(productCode) { var valHtml = escHtml(String(f.val)); if (f.editable) { var _extraCls = (f.label === '实际下单数量') ? ' pend-product-actual-qty' : ''; - valHtml = ''; + var _isRemark = f.label === '下单备注'; + var _inputStyle = 'width:100%;box-sizing:border-box;padding:3px ' + (_isRemark ? '30px' : '6px') + ' 3px 6px;font-size:13px'; + valHtml = ''; + if (_isRemark) { + valHtml = '' + valHtml + + ''; + } } else if (f.readonly) { valHtml = '' + valHtml + ''; } else { @@ -18184,7 +18218,7 @@ function pendingDetail(productCode) { '