feat: 本地暂存一线医疗点细节补全

This commit is contained in:
fengpu
2026-09-08 17:21:57 +08:00
parent 55819e077a
commit 60b4e38166
3 changed files with 275 additions and 51 deletions
@@ -452,8 +452,8 @@
panel.innerHTML = html;
}
/* ---- 小标签共用模板:半长热敏纸,字段为 订单号/名称/包装规格/包装日期/保质期,二维码居右 ---- */
function smallLabelHtml(nameLabel, name, specObj, shelfLife, code) {
/* ---- 小标签共用模板:半长热敏纸,字段为 订单号/名称/包装规格/包装日期,二维码居右 ---- */
function smallLabelHtml(nameLabel, name, specObj, code) {
return ''
+ '<div class="label-sticker label-sticker--small">'
+ '<div class="label-sticker__body">'
@@ -462,7 +462,6 @@
+ '<div class="label-info__item"><span class="label-info__label">' + nameLabel + '</span><span class="label-info__value">' + name + '</span></div>'
+ '<div class="label-info__item"><span class="label-info__label">包装规格:</span><span class="label-info__value">' + formatSpec(specObj) + '</span></div>'
+ '<div class="label-info__item"><span class="label-info__label">包装日期:</span><span class="label-info__value">' + mockData.packDate + '</span></div>'
+ '<div class="label-info__item"><span class="label-info__label">保质期:</span><span class="label-info__value">' + shelfLife + '</span></div>'
+ '</div>'
+ '</div>'
+ qrSvg(code, 48)
@@ -477,7 +476,7 @@
var specObj = typeof v.packSpec === 'object' ? v.packSpec : parseLegacyPackSpec(v.packSpec);
for (var p = 0; p < v.packSize; p++) {
var code = mockData.orderNo + '-V' + v.name.charAt(0) + (p + 1);
html += smallLabelHtml('净菜名称', v.name, specObj, v.shelfLife, code);
html += smallLabelHtml('净菜名称', v.name, specObj, code);
}
});
panel.innerHTML = html;
@@ -491,7 +490,7 @@
var specObj = typeof m.packSpec === 'object' ? m.packSpec : parseLegacyPackSpec(m.packSpec);
for (var p = 0; p < m.packSize; p++) {
var code = mockData.orderNo + '-M' + (p + 1);
html += smallLabelHtml('餐品名称', m.name, specObj, m.shelfLife, code);
html += smallLabelHtml('餐品名称', m.name, specObj, code);
}
});
panel.innerHTML = html;