|
|
@@ -90,7 +90,7 @@
|
|
|
<input type="text" class="form-control" v-model="applyObj.produceDate" @input="onProduceDateChange" />
|
|
|
</div>-->
|
|
|
</div>
|
|
|
- <a @click="authorityInterceptor(baseUrls.userPublishSeek, goPublish)">发布求购</a>
|
|
|
+ <a @click="goPublish">发布求购</a>
|
|
|
</div>
|
|
|
<div class="publish-upload">
|
|
|
<h1>批量发布</h1>
|
|
|
@@ -284,7 +284,8 @@
|
|
|
},
|
|
|
goPublish: function () {
|
|
|
if (this.user.logged) {
|
|
|
- if (this.checkAll()) {
|
|
|
+ this.authorityInterceptor(this.baseUrls.userPublishSeek, () => {
|
|
|
+ if (this.checkAll()) {
|
|
|
// if (!this.applyObj.prodTitle || this.applyObj.prodTitle.length === 0) {
|
|
|
// this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
|
|
|
// this.startPublish(response.data && response.data.length ? response.data : '其他')
|
|
|
@@ -292,18 +293,19 @@
|
|
|
// } else {
|
|
|
// this.startPublish()
|
|
|
// }
|
|
|
- this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
|
|
|
- this.startPublish(response.data && response.data.length ? response.data : this.applyObj.prodTitle)
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (!this.validObj.prodTitle) {
|
|
|
- this.$message.error('类目不能为空')
|
|
|
- } else if (!this.validObj.deadline) {
|
|
|
- this.$message.error('截止日期不能为空')
|
|
|
- } else if (!this.validObj.amount) {
|
|
|
- this.$message.error('请输入正确的数值')
|
|
|
+ this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
|
|
|
+ this.startPublish(response.data && response.data.length ? response.data : this.applyObj.prodTitle)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (!this.validObj.prodTitle) {
|
|
|
+ this.$message.error('类目不能为空')
|
|
|
+ } else if (!this.validObj.deadline) {
|
|
|
+ this.$message.error('截止日期不能为空')
|
|
|
+ } else if (!this.validObj.amount) {
|
|
|
+ this.$message.error('请输入正确的数值')
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$router.push('/auth/login?returnUrl=' + window.location.href)
|
|
|
}
|