瀏覽代碼

修复bug

xiaohaizhao 1 年之前
父節點
當前提交
33b7a39eb7
共有 2 個文件被更改,包括 33 次插入24 次删除
  1. 1 1
      packageA/remitVoucher/detail.js
  2. 32 23
      packageA/remitVoucher/update.js

+ 1 - 1
packageA/remitVoucher/detail.js

@@ -56,7 +56,7 @@ Page({
 				detail: res.data,
 				loading: false
 			});
-			if (init) this.partialRenewal(true)
+			this.partialRenewal(true)
 		})
 	},
 	/* 设置详情信息 */

+ 32 - 23
packageA/remitVoucher/update.js

@@ -207,30 +207,38 @@ Page({
 			version: 1
 		})
 		console.log("创建打款凭证", res);
-		await _Http.basic({
-			"id": 20221227092904,
-			"content": {
-				"paybilldetails": [{
-					"amount": content.amount,
-					"sa_accountclassid": content.sa_accountclassid,
-					sa_paybilldetailid
-				}],
-				"sa_paybillid": res.data.sa_paybillid
-			}
-		}).then(res => {
-			console.log("修改明细", res)
-		})
-
 		if (res.msg == '成功') {
-			let page = getCurrentPages()[getCurrentPages().length - 2];
-			if (page.__route__ == 'packageA/remitVoucher/index') {
-				wx.redirectTo({
-					url: '/packageA/remitVoucher/detail?id=' + res.data.sa_paybillid,
-				})
-			} else if (page.__route__ == 'packageA/remitVoucher/detail') {
-				wx.navigateBack();
-				page.getDetail(true)
-			}
+			_Http.basic({
+				"id": 20221227092904,
+				"content": {
+					"paybilldetails": [{
+						"amount": content.amount,
+						"sa_accountclassid": content.sa_accountclassid,
+						sa_paybilldetailid
+					}],
+					"sa_paybillid": res.data.sa_paybillid
+				}
+			}).then(s => {
+				console.log("修改明细", s)
+				if (s.msg == '成功') {
+					let page = getCurrentPages()[getCurrentPages().length - 2];
+					if (page.__route__ == 'packageA/remitVoucher/index') {
+						wx.redirectTo({
+							url: '/packageA/remitVoucher/detail?id=' + res.data.sa_paybillid,
+						})
+					} else if (page.__route__ == 'packageA/remitVoucher/detail') {
+						wx.navigateBack();
+						page.getDetail(true)
+					}
+				} else {
+					wx.showToast({
+						title: res.msg,
+						icon: "none",
+						mask: true
+					})
+				}
+
+			})
 		} else {
 			wx.showToast({
 				title: res.msg,
@@ -238,6 +246,7 @@ Page({
 				mask: true
 			})
 		}
+
 	},
 	// 是否显示全部
 	onChange({