From e680ee8cc2c34ec2d21c238e8110e4f1501eb8bc Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 24 十一月 2023 11:06:37 +0800
Subject: [PATCH] #

---
 pages/business/goBusiness/modiReimburseOnlineDetl.vue |   32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/pages/business/goBusiness/modiReimburseOnlineDetl.vue b/pages/business/goBusiness/modiReimburseOnlineDetl.vue
index c7b8842..e02f58b 100644
--- a/pages/business/goBusiness/modiReimburseOnlineDetl.vue
+++ b/pages/business/goBusiness/modiReimburseOnlineDetl.vue
@@ -10,7 +10,7 @@
 		<view class="container">
 			<view style="height: 16rpx;"></view>
 			<view class="card" v-for="(item,index) in form">
-				<view class="card-select" v-show="item.inputType != 'table'" style="width: 100%;">
+				<view class="card-select" v-show="item.inputType != 'table' && !item.hide" style="width: 100%;">
 					<view class="flex">
 						<view class="card-required" v-show="item.required">*</view>
 						<view >{{item.name}}</view>
@@ -140,7 +140,7 @@
 				],
 				radiovalue2: '',
 				form: [
-					{name: '椤圭洰鍚�',placeholder: '璇烽�夋嫨',inputType: 'chose',type: 'orderId',value: '',submitVal: ''},
+					{name: '椤圭洰鍚�',placeholder: '璇烽�夋嫨',inputType: 'chose',type: 'orderId',value: '',submitVal: '',hide: true},
 					{name: '鎶ラ攢绫诲瀷',placeholder: '璇烽�夋嫨',required:true,inputType: 'select',type: 'reimburseId',value: '',submitVal: ''},
 					{name: '鏄惁鍐茶处',placeholder: '璇烽�夋嫨',required:true,inputType: 'select',type: 'checkData',value: '',submitVal: ''},
 					{name: '鎶ラ攢鏄庣粏',placeholder: '璇烽�夋嫨',inputType: 'table'}
@@ -169,6 +169,7 @@
 				dataRule: [
 					{occupation: ''}
 				],
+				reimburseId2: 0,
 				reimburseId: false,
 				reimburseIds: [['椤圭洰鏈畬鎴�','椤圭洰宸插畬鎴愬湪璐ㄤ繚鏈熷唴','闈為」鐩瀷鎶ラ攢','鍏朵粬']],
 				checkData: false,
@@ -196,7 +197,8 @@
 						updateTime: '',
 						updateUserName: ''
 					},
-				fixtype: 'modi'
+				fixtype: 'modi',
+				businessId: 0
 			}
 		},
 		onLoad(option) {
@@ -209,10 +211,11 @@
 				if (data.data == 'add') {
 					_this.title = '娣诲姞鎶ラ攢瀹℃壒'
 					_this.fixtype = 'add'
+					_this.form[0].hide = false
 				}
 				if (data.data == 'modi') {
-					// _this.title = '娣诲姞鎶ラ攢瀹℃壒'
 					_this.form[1].value = data.detl.list.templateName
+					_this.reimburseId2 = data.detl.list.id
 					for (let k in _this.reimburseIds[0]) {
 						if (_this.reimburseIds[0][k] == data.detl.list.templateName) {
 							_this.form[1].submitVal = k
@@ -222,6 +225,12 @@
 					_this.form[0].value = data.detl.list.orderId$
 					_this.getOrderId(data.detl.list.orderId$)
 					_this.tableData = data.detl.list.detl
+				}
+				// 鍑哄樊鐢宠鎶ラ攢
+				if (data.data == 'add2') {
+					_this.title = '娣诲姞鎶ラ攢瀹℃壒'
+					_this.fixtype = 'add2'
+					_this.businessId = data.detl.id
 				}
 			})
 			
@@ -308,8 +317,9 @@
 						
 					]
 				}
+				
 				for (let element of this.orderIdList) {
-					if(element.value == this.orderId) {
+					if(element.value == this.form[0].value) {
 						param.orderId = element.id + ''
 					}
 				}
@@ -321,11 +331,8 @@
 						param.checkData = k.value
 					}
 				}
+				param.reimburseId = this.reimburseId2
 				param.reimburseOnlineDetls = this.tableData
-				if (param.reimburseId == null || param.reimburseId === '') {
-					uni.showToast({title: '鎶ラ攢绫诲瀷涓嶈兘涓虹┖', icon: "none", position: 'top'})
-					return
-				}
 				if (param.checkData == '') {
 					uni.showToast({title: '鏄惁鍐茶处涓嶈兘涓虹┖', icon: "none", position: 'top'})
 					return
@@ -334,8 +341,11 @@
 					uni.showToast({title: '璇锋坊鍔犳姤閿�鏄庣粏', icon: "none", position: 'top'})
 					return
 				}
-				console.log(this.fixtype);
+				console.log(param);
 				if (this.fixtype == 'add') {
+					this.formAdd(param)
+				} else if (this.fixtype == 'add2') {
+					param['businessId'] = this.businessId
 					this.formAdd(param)
 				} else {
 					this.formModi(param)
@@ -369,7 +379,7 @@
 					success(res) {
 						res = res.data
 						if (res.code === 200) {
-							uni.navigateBack({})
+							uni.navigateBack({delta:2})
 						} else if(res.code === 500) {
 							uni.showToast({title: res.msg, icon: "none", position: 'top'})
 						}

--
Gitblit v1.9.1