|
|
@@ -447,6 +447,7 @@
|
|
|
if (!this.modifyObj.unitPrice) {
|
|
|
this.modifyObj.currency = null
|
|
|
}
|
|
|
+ this.modifyObj.code = this.modifyObj.code.trim()
|
|
|
this.$http.put('/seek/updateSeekPurchaseByBatch', this.modifyObj)
|
|
|
.then(response => {
|
|
|
if (response.data.success) {
|
|
|
@@ -556,8 +557,9 @@
|
|
|
return item.code && item.brand && item.deadline && this.isValidDate(item.deadline)
|
|
|
},
|
|
|
checkCode: function () {
|
|
|
- let nullStrFlag = checkNullStr(this.modifyObj.code)
|
|
|
- this.validObj.code = this.modifyObj.code && this.modifyObj.code !== '' && nullStrFlag
|
|
|
+ let code = this.modifyObj.code.trim()
|
|
|
+ let nullStrFlag = checkNullStr(code)
|
|
|
+ this.validObj.code = code && code !== '' && nullStrFlag
|
|
|
if (!this.validObj.code) {
|
|
|
if (!nullStrFlag) {
|
|
|
this.$message.error('型号输入不合法')
|
|
|
@@ -626,7 +628,6 @@
|
|
|
}
|
|
|
},
|
|
|
onCodeChange: function () {
|
|
|
- this.modifyObj.code = this.modifyObj.code.trim()
|
|
|
if ((/[^\x00-\xff]/g).test(this.modifyObj.code)) {
|
|
|
let chineseIndex = -1
|
|
|
for (let i = 0; i < this.modifyObj.code.length; i++) {
|