mirror of
https://github.com/wasrusgen/wasrusgen1-crm.git
synced 2026-06-03 15:04:47 +00:00
feat(manager): doc links (инструкция + паспорт) under tech items in order detail
This commit is contained in:
parent
3fd618d83e
commit
ce76d9771a
@ -2256,6 +2256,30 @@ function screenOrder() {
|
||||
+'</div>';
|
||||
}
|
||||
|
||||
// ─── Документы изделия (инструкция + паспорт) ───
|
||||
function _techDocLinks(t){
|
||||
if(!t.brand) return '';
|
||||
var base='';
|
||||
var b=(t.brand||'').toLowerCase();
|
||||
var m=t.model||'';
|
||||
var q=encodeURIComponent((t.brand+' '+m).trim());
|
||||
if(b==='bosch'){
|
||||
base='https://www.bosch-home.com/ru/search.html?query='+encodeURIComponent(m||t.brand);
|
||||
} else {
|
||||
base='https://www.google.com/search?q='+q;
|
||||
}
|
||||
var manualUrl = b==='bosch' ? base : 'https://www.google.com/search?q='+encodeURIComponent((t.brand+' '+m+' инструкция по установке').trim());
|
||||
var passportUrl= b==='bosch' ? base : 'https://www.google.com/search?q='+encodeURIComponent((t.brand+' '+m+' паспорт характеристики').trim());
|
||||
return '<div style="display:flex;gap:5px;margin-top:7px;width:100%">'
|
||||
+'<a href="'+manualUrl+'" target="_blank" rel="noopener" style="flex:1;display:inline-flex;align-items:center;justify-content:center;gap:3px;padding:5px 6px;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:8px;text-decoration:none;font-size:10px;font-weight:700;color:#1D4ED8">'
|
||||
+'<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>'
|
||||
+'Инструкция</a>'
|
||||
+'<a href="'+passportUrl+'" target="_blank" rel="noopener" style="flex:1;display:inline-flex;align-items:center;justify-content:center;gap:3px;padding:5px 6px;background:#F0FDF4;border:1px solid #BBF7D0;border-radius:8px;text-decoration:none;font-size:10px;font-weight:700;color:#15803D">'
|
||||
+'<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M9 9h6M9 12h6M9 15h4"/></svg>'
|
||||
+'Паспорт</a>'
|
||||
+'</div>';
|
||||
}
|
||||
|
||||
// Tech section (kitchen only)
|
||||
var techHtml='';
|
||||
if(isKitchen && o.tech.length){
|
||||
@ -2312,6 +2336,7 @@ function screenOrder() {
|
||||
+'<div style="font-size:12px;color:#059669;font-weight:600;margin-top:3px">👤 Клиент выбрал</div>'
|
||||
+'<div style="font-size:13px;font-weight:700;color:var(--ink);margin-top:1px">'+cDetail+'</div>'
|
||||
+'</div></div>'
|
||||
+_techDocLinks(t)
|
||||
+'<div style="width:100%;margin-top:9px;padding:10px 12px;background:#F0FDF4;border:1.5px solid #86EFAC;border-radius:10px">'
|
||||
+'<div style="font-size:11px;font-weight:700;color:#15803D;margin-bottom:7px;text-transform:uppercase;letter-spacing:.04em">Подтвердить выбор клиента?</div>'
|
||||
+'<div style="display:flex;gap:7px">'
|
||||
@ -2322,12 +2347,15 @@ function screenOrder() {
|
||||
}
|
||||
// done
|
||||
var detail=(t.brand||'')+(t.model?' '+t.model:'')+(t.dims?'<br><span style="font-size:10px;color:var(--muted)">'+t.dims+'</span>':'');
|
||||
return '<div class="tech-item">'
|
||||
return '<div class="tech-item" style="flex-wrap:wrap;padding-bottom:10px">'
|
||||
+'<div style="display:flex;gap:10px;width:100%;align-items:flex-start">'
|
||||
+iconBox
|
||||
+'<div style="flex:1">'+nameRow
|
||||
+(detail?'<div style="font-size:12px;color:var(--muted);margin-top:2px">'+detail+'</div>':'')
|
||||
+'</div>'
|
||||
+'<button onclick="'+(t.source==='own'?"_startOwnTech('"+t.wkey+"')":'_startClientPick(\''+t.wkey+'\')')+'" class="btn-pill muted">Изменить</button>'
|
||||
+'</div>'
|
||||
+_techDocLinks(t)
|
||||
+'</div>';
|
||||
}).join('');
|
||||
var waitCount = o.tech.filter(function(t){return t.status==='wait';}).length;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user