Browse Source

修改保存成功后跳转到销售编辑页

zhangdan 3 years ago
parent
commit
e690952f27
1 changed files with 19 additions and 17 deletions
  1. 19 17
      pages/sales/addSales.vue

+ 19 - 17
pages/sales/addSales.vue

@@ -150,22 +150,22 @@
 				this.itemId=option.nowId
 				this.getCustomerData(this.itemId)
 				this.getUserAllList()
-				// setTimeout(()=>{
-				// 	const ind=this.settleTypeList.findIndex((item)=>{
-				// 		return item.settleStyleSn==this.customerData.settleStyleSn
-				// 	})
-				// 	console.log(ind,'ind')
-				// 	this.settleStyleName=this.settleTypeList[ind].name
-				// 	this.defaultSettleIndex=[ind]
-				// 	// if(this.customerData.customerSn){
-				// 	// 	const settleInd=this.custTypeList.findIndex((item)=>{
-				// 	// 		return item.customerSn==this.customerData.customerSn
-				// 	// 	})
-				// 	// 	this.custTypeName=this.custTypeList[settleInd].name
-				// 	// 	this.defaultCustIndex=[settleInd]
-				// 	// }
-				// 	console.log(ind,'a',JSON.parse(JSON.stringify(this.defaultSettleIndex)) )
-				// },200)
+				setTimeout(()=>{
+					const ind=this.settleTypeList.findIndex((item)=>{
+						return item.settleStyleSn==this.customerData.settleStyleSn
+					})
+					console.log(ind,'ind')
+					this.settleStyleName=this.settleTypeList[ind].name
+					this.defaultSettleIndex=[ind]
+					// if(this.customerData.customerSn){
+					// 	const settleInd=this.custTypeList.findIndex((item)=>{
+					// 		return item.customerSn==this.customerData.customerSn
+					// 	})
+					// 	this.custTypeName=this.custTypeList[settleInd].name
+					// 	this.defaultCustIndex=[settleInd]
+					// }
+					console.log(ind,'a',JSON.parse(JSON.stringify(this.defaultSettleIndex)) )
+				},200)
 			}
 			this.getSettleStyle()
 			this.getCustomerList()
@@ -524,7 +524,9 @@
 									icon: 'none'
 								})
 								setTimeout(()=>{
-									uni.navigateBack()
+									uni.navigateTo({
+										url:'/pages/sales/edit?pageType=edit&data='+JSON.stringify(res.data)
+									})
 								},300)
 							} 
 						})