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

---
 pages/business/goBusiness/businessTripOther.vue     |  129 +++++++
 pages.json                                          |   18 +
 pages/business/goBusiness/addBusinessTripOther.vue  |  616 ++++++++++++++++++++++++++++++++++++
 pages/business/goBusiness/businessTripOtherDetl.vue |  231 +++++++++++++
 4 files changed, 992 insertions(+), 2 deletions(-)

diff --git a/pages.json b/pages.json
index 332e6fb..3d0c9a2 100644
--- a/pages.json
+++ b/pages.json
@@ -349,6 +349,24 @@
         		"navigationBarTitleText" : "鍏朵粬",
         		"enablePullDownRefresh" : false
         	}
+        },
+        {
+        	"path" : "pages/business/goBusiness/businessTripOtherDetl",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "璇︽儏",
+        		"enablePullDownRefresh" : false,
+				"navigationStyle": "custom"
+        	}
+        },
+        {
+        	"path" : "pages/business/goBusiness/addBusinessTripOther",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "娣诲姞鍑哄樊鐢宠",
+        		"enablePullDownRefresh" : false
+				// "navigationStyle": "custom"
+        	}
         }
     ],
 	"globalStyle": {
diff --git a/pages/business/goBusiness/addBusinessTripOther.vue b/pages/business/goBusiness/addBusinessTripOther.vue
new file mode 100644
index 0000000..e6a7095
--- /dev/null
+++ b/pages/business/goBusiness/addBusinessTripOther.vue
@@ -0,0 +1,616 @@
+<template>
+	<view>
+
+		<view class="card" v-for="item in form2">
+			<!-- head -->
+			<view class="card-head flex">
+				<view class="card-head-title">{{item.title}}</view>
+			</view>
+			<!-- body -->
+			<view class="card-body flex-column" v-for="subItem in item.info" v-show="!subItem.unshow">
+				<view class="flex"><text class="card-required" v-show="subItem.required">*</text>{{subItem.subTitle}}
+				</view>
+				<view class="flex">
+					<uni-combox :candidates="orderIds" placeholder="璇烽�夋嫨椤圭洰" v-model="subItem.value"
+						@input="getOrderId(subItem.value)" v-show="subItem.inputType == 'chose'">
+					</uni-combox>
+
+					<view style="flex: 1;" v-show="subItem.inputType != 'chose'">
+
+						<input type="text" :placeholder="subItem.placeholder"
+							:placeholder-style="subItem.placeholderStyle" v-model="subItem.value"
+							:disabled="subItem.disabled" v-show="subItem.inputType != 'data'">
+						<uni-datetime-picker v-model="subItem.value" :border="false"
+							:red-color="subItem.placeholderStyle" v-if="subItem.inputType == 'data'" />
+					</view>
+
+					<view class="flex" style="width: 50rpx;" v-show="subItem.inputType == 'select'"
+						@click="showPicker(subItem.type)"><uni-icons type="right" color="#000"></uni-icons></view>
+				</view>
+
+			</view>
+
+		</view>
+
+
+		<u-picker :show="businessTransportationShow" :columns="businessTransportations"
+			@confirm="businessTransportationConfirm"></u-picker>
+		<u-picker :show="businessReturnShow" :columns="businessReturns" @confirm="businessReturnConfirm"></u-picker>
+		<u-picker :show="pcdShow" ref="uPicker" :columns="columns" @confirm="pcdStartConfirm" @change="changeHandler"
+			:defaultIndex="defaultIndex"></u-picker>
+		<u-picker :show="pcdEndShow" ref="uPicker" :columns="columns" @confirm="pcdEndConfirm" @change="changeHandler"
+			:defaultIndex="defaultIndex"></u-picker>
+		<u-picker :show="businessStartTimeDayShow" :columns="businessStartTimeDays"
+			@confirm="businessStartTimeDayConfirm"></u-picker>
+		<u-picker :show="businessEndTimeDayShow" :columns="businessEndTimeDays"
+			@confirm="businessEndTimeDayConfirm"></u-picker>
+
+		<view style="height: 120rpx;"></view>
+
+		<view class="floor">
+			<view class="default">閲嶇疆</view>
+			<view class="primary" @click="submit()">鎻愪氦</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import form from '../../../uni_modules/uview-ui/libs/config/props/form';
+	import data from '../../../static/js/citys-data.js'
+	export default {
+		data() {
+			return {
+				id: 0,
+				type: 'add',
+				orderIds: [],
+				orderId: '',
+				orderId$: '',
+				orderIdList: [],
+				year: '2021-5-3',
+				placeholderStyle: 'font-size:20rpx',
+				form: {
+					// businessTripReasons: ''
+				},
+				redColor: '',
+				columns: [],
+				defaultIndex: [],
+				citysData: data.citysData,
+				businessTransportationShow: false,
+				businessTransportations: [
+					['椋炴満', '楂橀搧', '鐏溅', '姹借溅', '鎽╂墭', '鐢佃溅', '鍏朵粬']
+				],
+				businessReturnShow: false,
+				businessReturns: [
+					['鍗曠▼', '寰�杩�']
+				],
+				pcdShow: false,
+				pcdEndShow: false,
+				pcds: data.citysData,
+				businessStartTimeDayShow: false,
+				businessStartTimeDays: [
+					['涓婂崍', '涓嬪崍']
+				],
+				businessEndTimeDayShow: false,
+				businessEndTimeDays: [
+					['涓婂崍', '涓嬪崍']
+				],
+				form2: [{
+						title: '鍩烘湰淇℃伅',
+						info: [{
+								subTitle: '椤圭洰鍚嶇О',
+								placeholder: '璇疯緭鍏ラ」鐩悕绉�',
+								placeholderStyle: 'font-size:20rpx',
+								value: '',
+								submitVal: '',
+								type: 'orderId',
+								inputType: 'chose',
+								required: true,
+								unshow: false
+							},
+							{
+								subTitle: '鍑哄樊浜嬬敱',
+								placeholder: '璇疯緭鍏ュ嚭宸簨鐢�',
+								placeholderStyle: 'font-size:20rpx',
+								value: '',
+								submitVal: '鍑哄樊浜嬬敱',
+								type: 'businessTripReasons',
+								inputType: 'input',
+								required: true
+							},
+							{
+								subTitle: '棰勪及閲戦',
+								placeholder: '璇疯緭鍏ラ浼伴噾棰�',
+								placeholderStyle: 'font-size:20rpx',
+								value: '',
+								submitVal: '棰勪及閲戦',
+								type: 'amountOfMoney',
+								inputType: 'input',
+								required: true
+							},
+						]
+					},
+					{
+						title: '鍏朵粬淇℃伅',
+						info: [{
+							subTitle: '澶囨敞',
+							placeholder: '澶囨敞淇℃伅',
+							placeholderStyle: 'font-size:20rpx',
+							value: '',
+							inputType: 'input',
+							type: 'businessNotes'
+						}]
+					},
+				],
+
+			}
+		},
+		onLoad(option) {
+			let _this = this
+			const eventChannel = this.getOpenerEventChannel();
+			eventChannel.on('businessTripOtherDetl', function(data) {
+				if (data.data == 'add') {
+					_this.getOrderId('')
+				}
+			})
+			// 椤圭洰璺熻釜浼犺繃鏉ョ殑
+			eventChannel.on('addType', function(data) {
+				if (data.data.comeFrom == 'saleManage') {
+					_this.form2[0].info[0].submitVal = data.data.orderId
+					_this.form2[0].info[0].unshow = true
+					_this.form2[0].info[0].required = false
+				}
+			})
+			// 淇敼椤甸潰鍥炰紶
+
+			eventChannel.on('modiGoBusinessDetl', function(data) {
+				if (data.data == 'modi') {
+					_this.form2[0].info[0].unshow = true
+					_this.form2[0].info[0].required = false
+					_this.form2[0].info[0].submitVal = data.detl.orderId
+					_this.type = 'modi'
+					_this.id = data.detl.id
+					_this.orderId$ = data.detl.orderId$
+					for (let item of _this.form2) {
+						for (let subItem of item.info) {
+							// 杈撳叆妗嗙洿鎺ヨ祴鍊�
+							if (subItem.inputType == 'input') {
+								subItem.value = data.detl[subItem.type]
+							} else if (subItem.inputType == 'select' || subItem.inputType == 'data') {
+								if (subItem.type == 'businessTransportation') {
+									subItem.value = _this.businessTransportations[0][data.detl[subItem.type] - 1]
+									subItem.submitVal = data.detl[subItem.type]
+								} else if (subItem.type == 'businessReturn') {
+									subItem.value = _this.businessReturns[0][data.detl[subItem.type]]
+									subItem.submitVal = data.detl[subItem.type]
+								} else if (subItem.type == 'businessStartTimeDay') {
+									subItem.value = _this.businessStartTimeDays[0][data.detl[subItem.type] - 1]
+									subItem.submitVal = data.detl[subItem.type]
+								} else if (subItem.type == 'businessEndTimeDay') {
+									subItem.value = _this.businessEndTimeDays[0][data.detl[subItem.type] - 1]
+									subItem.submitVal = data.detl[subItem.type]
+								} else if (subItem.type == 'pcdStart') {
+									subItem.value = data.detl.pcdStart$
+									subItem.submitVal = data.detl.pcdStart
+								} else if (subItem.type == 'pcdEnd') {
+									subItem.value = data.detl.pcdEnd$
+									subItem.submitVal = data.detl.pcdEnd
+								} else {
+									subItem.value = data.detl[subItem.type]
+								}
+							} else {
+								subItem.value = data.detl[subItem.type]
+							}
+
+						}
+					}
+				}
+
+			})
+		},
+		mounted() {
+			this.handlePcd();
+		},
+		methods: {
+			getOrderId(condition) {
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/orderQueryName/auth`,
+					sslVerify: false,
+					header: {
+						'token': uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
+					},
+					method: 'POST',
+					data: {
+						condition: condition
+					},
+					success(res) {
+						res = res.data
+						_this.orderIds = []
+						_this.orderIdList = []
+						if (res.code === 200 && res.data) {
+							_this.orderIds2 = res.data
+							for (let k of res.data) {
+								_this.orderIds.push(k.value)
+								_this.orderIdList.push(k)
+							}
+
+						}
+					}
+
+				})
+			},
+			handlePcd() {
+				let sheng_s = '110000';
+				let shi_s = '110100';
+				let qu_s = '110101';
+
+				let sheng = [];
+				let shi = [];
+				let qu = [];
+				this.pcds.forEach((sheng_item, sheng_index) => {
+					if (sheng_item.value === sheng_s) {
+						this.defaultIndex[0] = sheng_index
+						sheng_item.children.forEach((shi_item, shi_index) => {
+							if (shi_item.value === shi_s) {
+								this.defaultIndex[1] = shi_index
+								shi_item.children.forEach((qu_item, qu_index) => {
+									if (qu_item.value === qu_s) {
+										this.defaultIndex[2] = qu_index
+									}
+									qu.push(qu_item.text);
+								})
+							}
+							shi.push(shi_item.text);
+						})
+					}
+					sheng.push(sheng_item.text);
+				});
+				this.columns.push(
+					JSON.parse(JSON.stringify(sheng)),
+					JSON.parse(JSON.stringify(shi)),
+					JSON.parse(JSON.stringify(qu))
+				);
+			},
+			changeHandler(e) {
+				const {
+					columnIndex,
+					value,
+					values, // values涓哄綋鍓嶅彉鍖栧垪鐨勬暟缁勫唴瀹�
+					index,
+					// 寰俊灏忕▼搴忔棤娉曞皢picker瀹炰緥浼犲嚭鏉ワ紝鍙兘閫氳繃ref鎿嶄綔
+					picker = this.$refs.uPicker
+				} = e;
+				// console.log('娴嬭瘯鏁版嵁', e);
+				// 褰撶涓�鍒楀�煎彂鐢熷彉鍖栨椂锛屽彉鍖栫浜屽垪(鍚庝竴鍒�)瀵瑰簲鐨勯�夐」
+				if (columnIndex === 0) {
+					// console.log(value)
+					// picker涓洪�夋嫨鍣╰his瀹炰緥锛屽彉鍖栫浜屽垪瀵瑰簲鐨勯�夐」
+					this.pcds.forEach(item => {
+						if (value[0] == item.text) {
+							let shi = [];
+							let flag = item.children[0].text;
+							item.children.forEach((val, ol) => {
+								shi.push(val.text);
+								if (shi[0] == flag) { //璁剧疆榛樿寮�鍏筹紙閫夋嫨鐪佷唤鍚庤缃粯璁ゅ煄甯傦級
+									flag = '';
+									let qu = [];
+									val.children.forEach(vol => {
+										qu.push(vol.text);
+									});
+									picker.setColumnValues(2, qu);
+								}
+							});
+							picker.setColumnValues(1, shi);
+						}
+					});
+				}
+				//褰撶浜屽垪鍙樺寲鏃讹紝绗笁鍒楀搴斿彉鍖�
+				if (columnIndex === 1) {
+					this.pcds.forEach(item => {
+						if (value[0] == item.text) {
+							let shi = [];
+							item.children.forEach((val, ol) => {
+								shi.push(val.text);
+								if (value[1] == val.text) {
+									let qu = [];
+									val.children.forEach(vol => {
+										qu.push(vol.text);
+									});
+									picker.setColumnValues(2, qu);
+								}
+							});
+						}
+					});
+				}
+			},
+			submit() {
+				let subPass = true
+				for (let k of this.form2) {
+					for (let sub of k.info) {
+						console.log(sub);
+						if (sub.inputType == 'select') {
+							this.form[sub.type] = sub.submitVal
+						} else if (sub.inputType == 'chose') {
+							if (!sub.unshow) {
+								for (let odd of this.orderIdList) {
+									if (sub.value == odd.value) {
+										this.form[sub.type] = odd.id
+									}
+								}
+							} else {
+								this.form[sub.type] = sub.submitVal
+							}
+						} else {
+							this.form[sub.type] = sub.value
+						}
+
+						if (sub.required) {
+							sub.placeholderStyle = 'font-size:20rpx;'
+							if (sub.value == '' || (sub.submitVal == '' && sub.submitVal < 0)) {
+								sub.placeholderStyle = 'font-size:20rpx;color:red'
+								subPass = false
+							}
+						}
+
+					}
+				}
+				console.log(this.form);
+				// subPass 琛ㄥ崟鏄惁濉啓瀹屾垚
+				if (subPass) {
+					if (this.type == 'add') {
+						this.formAdd(this.form)
+					} else {
+						this.form['id'] = this.id
+						this.form['orderId$'] = this.orderId$
+						this.formModi(this.form)
+					}
+				}
+			},
+			formAdd(form) {
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/businessTripOther/add/auth`,
+					header: {
+						'token': uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
+					},
+					sslVerify: false,
+					data: form,
+					method: 'POST',
+					success(res) {
+						res = res.data
+						if (res.code === 200) {
+							uni.showToast({
+								title: '娣诲姞鎴愬姛',
+								icon: "none",
+								position: 'top'
+							})
+							setTimeout(() => {
+								uni.navigateBack({})
+							}, 1000)
+						} else if (res.code === 500) {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								position: 'top'
+							})
+						} else {
+
+						}
+					}
+
+
+				})
+			},
+			formModi(form) {
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/businessTripOther/update/auth`,
+					header: {
+						'token': uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
+					},
+					sslVerify: false,
+					data: form,
+					method: 'POST',
+					success(res) {
+						res = res.data
+						if (res.code === 200) {
+							uni.showToast({
+								title: '淇敼鎴愬姛',
+								icon: "none",
+								position: 'top'
+							})
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 2
+								})
+							}, 1000)
+						} else if (res.code === 500) {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								position: 'top'
+							})
+						} else {
+
+						}
+					}
+
+
+				})
+			},
+			showPicker(e) {
+				switch (e) {
+					case 'businessTransportation':
+						this.businessTransportationShow = true
+						break;
+					case 'businessReturn':
+						this.businessReturnShow = true
+						break
+					case 'pcdStart':
+						this.pcdShow = true
+						break
+					case 'pcdEnd':
+						this.pcdEndShow = true
+						break
+					case 'businessStartTimeDay':
+						this.businessStartTimeDayShow = true
+						break
+					case 'businessEndTimeDay':
+						this.businessEndTimeDayShow = true
+						break
+				}
+			},
+			businessTransportationConfirm(e) {
+				// console.log('confirm', e)
+				this.form2[1].info[0].value = e.value[0]
+				this.form2[1].info[0].submitVal = e.indexs[0] + 1
+				this.businessTransportationShow = false
+			},
+			businessReturnConfirm(e) {
+				// console.log('confirm', e)
+				this.form2[1].info[1].value = e.value[0]
+				this.form2[1].info[1].submitVal = e.indexs[0]
+				this.businessReturnShow = false
+			},
+			businessStartTimeDayConfirm(e) {
+				// console.log('confirm', e)
+				this.form2[2].info[1].value = e.value[0]
+				this.form2[2].info[1].submitVal = e.indexs[0] + 1
+				this.businessStartTimeDayShow = false
+			},
+			businessEndTimeDayConfirm(e) {
+				// console.log('confirm', e)
+				this.form2[2].info[3].value = e.value[0]
+				this.form2[2].info[3].submitVal = e.indexs[0] + 1
+				this.businessEndTimeDayShow = false
+			},
+			pcdChangeHandler(e) {
+				const {
+					columnIndex,
+					value,
+					values, // values涓哄綋鍓嶅彉鍖栧垪鐨勬暟缁勫唴瀹�
+					index,
+					// 寰俊灏忕▼搴忔棤娉曞皢picker瀹炰緥浼犲嚭鏉ワ紝鍙兘閫氳繃ref鎿嶄綔
+					picker = this.$refs.uPicker
+				} = e
+				// 褰撶涓�鍒楀�煎彂鐢熷彉鍖栨椂锛屽彉鍖栫浜屽垪(鍚庝竴鍒�)瀵瑰簲鐨勯�夐」
+				if (columnIndex === 0) {
+					// picker涓洪�夋嫨鍣╰his瀹炰緥锛屽彉鍖栫浜屽垪瀵瑰簲鐨勯�夐」
+					picker.setColumnValues(1, this.columnData[index])
+				}
+			},
+			pcdStartConfirm(e) {
+				// console.log('confirm', e)
+				let pcd = data.citysData
+				pcd[e.indexs[0]]
+				// console.log(pcd[e.indexs[0]]);
+				this.pcdShow = false
+
+				// console.log(e.indexs)
+				let shen = data.citysData[e.indexs[0]]
+				// console.log(shen.value, shen.text)
+				let shi = shen.children[e.indexs[1]]
+				// console.log(shi.value, shi.code)
+				let qu = shi.children[e.indexs[2]]
+				// console.log(qu.value, qu.code)
+				// console.log(shen.value , shi.value, qu.value);
+				this.form2[1].info[4].value = e.value[0] + '/' + e.value[1] + '/' + e.value[2]
+				this.form2[1].info[4].submitVal = shen.value + ',' + shi.value + ',' + qu.value
+				// console.log(this.form2[1].info[4].value, this.form2[1].info[4].submitVal);
+			},
+			pcdEndConfirm(e) {
+				// console.log('confirm', e)
+				let pcd = data.citysData
+				pcd[e.indexs[0]]
+				// console.log(pcd[e.indexs[0]]);
+				this.pcdEndShow = false
+
+				// console.log(e.indexs)
+				let shen = data.citysData[e.indexs[0]]
+				// console.log(shen.value, shen.text)
+				let shi = shen.children[e.indexs[1]]
+				// console.log(shi.value, shi.code)
+				let qu = shi.children[e.indexs[2]]
+				// console.log(qu.value, qu.code)
+				// console.log(shen.value , shi.value, qu.value);
+				this.form2[1].info[6].value = e.value[0] + '/' + e.value[1] + '/' + e.value[2]
+				this.form2[1].info[6].submitVal = shen.value + ',' + shi.value + ',' + qu.value
+				// console.log(this.form2[1].info[6].value, this.form2[1].info[6].submitVal);
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.card {
+		min-height: 100rpx;
+		margin: 16rpx 20rpx 0 20rpx;
+		background-color: #fff;
+	}
+
+	.card-head {
+		min-height: 60rpx;
+		width: calc(100%-5px);
+		margin-left: 4px;
+		box-shadow: -4px 0 0px #2d8cf0;
+	}
+
+	.card-head-title {
+		/* background-color: #556655; */
+		padding-left: 6px;
+	}
+
+	.card-body {
+		margin: 8rpx 8rpx 0 8rpx;
+	}
+
+	.card-required {
+		color: red;
+		padding-right: 4rpx;
+	}
+
+	.flex {
+		display: flex;
+		align-items: center;
+	}
+
+	.flex-column {
+		display: flex;
+		flex-direction: column;
+	}
+
+	.floor {
+		height: 100rpx;
+		line-height: 100rpx;
+		width: 100%;
+		background-color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		display: flex;
+		align-items: center;
+		text-align: center;
+		letter-spacing: 10rpx;
+	}
+
+	.default {
+		flex: 2;
+	}
+
+	.default:active {
+		background-color: #eff0f1;
+	}
+
+	.primary {
+		flex: 3;
+		background-color: #2d8cf0;
+		color: #fff;
+	}
+
+	.primary:active {
+		background-color: #007dea;
+	}
+</style>
\ No newline at end of file
diff --git a/pages/business/goBusiness/businessTripOther.vue b/pages/business/goBusiness/businessTripOther.vue
index 6408114..1fce0ca 100644
--- a/pages/business/goBusiness/businessTripOther.vue
+++ b/pages/business/goBusiness/businessTripOther.vue
@@ -20,7 +20,26 @@
 			<u-search placeholder="杈撳叆" v-model="keyword" :clearabled="true" @custom="search()" @search="search()"></u-search>
 		</view>
 		
+		<view class="main-box">
+			<view class="box" v-for="item in list" @click="goDetl(item)">
+				<view style="display: flex;">
+					<view class="box-title" style="flex: 1;">{{item.userId$}}鎻愪氦鐨勫嚭宸敵璇�</view>
+					<view class="box-time">{{item.createTime$.substring(0,10)}}</view>
+				</view>
+				<view class="box-item">鍑哄樊浜嬬敱:{{item.businessTripReasons}}</view>
+				<view class="box-item">璺熻釜椤圭洰:{{item.orderId$}}</view>
+				<view style="display: flex;">
+					<view class="box-item" style="flex: 1;">鐘舵��:{{item.status$}}</view>
+					<view class="box-settle" :style="item.bgcolor">{{item.settle$}}</view>
+				</view>
+			</view>
+		</view>
+		
 		<u-empty v-if="true" icon="../../../static/image/emptyList.png" v-show="list.length <= 0" />
+		
+		<view class="fxbtn">
+			<uni-icons type="plusempty" color="#fff" @click="add()" ></uni-icons>
+		</view>
 		 
 	</view>
 </template>
@@ -49,7 +68,7 @@
 				that.falg = false
 			})
 			setTimeout(()=> {
-				// this.getCsmtr1()
+				this.getBusinessTripOther()
 			},50)
 			if (this.falg) {
 				this.getDetail()
@@ -73,6 +92,59 @@
 					});
 				}, 1000);
 			},
+			getBusinessTripOther() {
+				let _this = this
+				let param = {curr:1,limit:16,dept_id: 0,user_id: 67}
+				if (_this.user.type == 'user_id') {
+					param = {curr:1,limit:16,user_id: _this.user.id}
+				} else if(_this.user.type == 'dept_id') {
+					param = {curr:1,limit:16,dept_id: _this.user.id}
+				} else {
+					param = {curr:1,limit:16}
+				}
+				uni.request({
+					url: `${_this.baseUrl}/businessTripOther/list/auth`,
+					header: {
+						'token': uni.getStorageSync('token')
+					},
+					data: param,
+					success(res) {
+						res = res.data
+						if (res.code === 200) {
+							for (let k of res.data.records) {
+								if (k.settle == 2) {
+									k['bgcolor'] = 'color: #12d489'
+								} else if (k.settle == 1) {
+									k['bgcolor'] = 'color: #ffbd67'
+								}
+							}
+							_this.list = res.data.records
+						}
+						// _this.list = 
+					}
+				})
+			},
+			goDetl(e) {
+				uni.navigateTo({
+					url: '/pages/business/goBusiness/businessTripOtherDetl',
+					success: function(res) {
+						res.eventChannel.emit('businessTripOtherDetl', {
+							data: e
+						})
+					}
+				})
+			},
+			// 鍑哄樊鐢宠
+			add() {
+				uni.navigateTo({
+					url: '/pages/business/goBusiness/addBusinessTripOther',
+					success: function(res) {
+						res.eventChannel.emit('businessTripOtherDetl', {
+							data: 'add'
+						})
+					}
+				})
+			},
 			back() {
 				uni.navigateBack({
 				})
@@ -87,5 +159,58 @@
 </script>
 
 <style>
-
+	.flex-row {
+		display: flex;
+	}
+	
+	.flex-col {
+		display: flex;
+		flex-direction: column;
+	}
+	
+	.main-box {
+		/* margin: 16rpx; */
+		/* background-color: #FFF; */
+		border-radius: 20rpx;
+		padding: 8rpx;
+	}
+	
+	.box {
+		margin: 16rpx 8rpx;
+		/* height: 200px; */
+		box-shadow: 0 0 5px #dddddd;
+		background-color: #FFF;
+		padding: 16rpx 32rpx;
+		position: relative;
+		border-radius: 20rpx;
+		font-size: 24rpx;
+		color: #bdbdbd;
+	}
+	
+	.box-flag {
+		position: absolute;
+		right: 0;
+		top: 10rpx;
+		background-color: #74B9E9;
+		padding: 6rpx;
+		font-size: 10rpx;
+		color: #FFF;
+	}
+	
+	.box-time {
+		color: #bdbdbd;
+	}
+	
+	.box-settle {
+		font-size: 26rpx;
+		/* font-weight: bold; */
+	}
+	
+	.box-title {
+		font-size: 28rpx;
+		font-weight: bold;
+		color: #000;
+	}
+	
+	.box-single-row {}
 </style>
diff --git a/pages/business/goBusiness/businessTripOtherDetl.vue b/pages/business/goBusiness/businessTripOtherDetl.vue
new file mode 100644
index 0000000..776ba9d
--- /dev/null
+++ b/pages/business/goBusiness/businessTripOtherDetl.vue
@@ -0,0 +1,231 @@
+<template>
+	<view>
+		<view class="status_bar">
+			<!-- 杩欓噷鏄姸鎬佹爮 -->
+		</view>
+		<uni-nav-bar left-icon="left" title="璇︽儏" @clickLeft="back" @clickRight="scan" :fixed="true" :border="false"
+			rightWidth="160rpx" leftWidth="160rpx">
+		</uni-nav-bar>
+		<view class="main-box">
+			<view class="box" v-for="item in list">
+				<view class="box-single-row flex-row" v-for="rule in listRule">
+					<view style="flex: 1;">{{rule.label}}</view>
+					<view style="flex: 4;">{{item[rule.attribute]}}</view>
+				</view>
+			</view>
+		</view>
+		
+		<view class="floor">
+			<view class="wran">鍒犻櫎</view>
+			<view class="default" v-show="settle == 1" @click="edit()">淇敼</view>
+			<view class="primary" @click="submit()">{{subTitle}}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				settle: 1,
+				subTitle: '鐢宠鎶ラ攢',
+				list: [{
+					businessTripReasons: '娌熼�氱珛搴撲簨瀹�',
+					businessTransportation$: '浜ら�氬伐鍏�',
+					businessStartAddr$: '鍑哄彂鍦�',
+					businessEndAddr$: '鐩殑鍦�',
+					businessStartTimeDay$: '鍑哄彂鏃ユ湡',
+					businessEndTimeDay$: '缁撴潫鏃ユ湡',
+					businessDuration$: '鍑哄樊鏃堕暱',
+					businessTripDays$: '鍑哄樊澶╂暟',
+					businessPeers: '鍚岃浜�',
+					userId$: '鐢宠浜�',
+					orderId: '璺熻釜椤圭洰',
+					updateTime$: '鏇存柊鏃堕棿',
+					updateId$: '鏇存柊浜哄憳',
+					settle: 1,
+					settle$: '鐢宠閫氳繃',
+					businessNotes: '鍑哄樊澶囨敞',
+					createTime$: '2023-11-06 08:51:24',
+					bgcolor: 'color:#24ab59'
+				}, ],
+				listRule: [
+					{
+						label: "鍑哄樊浜嬬敱",
+						attribute: "businessTripReasons",
+					},
+					{
+						label: "閲戦",
+						attribute: "amountOfMoney$",
+					},
+					{
+						label: "鐢宠浜�",
+						attribute: "userId$",
+					},
+					{
+						label: "鎵�灞為儴闂�",
+						attribute: "deptId$",
+					},
+					{
+						label: "璺熻釜椤圭洰",
+						attribute: "orderId$",
+					},
+					{
+						label: "杩涘害",
+						attribute: "settle$",
+					},
+					
+					{
+						label: "鐘舵��",
+						attribute: "status$",
+					},
+					{
+						label: "鍑哄樊澶囨敞",
+						attribute: "businessNotes",
+					},
+					{
+						label: "鏇存柊鏃堕棿",
+						attribute: "updateTime$",
+					},
+					{
+						label: "鏇存柊浜哄憳",
+						attribute: "updateId$",
+					},
+				],
+			}
+		},
+		onLoad(option) {
+			let _this = this
+			_this.list = []
+			const eventChannel = this.getOpenerEventChannel();
+			eventChannel.on('businessTripOtherDetl', function(data) {
+				_this.list.push(data.data)
+				_this.settle = data.data.settle
+				if (data.data.settle == 1) {
+					_this.subTitle = '瀹℃壒'
+				}
+			})
+		},
+		methods: {
+			submit() {
+				if (this.settle == 1) {
+					this.approval()
+				} else {
+					this.reimburse()
+				}
+			},
+			// 瀹℃壒
+			approval() {
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/businessTripOther/approval/auth`,
+					header: { 
+						'token': uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
+					},
+					method: 'POST',
+					sslVerify: false,
+					data: {planId: _this.list[0].id},
+					success(res) {
+						res = res.data
+						// console.log(res);
+						if (res.code === 200) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'})
+							setTimeout(()=>{
+								uni.navigateBack({})
+							},1000)
+						} else if (res.code === 500) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'})
+						}
+					}
+				})
+			},
+			// 鐢宠鎶ラ攢
+			reimburse() {
+				let _this = this
+				uni.navigateTo({
+					url: '/pages/business/goBusiness/modiReimburseOnlineDetl',
+					success: function(res) {
+						res.eventChannel.emit('reimburseOnlineDetl', {
+							data: 'add2',
+							detl: _this.list[0]
+						})
+					}
+				})
+			},
+			edit() {
+				let _this = this
+				uni.navigateTo({
+					url: '/pages/business/goBusiness/addBusinessTripOther',
+					success: function(res) {
+						res.eventChannel.emit('modiGoBusinessDetl', {
+							data: 'modi',
+							detl: _this.list[0]
+						})
+					}
+				})
+			},
+			back() {
+				uni.navigateBack({})
+			},
+			scan() {
+
+			}
+		}
+	}
+</script>
+
+<style>
+	.main-box {
+		border-radius: 20rpx;
+		padding: 8rpx;
+	}
+
+	.box {
+		margin: 16rpx 8rpx;
+		/* height: 200px; */
+		box-shadow: 0 0 5px #dddddd;
+		background-color: #FFF;
+		padding: 16rpx 32rpx;
+		position: relative;
+		border-radius: 20rpx;
+		font-size: 24rpx;
+		/* color: #bdbdbd; */
+	}
+	.box-single-row {
+		display: flex;
+	}
+	
+	.floor {
+		height: 100rpx;
+		line-height: 100rpx;
+		width: 100%;
+		background-color: #fff;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		display: flex;
+		align-items: center;
+		text-align: center;
+		letter-spacing: 10rpx;
+	}
+	.default {
+		flex: 2;
+	}
+	.default:active {
+		background-color: #eff0f1;
+	}
+	.wran {
+		flex: 1;
+		background-color: #ff5722;
+		color: #fff;
+	}
+	.primary {
+		flex: 2;
+		background-color: #2d8cf0;
+		color: #fff;
+	}
+	.primary:active {
+		background-color: #007dea;
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.1