Ver código fonte

修改重新开票逻辑

gcz 1 ano atrás
pai
commit
4164b50ace
1 arquivos alterados com 23 adições e 18 exclusões
  1. 23 18
      center/invoicedetails.vue

+ 23 - 18
center/invoicedetails.vue

@@ -92,6 +92,7 @@
 			getInvoiceDetail(){
 				this.$u.api.getInvoiceDetail({orderId:this.orderId}).then(res=>{
 					// console.log('res',res);
+					this.details = {};
 					this.details = res.data;
 					if(res.data.status>2){
 						this.detailsInfo[1].push({name:'失败原因 ',key:'errReason'});
@@ -102,25 +103,29 @@
 				})
 			},
 			submitorder(){
-				this.formData.orderId =this.details.orderId;
-				this.formData.invoiceAmount = this.details.invoiceAmount;
-				this.formData.invoiceHandler.handlerType = this.details.handlerType;
-				this.formData.invoiceHandler.name = this.details.name;
-				this.formData.invoiceHandler.email = this.details.email;
-				if(this.details.handlerType===2){//企业
-					this.formData.invoiceHandler.creditCode = this.details.creditCode;
-				}
-				this.$u.api.submitInvoice(this.formData).then(res=>{
-					uni.$u.toast(res.msg)
-					// uni.navigateBack()
-					setTimeout(()=>{
-						uni.redirectTo({
-							url: `/center/orderdetails?id=${this.orderId}`
-						})
-					},1500)
-				}).catch(err=>{
-					console.log('submitorder',err);
+				uni.redirectTo({
+					url: `/center/invoice?id=${this.orderId}`
 				})
+				return
+				// this.formData.orderId =this.details.orderId;
+				// this.formData.invoiceAmount = this.details.invoiceAmount;
+				// this.formData.invoiceHandler.handlerType = this.details.handlerType;
+				// this.formData.invoiceHandler.name = this.details.name;
+				// this.formData.invoiceHandler.email = this.details.email;
+				// if(this.details.handlerType===2){//企业
+				// 	this.formData.invoiceHandler.creditCode = this.details.creditCode;
+				// }
+				// this.$u.api.submitInvoice(this.formData).then(res=>{
+				// 	uni.$u.toast(res.msg)
+				// 	// uni.navigateBack()
+				// 	setTimeout(()=>{
+				// 		uni.redirectTo({
+				// 			url: `/center/orderdetails?id=${this.orderId}`
+				// 		})
+				// 	},1500)
+				// }).catch(err=>{
+				// 	console.log('submitorder',err);
+				// })
 			}
 
 		}