panhui 2 ani în urmă
părinte
comite
4b2be7acf6
1 a modificat fișierele cu 8 adăugiri și 8 ștergeri
  1. 8 8
      src/main/vue-admin/src/views/SaleBatchEdit.vue

+ 8 - 8
src/main/vue-admin/src/views/SaleBatchEdit.vue

@@ -151,16 +151,16 @@ export default {
             this.$http
                 .get('saleBatch/get/' + this.$route.query.id)
                 .then(res => {
-                    if (res.saleBatch.saleStart && res.saleBatch.saleEnd) {
-                        res.saleBatch.sell = [res.saleBatch.saleStart, res.saleBatch.saleEnd]
+                    if (res.saleStart && res.saleEnd) {
+                        res.sell = [res.saleStart, res.saleEnd]
                     }
-                    if (res.saleBatch.delegateStart && res.saleBatch.delegateEnd) {
-                        res.saleBatch.delegate = [res.saleBatch.delegateStart, res.saleBatch.delegateEnd]
+                    if (res.delegateStart && res.delegateEnd) {
+                        res.delegate = [res.delegateStart, res.delegateEnd]
                     }
-                    if (res.saleBatch.delayDuration) {
-                        res.saleBatch.delayDuration = res.saleBatch.delayDuration / 1000
+                    if (res.delayDuration) {
+                        res.delayDuration = res.delayDuration / 1000
                     }
-                    this.formData = res.saleBatch
+                    this.formData = res
                     this.extensions = res.extensions
                 })
                 .catch(e => {
@@ -321,7 +321,7 @@ export default {
             }
 
             let data = {
-                saleBatch: formData,
+                ...formData,
                 extensions: [...this.extensions]
             }
             this.saving = true