| 
					
				 | 
			
			
				@@ -1,6 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const _Http = getApp().globalData.http, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	getTime = require("../../utils/getTime"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+let sa_paybilldetailid = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	data: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		showAll: false, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -11,56 +11,46 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			period: "" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		form: [{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				label: "银行账号", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "转出账号", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				type: "route", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				url: "/pages/bankAccount/index", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				params: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "银行账号", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "转出账号", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "bankcardno", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				interrupt: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				required: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				label: "付款人", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "打款人", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				type: "text", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "付款人", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "打款人", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "payer", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				required: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				label: "银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "转出银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				type: "text", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "转出银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				disabled: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "bank", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				required: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				label: "付款时间", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "打款时间", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				type: "date", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: getTime.formatTime(new Date(), '-').split(' ')[0], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "请选择付款时间", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "选择打款时间", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "paydate", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				label: "打款总金额", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				type: "digit", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "请输入打款总金额", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				valueName: "amount", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				label: "转入银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -70,39 +60,70 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				rangeKey: "remarks", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				rangeIndex: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "请选择转入银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "选择转入银行", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "inbank", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				required: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				interrupt: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				label: "转入账户", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "银行账号", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				type: "text", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "请选择转入银行后自动带入", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "选择转入银行后自动带入", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "inbankcardno", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				required: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "转入账户", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				type: "selector", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				range: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				rangeKey: "accountname", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				rangeIndex: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "选择转入账户", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				valueName: "sa_accountclassid", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				interrupt: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				label: "转入金额", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				type: "digit", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "转入金额", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				valueName: "amount", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				required: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				label: "备注", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				error: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				errMsg: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				type: "text", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				value: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				placeholder: "请输入备注", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				placeholder: "输入备注", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				valueName: "remarks", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				required: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	onLoad(options) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		let sa_paybillid = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if (options.rowData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			let data = JSON.parse(options.rowData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sa_paybillid = data.sa_paybillid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sa_paybilldetailid = data.sa_paybilldetailid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				form: this.data.form.map(v => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					v.value = data[v.valueName]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					if (v.valueName == 'bankcardno') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						v.value = [data[v.valueName], data[v.valueName]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} else if (v.valueName == "sa_accountclassid") { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						v.id = data[v.valueName]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						v.value = data.accountname; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						v.value = data[v.valueName]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					return v 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				'content.sa_paybillid': data.sa_paybillid 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -128,26 +149,48 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		_Http.basic({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			"id": 20221228085004, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			"content": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				"pageNumber": 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				"pageSize": 9999, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				sa_paybillid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				"where": { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					"ispay": 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			console.log("获取可选择账户", res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			if (res.msg == '成功') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let item = this.data.form.find(v => v.label == '转入账户') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				item.range = res.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if (sa_paybillid) item.disabled = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					form: this.data.form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	/* 打断处理form */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	interrupt({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		detail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		if (detail.data.label == '转入银行') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			detail.form[5] = detail.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			detail.form[6].value = detail.result.value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				form: detail.form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		} else if (detail.temporary.item.label == '银行账号') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			detail.form[4] = detail.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			detail.form[5].value = detail.result.value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} 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() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} else if (detail.temporary.item.label == '转入账户') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			detail.form[6].value = detail.result.accountname; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			detail.form[6].id = detail.result.sa_accountclassid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		this.setData({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			form: detail.form 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.selectComponent('#Form').confirm() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	async submit() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,13 +198,29 @@ Page({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			...this.data.content, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			...this.selectComponent("#Form").submit() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		content.sa_accountclassid = this.data.form.find(v => v.label == '转入账户').id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		content.bankcardno = content.bankcardno[0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		console.log(content) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		let res = await _Http.basic({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			"id": "20221226153004", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			content, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			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') { 
			 |