Browse Source

打款凭证银行账户改为选择

xiaohaizhao 2 years ago
parent
commit
8316b9f948
1 changed files with 23 additions and 10 deletions
  1. 23 10
      packageA/remitVoucher/update.js

+ 23 - 10
packageA/remitVoucher/update.js

@@ -11,24 +11,27 @@ Page({
 			period: ""
 		},
 		form: [{
-				label: "付款人",
+				label: "银行账号",
 				error: false,
 				errMsg: "",
-				type: "text",
+				type: "route",
+				url: "/pages/bankAccount/index",
+				params: {},
 				value: "",
-				placeholder: "付款人",
-				valueName: "payer",
+				placeholder: "银行账号",
+				valueName: "bankcardno",
+				interrupt: true,
 				required: true
 			}, {
-				label: "银行账号",
+				label: "付款人",
 				error: false,
 				errMsg: "",
-				type: "number",
+				type: "text",
 				value: "",
-				placeholder: "银行账号",
-				valueName: "bankcardno",
+				placeholder: "付款人",
+				disabled: true,
+				valueName: "payer",
 				required: true
-
 			}, {
 				label: "银行",
 				error: false,
@@ -36,6 +39,7 @@ Page({
 				type: "text",
 				value: "",
 				placeholder: "银行",
+				disabled: true,
 				valueName: "bank",
 				required: true
 			}, {
@@ -123,7 +127,7 @@ Page({
 					form: this.data.form
 				})
 			}
-		})
+		});
 	},
 	/* 打断处理form */
 	interrupt({
@@ -135,6 +139,14 @@ Page({
 			this.setData({
 				form: detail.form
 			})
+		} else if (detail.temporary.item.label == '银行账号') {
+			detail.form[0].value = [detail.data.bankcardno, detail.data.bankcardno];
+			detail.form[1].value = detail.data.name;
+			detail.form[2].value = detail.data.bank;
+			this.setData({
+				form: detail.form
+			})
+			wx.navigateBack()
 		}
 		this.selectComponent('#Form').confirm()
 	},
@@ -143,6 +155,7 @@ Page({
 			...this.data.content,
 			...this.selectComponent("#Form").submit()
 		}
+		content.bankcardno = content.bankcardno[0]
 		let res = await _Http.basic({
 			"id": "20221226153004",
 			content,