Browse Source

求购频道验收修改

yangc 8 years ago
parent
commit
a4fca70544

+ 6 - 2
components/applyPurchase/ApplyInfo.vue

@@ -185,7 +185,7 @@
           let valid = this.sayPriceObj.currency && this.sayPriceObj.unitPrice && this.sayPriceObj.minDay && this.sayPriceObj.maxDay
           let valid = this.sayPriceObj.currency && this.sayPriceObj.unitPrice && this.sayPriceObj.minDay && this.sayPriceObj.maxDay
           if (valid) {
           if (valid) {
             this.sayPriceObj.spId = purchaseMan.id
             this.sayPriceObj.spId = purchaseMan.id
-            this.sayPriceObj.currency = purchaseMan.currency
+            this.sayPriceObj.currency = purchaseMan.currency || this.sayPriceObj.currency
             this.$http.post('/seek/offer/saveOffer', this.sayPriceObj).then(response => {
             this.$http.post('/seek/offer/saveOffer', this.sayPriceObj).then(response => {
               if (response.data.success) {
               if (response.data.success) {
                 this.$message.success('报价成功')
                 this.$message.success('报价成功')
@@ -203,7 +203,7 @@
             this.$message.error('请填写正确的信息')
             this.$message.error('请填写正确的信息')
           }
           }
         } else {
         } else {
-          this.$router.push('/auth/login')
+          this.$router.push('/auth/login?returnUrl=' + window.location.href)
         }
         }
       },
       },
       resetList: function () {
       resetList: function () {
@@ -227,6 +227,8 @@
           }
           }
         } else if (this.sayPriceObj.minDay < 0) {
         } else if (this.sayPriceObj.minDay < 0) {
           this.sayPriceObj.minDay = 0
           this.sayPriceObj.minDay = 0
+        } else if (this.sayPriceObj.minDay > 31) {
+          this.sayPriceObj.minDay = 31
         }
         }
       },
       },
       onMaxDayInput: function () {
       onMaxDayInput: function () {
@@ -237,6 +239,8 @@
           }
           }
         } else if (this.sayPriceObj.maxDay < 0) {
         } else if (this.sayPriceObj.maxDay < 0) {
           this.sayPriceObj.maxDay = 0
           this.sayPriceObj.maxDay = 0
+        } else if (this.sayPriceObj.maxDay > 31) {
+          this.sayPriceObj.maxDay = 31
         }
         }
       },
       },
       onProduceDateChange: function () {
       onProduceDateChange: function () {

+ 1 - 1
components/applyPurchase/PublishApply.vue

@@ -187,7 +187,7 @@
             this.$message.error('请填写正确的信息')
             this.$message.error('请填写正确的信息')
           }
           }
         } else {
         } else {
-          this.$router.push('/auth/login')
+          this.$router.push('/auth/login?returnUrl=' + window.location.href)
         }
         }
       },
       },
       checkCode: function () {
       checkCode: function () {