瀏覽代碼

no message

xiaoxin 2 年之前
父節點
當前提交
e75dda99a5

+ 2 - 2
pagesRepairs/addressBook/addressBook.vue

@@ -19,7 +19,7 @@
 				</view>
 				<view class="info_phone">{{ item.userPhone }}</view>
 			</view>
-			<view class="item_type color_type2" v-if="item.state === 1">大量接单</view>
+			<view class="item_type color_type2" v-if="item.state === 1">正常接单</view>
 			<view class="item_type color_type3" v-if="item.state === 2">停止接单</view>
 		</view>
 
@@ -34,7 +34,7 @@
 				</view>
 				<view class="info_phone">{{ item.userPhone }}</view>
 			</view>
-			<view class="item_type color_type2" v-if="item.state === 1">大量接单</view>
+			<view class="item_type color_type2" v-if="item.state === 1">正常接单</view>
 			<view class="item_type color_type3" v-if="item.state === 2">停止接单</view>
 		</view>
 

+ 1 - 1
pagesRepairs/helpPeople/helpPeople.vue

@@ -20,7 +20,7 @@
 					</view>
 					<view class="info_phone">{{ item.userPhone }}</view>
 				</view>
-				<view class="item_type color_type2" v-if="item.state === '大量接单'">大量接单</view>
+				<view class="item_type color_type2" v-if="item.state === '正常接单'">正常接单</view>
 				<view class="item_type color_type3" v-if="item.state === '停止接单'">停止接单</view>
 			</view>
 		</view>

+ 4 - 4
pagesRepairs/home/home.vue

@@ -138,7 +138,7 @@ export default {
 			// 改变的是第几个索引
 			changeIndex: 0,
 			// 排班状态数组
-			typeArray: ['大量接单', '停止接单'],
+			typeArray: ['正常接单', '停止接单'],
 			// 值班状态数组
 			workArray: [],
 			// 分段器数组数据
@@ -367,7 +367,7 @@ export default {
 			// })
 			item.state = e.detail.value * 1 + 1
 			if (item.state === 1) {
-				item.stateStr = '大量接单'
+				item.stateStr = '正常接单'
 			} else {
 				item.stateStr = '停止接单'
 			}
@@ -419,7 +419,7 @@ export default {
 		onClickItem(e) {
 			if (this.current != e.currentIndex) {
 				this.current = e.currentIndex
-				console.log(this.current)
+				// console.log(this.current)
 				if (this.current === 0) {
 					// 团队数据
 					this.getTeamCount()
@@ -667,4 +667,4 @@ export default {
 		}
 	}
 }
-</style>
+</style>

+ 3 - 3
pagesRepairs/management/management.vue

@@ -259,7 +259,7 @@
 						<view class="fee_item" v-for="(element, index2) in goodsList" :key="index2">
 							<view class="fee_box">
 								耗材:
-								<text>{{ element.name }}</text>
+								<text>{{ element.consumeName }}</text>
 							</view>
 							<view class="fee_box">
 								耗材单价:
@@ -267,11 +267,11 @@
 							</view>
 							<view class="fee_box">
 								耗材数量:
-								<text>{{ element.num }}</text>
+								<text>{{ element.number }}</text>
 							</view>
 							<view class="fee_box">
 								耗材费用:
-								<text>{{ element.count }}元</text>
+								<text>{{ element.totalPrice }}元</text>
 							</view>
 						</view>
 					</view>

+ 10 - 0
pagesRepairs/offer/offer.vue

@@ -93,7 +93,9 @@ export default {
 		}
 	},
 	onLoad(options) {
+		// console.log(options)
 		this.info = JSON.parse(decodeURIComponent(options.info))
+		// console.log(this.info.goodsList)
 		this.worker = this.info.maintenancerName || ''
 		this.phone = this.info.maintenancerPhone || ''
 		if (options.type) {
@@ -151,6 +153,11 @@ export default {
 				success: async (res) => {
 					if (res.confirm) {
 						if (this.type) {
+							this.goodList.forEach((ele) => {
+								if (ele.new) {
+									ele.id = null
+								}
+							})
 							const res = await this.$myRequest_repairs({
 								url: '/repairConsumables/changeMaintenanceConsumables',
 								method: 'post',
@@ -201,6 +208,7 @@ export default {
 		},
 		// 全局自定义事件
 		addConsumable(e) {
+			// console.log(e)
 			// 判断是否存在相同的耗材
 			let flag = this.goodList.some((ele) => {
 				return ele.consumeName === e.data.name
@@ -211,6 +219,8 @@ export default {
 				this.$set(e.data, 'consumeName', e.data.name)
 				this.$set(e.data, 'consumeId', e.data.id)
 				this.$set(e.data, 'articleId', e.articleId)
+				// 添加标识
+				this.$set(e.data, 'new', true)
 				// this.$delete(e.data, 'name')
 				// this.$delete(e.data, 'id')
 				this.goodList.push(e.data)

+ 33 - 0
pagesRepairs/repairDetails/repairDetails.vue

@@ -103,6 +103,12 @@
 							{{ item.voiceLength }}″
 						</view>
 					</view>
+					<view class="steps_desc2" v-if="item.images">
+						上传图片:
+						<view class="desc_imgList">
+							<img mode="aspectFill" v-for="(ele, index) in item.images" :key="index" :src="ele" @click="handleLookImages(item.images, index)" />
+						</view>
+					</view>
 					<view class="steps_desc" v-if="item.content">{{ item.content }}</view>
 				</template>
 			</uv-steps-item>
@@ -202,6 +208,13 @@ export default {
 				urls: img
 			})
 		},
+		// 点击报修跟踪图片回调
+		handleLookImages(urls, current) {
+			uni.previewImage({
+				urls,
+				current
+			})
+		},
 		// 点击录音播放回调
 		handlePlayRecording(item) {
 			// 先重置播放状态
@@ -292,6 +305,7 @@ export default {
 
 		.box_value2 {
 			display: flex;
+			align-items: center;
 
 			img {
 				margin-top: -2rpx;
@@ -394,6 +408,25 @@ export default {
 		}
 	}
 
+	.steps_desc2 {
+		display: flex;
+		margin: 10rpx 0;
+		line-height: 45rpx;
+		font-size: 24rpx;
+
+		.desc_imgList {
+			display: flex;
+			flex-wrap: wrap;
+
+			img {
+				margin-right: 10rpx;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 14rpx;
+			}
+		}
+	}
+
 	.gap {
 		height: 20rpx;
 	}

+ 1 - 1
pagesRepairs/repairs/repairs.vue

@@ -393,7 +393,7 @@ export default {
 		},
 		// 全局自定义事件
 		addRepairsArea(e) {
-			// console.log(e)
+			console.log(e)
 			this.repairsArea = e.data
 			this.schoolId = e.schoolId
 			this.buildId = e.buildId

+ 5 - 5
pagesRepairs/selectArea/selectArea.vue

@@ -60,9 +60,6 @@ export default {
 			myLat: 0
 		}
 	},
-	mounted() {
-		this.getSchoolList()
-	},
 	onLoad(options) {
 		// 实例化API核心类
 		qqmapsdk = new QQMapWX({
@@ -74,6 +71,7 @@ export default {
 			this.buildId = options.buildId
 			this.addressId = options.addressId
 		}
+		this.getSchoolList()
 	},
 	methods: {
 		// 获取当前定位位置信息
@@ -93,6 +91,8 @@ export default {
 						} else {
 							this.current = 1
 						}
+						this.schoolId = this.schoolList[this.current].id
+						this.getRepairAreaTree()
 					} else {
 						uni.showToast({
 							title: '请求定位失败',
@@ -142,11 +142,11 @@ export default {
 							this.current = index
 						}
 					})
+					this.schoolId = this.schoolList[this.current].id
+					this.getRepairAreaTree()
 				} else {
 					this.getLocationData()
 				}
-				this.schoolId = this.schoolList[this.current].id
-				this.getRepairAreaTree()
 			}
 		},
 		// 获取区域数据

+ 1 - 1
pagesRepairs/util/imageCompress.js

@@ -26,7 +26,7 @@ function getCanvasImage(canvasId, imagePath, imageW, imageH, that, getImgSuccess
 	//图片画上去,imageW和imageH是画上去的尺寸,图像和画布间隔都是0
 	ctx.drawImage(imagePath, 0, 0, imageW, imageH);
 	//这里一定要加定时器,给足够的时间去画(所以每次递归最少要耗时200ms,多次递归很耗时!)
-	ctx.draw(false, setTimeout(() => {
+	ctx.draw(setTimeout(() => {
 		//把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径
 		wx.canvasToTempFilePath({
 			canvasId: canvasId,