|
@@ -354,6 +354,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 去除产品编码、产品名称、原厂编码 文字中间2个以上连续空格转化为一个空格
|
|
|
+ mergeSpaces (text) {
|
|
|
+ return text.replace(/\s+/g, ' ')
|
|
|
+ },
|
|
|
// 保存
|
|
|
handleSubmit (e) {
|
|
|
e.preventDefault()
|
|
@@ -375,6 +379,9 @@ export default {
|
|
|
form.carOwnersPrice = !form.carOwnersPrice ? '' : form.carOwnersPrice
|
|
|
form.specialPrice = !form.specialPrice ? '' : form.specialPrice
|
|
|
form.terminalPrice = !form.terminalPrice ? '' : form.terminalPrice
|
|
|
+ form.name = _this.mergeSpaces(form.name)
|
|
|
+ form.code = _this.mergeSpaces(form.code)
|
|
|
+ form.origCode = _this.mergeSpaces(form.origCode)
|
|
|
dealerProductSave(form).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|