1
This commit is contained in:
@@ -178,8 +178,12 @@ export default {
|
|||||||
const logistics = (this.form.logisticsLink || '').trim()
|
const logistics = (this.form.logisticsLink || '').trim()
|
||||||
const thirdPartyOrderNo = (this.form.thirdPartyOrderNoText || '').trim()
|
const thirdPartyOrderNo = (this.form.thirdPartyOrderNoText || '').trim()
|
||||||
if (thirdPartyOrderNo) {
|
if (thirdPartyOrderNo) {
|
||||||
const re = /(第三方单号:)\n([^\n]*)\n(—————————)/g
|
// 与 InstructionServiceImpl.WENAN_D 一致:「第三方单号:值」同行,下一行才是分隔线
|
||||||
t = t.replace(re, (_, a, _line, sep) => `${a}\n${thirdPartyOrderNo}\n${sep}`)
|
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) {
|
if (buyer) {
|
||||||
t = t.replace(/(下单人(需填):)\n\n/, `$1\n${buyer}\n\n`)
|
t = t.replace(/(下单人(需填):)\n\n/, `$1\n${buyer}\n\n`)
|
||||||
|
|||||||
Reference in New Issue
Block a user