shish 2 лет назад
Родитель
Сommit
d458463808
3 измененных файлов с 25 добавлено и 7 удалено
  1. 8 1
      ghs/src/views/in/add.vue
  2. 15 5
      ghs/src/views/in/change.vue
  3. 2 1
      ghs/src/views/in/list.vue

+ 8 - 1
ghs/src/views/in/add.vue

@@ -566,12 +566,19 @@ export default {
               that.$notify({ title: '成功', message: '操作成功', type: 'success'})
               that.$notify({ title: '成功', message: '操作成功', type: 'success'})
               that.backToSearchItem()
               that.backToSearchItem()
               setTimeout(function(){
               setTimeout(function(){
-                that.formReset()
+                that.goChangePrice(data)
               },900)
               },900)
             })
             })
         })
         })
       })
       })
     },
     },
+    goChangePrice(info){
+      let query = {};
+			query.orderSn = info.orderSn
+			query.id = info.id
+      query.backType = 'add'
+      this.$router.push({path:'/in/change',query})
+    },
     formReset(){
     formReset(){
       this.form.ghsId = 0
       this.form.ghsId = 0
       this.form.ghsName = ''
       this.form.ghsName = ''

+ 15 - 5
ghs/src/views/in/change.vue

@@ -97,7 +97,7 @@ export default {
                     if(data.status == 4){
                     if(data.status == 4){
                         that.$notify({ title: '成功', message: '操作成功', type: 'success'})
                         that.$notify({ title: '成功', message: '操作成功', type: 'success'})
                         setTimeout(function(){
                         setTimeout(function(){
-                            //that.pageTo({url: '/pagesPurchase/info?orderSn='+that.info.orderSn,type:2})
+                            that.goBackBefore()
                         },1100)
                         },1100)
                     }
                     }
 				})
 				})
@@ -138,13 +138,13 @@ export default {
 					//uni.hideLoading()
 					//uni.hideLoading()
                     that.$notify({ title: '成功', message: '操作成功', type: 'success'})
                     that.$notify({ title: '成功', message: '操作成功', type: 'success'})
                     setTimeout(function(){
                     setTimeout(function(){
-                        //uni.navigateBack()
+                        that.goBackBefore()
                     },1300)
                     },1300)
 				})
 				})
 			})
 			})
 		},
 		},
 		goBackFn() {
 		goBackFn() {
-			//uni.navigateBack({})
+			this.goBackBefore()
 		},
 		},
 		commitChange(type){
 		commitChange(type){
 			let that = this
 			let that = this
@@ -193,10 +193,20 @@ export default {
 				//uni.hideLoading()
 				//uni.hideLoading()
                 that.$notify({ title: '成功', message: '操作成功', type: 'success'})
                 that.$notify({ title: '成功', message: '操作成功', type: 'success'})
                 setTimeout(function(){
                 setTimeout(function(){
-                    //that.pageTo({url: '/pagesPurchase/info?orderSn='+that.info.orderSn,type:2})
-                },1100)
+                    that.goBackBefore()
+                },1800)
 			})
 			})
 		},
 		},
+        goBackBefore(){
+            let query = {};
+            let backType = this.$route.query.backType ? this.$route.query.backType : 'add'
+            if(backType == 'add'){
+                this.$router.push({path:'/in/add',query})
+            }
+            if(backType == 'list'){
+                this.$router.push({path:'/in/list',query})
+            }
+        },
 		linkChange(i){
 		linkChange(i){
 			if(this.flowersList[i].suggestPrice && Number(this.flowersList[i].suggestPrice)>0){
 			if(this.flowersList[i].suggestPrice && Number(this.flowersList[i].suggestPrice)>0){
 				let skMore = this.flowersList[i].skMore ? Number(this.flowersList[i].skMore) : 0
 				let skMore = this.flowersList[i].skMore ? Number(this.flowersList[i].skMore) : 0

+ 2 - 1
ghs/src/views/in/list.vue

@@ -132,7 +132,8 @@ export default {
       let query = {};
       let query = {};
 			query.orderSn = info.orderSn
 			query.orderSn = info.orderSn
 			query.id = info.id
 			query.id = info.id
-      this.$router.push({path: '/in/change',query})
+      query.backType = 'list'
+      this.$router.push({path:'/in/change',query})
     },
     },
     detailShowFn(item) {
     detailShowFn(item) {
       this.optionData = item;
       this.optionData = item;