Browse Source

no message

xiaoxin 2 years ago
parent
commit
224ac84dcb

+ 18 - 13
pagesRepairs/addGoods/addGoods.vue

@@ -18,17 +18,16 @@
 		</view>
 
 		<!-- 备注区域 -->
-		<view class="notes" v-if="activeIndex === 4">
+		<view class="notes" v-if="list[activeIndex] === '其他'">
 			<view class="notes_title">备注</view>
 			<view class="notes_textarea">
-				<textarea placeholder-style="color:#CCCCCC" placeholder="请输入您的备注" maxlength="150" @input="handleInput"></textarea>
+				<textarea placeholder-style="color:#CCCCCC" placeholder="请输入您的备注" maxlength="150" v-model="textareaValue" @input="handleInput"></textarea>
 
 				<view class="notes_num">{{ textLength }}/150</view>
 			</view>
 		</view>
-		<view class="notes2" v-else></view>
 
-		<view class="btn" @click="handleAffirm">确认</view>
+		<view class="btn" v-if="list[activeIndex] === '其他'" @click="handleAffirm">确认</view>
 	</view>
 </template>
 
@@ -38,6 +37,8 @@ export default {
 		return {
 			// 搜索框绑定数据
 			searchValue: '',
+			// 备注输入框绑定数据
+			textareaValue: '',
 			// 输入框当前输入数据的长度
 			textLength: 0,
 			// 左边数组的索引
@@ -53,11 +54,15 @@ export default {
 	methods: {
 		// 确认按钮回调
 		handleAffirm() {
-			// console.log(this.List2[this.activeIndex2])
-			uni.$emit('addConsumable', {
-				data: this.List2[this.activeIndex2]
-			})
-			uni.navigateBack(1)
+			if (this.textareaValue) {
+				this.List2.push(this.textareaValue)
+				this.textareaValue = ''
+			} else {
+				uni.showToast({
+					title: '请输入备注',
+					icon: 'none'
+				})
+			}
 		},
 		// 左边数组切换回调
 		handleChange(index) {
@@ -66,6 +71,10 @@ export default {
 		// 右边数组切换回调
 		handleChange2(index) {
 			this.activeIndex2 = index
+			uni.$emit('addConsumable', {
+				data: this.List2[this.activeIndex2]
+			})
+			uni.navigateBack(1)
 		},
 		// 输入框输入值变化回调
 		handleInput(e) {
@@ -193,10 +202,6 @@ export default {
 		}
 	}
 
-	.notes2 {
-		height: 150rpx;
-	}
-
 	.btn {
 		display: flex;
 		justify-content: center;

+ 13 - 2
pagesRepairs/addressBook/addressBook.vue

@@ -123,7 +123,7 @@ export default {
 		}
 	},
 	mounted() {
-		console.log(666)
+		console.log('通讯录页面加载')
 	},
 	methods: {
 		handleEdit(item) {
@@ -136,7 +136,18 @@ export default {
 							url: '/pagesRepairs/edit/edit'
 						})
 					} else if (res.tapIndex === 1) {
-						console.log('删除')
+						uni.showModal({
+							title: '提示',
+							content: `确定删除${item.name}吗?`,
+							success: (res) => {
+								if (res.confirm) {
+									uni.showToast({
+										title: '删除成功',
+										icon: 'success'
+									})
+								}
+							}
+						})
 					}
 				},
 				fail: (res) => {}

+ 38 - 20
pagesRepairs/box/box.vue

@@ -36,26 +36,6 @@ export default {
 		MyRepairs,
 		Tabbar
 	},
-	mounted() {
-		const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
-		if (repairsUserInfo.routes) {
-			this.routes = this.filterRoute(this.list, repairsUserInfo.routes)
-		}
-		const currentIndexRepairs = uni.getStorageSync('currentIndexRepairs')
-		if (currentIndexRepairs) {
-			this.currentRouter = currentIndexRepairs
-			this.show = this.routes[currentIndexRepairs].show
-			uni.setNavigationBarTitle({
-				title: this.routes[currentIndexRepairs].text
-			})
-		} else {
-			this.currentRouter = 0
-			this.show = this.routes[0].show
-			uni.setNavigationBarTitle({
-				title: this.routes[0].text
-			})
-		}
-	},
 	data() {
 		return {
 			// 展示的路由
@@ -105,7 +85,45 @@ export default {
 			currentRouter: 0
 		}
 	},
+	mounted() {
+		// 获取权限路由
+		const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
+		if (repairsUserInfo.routes) {
+			this.routes = this.filterRoute(this.list, repairsUserInfo.routes)
+		}
+		// 获取当前激活的路由
+		const currentIndexRepairs = uni.getStorageSync('currentIndexRepairs')
+		if (currentIndexRepairs) {
+			this.currentRouter = currentIndexRepairs
+			this.show = this.routes[currentIndexRepairs].show
+			uni.setNavigationBarTitle({
+				title: this.routes[currentIndexRepairs].text
+			})
+		} else {
+			this.currentRouter = 0
+			this.show = this.routes[0].show
+			uni.setNavigationBarTitle({
+				title: this.routes[0].text
+			})
+		}
+	},
+	onLoad() {
+		uni.$on('goToRepairs', this.goToRepairs)
+		console.log('box页面加载')
+	},
+	onUnload() {
+		// 移除全局自定义事件监听器
+		uni.$off()
+	},
 	methods: {
+		// 全局自定义事件
+		goToRepairs(e) {
+			// console.log(e)
+			this.show = e.show
+			uni.setNavigationBarTitle({
+				title: e.title
+			})
+		},
 		// 底部导航栏切换回调
 		handleChangeRouter(show, text, e) {
 			uni.setStorageSync('currentIndexRepairs', e)

+ 53 - 10
pagesRepairs/edit/edit.vue

@@ -5,7 +5,7 @@
 		<view class="box">
 			手机
 			<view class="box_input">
-				<input type="text" v-model="phone" />
+				<input type="number" maxlength="11" placeholder="请输入手机号码" v-model="phone" />
 			</view>
 		</view>
 
@@ -33,7 +33,7 @@
 
 		<view class="box_time">
 			<view class="time">
-				<input type="text" v-model="time" />
+				<input type="text" v-model="receivingTime" />
 				<img src="../../static/images/repairsImg/clock.png" />
 			</view>
 			分钟
@@ -43,7 +43,7 @@
 
 		<view class="box_time">
 			<view class="time">
-				<input type="text" v-model="time2" />
+				<input type="text" v-model="repairsTime" />
 				<img src="../../static/images/repairsImg/clock.png" />
 			</view>
 			分钟
@@ -58,28 +58,71 @@
 export default {
 	data() {
 		return {
+			// 手机号码
 			phone: '13659864589',
-			time: 10,
-			time2: 15,
+			// 接单考核时间
+			receivingTime: 0,
+			// 维修考核时间
+			repairsTime: 0,
+			// 状态数组
 			array: ['接单中', '停止接单', '订单饱和'],
+			// 状态数组当前索引
 			index: 0,
+			// 工种数组
 			array2: ['电工', '水工', '泥工', '空调'],
+			// 工种数组当前索引
 			index2: 0
 		}
 	},
 	methods: {
+		// 确认提交按钮回调
 		handleSub() {
-			// uni.navigateBack(1)
-			uni.navigateTo({
-				url: '/pagesRepairs/box/box'
+			if (!this.phone) {
+				uni.showToast({
+					title: '请输入手机号码',
+					icon: 'none'
+				})
+				return
+			}
+			const rePhone = /^[1][3,4,5,7,8,9][0-9]{9}$/
+			if (!rePhone.test(this.phone)) {
+				uni.showToast({
+					title: '手机号码格式有误',
+					icon: 'none'
+				})
+				return
+			}
+			uni.showModal({
+				title: '提示',
+				content: '确认提交吗?',
+				success: (res) => {
+					if (res.confirm) {
+						console.log(this.phone)
+						console.log(this.array[this.index])
+						console.log(this.array2[this.index2])
+						console.log(this.receivingTime)
+						console.log(this.repairsTime)
+
+						uni.showToast({
+							title: '编辑成功',
+							icon: 'success'
+						})
+
+						setTimeout(() => {
+							uni.navigateTo({
+								url: '/pagesRepairs/box/box'
+							})
+						}, 1500)
+					}
+				}
 			})
 		},
+		// 状态选择框选择回调
 		bindPickerChange(e) {
-			console.log('picker发送选择改变,携带值为', e.detail.value)
 			this.index = e.detail.value
 		},
+		// 工种选择框选择回调
 		bindPickerChange2(e) {
-			console.log('picker发送选择改变,携带值为', e.detail.value)
 			this.index2 = e.detail.value
 		}
 	}

+ 20 - 12
pagesRepairs/help/help.vue

@@ -101,19 +101,27 @@ export default {
 		},
 		// 确认按钮回调
 		handleAffirm() {
-			console.log(this.recordingPath)
-			console.log(this.desc)
-			console.log(this.peoples)
-			uni.showToast({
-				title: '提交协作申请成功,请等待管理员审核',
-				icon: 'none',
-				duration: 3000
+			uni.showModal({
+				title: '提示',
+				content: '确认提交协作申请吗?',
+				success: (res) => {
+					if (res.confirm) {
+						console.log(this.recordingPath)
+						console.log(this.desc)
+						console.log(this.peoples)
+						uni.showToast({
+							title: '提交协作申请成功,请等待管理员审核',
+							icon: 'none',
+							duration: 3000
+						})
+						setTimeout(() => {
+							uni.redirectTo({
+								url: '/pagesRepairs/box/box'
+							})
+						}, 3000)
+					}
+				}
 			})
-			setTimeout(() => {
-				uni.redirectTo({
-					url: '/pagesRepairs/box/box'
-				})
-			}, 3000)
 		},
 		handleHelpPeople() {
 			uni.navigateTo({

+ 79 - 42
pagesRepairs/home/home.vue

@@ -1,29 +1,9 @@
 <template>
 	<view class="container">
-		<view class="top_bg" @click="permission = !permission"></view>
+		<view class="top_bg"></view>
 
-		<!-- 状态统计区域 -->
-		<view class="top_types" v-if="!permission">
-			<view class="types_box">
-				<view class="box_num">100</view>
-				<view class="box_info">工单数</view>
-			</view>
-
-			<view class="types_box">
-				<view class="box_num">10</view>
-				<view class="box_info">处理中</view>
-			</view>
-			<view class="types_box">
-				<view class="box_num">50</view>
-				<view class="box_info">已完成</view>
-			</view>
-			<view class="types_box">
-				<view class="box_num">60</view>
-				<view class="box_info">已超时</view>
-			</view>
-		</view>
-
-		<view class="top_types2" v-else>
+		<!-- 状态统计区域 后勤管理端 -->
+		<view class="top_types2" v-if="btns.includes('首页分段器')">
 			<view class="top">
 				<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#6FB6B8"></uni-segmented-control>
 			</view>
@@ -48,6 +28,27 @@
 			</view>
 		</view>
 
+		<!-- 状态统计区域 维修师傅端 -->
+		<view class="top_types" v-else>
+			<view class="types_box">
+				<view class="box_num">100</view>
+				<view class="box_info">工单数</view>
+			</view>
+
+			<view class="types_box">
+				<view class="box_num">10</view>
+				<view class="box_info">处理中</view>
+			</view>
+			<view class="types_box">
+				<view class="box_num">50</view>
+				<view class="box_info">已完成</view>
+			</view>
+			<view class="types_box">
+				<view class="box_num">60</view>
+				<view class="box_info">已超时</view>
+			</view>
+		</view>
+
 		<!-- 排班区域 -->
 		<view class="watch">
 			<view class="watch_title">
@@ -71,7 +72,7 @@
 					<uni-td align="center">{{ item.type }}</uni-td>
 					<!-- 状态区域 -->
 					<uni-td align="center">
-						<picker @change="bindPickerChange($event, item)" :range="typeArray">
+						<picker :disabled="!btns.includes('表格编辑')" @change="bindPickerChange($event, item)" :range="typeArray">
 							<view class="watch_color" v-if="item.status == '0'">{{ typeArray[item.status] }}</view>
 							<view class="watch_color2" v-if="item.status == '1'">{{ typeArray[item.status] }}</view>
 							<view class="watch_color3" v-if="item.status == '2'">{{ typeArray[item.status] }}</view>
@@ -79,13 +80,13 @@
 					</uni-td>
 					<!-- 是否值班 -->
 					<uni-td align="center">
-						<view @click="handleChange(item, index)">{{ item.work.toString() }}</view>
+						<view @click="handleChange(item, index)">{{ getCutting(item.work) }}</view>
 					</uni-td>
 				</uni-tr>
 			</uni-table>
 
 			<!-- 是否值班弹窗区域 -->
-			<uni-popup ref="popup_work">
+			<uni-popup ref="popup_work" background-color="#fff">
 				<view class="watch_pop">
 					<view class="poop_title">
 						<view class="cancel" @click="$refs.popup_work.close()">取消</view>
@@ -97,7 +98,7 @@
 							<view class="body_item_info">
 								{{ item }}
 							</view>
-							<view class="body_item_icon" v-if="defaultIndex.includes(item)">✔</view>
+							<view class="body_item_icon" v-if="defaultList.includes(item)">✔</view>
 						</view>
 					</view>
 				</view>
@@ -113,15 +114,13 @@
 			<!-- 排行榜柱状图 -->
 			<view class="rank_charts">
 				<!-- 加上canvas2d属性后 模拟器上图表显示异常,真机调试没有问题,开发时不添加canvas2d属性,发布时添加canvas2d属性 -->
-
-				<!-- :canvas2d="true" -->
 				<qiun-data-charts type="bar" :opts="opts" :chartData="chartData" />
 			</view>
 		</view>
 
 		<!-- 悬浮按钮区域 -->
 		<view class="fixed">
-			<img src="../../static/images/repairsImg/add.png" />
+			<img src="../../static/images/repairsImg/add.png" @click="handleGoRepairs" />
 			<uni-badge :offset="[5, 5]" absolute="rightTop" text="8">
 				<img class="img" src="../../static/images/repairsImg/message.png" @click="handleGoMsg" />
 			</uni-badge>
@@ -133,13 +132,21 @@
 export default {
 	data() {
 		return {
-			defaultIndex: [],
+			// 按钮权限
+			btns: [],
+			// 是否值班弹窗默认选中数组
+			defaultList: [],
+			// 改变的是第几个索引
 			changeIndex: 0,
+			// 排班状态数组
 			typeArray: ['接单中', '订单饱和', '停止接单'],
+			// 值班状态数组
 			workArray: ['正常班次', '值班班次'],
-			permission: true,
+			// 分段器数组数据
 			items: ['团队数据统计', '个人数据统计'],
+			// 分段器当前索引
 			current: 0,
+			// 柱状图数据
 			chartData: {
 				categories: ['张三', '李四', '王五', '老六', '刘八'],
 				series: [
@@ -161,6 +168,8 @@ export default {
 				xAxis: {
 					boundaryGap: 'justify',
 					disableGrid: false,
+					gridType: 'dash',
+					gridColor: '#E5E5E5',
 					min: 0,
 					axisLine: false,
 					max: 40
@@ -181,6 +190,7 @@ export default {
 					}
 				}
 			},
+			// 表格数据
 			// status状态: 0 接单中  1 订单饱和  2 停止接单
 			// work状态: 0 正常班次  1 值班班次
 			tableData: [
@@ -223,7 +233,12 @@ export default {
 			]
 		}
 	},
-	mounted() {},
+	mounted() {
+		console.log('主页页面加载')
+		const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
+		this.btns = repairsUserInfo.btns
+		console.log(this.btns)
+	},
 	methods: {
 		// 是否值班弹窗确定按钮回调
 		handlePopConfirm() {
@@ -232,7 +247,7 @@ export default {
 				content: '确定修改是否值班状态吗?',
 				success: (res) => {
 					if (res.confirm) {
-						this.tableData[this.changeIndex].work = this.defaultIndex
+						this.tableData[this.changeIndex].work = this.defaultList
 						console.log('用户点击确定')
 					} else if (res.cancel) {
 						console.log('用户点击取消')
@@ -243,17 +258,19 @@ export default {
 		},
 		// 点击值班状态回调
 		handleChange(item, index) {
-			this.$refs.popup_work.open('bottom')
-			this.changeIndex = index
-			this.defaultIndex = JSON.parse(JSON.stringify(item.work))
+			if (this.btns.includes('表格编辑')) {
+				this.$refs.popup_work.open('bottom')
+				this.changeIndex = index
+				this.defaultList = JSON.parse(JSON.stringify(item.work))
+			}
 		},
 		// 切换值班状态回调
 		handleChangeWork(item) {
-			if (this.defaultIndex.includes(item)) {
-				const temIndex = this.defaultIndex.indexOf(item)
-				this.defaultIndex.splice(temIndex, 1)
+			if (this.defaultList.includes(item)) {
+				const temIndex = this.defaultList.indexOf(item)
+				this.defaultList.splice(temIndex, 1)
 			} else {
-				this.defaultIndex.push(item)
+				this.defaultList.push(item)
 			}
 		},
 
@@ -273,18 +290,37 @@ export default {
 			})
 		},
 
-		// 点击悬浮按钮回调
+		// 点击悬浮消息按钮回调
 		handleGoMsg() {
 			uni.navigateTo({
 				url: '/pagesRepairs/message/message'
 			})
 		},
+		// 点击悬浮加号按钮回调
+		handleGoRepairs() {
+			uni.$emit('goToRepairs', {
+				show: 'repairs',
+				title: '报修'
+			})
+		},
 		// 顶部分段器切换回调
 		onClickItem(e) {
 			if (this.current != e.currentIndex) {
 				this.current = e.currentIndex
 				console.log(this.current)
 			}
+		},
+		// 把数组每一项的第一个文字切割出来
+		getCutting(list) {
+			let str = ''
+			list.forEach((ele, index) => {
+				if (index + 1 == list.length && list.length > 1) {
+					str += '、' + ele.substring(0, 1)
+				} else {
+					str += ele.substring(0, 1)
+				}
+			})
+			return str
 		}
 	}
 }
@@ -294,6 +330,7 @@ export default {
 .container {
 	width: 100vw;
 	height: calc(100vh - 152rpx);
+	font-size: 32rpx;
 	overflow-y: auto;
 
 	.top_bg {

+ 40 - 9
pagesRepairs/index/index.vue

@@ -20,21 +20,51 @@ export default {
 			showLogin: false,
 			// 获取用户信息
 			appid: 'wxd6f090391d410534',
-			repairsUserInfo: {
-				routes: ['首页', '工单管理', '待处理池']
-			},
+			// repairsUserInfo: {
+			// 	routes: ['首页', '工单管理', '待处理池']
+			// },
 			// 用户路由
-			userList: ['报修', '我的报修'],
+			userListInfo: {
+				routes: ['报修', '我的报修'],
+				btns: []
+			},
 			// 师傅路由
-			workerList: ['首页', '工单管理', '待处理池'],
+			workerListInfo: {
+				routes: ['首页', '工单管理', '待处理池'],
+				btns: ['协作', '接单', '转单', '报价', '维修完成']
+			},
 			// 后勤路由
-			logisticsList: ['首页', '工单管理', '待处理池', '通讯录'],
+			logisticsListInfo: {
+				routes: ['首页', '工单管理', '待处理池', '通讯录'],
+				btns: ['表格编辑', '延时', '派单', '审核', '分段器按钮']
+			},
 			// 管理者路由
-			adminList: ['首页', '工单管理', '待处理池', '通讯录']
+			adminListInfo: {
+				routes: ['首页', '工单管理', '待处理池', '通讯录'],
+				btns: ['首页分段器', '表格编辑', '工单管理分段器', '延时', '派单', '审核', '接单', '报价', '维修完成']
+			}
 		}
 	},
 	mounted() {
-		this.hasUserInfo()
+		// this.hasUserInfo()
+		uni.setStorageSync('currentIndexRepairs', 0)
+		uni.showActionSheet({
+			itemList: ['用户', '维修师傅', '管理员', '后勤'],
+			success: (res) => {
+				if (res.tapIndex == 0) {
+					uni.setStorageSync('repairsUserInfo', this.userListInfo)
+				} else if (res.tapIndex == 1) {
+					uni.setStorageSync('repairsUserInfo', this.workerListInfo)
+				} else if (res.tapIndex == 2) {
+					uni.setStorageSync('repairsUserInfo', this.adminListInfo)
+				} else if (res.tapIndex == 3) {
+					uni.setStorageSync('repairsUserInfo', this.logisticsListInfo)
+				}
+				uni.reLaunch({
+					url: '/pagesRepairs/box/box'
+				})
+			}
+		})
 	},
 	methods: {
 		// 检查是否存在用户信息
@@ -47,10 +77,11 @@ export default {
 				})
 			} else {
 				console.log('重新授权')
-				uni.setStorageSync('repairsUserInfo', this.repairsUserInfo)
+				uni.setStorageSync('repairsUserInfo', this.userListInfo)
 				uni.reLaunch({
 					url: '/pagesRepairs/box/box'
 				})
+
 				// this.showLogin = true
 				// this.visible = true
 			}

+ 180 - 62
pagesRepairs/management/management.vue

@@ -1,29 +1,9 @@
 <template>
 	<view class="container">
-		<view class="top_bg" @click="permission = !permission"></view>
+		<view class="top_bg"></view>
 
-		<!-- 状态统计区域 -->
-		<view class="top_types" v-if="!permission">
-			<view class="types_box">
-				<view class="box_num">100</view>
-				<view class="box_info">待接单</view>
-			</view>
-
-			<view class="types_box">
-				<view class="box_num">10</view>
-				<view class="box_info">维修中</view>
-			</view>
-			<view class="types_box">
-				<view class="box_num">50</view>
-				<view class="box_info">已超时</view>
-			</view>
-			<view class="types_box">
-				<view class="box_num">60</view>
-				<view class="box_info">待审核</view>
-			</view>
-		</view>
-
-		<view class="top_types2" v-else>
+		<!-- 状态统计区域 后勤管理端 -->
+		<view class="top_types2" v-if="btns.includes('工单管理分段器')">
 			<view class="top">
 				<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#6FB6B8"></uni-segmented-control>
 			</view>
@@ -56,6 +36,36 @@
 			</view>
 		</view>
 
+		<!-- 状态统计区域 维修师傅端 -->
+		<view class="top_types" v-else>
+			<view class="types_box">
+				<view class="box_num">100</view>
+				<view class="box_info">待接单</view>
+			</view>
+
+			<view class="types_box">
+				<view class="box_num">10</view>
+				<view class="box_info">维修中</view>
+			</view>
+			<view class="types_box">
+				<view class="box_num">50</view>
+				<view class="box_info">已超时</view>
+			</view>
+			<view class="types_box">
+				<view class="box_num">60</view>
+				<view class="box_info">待审核</view>
+			</view>
+
+			<view class="types_box" v-if="btns.includes('分段器按钮')">
+				<view class="box_num">50</view>
+				<view class="box_info">已完成</view>
+			</view>
+			<view class="types_box" v-if="btns.includes('分段器按钮')">
+				<view class="box_num">60</view>
+				<view class="box_info">已关单</view>
+			</view>
+		</view>
+
 		<!-- 订单列表区域 -->
 		<view class="body">
 			<!-- 每一个订单区域 -->
@@ -64,8 +74,8 @@
 				<view class="item_title">
 					<img src="../../static/images/repairsImg/order.png" />
 					<view class="title_info">工单编号:{{ item.order }}</view>
-					<view class="title_type" v-if="item.overtime">超时未接</view>
 				</view>
+
 				<!-- 报修时间 -->
 				<view class="item_time">
 					<view class="time_msg">
@@ -85,6 +95,7 @@
 				<view class="item_box">
 					<view class="box_key">报修姓名:</view>
 					<view class="box_value">{{ item.name }}</view>
+					<view class="box_type" v-if="item.overtime">超时未接</view>
 				</view>
 
 				<!-- 报修电话 -->
@@ -155,16 +166,16 @@
 				<!-- 按钮区域 -->
 				<view class="item_btn">
 					<img v-if="item.type < 3" src="../../static/images/repairsImg/close.png" @click="handleClose" />
-					<img class="img" src="../../static/images/repairsImg/help.png" v-if="item.type === 1 && !permission" @click="handleHelp" />
-					<view class="btn_box type" v-if="item.type < 3 && permission" @click="handleDelay">延时</view>
-					<view class="btn_box type" v-if="item.type === 1" @click="handleOrderReceiving">接单</view>
-					<view class="btn_box type2" v-if="item.type === 1 && !permission" @click="handleTransferOrder">转单</view>
-					<view class="btn_box type2" v-if="item.type === 1 && permission" @click="handleSendOrder">派单</view>
-					<view class="btn_box type" v-if="item.type === 2" @click="handleOffer">报价</view>
-					<view class="btn_box type2" v-if="item.type === 2" @click="handleFinish">维修完成</view>
-
-					<view class="btn_box type" v-if="item.type === 3 && permission" @click="handleAudit(item.status)">审核</view>
-					<view class="btn_box type" v-if="item.type === 5">改价</view>
+					<img class="img" src="../../static/images/repairsImg/help.png" v-if="item.type === 1 && btns.includes('协作')" @click="handleHelp" />
+					<view class="btn_box type" v-if="item.type < 3 && btns.includes('延时')" @click="handleDelay">延时</view>
+					<view class="btn_box type" v-if="item.type === 1 && btns.includes('接单')" @click="handleOrderReceiving">接单</view>
+					<view class="btn_box type2" v-if="item.type === 1 && btns.includes('转单')" @click="handleTransferOrder">转单</view>
+					<view class="btn_box type2" v-if="item.type === 1 && btns.includes('派单')" @click="handleSendOrder">派单</view>
+					<view class="btn_box type" v-if="item.type === 2 && btns.includes('报价')" @click="handleOffer">报价</view>
+					<view class="btn_box type2" v-if="item.type === 2 && btns.includes('维修完成')" @click="handleFinish">维修完成</view>
+
+					<view class="btn_box type" v-if="item.type === 3 && btns.includes('审核')" @click="handleAudit(item.status)">审核</view>
+					<view class="btn_box type" v-if="item.type === 5" @click="handleChangeOffer">改价</view>
 					<view class="btn_box type2" v-if="item.type === 5" @click="handleLeaveWords">留言</view>
 				</view>
 
@@ -235,7 +246,8 @@
 export default {
 	data() {
 		return {
-			permission: true,
+			// 按钮权限
+			btns: [],
 			// 留言弹窗输入框绑定数据
 			leaveWords: '',
 			// 顶部分段器数组
@@ -249,7 +261,92 @@ export default {
 			// type为 1 是 待接单,type为 2 是维修中,
 			// type为 3 是 待审核,type为 4 是已完成,
 			// type为 5 是 待确认,type为 6 是已关单,
-			dataList: [
+			dataList: [],
+			temList: [
+				{
+					id: 1,
+					order: '656262219626262',
+					overtime: true,
+					time: '2023.07.05  09:25:26',
+					type: 1,
+					name: '张三',
+					phone: '13659585689',
+					area: '行政楼',
+					address: '3楼309',
+					goods: '电脑',
+					description: '水龙头坏了',
+					img: [
+						'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
+						'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
+						'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
+					]
+				},
+				{
+					id: 2,
+					order: '956262219626262',
+					overtime: false,
+					time: '2023.07.05  09:25:26',
+					type: 2,
+					name: '李四',
+					phone: '13659585689',
+					area: '行政楼',
+					address: '3楼309',
+					goods: '电脑',
+					description: '电脑坏了',
+					img: [
+						'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
+						'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
+						'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
+					],
+					workerName: '老张',
+					workerPhone: '13659585689'
+				},
+				{
+					id: 3,
+					order: '956262219626262',
+					overtime: false,
+					time: '2023.07.05  09:25:26',
+					type: 3,
+					name: '李四',
+					phone: '13659585689',
+					area: '行政楼',
+					address: '3楼309',
+					goods: '电脑',
+					description: '电脑坏了',
+					img: [
+						'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
+						'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
+						'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
+					],
+					workerName: '老张',
+					workerPhone: '13659585689',
+					money: 50,
+					status: 1
+				},
+				{
+					id: 369,
+					order: '956262219626262',
+					overtime: false,
+					time: '2023.07.05  09:25:26',
+					type: 3,
+					name: '李四',
+					phone: '13659585689',
+					area: '行政楼',
+					address: '3楼309',
+					goods: '电脑',
+					description: '电脑坏了',
+					img: [
+						'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
+						'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
+						'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
+					],
+					workerName: '老张',
+					workerPhone: '13659585689',
+					money: 50,
+					status: 2
+				}
+			],
+			temList2: [
 				{
 					id: 1,
 					order: '656262219626262',
@@ -398,6 +495,17 @@ export default {
 			]
 		}
 	},
+	mounted() {
+		console.log('工单管理页面加载')
+		const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
+		this.btns = repairsUserInfo.btns
+		console.log(this.btns)
+		if (this.btns.includes('工单管理分段器')) {
+			this.dataList = this.temList2
+		} else {
+			this.dataList = this.temList
+		}
+	},
 	methods: {
 		// 留言弹窗确定按钮回调
 		handleLeaveWordsConfirm() {
@@ -423,7 +531,7 @@ export default {
 					if (res.confirm) {
 						uni.showToast({
 							title: '关单成功',
-							icon: 'none'
+							icon: 'success'
 						})
 						console.log(this.closeList[this.activeIndex])
 						this.$refs.popup_close[0].close()
@@ -440,7 +548,7 @@ export default {
 					if (res.confirm) {
 						uni.showToast({
 							title: '接单成功',
-							icon: 'none'
+							icon: 'success'
 						})
 					}
 				}
@@ -461,6 +569,12 @@ export default {
 				url: '/pagesRepairs/offer/offer'
 			})
 		},
+		// 改价按钮回调
+		handleChangeOffer() {
+			uni.navigateTo({
+				url: '/pagesRepairs/offer/offer?type=1'
+			})
+		},
 		// 维修完成按钮回调
 		handleFinish() {
 			uni.navigateTo({
@@ -541,6 +655,7 @@ export default {
 .container {
 	width: 100vw;
 	height: calc(100vh - 152rpx);
+	font-size: 32rpx;
 	overflow-y: auto;
 
 	.top_bg {
@@ -550,17 +665,18 @@ export default {
 
 	.top_types {
 		display: flex;
+		flex-wrap: wrap;
 		justify-content: space-evenly;
 		margin: auto;
 		margin-top: -100rpx;
 		width: 690rpx;
-		height: 188rpx;
 		border-radius: 10rpx;
 		box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
 		background-color: #fff;
 
 		.types_box {
-			flex: 1;
+			width: 25%;
+			height: 188rpx;
 			display: flex;
 			flex-direction: column;
 			justify-content: center;
@@ -638,19 +754,9 @@ export default {
 				}
 
 				.title_info {
-					margin: 0 21rpx 0 13rpx;
-					font-size: 28rpx;
-				}
-
-				.title_type {
-					width: 137rpx;
-					height: 47rpx;
-					line-height: 47rpx;
-					text-align: center;
-					border-radius: 136rpx;
-					color: #ff5733;
-					font-size: 24rpx;
-					border: 1rpx solid #ff5733;
+					margin-left: 16rpx;
+					// font-size: 28rpx;
+					font-size: 32rpx;
 				}
 			}
 
@@ -662,7 +768,7 @@ export default {
 				height: 79rpx;
 
 				.time_msg {
-					font-size: 28rpx;
+					// font-size: 28rpx;
 					color: #808080;
 
 					text {
@@ -693,7 +799,7 @@ export default {
 				display: flex;
 				padding: 0 30rpx;
 				height: 60rpx;
-				font-size: 28rpx;
+				// font-size: 28rpx;
 
 				.box_key {
 					color: #808080;
@@ -703,13 +809,25 @@ export default {
 					display: flex;
 
 					img {
-						margin-top: 5rpx;
 						margin-left: 10rpx;
-						width: 28rpx;
-						height: 28rpx;
+						width: 45rpx;
+						height: 45rpx;
 					}
 				}
 
+				.box_type {
+					margin-left: auto;
+					width: 137rpx;
+					height: 47rpx;
+					line-height: 47rpx;
+					text-align: center;
+					border-radius: 136rpx;
+					color: #ff5733;
+					// font-size: 24rpx;
+					font-size: 24rpx;
+					border: 1rpx solid #ff5733;
+				}
+
 				.box_value2 {
 					display: flex;
 
@@ -732,7 +850,7 @@ export default {
 				padding: 0 30rpx;
 				height: 120rpx;
 				color: #808080;
-				font-size: 28rpx;
+				// font-size: 28rpx;
 
 				.img_key {
 				}
@@ -777,7 +895,7 @@ export default {
 					margin-bottom: 40rpx;
 					width: 174rpx;
 					height: 68rpx;
-					font-size: 28rpx;
+					// font-size: 28rpx;
 					border-radius: 11rpx;
 				}
 
@@ -869,7 +987,7 @@ export default {
 						padding: 20rpx;
 						width: 610rpx;
 						height: 312rpx;
-						font-size: 28rpx;
+						// font-size: 28rpx;
 						border-radius: 14rpx;
 						border: 1rpx solid #e6e6e6;
 					}
@@ -933,7 +1051,7 @@ export default {
 					align-items: center;
 					padding-left: 42rpx;
 					height: 80rpx;
-					font-size: 28rpx;
+					// font-size: 28rpx;
 					color: #808080;
 
 					text {

+ 6 - 6
pagesRepairs/myRepairs/myRepairs.vue

@@ -38,7 +38,7 @@
 				<!-- 报修电话 -->
 				<view class="item_box">
 					<view class="box_key">报修电话:</view>
-					<view class="box_value phone" @click="handleCallPhone('13820846714')">
+					<view class="box_value phone" @click="handleCallPhone(item.phone)">
 						{{ item.phone }}
 						<img src="../../static/images/repairsImg/phone.png" />
 					</view>
@@ -85,7 +85,7 @@
 				<!-- 师傅电话 -->
 				<view class="item_box" v-if="item.type === 3 || item.type === 4">
 					<view class="box_key">师傅电话:</view>
-					<view class="box_value phone" @click="handleCallPhone('13820846714')">
+					<view class="box_value phone" @click="handleCallPhone(item.workerPhone)">
 						{{ item.workerPhone }}
 						<img src="../../static/images/repairsImg/phone.png" />
 					</view>
@@ -273,7 +273,7 @@ export default {
 		}
 	},
 	mounted() {
-		console.log(666)
+		console.log('我的报修页面加载')
 		this.list = this.dataList
 	},
 	methods: {
@@ -282,7 +282,7 @@ export default {
 			console.log(this.logisticsValue)
 			uni.showToast({
 				title: '留言成功',
-				icon: 'none'
+				icon: 'success'
 			})
 			this.$refs.popup_logistics[0].close()
 		},
@@ -295,7 +295,7 @@ export default {
 					if (res.confirm) {
 						uni.showToast({
 							title: '催单成功',
-							icon: 'none'
+							icon: 'success'
 						})
 					}
 				}
@@ -311,7 +311,7 @@ export default {
 					if (res.confirm) {
 						uni.showToast({
 							title: '撤销成功',
-							icon: 'none'
+							icon: 'success'
 						})
 					}
 				}

+ 27 - 14
pagesRepairs/offer/offer.vue

@@ -78,7 +78,11 @@ export default {
 			}
 		}
 	},
-	onLoad() {
+	onLoad(options) {
+		console.log(options)
+		if (options.type) {
+			console.log('改价')
+		}
 		uni.$on('addConsumable', this.addConsumable)
 	},
 	methods: {
@@ -111,19 +115,28 @@ export default {
 				})
 				return
 			}
-			uni.showToast({
-				title: '报价成功',
-				icon: 'success'
+
+			uni.showModal({
+				title: '提示',
+				content: '确认提交吗?',
+				success: (res) => {
+					if (res.confirm) {
+						uni.showToast({
+							title: '提交成功',
+							icon: 'success'
+						})
+						setTimeout(() => {
+							uni.reLaunch({
+								url: '/pagesRepairs/box/box'
+							})
+						}, 1500)
+						console.log(this.goodList)
+						console.log(this.countMoney)
+						console.log(this.worker)
+						console.log(this.phone)
+					}
+				}
 			})
-			setTimeout(() => {
-				uni.reLaunch({
-					url: '/pagesRepairs/box/box'
-				})
-			}, 1500)
-			console.log(this.goodList)
-			console.log(this.countMoney)
-			console.log(this.worker)
-			console.log(this.phone)
 		},
 		// 全局自定义事件
 		addConsumable(e) {
@@ -138,7 +151,7 @@ export default {
 				this.goodList.push({
 					name: e.data,
 					num: 1,
-					price: 0
+					price: ''
 				})
 			}
 		},

+ 24 - 16
pagesRepairs/pending/pending.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<view class="top_bg" @click="permission = !permission"></view>
+		<view class="top_bg"></view>
 		<view class="body">
 			<!-- 每一个订单区域 -->
 			<view class="body_item" v-for="item in dataList" :key="item.id">
@@ -27,7 +27,7 @@
 				<!-- 报修电话 -->
 				<view class="item_box">
 					<view class="box_key">报修电话:</view>
-					<view class="box_value phone" @click="handleCallPhone('13820846714')">
+					<view class="box_value phone" @click="handleCallPhone(item.phone)">
 						{{ item.phone }}
 						<img src="../../static/images/repairsImg/phone.png" />
 					</view>
@@ -66,9 +66,9 @@
 				<!-- 按钮区域 -->
 				<view class="item_btn">
 					<img src="../../static/images/repairsImg/close.png" @click="handleClose" />
-					<view class="btn_box type" v-if="permission" @click="handleDelay">延时</view>
-					<view class="btn_box type" @click="handleOrderReceiving">接单</view>
-					<view class="btn_box type2" v-if="permission" @click="handleSendOrder">派单</view>
+					<view class="btn_box type" v-if="btns.includes('延时')" @click="handleDelay">延时</view>
+					<view class="btn_box type" v-if="btns.includes('接单')" @click="handleOrderReceiving">接单</view>
+					<view class="btn_box type2" v-if="btns.includes('派单')" @click="handleSendOrder">派单</view>
 				</view>
 
 				<!-- 关闭按钮弹窗 -->
@@ -98,11 +98,13 @@
 export default {
 	data() {
 		return {
-			permission: true,
+			// 按钮权限
+			btns: [],
 			// 关闭按钮弹窗当前索引
 			activeIndex: 0,
 			// 关闭按钮弹窗选项数组
 			closeList: ['重复报单', '不属于维修范围', '已维修完成'],
+			// 工单数据数组
 			dataList: [
 				{
 					id: 1,
@@ -166,6 +168,12 @@ export default {
 			]
 		}
 	},
+	mounted() {
+		console.log('待处理池页面加载')
+		const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
+		this.btns = repairsUserInfo.btns
+		console.log(this.btns)
+	},
 	methods: {
 		// 接单按钮回调
 		handleOrderReceiving() {
@@ -176,7 +184,7 @@ export default {
 					if (res.confirm) {
 						uni.showToast({
 							title: '接单成功',
-							icon: 'none'
+							icon: 'success'
 						})
 					}
 				}
@@ -196,7 +204,7 @@ export default {
 					if (res.confirm) {
 						uni.showToast({
 							title: '关单成功',
-							icon: 'none'
+							icon: 'success'
 						})
 						console.log(this.closeList[this.activeIndex])
 						this.$refs.popup_close[0].close()
@@ -242,6 +250,7 @@ export default {
 .container {
 	width: 100vw;
 	height: calc(100vh - 152rpx);
+	font-size: 32rpx;
 	overflow-y: auto;
 
 	.top_bg {
@@ -278,7 +287,7 @@ export default {
 
 				.title_info {
 					margin: 0 21rpx 0 13rpx;
-					font-size: 28rpx;
+					// font-size: 28rpx;
 				}
 			}
 
@@ -290,7 +299,7 @@ export default {
 				height: 79rpx;
 
 				.time_msg {
-					font-size: 28rpx;
+					// font-size: 28rpx;
 					color: #808080;
 
 					text {
@@ -308,7 +317,7 @@ export default {
 				display: flex;
 				padding: 0 30rpx;
 				height: 60rpx;
-				font-size: 28rpx;
+				// font-size: 28rpx;
 
 				.box_key {
 					color: #808080;
@@ -318,10 +327,9 @@ export default {
 					display: flex;
 
 					img {
-						margin-top: 5rpx;
 						margin-left: 10rpx;
-						width: 28rpx;
-						height: 28rpx;
+						width: 45rpx;
+						height: 45rpx;
 					}
 				}
 
@@ -336,7 +344,7 @@ export default {
 				padding: 0 30rpx;
 				height: 120rpx;
 				color: #808080;
-				font-size: 28rpx;
+				// font-size: 28rpx;
 
 				.img_key {
 				}
@@ -368,7 +376,7 @@ export default {
 					margin-left: 16rpx;
 					width: 174rpx;
 					height: 68rpx;
-					font-size: 28rpx;
+					// font-size: 28rpx;
 					border-radius: 11rpx;
 				}
 

+ 109 - 3
pagesRepairs/repairDetails/repairDetails.vue

@@ -24,7 +24,7 @@
 		</view>
 		<view class="box">
 			<view class="box_key">报修电话:</view>
-			<view class="box_value phone" @click="handleCallPhone('13820846714')">
+			<view class="box_value phone" @click="handleCallPhone(detailInfo.phone)">
 				{{ detailInfo.phone }}
 				<img src="../../static/images/repairsImg/phone.png" />
 			</view>
@@ -51,6 +51,27 @@
 			<img class="img_value" mode="aspectFill" :src="detailInfo.img[0]" @click="handleLookImgs(detailInfo.img)" />
 		</view>
 
+		<view class="box top" v-if="detailInfo.workerName">
+			<view class="box_key">维修师傅:</view>
+			<view class="box_value">{{ detailInfo.workerName }}</view>
+		</view>
+
+		<view class="box" v-if="detailInfo.workerPhone">
+			<view class="box_key">师傅电话:</view>
+			<view class="box_value phone" @click="handleCallPhone(detailInfo.workerPhone)">
+				{{ detailInfo.workerPhone }}
+				<img src="../../static/images/repairsImg/phone.png" />
+			</view>
+		</view>
+
+		<view class="box" v-if="detailInfo.money">
+			<view class="box_key">维修费用:</view>
+			<view class="box_value2 phone" @click="checkFeeDetail">
+				{{ detailInfo.money }}元
+				<img src="../../static/images/repairsImg/eye.png" />
+			</view>
+		</view>
+
 		<view class="title top">报修跟踪</view>
 
 		<!-- 步骤条区域 -->
@@ -65,6 +86,34 @@
 				</template>
 			</uv-steps-item>
 		</uv-steps>
+
+		<view class="gap"></view>
+
+		<!-- 维修费用弹窗 -->
+		<uni-popup :is-mask-click="false" ref="popup_fee">
+			<view class="pop_fee">
+				<view class="fee_title">
+					维修费用
+					<text @click="$refs.popup_fee.close()">×</text>
+				</view>
+				<view class="fee_box">
+					耗材:
+					<text>螺丝刀</text>
+				</view>
+				<view class="fee_box">
+					耗材单价:
+					<text>1元</text>
+				</view>
+				<view class="fee_box">
+					耗材数量:
+					<text>2</text>
+				</view>
+				<view class="fee_box">
+					耗材费用:
+					<text>2元</text>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
@@ -115,9 +164,12 @@ export default {
 		console.log(this.detailInfo)
 	},
 	methods: {
+		// 查看维修费用回调
+		checkFeeDetail() {
+			this.$refs.popup_fee.open('center')
+		},
 		// 点击电话号码回调
 		handleCallPhone(phone) {
-			console.log(phone)
 			uni.makePhoneCall({
 				phoneNumber: phone
 			})
@@ -135,7 +187,7 @@ export default {
 
 <style lang="scss" scoped>
 .container {
-	padding: 0 30rpx 50rpx;
+	padding: 0 30rpx;
 	height: 100vh;
 	overflow-y: auto;
 
@@ -170,6 +222,17 @@ export default {
 			}
 		}
 
+		.box_value2 {
+			display: flex;
+
+			img {
+				margin-top: -2rpx;
+				margin-left: 14rpx;
+				width: 46rpx;
+				height: 46rpx;
+			}
+		}
+
 		.phone {
 			color: #6fb6b8;
 		}
@@ -234,5 +297,48 @@ export default {
 		line-height: 45rpx;
 		font-size: 24rpx;
 	}
+
+	.gap {
+		height: 20rpx;
+	}
+
+	.pop_fee {
+		padding-bottom: 50rpx;
+		border-radius: 19rpx;
+		background-color: #fff;
+
+		.fee_title {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			box-sizing: border-box;
+			padding: 0 31rpx 0 42rpx;
+			width: 690rpx;
+			height: 110rpx;
+			font-size: 32rpx;
+			font-weight: bold;
+			border-radius: 19rpx 19rpx 0 0;
+			border-bottom: 1rpx solid #e6e6e6;
+
+			text {
+				font-size: 45rpx;
+				font-weight: 400;
+				color: #808080;
+			}
+		}
+
+		.fee_box {
+			display: flex;
+			align-items: center;
+			padding-left: 42rpx;
+			height: 80rpx;
+			font-size: 28rpx;
+			color: #808080;
+
+			text {
+				color: #000000;
+			}
+		}
+	}
 }
 </style>

+ 39 - 17
pagesRepairs/repairRecord/repairRecord.vue

@@ -223,29 +223,51 @@ export default {
 				this.goodList.push({
 					name: e.data,
 					num: 1,
-					price: 0
+					price: ''
 				})
 			}
 		},
 		// 确认提交按钮回调
 		handleSub() {
-			console.log(this.repairDate)
-			console.log(this.repairContent)
-			console.log(this.recordingPath)
-			console.log(this.goodList)
-			console.log(this.countMoney)
-			console.log(this.worker)
-			console.log(this.phone)
-			console.log(this.subImgList)
-			uni.showToast({
-				title: '提交成功',
-				icon: 'success'
-			})
-			setTimeout(() => {
-				uni.reLaunch({
-					url: '/pagesRepairs/box/box'
+			if (!this.goodList.length) {
+				uni.showToast({
+					title: '请添加耗材',
+					icon: 'none'
+				})
+				return
+			}
+			if (this.countMoney <= 0) {
+				uni.showToast({
+					title: '合计费用不能小于0元',
+					icon: 'none'
 				})
-			}, 1500)
+				return
+			}
+			uni.showModal({
+				title: '提示',
+				content: '确认提交吗?',
+				success: (res) => {
+					if (res.confirm) {
+						console.log(this.repairDate)
+						console.log(this.repairContent)
+						console.log(this.recordingPath)
+						console.log(this.goodList)
+						console.log(this.countMoney)
+						console.log(this.worker)
+						console.log(this.phone)
+						console.log(this.subImgList)
+						uni.showToast({
+							title: '提交成功',
+							icon: 'success'
+						})
+						setTimeout(() => {
+							uni.reLaunch({
+								url: '/pagesRepairs/box/box'
+							})
+						}, 1500)
+					}
+				}
+			})
 		},
 		// 耗材数量计数器改变回调
 		bindChange(e, index) {

+ 13 - 1
pagesRepairs/repairs/repairs.vue

@@ -121,7 +121,7 @@
 			</view>
 			<view class="item_info">
 				<view class="item_input">
-					<input placeholder-style="color:#CCCCCC" type="number" placeholder="请输入联系电话" v-model="repairsPhone" />
+					<input placeholder-style="color:#CCCCCC" type="number" placeholder="请输入联系电话" maxlength="11" v-model="repairsPhone" />
 				</view>
 			</view>
 		</view>
@@ -217,6 +217,7 @@ export default {
 		}
 	},
 	mounted() {
+		console.log('报修页面加载')
 		uni.$on('addRepairsArea', this.addRepairsArea)
 		uni.$on('addRepairsGoods', this.addRepairsGoods)
 		//在ios下静音时播放没有声音,默认为true,改为false就好了。
@@ -241,6 +242,17 @@ export default {
 					title: '提交成功',
 					icon: 'none'
 				})
+
+				// 不是用户报修的单,则跳转回首页
+				const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
+
+				if (repairsUserInfo.routes.includes('首页')) {
+					setTimeout(() => {
+						uni.reLaunch({
+							url: '/pagesRepairs/box/box'
+						})
+					}, 1500)
+				}
 			}
 		},
 		// 验证信息是否符合规范

+ 19 - 11
pagesRepairs/transferOrder/transferOrder.vue

@@ -111,18 +111,26 @@ export default {
 		},
 		// 确认按钮回调
 		handleAffirm() {
-			console.log(this.recordingPath)
-			console.log(this.desc)
-			uni.showToast({
-				title: '提交转单申请成功,请等待管理员审核',
-				icon: 'none',
-				duration: 3000
+			uni.showModal({
+				title: '提示',
+				content: '确认提交转单申请吗?',
+				success: (res) => {
+					if (res.confirm) {
+						console.log(this.recordingPath)
+						console.log(this.desc)
+						uni.showToast({
+							title: '提交转单申请成功,请等待管理员审核',
+							icon: 'none',
+							duration: 3000
+						})
+						setTimeout(() => {
+							uni.redirectTo({
+								url: '/pagesRepairs/box/box'
+							})
+						}, 3000)
+					}
+				}
 			})
-			setTimeout(() => {
-				uni.redirectTo({
-					url: '/pagesRepairs/box/box'
-				})
-			}, 3000)
 		},
 		// 点击录音按钮回调
 		handleRecording() {