lilei před 2 roky
rodič
revize
737e82adfb
2 změnil soubory, kde provedl 12 přidání a 3 odebrání
  1. 11 2
      pages/sales/addCustomer.vue
  2. 1 1
      pages/sales/chooseCustomer.vue

+ 11 - 2
pages/sales/addCustomer.vue

@@ -94,6 +94,7 @@
 				areaIdArr: [],  //  省市区id数组
 				defaultSettleIndex:[0] ,//选中收款方式的下标
 				defaultCustIndex:[0],//选中客户类型的下标
+				backPage: ''
 			}
 		},
 		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
@@ -101,6 +102,7 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		onLoad(option) {
+			this.backPage = option.backPage
 			this.getSettleStyle()
 			this.getCustomerList()
 		},
@@ -220,11 +222,18 @@
 									title: res.message,
 									icon: 'none'
 								})
-								setTimeout(()=>{
+								if(!this.backPage){
 									uni.redirectTo({
 										url:'/pages/sales/addSales?pageType=add&nowId='+res.data.id
 									})
-								},300)
+								}
+								// 门店审核通过
+								if(this.backPage == 'authPass'){
+									uni.$emit("addCustome",res.data)
+									uni.navigateBack({
+										delta: 2
+									})
+								}
 							} 
 						})
 					} else {

+ 1 - 1
pages/sales/chooseCustomer.vue

@@ -68,7 +68,7 @@
 			// 新增客户
 			addCustomer(){
 				uni.navigateTo({
-					url:'/pages/sales/addCustomer'
+					url:'/pages/sales/addCustomer?backPage='+this.backPage
 				})
 			},
 			getData(){