From 239c5308af49780bf45a09a05c519e669caec939 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期一, 11 九月 2023 16:54:47 +0800
Subject: [PATCH] 小程序

---
 minipro_standard/pages/plannedDistribution/plannedDistribution.vue               |   13 
 minipro_standard/pages_adjust/components/multipleMaterial.vue                    |   12 
 minipro_standard/pages_adjust/pages/outboundList/outboundList.vue                |   10 
 minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue    |   10 
 minipro_standard/util/api/QualityAPI.js                                          |    2 
 minipro_standard/pages/index/index.vue                                           |    4 
 minipro_standard/pages_adjust/pages/transferList/transferList.vue                |   10 
 minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue          |    2 
 minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue        |   28 +
 minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue          |   10 
 minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue            |    2 
 minipro_standard/pages.json                                                      |    7 
 minipro_standard/pages_inspect/pages/InspectionRecords/InspectionRecords.vue     |    8 
 minipro_standard/pages/mine/mine.vue                                             |    2 
 minipro_standard/util/api/index.js                                               |    5 
 minipro_standard/pages/plannedProgress/plannedProgress.vue                       |   14 
 minipro_standard/pages_inspect/pages/equipmentInspection/equipmentInspection.vue |  563 +++++++++++++++++++++++++++++++++++++++++++
 minipro_standard/pages/allocation/allocation.vue                                 |   45 ++-
 minipro_standard/util/utils.js                                                   |   18 +
 19 files changed, 701 insertions(+), 64 deletions(-)

diff --git a/minipro_standard/pages.json b/minipro_standard/pages.json
index 2f12ed3..44801d1 100644
--- a/minipro_standard/pages.json
+++ b/minipro_standard/pages.json
@@ -263,6 +263,13 @@
 						"navigationBarTitleText": "妫�楠岃鎯�",
 						"enablePullDownRefresh": false
 					}
+				},
+				{
+					"path": "pages/equipmentInspection/equipmentInspection",
+					"style": {
+						"navigationBarTitleText": "璁惧宸℃",
+						"enablePullDownRefresh": false
+					}
 				}
 			]
 		}
diff --git a/minipro_standard/pages/allocation/allocation.vue b/minipro_standard/pages/allocation/allocation.vue
index cda34f5..43ad353 100644
--- a/minipro_standard/pages/allocation/allocation.vue
+++ b/minipro_standard/pages/allocation/allocation.vue
@@ -137,6 +137,7 @@
 					if (res.code === 200) {
 						uni.showToast({ title: '鍒嗛厤鎴愬姛', icon: 'success', duration: 2000, mask: true });
 						setTimeout(() => {
+							uni.$emit('update', { msg:'鍒锋柊鍒楄〃' })
 							uni.navigateBack({ delta: 1 });
 						}, 2000)
 					}
@@ -195,6 +196,9 @@
 					display: flex;
 					flex-direction: column;
 				}
+				.u-icon__icon {
+					margin-right: 0 !important;
+				}
 				.fp_list_item_right_dis {
 					display: flex;
 					align-items: center;
@@ -217,15 +221,15 @@
                 .black {
                     color: black !important;
                 }
-                input {
-                    width: 180rpx;
-                    height: 60rpx;
-                    border-radius: 8rpx;
-                    border: 2rpx solid #E5E5E5;
-                    padding: 0 30rpx;
-                    text-align: right;
-                    font-size: 25rpx;
-                }
+                // input {
+                //     width: 180rpx;
+                //     height: 60rpx;
+                //     border-radius: 8rpx;
+                //     border: 2rpx solid #E5E5E5;
+                //     padding: 0 30rpx;
+                //     text-align: right;
+                //     font-size: 25rpx;
+                // }
                 text {
                     font-size: 28rpx;
                     font-weight: 400;
@@ -256,9 +260,12 @@
                     font-weight: 400;
                 }
             }
-            .fp_list_item_right {
+            .fp_list_item_right::v-deep {
                 display: flex;
                 align-items: center;
+				.u-icon__icon {
+					margin-right: 0 !important;
+				}
                 .wu {
                     text-align: center;
                     text {
@@ -269,15 +276,15 @@
                 .black {
                     color: black !important;
                 }
-                input {
-                    width: 180rpx;
-                    height: 60rpx;
-                    border-radius: 8rpx;
-                    border: 1rpx solid #E5E5E5;
-                    padding: 0 30rpx;
-                    text-align: right;
-                    font-size: 25rpx;
-                }
+                // input {
+                //     width: 180rpx;
+                //     height: 60rpx;
+                //     border-radius: 8rpx;
+                //     border: 1rpx solid #E5E5E5;
+                //     padding: 0 30rpx;
+                //     text-align: right;
+                //     font-size: 25rpx;
+                // }
                 text {
                     font-size: 28rpx;
                     font-weight: 400;
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 8da7917..6204425 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -4,9 +4,9 @@
 		<!-- {{$store.state.statusbarHeight}} -->
 
 		<u-sticky>
-			<view class="plr50 pb30 nav-style">
+			<view class="plr30 pb30 nav-style">
 				<view
-					:style="{paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
+					:style="{background: '#fff', zIndex: '999', paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
 					寰呭姙</view>
 				<view class="cY">
 					<u-search placeholder="鎼滅储鍏抽敭瀛�" bgColor="#f7f7f7" :showAction="false" @search="search"
diff --git a/minipro_standard/pages/mine/mine.vue b/minipro_standard/pages/mine/mine.vue
index 19d9808..1fbb9f3 100644
--- a/minipro_standard/pages/mine/mine.vue
+++ b/minipro_standard/pages/mine/mine.vue
@@ -2,7 +2,7 @@
 <view>
 	<div class="box">
 		<div class="box_info" :style="{background: 'url(' + img + ')'}">
-			<image :src="userInfo.avatar ? userInfo.avatar : avatar" mode="widthFix" />
+			<image :src="avatar" mode="widthFix" />
 			<div class="box_info_box">
 				<text>{{userInfo.realname}}</text>
 				<div class="box_info_box_x" @click="switchOrganization">
diff --git a/minipro_standard/pages/plannedDistribution/plannedDistribution.vue b/minipro_standard/pages/plannedDistribution/plannedDistribution.vue
index b78ec83..cbb7d3a 100644
--- a/minipro_standard/pages/plannedDistribution/plannedDistribution.vue
+++ b/minipro_standard/pages/plannedDistribution/plannedDistribution.vue
@@ -93,6 +93,13 @@
 		},
 		onLoad() {
 			this.getLists()
+			uni.$on('update', (data) => {
+				this.isLoading = true
+				this.search.page = 0
+				this.list = []
+				this.finished = false
+				this.getLists()
+			})
 		},
 		methods: {
 			// 涓嬫媺鍒锋柊
@@ -107,7 +114,9 @@
 			// 鐐瑰嚮褰撳墠椤�
 			clickItem(i) {
 				this.list.forEach((item, index) => {
-					item.isActive = i === index;
+					if (i === index) {
+						item.isActive = !item.isActive
+					}
 				})
 			},
 			// 鎼滅储
@@ -139,7 +148,7 @@
 					return
 				}
 				uni.navigateTo({
-					url: `/pages/allocation/allocation?gxid=${data.procedureId}&jhid=${data.id}&num=${data.workorderDistributNum ? data.num - data.workorderDistributNum : data.num}`
+					url: `/pages/allocation/allocation?gxid=${data.procedureId}&jhid=${data.id}&num=${data.num - data.workorderDistributNum - data.distributNoDoneNum}`
 				});
 			},
 			// 鑾峰彇褰撳墠鐢ㄦ埛鎵�鍒嗛厤鐨勫伐搴�
diff --git a/minipro_standard/pages/plannedProgress/plannedProgress.vue b/minipro_standard/pages/plannedProgress/plannedProgress.vue
index 5b72386..5eb0919 100644
--- a/minipro_standard/pages/plannedProgress/plannedProgress.vue
+++ b/minipro_standard/pages/plannedProgress/plannedProgress.vue
@@ -102,7 +102,9 @@
 			</scroll-view>
 		</view>
 		<!-- 閫夋嫨鏃ユ湡 -->
-		<u-calendar :show="timeShow" mode="range" @confirm="timeConfirm"></u-calendar>
+		<!-- <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar> -->
+		<l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
+			rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
 	</view>
 </template>
 
@@ -217,8 +219,8 @@
 			},
 			// 鏃ユ湡纭畾
 			timeConfirm(val) {
-				this.listData.startDate = val[0]
-				this.listData.endDate = val[val.length - 1]
+				this.listData.startDate = val.startDate
+				this.listData.endDate = val.endDate
 				this.timeShow = false
 			},
 			// 鍒囨崲宸ュ巶
@@ -247,7 +249,8 @@
 			},
 			// 鐐瑰嚮鏍囩鎼滅储
 			clickTag(ids) {
-				this.listData.cateIds = ids
+				// ids ? ids.split(',') : []
+				this.listData.cateIds = ids ? ids.split(',') : []
 				this.listData.page = 0
 				this.finished = false
 				this.lists = []
@@ -332,7 +335,8 @@
 							endDate: this.listData.endDate,
 							procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
 							factoryId: this.listData.departIds,
-							statusList: this.listData.cateIds ? this.listData.cateIds.split(',') : []
+							statusList: this.listData.cateIds
+							// this.listData.cateIds ? this.listData.cateIds.split(',') : []
 						},
 						page: this.listData.page,
 						sorts: [
diff --git a/minipro_standard/pages_adjust/components/multipleMaterial.vue b/minipro_standard/pages_adjust/components/multipleMaterial.vue
index ea3d29a..40549be 100644
--- a/minipro_standard/pages_adjust/components/multipleMaterial.vue
+++ b/minipro_standard/pages_adjust/components/multipleMaterial.vue
@@ -63,8 +63,8 @@
 			</view> -->
 			<view class="fixedBottom bottom cY">
 				<view class="fx1 bbox plr30">
-					<u-checkbox-group style="display: block;" name="" @change="selectAll()">
-						<u-checkbox :checked="isAll" label="鍏ㄩ��"></u-checkbox>
+					<u-checkbox-group v-model="isAll" style="display: block;" @change="selectAll()">
+						<u-checkbox label="鍏ㄩ��" name="all"></u-checkbox>
 					</u-checkbox-group>
 				</view>
 				<view class="submit sbtn_green bbox tc" @click="submitAction">{{ `鎻愪氦(${totalNum})`}}</view>
@@ -97,6 +97,7 @@
 				loading: false,
 				finished: false,
 				refreshing: false,
+				isAll: false,
 				total: 0
 			};
 		},
@@ -135,6 +136,7 @@
 		},
 		methods: {
 			open() {
+				this.isAll = false
 				this.show = true
 				this.refreshing = false
 				this.finished = false
@@ -212,9 +214,11 @@
 				this.pages.page = 1
 				this.loadData()
 			},
-			selectAll() {
+			selectAll(e) {
+				console.log(e)
+				console.log(this.isAll)
 				this.list.forEach(element => {
-					element.isActive = this.all
+					element.isActive = e.length > 0 ? true : false
 				})
 			},
 			submitAction () {
diff --git a/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue b/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
index 692c60e..29eff1c 100644
--- a/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
+++ b/minipro_standard/pages_adjust/pages/InventoryQuery/InventoryQuery.vue
@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="content_search">
 			<Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
-				placeholder="鎼滅储浠撳簱鍚嶇О/鐗╂枡鍚嶇О">
+				placeholder="鎼滅储浠撳簱鍚嶇О/鐗╂枡缂栫爜">
 				<template v-slot:content>
 					<view class="Search_item">
 						<view class="Search_item_label">姹囨�讳緷鎹�</view>
diff --git a/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue b/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
index 8689680..6ca13c7 100644
--- a/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
+++ b/minipro_standard/pages_adjust/pages/outboundDetails/outboundDetails.vue
@@ -71,7 +71,7 @@
 					<view class="content_list_item_content_item">
 						<view class="content_list_item_content_item_label">鎵规鍙凤細</view>
 						<view class="content_list_item_content_item_nr">
-							{{ item.batch }}
+							{{ item.batch ? item.batch : '-' }}
 						</view>
 					</view>
 					<view class="content_list_item_content_item">
diff --git a/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue b/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
index dea0345..04a1045 100644
--- a/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
+++ b/minipro_standard/pages_adjust/pages/outboundList/outboundList.vue
@@ -90,8 +90,10 @@
 			</scroll-view>
 		</view>
 		<!-- 閫夋嫨鏃ユ湡 -->
-		<u-calendar mode="range" :show="timeShow" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
-			@confirm="timeConfirm"></u-calendar>
+		<!-- <u-calendar mode="range" :show="timeShow" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
+			@confirm="timeConfirm"></u-calendar> -->
+		<l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
+			rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
 	</view>
 </template>
 
@@ -360,8 +362,8 @@
 			},
 			// 鏃ユ湡纭畾
 			timeConfirm(val) {
-				this.listData.planDateEnd = val[val.length - 1]
-				this.listData.planDateStart = val[0]
+				this.listData.planDateEnd = val.endDate
+				this.listData.planDateStart = val.startDate
 				this.timeShow = false
 			},
 			// 鍒囨崲宸ュ簭
diff --git a/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue b/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue
index 04c7879..d3b26f9 100644
--- a/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue
+++ b/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue
@@ -2,7 +2,7 @@
 	<view class="bg">
 		<view class="bg_plan" @click="selectPlan">
 			<view class="bg_plan_label" v-if="!from.processPlan">
-				<text><b>*</b>宸ュ簭鐢熶骇璁″垝</text>
+				<text><text>*</text>宸ュ簭鐢熶骇璁″垝</text>
 			</view>
 			<view class="bg_plan_nr" v-else>
 				<text>{{ from.processPlan.materialName }} | {{ from.processPlan.materialCode }} | {{ from.processPlan.produceName }}</text>
@@ -109,7 +109,7 @@
 				<view class="bg_list_item_h">
 					<view class="bg_list_item_num">
 						<view class="bg_list_item_num_item">
-							<text><b>*</b>鑹搧鏁�</text>
+							<text><text>*</text>鑹搧鏁�</text>
 							<view class="bg_list_item_num_item_sr">
 								<u--input
 								    placeholder="璇疯緭鍏�"
@@ -143,7 +143,8 @@
 					</view>
 					<view class="bg_list_item_num" v-if="from.undesirable > 0">
 						<view class="bg_list_item_num_item" @click="openBL">
-							<text><b>*</b>涓嶈壇椤�</text>
+							<!-- <text>*</text> -->
+							<text>涓嶈壇椤�</text>
 							<view class="bg_list_item_num_item_sr">
 								<text class="wulll" :style="{color: from.defectiveName ? '#305ED5' : ''}">{{from.defectiveName ? from.defectiveName : '璁剧疆'}}</text>
 								<image src="@/static/ic_ar@2x.png" alt="" />
@@ -161,7 +162,7 @@
 					<image src="@/static/ic_ar@2x.png" alt="" />
 				</view>
 			</view>
-			<view class="bg_list_item" v-if="arrType && arrType.length > 0">
+			<view class="bg_list_item" v-if="arrType && arrType.length > 0 && from.duration > 0">
 				<view class="bg_list_item_top">
 					<view class="bg_list_item_top_left">
 						<view class="bg_list_item_top_left_x"></view>
@@ -258,9 +259,9 @@
 					processPlan: null,
 					deviceId: '',
 					deviceName: '',
-					// userId: store.state.userInfo.id,
+					// userId: userInfo.id,
 					userId: '',
-					// userName: store.state.userInfo.companyUser.name,
+					// userName: userInfo.companyUser.name,
 					userName: '',
 					qualified: '',  // 鑹搧鏁�
 					undesirable: '', // 涓嶈壇鏁�
@@ -333,8 +334,13 @@
 			}
 		},
 		onReady() {
-			this.from.userId = this.userInfo.id
-			this.form.userName = this.userInfo.realname
+			let timer = setInterval(() => {
+				if (this.userInfo) {
+					this.from.userId = this.userInfo.id
+					this.from.userName = this.userInfo.realname
+					clearInterval(timer)
+				}
+			}, 500)
 		},
 		onLoad() {
 			let arr = []
@@ -722,7 +728,7 @@
 				font-family: PingFangSC-Regular, PingFang SC;
 				font-weight: 400;
 				color: #222222;
-				b {
+				text {
 					color: red;
 				}
 			}
@@ -932,9 +938,9 @@
 								overflow: hidden;
 								text-overflow: ellipsis;
 								white-space: nowrap;
-								b {
+								text {
 									font-size: 30rpx;
-									color: red;
+									color: red !important;
 									margin-right: 5rpx;
 								}
 								.warning {
diff --git a/minipro_standard/pages_adjust/pages/transferList/transferList.vue b/minipro_standard/pages_adjust/pages/transferList/transferList.vue
index e2903f8..eb89acf 100644
--- a/minipro_standard/pages_adjust/pages/transferList/transferList.vue
+++ b/minipro_standard/pages_adjust/pages/transferList/transferList.vue
@@ -103,13 +103,15 @@
 			</scroll-view>
 		</view>
 		<!-- 閫夋嫨鏃ユ湡 -->
-		<u-calendar
+		<!-- <u-calendar
 		:show="timeShow"
 		mode="range"
 		@close="timeShow = false"
 		:minDate="minDate"
 		:maxDate="maxDate"
-		@confirm="timeConfirm"></u-calendar>
+		@confirm="timeConfirm"></u-calendar> -->
+		<l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
+			rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
 	</view>
 </template>
 
@@ -416,8 +418,8 @@
 
 			// 鏃ユ湡纭畾
 			timeConfirm(val) {
-				this.listData.outPlanDateStart = val[0]
-				this.listData.outPlanDateEnd = val[val.length - 1]
+				this.listData.outPlanDateStart = val.startDate
+				this.listData.outPlanDateEnd = val.endDate
 				this.timeShow = false
 			},
 			// 鍒囨崲宸ュ巶
diff --git a/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue b/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
index 2aa3d23..04cb0cd 100644
--- a/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
+++ b/minipro_standard/pages_adjust/pages/warehousingDetails/warehousingDetails.vue
@@ -86,7 +86,7 @@
 						<view class="content_list_item_content_item">
 							<view class="content_list_item_content_item_label">鎵规鍙凤細</view>
 							<view class="content_list_item_content_item_nr">
-								{{ item.batch }}
+								{{ item.batch ? item.batch : '-' }}
 							</view>
 						</view>
 						<view class="content_list_item_content_item">
@@ -140,6 +140,7 @@
 	export default {
 		data() {
 			return {
+				id: null,
 				types: [{
 						name: '鍏ㄩ儴',
 						id: '',
@@ -255,6 +256,7 @@
 			};
 		},
 		onLoad(option) {
+			this.id = option.id
 			wTransferExtDetail(option.id)
 				.then(res => {
 					this.data = res.data
@@ -269,6 +271,9 @@
 				if (this.data.status === 0) { // 鍑哄簱
 					console.log('鍑哄簱')
 					// router.push({ name: 'issueOperation', query: { id: route.query.id, type: 7 } })
+					uni.navigateTo({
+						url: `/pages/OutOperation/OutOperation?id=${this.id}&type=7`
+					});
 				} else if (this.data.status === 1) { // 鍏ュ簱
 					if (this.data.type === 3) { // 澶囨枡纭
 						console.log('澶囨枡纭')
@@ -276,6 +281,9 @@
 						return
 					}
 					console.log('鍏ュ簱')
+					uni.navigateTo({
+						url: `/pages/InOperation/InOperation?id=${this.id}&type=7`
+					});
 					// router.push({ name: 'warehousing', query: { id: route.query.id, type: 7 } })
 				}
 			},
diff --git a/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue b/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
index 32d93bc..5f4fa12 100644
--- a/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
+++ b/minipro_standard/pages_adjust/pages/warehousingList/warehousingList.vue
@@ -89,8 +89,10 @@
 			</scroll-view>
 		</view>
 		<!-- 閫夋嫨鏃ユ湡 -->
-		<u-calendar :show="timeShow" mode="range" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
-			@confirm="timeConfirm"></u-calendar>
+		<!-- <u-calendar :show="timeShow" mode="range" :minDate="minDate" :maxDate="maxDate" @close="timeShow = false"
+			@confirm="timeConfirm"></u-calendar> -->
+		<l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
+			rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
 	</view>
 </template>
 
@@ -385,8 +387,8 @@
 			},
 			// 鏃ユ湡纭畾
 			timeConfirm(val) {
-				this.listData.planDateStart = val[0]
-				this.listData.planDateEnd = val[val.length - 1]
+				this.listData.planDateStart = val.startDate
+				this.listData.planDateEnd = val.endDate
 				this.timeShow = false
 			},
 			// 鍒囨崲鍗曟嵁绫诲瀷
diff --git a/minipro_standard/pages_inspect/pages/InspectionRecords/InspectionRecords.vue b/minipro_standard/pages_inspect/pages/InspectionRecords/InspectionRecords.vue
index 39f2295..a1978f8 100644
--- a/minipro_standard/pages_inspect/pages/InspectionRecords/InspectionRecords.vue
+++ b/minipro_standard/pages_inspect/pages/InspectionRecords/InspectionRecords.vue
@@ -99,7 +99,9 @@
 			</scroll-view>
 		</view>
 		<!-- 閫夋嫨鏃ユ湡 -->
-		<u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar>
+		<!-- <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar> -->
+		<l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
+			rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
 	</view>
 </template>
 
@@ -197,8 +199,8 @@
 			},
 			// 鏃ユ湡纭畾
 			timeConfirm(val) {
-				this.pageData.checkStartDate = val[0]
-				this.pageData.checkEndDate = val[val.length - 1]
+				this.pageData.checkStartDate = val.startDate
+				this.pageData.checkEndDate = val.endDate
 				this.timeShow = false
 			},
 			// 鍒囨崲妫�绫诲瀷
diff --git a/minipro_standard/pages_inspect/pages/equipmentInspection/equipmentInspection.vue b/minipro_standard/pages_inspect/pages/equipmentInspection/equipmentInspection.vue
new file mode 100644
index 0000000..d42f60f
--- /dev/null
+++ b/minipro_standard/pages_inspect/pages/equipmentInspection/equipmentInspection.vue
@@ -0,0 +1,563 @@
+<template>
+	<view class="box1">
+		<!--    璁惧+鏃ユ湡   -->
+		<view class="box_list">
+			<view class="box_list_item" @click="open">
+				<view class="box_list_item_left">
+					<text>妫�楠岃澶�</text><text>*</text>
+				</view>
+				<view class="box_list_item_right">
+					<text :style="form.equipmentName ? 'color: #000' : ''">{{ form.equipmentName ? form.equipmentName : '鐐瑰嚮閫夋嫨宸℃璁惧' }}</text>
+					<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
+				</view>
+			</view>
+			<view class="box_list_code" @click.stop="openCode">
+				<view class="boxs">
+					<image src="@/static/jianyan_ic_saoma@2x.png" alt="" />
+					<text>鎵弿璁惧</text>
+				</view>
+			</view>
+			<view class="box_list_item" @click="showTime = true">
+				<view class="box_list_item_left">
+					<text>宸℃鏃堕棿</text><text>*</text>
+				</view>
+				<view class="box_list_item_right">
+					<text class="black">{{form.time}}</text>
+					<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
+				</view>
+			</view>
+		</view>
+		<!--    鐘舵��+鍥剧墖/瑙嗛   -->
+		<view class="box_list1">
+			<view class="box_list1_item">
+				<view class="box_list1_item_left">
+					<text>璁惧鐘舵��</text><text>*</text>
+				</view>
+				<view class="box_list1_item_right">
+					<view class="box_list1_item_right_item" :class="{'active': item.active}"
+						v-for="(item, index) in status" :key="index" @click="changeItem(index, item.id)">{{item.name}}
+					</view>
+				</view>
+			</view>
+			<view class="box_list1_club">
+				<view class="box_list1_club_label">宸℃鐜板満鐓х墖<text v-show="form.status == '1'">*</text></view>
+				<view class="box_list1_club_list">
+					<view class="box_list1_club_list_item" @click="uploadFile">
+						<view class="type">
+							<image class="type_img" src="@/static/btn_upload@2x.png" alt="" />
+						</view>
+					</view>
+					<view class="box_list1_club_list_item" v-for="(item, index) in form.files" :key="index"
+						@click="seeBigFile(index)">
+						<image class="close" src="@/static/ic_delete@2x.png" @click.stop="dele(index)" />
+						<image class="play" src="@/static/ic_play@2x.png" v-if="item.type === 1" />
+						<view class="type">
+							<video :src="item.url" v-if="item.type === 1"></video>
+							<image v-else class="type_img" :src="item.url" mode="widthFix" />
+						</view>
+					</view>
+					<view class="box_list1_club_list_item1"></view>
+					<view class="box_list1_club_list_item1"></view>
+				</view>
+			</view>
+		</view>
+		<view class="box_list2">
+			<view class="box_list2_label">澶囨敞</view>
+			<textarea name="" id="" v-model="form.remarks" cols="20" rows="5" maxlength="300"
+				placeholder="璇疯缁嗘弿杩板贰妫�鎯呭喌"></textarea>
+		</view>
+		<view class="box_footer">
+			<button class="box_footer_submit" v-preventReClick @click="submit">鎻愪氦</button>
+		</view>
+		<!-- 閫夋嫨鏃堕棿 -->
+		<u-datetime-picker :show="showTime" v-model="currentDate" @cancel="showTime = false" @confirm="queding" mode="datetime"></u-datetime-picker>
+	</view>
+</template>
+
+<script>
+	import { getBarcodeContent } from '@/util/api/WorkOrderAPI'
+	import { saveBean, getDeviceByCondition, getsbInfo } from '@/util/api/QualityAPI'
+	import { queryListByCode, uploadFiles } from '@/util/api/index'
+	import { QRCodeType, baseUrl } from '@/common/config.js'
+	import { setTime, judgmentType } from '@/util/utils.js'
+	import { mapState } from 'vuex'
+
+	export default {
+		data() {
+			return {
+				status: [{
+						name: '姝e父',
+						active: true,
+						id: '0'
+					},
+					{
+						name: '寮傚父',
+						active: false,
+						id: '1'
+					}
+				],
+				columns: [],
+				path: '',
+				showTime: false,
+				currentDate: new Date(),
+				form: {
+					equipmentId: '', // 璁惧id
+					equipmentName: '', //璁惧鍚嶇О
+					time: '', // 宸℃鏃堕棿
+					status: '0', // 璁惧鐘舵��
+					files: [], // 宸℃鍥剧墖/瑙嗛
+					remarks: '' // 澶囨敞
+				}
+			};
+		},
+		onLoad() {
+			this.form.time = setTime(new Date(), '-')
+			this.getqueryListByCode()
+		},
+		computed: {
+			...mapState(['session'])
+		},
+		methods: {
+			// 纭閫夋嫨鏃ユ湡
+			queding(val) {
+				this.form.time = uni.$u.timeFormat(val.value, 'yyyy-mm-dd hh:MM:ss')
+				this.showTime = false
+			},
+			// 鎵爜
+			openCode() {
+				uni.scanCode({
+					onlyFromCamera: true,
+					success: function (result) {
+						getBarcodeContent({
+							barcode: result.result
+						}).then(res => {
+							if (res.code === 200) {
+								if (res.data.barcodeType === QRCodeType.SB) {
+									getsbInfo(res.data.id)
+										.then(res1 => {
+											if (res1.code === 200) {
+												this.form.equipmentId = res1.data.id
+												this.form.equipmentName = res1.data.name
+											}
+										})
+								} else {
+									uni.showToast({
+										title: '璇锋壂鎻忔纭殑璁惧鐮�',
+										icon: 'none',
+										duration: 2000
+									});
+								}
+							}
+						})
+					}
+				});
+			},
+			// 鏀瑰彉鐘舵��
+			changeItem(i, id) {
+				this.status.forEach((item, index) => {
+					item.active = index === i;
+				})
+				this.form.status = id
+			},
+			submit() {
+				if (!this.form.equipmentId) return uni.showToast({
+					title: '璁惧涓嶈兘涓虹┖',
+					icon: 'none',
+					duration: 2000
+				});
+				if (!this.form.time) return uni.showToast({
+					title: '鏃堕棿涓嶈兘涓虹┖',
+					icon: 'none',
+					duration: 2000
+				});
+				if (!this.form.status) return uni.showToast({
+					title: '鐘舵�佷笉鑳戒负绌�',
+					icon: 'none',
+					duration: 2000
+				});
+				if (this.form.status == '1') {
+					if (this.form.files.length === 0) return uni.showToast({
+						title: '鐜板満鐓х墖涓嶈兘涓虹┖',
+						icon: 'none',
+						duration: 2000
+					});
+				}
+				saveBean({
+					checkDate: this.form.time,
+					content: this.form.remarks,
+					deviceId: this.form.equipmentId,
+					status: this.form.status,
+					multiFilesSaveBeans: this.form.files
+				}).then(res => {
+					if (res.code === 200) {
+						uni.showToast({
+							title: '鎻愪氦鎴愬姛',
+							icon: 'success',
+							duration: 2000,
+							mask: true
+						});
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 2000)
+					}
+				})
+			},
+			// 鑾峰彇褰撳墠鐢ㄦ埛涓嬫墍鏈夎澶�
+			getSB() {
+				getDeviceByCondition({})
+					.then(res => {
+						if (res.code === 200 && res.data && res.data.length > 0) {
+							this.columns = []
+							res.data.forEach(item => {
+								this.columns.push({ text: item.name, id: item.id })
+							})
+						}
+					})
+			},
+			// 鑾峰彇鏂囦欢
+			async upFile(e) {
+				if (this.form.files.length + e.target.files.length > 9) {
+					uni.showToast({
+						title: '鏈�澶氬彧鑳戒笂浼�9涓浘鐗�/瑙嗛',
+						icon: 'none',
+						duration: 2000
+					});
+					return
+				}
+				for (let i = 0; i < e.target.files.length; i++) {
+					let type = e.target.files[i].type
+					let index = type.indexOf('/')
+					let data = type.substring(index + 1, type.length)
+					const format = new FormData()
+					format.append('file', e.target.files[i])
+					format.append('folder', this.path)
+					let res = await uploadFiles(format)
+					if (res.code === 200) {
+						form.files.push({
+							fileUrl: res.data.imgaddr,
+							filename: res.data.imgname,
+							filesize: e.target.files[i].size,
+							type: judgmentType(data.toLowerCase()) ? 0 : 1,
+							url: res.data.url
+						})
+					}
+				}
+				// upload.value.value = ''
+			},
+			// 鐐瑰嚮涓婁紶
+			uploadFile() {
+				uni.chooseImage({
+					success: (chooseImageRes) => {
+						const tempFilePaths = chooseImageRes.tempFilePaths;
+						console.log(tempFilePaths)
+						uni.uploadFile({
+							url: baseUrl + '/ext/routeCardExt/upload',
+							filePath: tempFilePaths[0],
+							name: 'file',
+							header: {
+								'Cookie': 'eva-auth-token=' + this.session
+							},
+							formData: {
+								'folder': this.path
+							},
+							success: (uploadFileRes) => {
+								console.log(JSON.parse(uploadFileRes.data));
+								let res = JSON.parse(uploadFileRes.data)
+								this.form.files.push({
+									fileUrl: res.data.imgaddr,
+									filename: res.data.imgname,
+									// filesize: e.target.files[i].size,
+									type: judgmentType(tempFilePaths[0]) ? 0 : 1,
+									url: res.data.url
+								})
+							}
+						});
+					}
+				});
+			},
+			// 鑾峰彇瀛楀吀绾�
+			getqueryListByCode() {
+				queryListByCode({
+					dicCode: 'FOLDER',
+					label: 'DEVICE_CHECK'
+				}).then(res => {
+					if (res.code === 200) {
+						this.path = res.data[0].code
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.box1 {
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		background: #F7F7F7;
+
+		.box_list {
+			padding: 0 30rpx 0 30rpx;
+			background: white;
+			display: flex;
+			flex-direction: column;
+
+			.box_list_code {
+				margin: 20rpx 0;
+
+				.boxs {
+					display: flex;
+					align-items: center;
+					justify-content: flex-end;
+
+					image {
+						width: 28rpx;
+						height: 28rpx;
+						margin-right: 12rpx;
+					}
+
+					text {
+						font-size: 28rpx;
+						font-weight: 400;
+						color: $nav-color;
+					}
+				}
+			}
+
+			.box_list_item {
+				height: 98rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border-bottom: 1rpx solid #E5E5E5;
+
+				&:last-child {
+					border: none;
+				}
+
+				.box_list_item_left {
+					text {
+						font-size: 30rpx;
+						font-weight: 400;
+
+						&:first-child {
+							color: #222222;
+						}
+
+						&:last-child {
+							color: #DE5243;
+							margin-left: 8rpx;
+						}
+					}
+				}
+
+				.box_list_item_right {
+					display: flex;
+					align-items: center;
+					.black {
+						color: black;
+					}
+
+					text {
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #999999;
+						margin-right: 10rpx;
+					}
+				}
+			}
+		}
+
+		.box_list1 {
+			padding: 30rpx;
+			background: white;
+			margin-top: 20rpx;
+
+			.box_list1_item {
+				height: 98rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border-bottom: 1rpx solid #E5E5E5;
+
+				&:last-child {
+					border: none;
+				}
+
+				.box_list1_item_left {
+					text {
+						font-size: 30rpx;
+						font-weight: 400;
+						color: #222222;
+
+						&:last-child {
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #DE5243;
+							margin-left: 4rpx;
+						}
+					}
+				}
+
+				.box_list1_item_right {
+					display: flex;
+					align-items: center;
+
+					.active {
+						color: white !important;
+						background: $nav-color !important;
+					}
+
+					.box_list1_item_right_item {
+						padding: 18rpx 32rpx;
+						background: #F2F2F2;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #333333;
+						margin-left: 20rpx;
+						border-radius: 8rpx;
+					}
+				}
+			}
+
+			.box_list1_club {
+				display: flex;
+				flex-direction: column;
+				margin-top: 36rpx;
+
+				.box_list1_club_label {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					margin-bottom: 32rpx;
+
+					text {
+						font-size: 30rpx;
+						font-weight: 400;
+						color: #DE5243;
+						margin-left: 4rpx;
+					}
+				}
+
+				.box_list1_club_list {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					flex-wrap: wrap;
+
+					.box_list1_club_list_item1 {
+						width: 170rpx;
+						height: 0;
+					}
+
+					.box_list1_club_list_item {
+						width: 150rpx;
+						height: 150rpx;
+						border-radius: 8rpx;
+						position: relative;
+						margin-right: 22rpx;
+						margin-bottom: 22rpx;
+
+						.type {
+							width: 100%;
+							height: 100%;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							overflow: hidden;
+							position: absolute;
+							top: 0;
+							left: 0;
+
+							.type_img {
+								width: 100%;
+								height: 100%;
+							}
+
+							video {
+								height: 100%;
+								z-index: 1;
+							}
+						}
+
+						.play {
+							position: absolute;
+							left: 50%;
+							top: 50%;
+							width: 56rpx;
+							height: 56rpx;
+							z-index: 9;
+							transform: translate(-50%, -50%);
+						}
+
+						.close {
+							position: absolute;
+							right: -16rpx;
+							top: -16rpx;
+							width: 32rpx;
+							height: 32rpx;
+							z-index: 9;
+						}
+					}
+				}
+			}
+		}
+
+		.box_list2 {
+			padding: 30rpx;
+			background: white;
+			margin-top: 20rpx;
+			display: flex;
+			flex-direction: column;
+
+			.box_list2_label {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #222222;
+				margin-bottom: 32rpx;
+			}
+
+			textarea {
+				border: none;
+				font-size: 28rpx;
+			}
+
+			textarea::-webkit-input-placeholder {
+				font-size: 28rpx;
+				font-weight: 400;
+				color: #B2B2B2;
+			}
+		}
+
+		.box_footer {
+			width: 100%;
+			padding: 0 30rpx 68rpx 30rpx;
+			box-sizing: border-box;
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			background: #F7F7F7;
+
+			.box_footer_submit {
+				width: 100%;
+				height: 88rpx;
+				background: #4275FC;
+				box-shadow: 0 0 12rpx 0 rgba(0, 0, 0, 0.0800);
+				border-radius: 8rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				border: none;
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/minipro_standard/util/api/QualityAPI.js b/minipro_standard/util/api/QualityAPI.js
index 8c4a347..a360e00 100644
--- a/minipro_standard/util/api/QualityAPI.js
+++ b/minipro_standard/util/api/QualityAPI.js
@@ -38,7 +38,7 @@
 
 // 鏍规嵁ID鏌ヨ
 export function getBYid (id) {
-  return request.post(`/ext/workorderCheckExt/${id}`)
+  return request.get(`/ext/workorderCheckExt/${id}`)
 }
 // export function getBYid(id: any): Promise<any> {
 //     return httpRequest({
diff --git a/minipro_standard/util/api/index.js b/minipro_standard/util/api/index.js
index e99feee..15b9d22 100644
--- a/minipro_standard/util/api/index.js
+++ b/minipro_standard/util/api/index.js
@@ -57,4 +57,9 @@
 // 鏌ヨ褰撳墠鐢ㄦ埛鎵�鏈変富缁勭粐涓嬬殑宸ュ簭
 export function getOrganization(data) {
 	return http.post('/ext/departmentExt/getDepartmentListByConditon', data)
+}
+
+// 鑾峰彇涓婁紶瀛楀吀鍊�
+export function queryListByCode(params) {
+	return http.get('/system/dictData/queryListByCode', {params})
 }
\ No newline at end of file
diff --git a/minipro_standard/util/utils.js b/minipro_standard/util/utils.js
index f30d0dc..95f672f 100644
--- a/minipro_standard/util/utils.js
+++ b/minipro_standard/util/utils.js
@@ -59,4 +59,20 @@
     number: /^\d+(?:\.\d{1,4})?$/
 }
 
-export { gsdate, setTime, setTimeO, REGULAR }
+/***
+ *
+ * @param type 鏂囦欢绫诲瀷
+ */
+function judgmentType (type) {
+    let arr = ['jpg', 'jpeg', 'png']
+    // arr.includes(type)
+    let open = false
+    arr.forEach(item => {
+        if (type === item) {
+            open = true
+        }
+    })
+    return open;
+}
+
+export { gsdate, setTime, setTimeO, REGULAR, judgmentType }

--
Gitblit v1.9.3