This commit is contained in:
van
2026-04-08 17:31:13 +08:00
parent eefbc2ba87
commit ffe48e0417

View File

@@ -134,10 +134,18 @@ export default {
} }
return 'F-' + s return 'F-' + s
}, },
/** 地址压成一行:换行/多空格合并为单空格,去掉中文逗号 */
compressAddressOneLine(raw) {
if (raw == null) return ''
return String(raw)
.replace(//g, '')
.replace(/\s+/g, ' ')
.trim()
},
buildCommand() { buildCommand() {
const mark = this.buildDistributionMark() const mark = this.buildDistributionMark()
const model = (this.form.model || '').trim() const model = (this.form.model || '').trim()
const address = (this.form.address || '').trim() const address = this.compressAddressOneLine(this.form.address)
if (!model) { if (!model) {
this.$modal.msgError('请填写型号') this.$modal.msgError('请填写型号')
return null return null