diff --git a/src/views/system/jd-instruction/fadan-quick-record.vue b/src/views/system/jd-instruction/fadan-quick-record.vue index fad3969..b9d1563 100644 --- a/src/views/system/jd-instruction/fadan-quick-record.vue +++ b/src/views/system/jd-instruction/fadan-quick-record.vue @@ -178,8 +178,12 @@ export default { const logistics = (this.form.logisticsLink || '').trim() const thirdPartyOrderNo = (this.form.thirdPartyOrderNoText || '').trim() if (thirdPartyOrderNo) { - const re = /(第三方单号:)\n([^\n]*)\n(—————————)/g - t = t.replace(re, (_, a, _line, sep) => `${a}\n${thirdPartyOrderNo}\n${sep}`) + // 与 InstructionServiceImpl.WENAN_D 一致:「第三方单号:值」同行,下一行才是分隔线 + const reInline = /第三方单号:[^\n]*\n(—————————)/g + t = t.replace(reInline, `第三方单号:${thirdPartyOrderNo}\n$1`) + // 兼容「标签独占一行 + 值独占一行」的旧文案 + const reMultiline = /(第三方单号:)\n([^\n]*)\n(—————————)/g + t = t.replace(reMultiline, (_, a, _line, sep) => `${a}\n${thirdPartyOrderNo}\n${sep}`) } if (buyer) { t = t.replace(/(下单人(需填):)\n\n/, `$1\n${buyer}\n\n`)