|
|
@@ -104,6 +104,9 @@
|
|
|
this.applyObj[attr] = attr === 'currency' ? 'RMB' : ''
|
|
|
}
|
|
|
},
|
|
|
+ setRemindText: function (str) {
|
|
|
+ this.$emit('remindAction', str)
|
|
|
+ },
|
|
|
goPublish: function () {
|
|
|
if (this.checkAll()) {
|
|
|
let inquiry = {}
|
|
|
@@ -138,7 +141,8 @@
|
|
|
inquiry.inquiryItems = inquiryItems
|
|
|
this.$http.post('/inquiry/buyer/save', inquiry)
|
|
|
.then(response => {
|
|
|
- this.$message.success('发布成功')
|
|
|
+// this.$message.success('发布成功')
|
|
|
+ this.setRemindText('发布成功')
|
|
|
// this.showRemindBox = true
|
|
|
this.emptyForm()
|
|
|
// this.validObj.deadline = true
|
|
|
@@ -146,7 +150,8 @@
|
|
|
this.cancel()
|
|
|
}, error => {
|
|
|
console.log(error)
|
|
|
- this.$message.error('发布失败')
|
|
|
+// this.$message.error('发布失败')
|
|
|
+ this.setRemindText('发布失败')
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -161,7 +166,8 @@
|
|
|
},
|
|
|
deadlineChange: function () {
|
|
|
if (!this.isValidDate(this.applyObj.deadline)) {
|
|
|
- this.$message.error('日期需不小于今天且在90天以内')
|
|
|
+// this.$message.error('日期需不小于今天且在90天以内')
|
|
|
+ this.setRemindText('日期需不小于今天且在90天以内')
|
|
|
this.applyObj.deadline = ''
|
|
|
}
|
|
|
},
|
|
|
@@ -170,13 +176,16 @@
|
|
|
},
|
|
|
checkCode: function () {
|
|
|
if (!this.applyObj.code) {
|
|
|
- this.$message.error('型号不能为空')
|
|
|
+// this.$message.error('型号不能为空')
|
|
|
+ this.setRemindText('型号不能为空')
|
|
|
return false
|
|
|
} else if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
|
|
|
- this.$message.error('型号不能包含中文及中文字符')
|
|
|
+// this.$message.error('型号不能包含中文及中文字符')
|
|
|
+ this.setRemindText('型号不能包含中文及中文字符')
|
|
|
return false
|
|
|
} else if (getRealLen(this.applyObj.code) > 100) {
|
|
|
- this.$message.error('型号不能超过100个字符')
|
|
|
+// this.$message.error('型号不能超过100个字符')
|
|
|
+ this.setRemindText('型号不能超过100个字符')
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
|
@@ -193,13 +202,16 @@
|
|
|
}
|
|
|
}
|
|
|
if (!this.applyObj.brand) {
|
|
|
- this.$message.error('品牌不能为空')
|
|
|
+// this.$message.error('品牌不能为空')
|
|
|
+ this.setRemindText('品牌不能为空')
|
|
|
return false
|
|
|
} else if (chineseIndex !== -1) {
|
|
|
- this.$message.error('品牌不能包含中文字符')
|
|
|
+// this.$message.error('品牌不能包含中文字符')
|
|
|
+ this.setRemindText('品牌不能包含中文字符')
|
|
|
return false
|
|
|
} else if (getRealLen(this.applyObj.brand) > 50) {
|
|
|
- this.$message.error('品牌不能超过50个字符')
|
|
|
+// this.$message.error('品牌不能超过50个字符')
|
|
|
+ this.setRemindText('品牌不能超过50个字符')
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
|
@@ -207,7 +219,8 @@
|
|
|
},
|
|
|
checkDeadLine: function () {
|
|
|
if (!this.applyObj.deadline) {
|
|
|
- this.$message.error('截止日期不能为空')
|
|
|
+// this.$message.error('截止日期不能为空')
|
|
|
+ this.setRemindText('截止日期不能为空')
|
|
|
}
|
|
|
return this.applyObj.deadline
|
|
|
},
|
|
|
@@ -216,10 +229,12 @@
|
|
|
return true
|
|
|
} else {
|
|
|
if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
|
|
|
- this.$message.error('请输入正确的数量')
|
|
|
+// this.$message.error('请输入正确的数量')
|
|
|
+ this.setRemindText('请输入正确的数量')
|
|
|
return false
|
|
|
} else if (this.applyObj.amount.length > 9) {
|
|
|
- this.$message.error('数量不能大于999999999')
|
|
|
+// this.$message.error('数量不能大于999999999')
|
|
|
+ this.setRemindText('数量不能大于999999999')
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
|
@@ -231,7 +246,8 @@
|
|
|
return true
|
|
|
} else {
|
|
|
if (getRealLen(this.applyObj.produceDate) > 12) {
|
|
|
- this.$message.error('生产日期不能大于12个字符')
|
|
|
+// this.$message.error('生产日期不能大于12个字符')
|
|
|
+ this.setRemindText('生产日期不能大于12个字符')
|
|
|
return false
|
|
|
} else {
|
|
|
return true
|
|
|
@@ -253,13 +269,13 @@
|
|
|
line-height: .8rem;
|
|
|
font-size: .26rem;
|
|
|
text-align: left;
|
|
|
- border-bottom: .04rem solid #b7d5fe;
|
|
|
+ border-bottom: .02rem solid #b7d5fe;
|
|
|
position: relative;
|
|
|
input {
|
|
|
width: 3.49rem;
|
|
|
height: .52rem;
|
|
|
padding-left: .19rem;
|
|
|
- border: .04rem solid #7e7e7e;
|
|
|
+ border: .02rem solid #7e7e7e;
|
|
|
}
|
|
|
> span {
|
|
|
display: inline-block;
|
|
|
@@ -296,7 +312,7 @@
|
|
|
li {
|
|
|
height: .52rem;
|
|
|
line-height: .52rem;
|
|
|
- border-bottom: .04rem solid #dfdfdf;
|
|
|
+ border-bottom: .02rem solid #dfdfdf;
|
|
|
&:hover, &:active {
|
|
|
background: #dedede;
|
|
|
}
|