AaronBruin 3 months ago
parent
commit
e795d6d20a

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "冷链送药",
     "appid" : "__UNI__49186F9",
     "description" : "",
-    "versionName" : "1.2.0",
-    "versionCode" : 124,
+    "versionName" : "1.2.3",
+    "versionCode" : 126,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 5 - 1
pages/home/IceManagement.vue

@@ -78,7 +78,11 @@
 				}, {
 					bgcolor: '#ff9900',
 					label: '释冷中',
-					value: '4',
+					value: '5',
+				}, {
+					bgcolor: '#67C23A',
+					label: '释冷完成',
+					value: '6',
 				}],
 				PageIndex: 1,
 				PageSize: 15,

+ 1 - 1
pages/homePage.vue

@@ -2,7 +2,7 @@
 	<view class="home_app_bgc">
 		<u-navbar placeholder bgColor="#a9e3f1" leftIcon="" @rightClick="rightClick">
 			<view class="u-nav-slot" slot="left">
-				{{userInfo.dept.appName}}<span v-if="userInfo.dept.appName">-</span>智慧冰排管理系统
+				<view v-if="userInfo.dept">{{userInfo.dept.appName}}<span v-if="userInfo.dept.appName">-</span></view>智慧冰排管理系统
 			</view>
 			<view class="u-nav-slot" slot="right">
 				<u-icon name="list-dot" size="30" color="#fff"></u-icon>

+ 6 - 0
pages/mine/password.vue

@@ -80,6 +80,9 @@
 		methods: {
 			amend() {
 				if (this.userInfo.sedNewCode === this.userInfo.newCode) {
+					uni.showLoading({
+						mask: true
+					});
 					this.$api.put('/api/user/pwd/set', {
 						oldPassword: this.userInfo.oldCode,
 						newPassword: this.userInfo.newCode,
@@ -96,6 +99,9 @@
 								icon: 'none'
 							});
 						}
+						uni.hideLoading();
+					}).catch(() => {
+						uni.hideLoading();
 					})
 				} else {
 					uni.showToast({

+ 48 - 1
pages/order/Incubator.vue

@@ -33,7 +33,20 @@
 						<view>{{item.name}}</view>
 					</view>
 					<view class="card_precooling" :style="{color: filterColor(item.useStatus)}">
-						{{matchingType(item.useStatus)}}</view>
+						{{matchingType(item.useStatus)}}
+					</view>
+				</view>
+				<view v-if="isCoolerInfo.isCoolerReleaseCold && item.useStatus == 1 || item.useStatus == 3">
+					<view class="card_precool" v-if="item.cold_temperatures">预冷温度(℃): {{item.cold_temperatures}}</view>
+					<view class="card_precool" v-if="item.cold_spots">预冷地点: {{item.cold_spots}}</view>
+					<view style="display: flex;align-items: center;">
+						<view class="card_precool" v-if="item.for_cold_cooler_time">预冷要求:
+							<span>{{item.for_cold_cooler_time}}h</span>
+						</view>
+						<view class="card_precool" v-if="item.cooler_box_record.for_cold_duration">预冷时间:
+							<span>{{item.cooler_box_record.for_cold_duration}}</span>
+						</view>
+					</view>
 				</view>
 				<view class="floe_card" v-if="item.ice_raft.length > 0 && iceColdFlag">
 					<view class="card_ice_list">
@@ -118,6 +131,10 @@
 					bgcolor: '#67C23A',
 					label: '使用中',
 					value: 2,
+				}, {
+					bgcolor: '#67C23A',
+					label: '预冷完成',
+					value: 3,
 				}]
 			}
 		},
@@ -185,6 +202,9 @@
 			// 保温箱预冷
 			coolingRelease() {
 				if (this.selectedList.length > 0) {
+					uni.showLoading({
+						mask: true
+					});
 					let arrID = this.selectedList.map(item => item.toString())
 					this.$api.post('/api/cooler-box/coolerboxstarttime', {
 						id: arrID,
@@ -199,6 +219,9 @@
 						} else {
 							uni.$u.toast(res.msg)
 						}
+						uni.hideLoading();
+					}).catch(() => {
+						uni.hideLoading();
 					})
 				} else {
 					uni.$u.toast('请先选择保温箱')
@@ -207,6 +230,9 @@
 			// 结束使用
 			endOfUse() {
 				if (this.selectedList.length > 0) {
+					uni.showLoading({
+						mask: true
+					});
 					let arrID = this.selectedList.map(item => item.toString())
 					this.$api.put('/api/cooler-box/coolerBoxEndUse', {
 						id: arrID,
@@ -217,7 +243,12 @@
 							this.orderList = []
 							this.loadingMore = true
 							this.getIncubator()
+						} else {
+							uni.$u.toast(res.msg || '操作成功')
 						}
+						uni.hideLoading();
+					}).catch(() => {
+						uni.hideLoading();
 					})
 				} else {
 					uni.$u.toast('请先选择保温箱')
@@ -226,6 +257,9 @@
 			// 结束使用单个
 			endOfUseil(event) {
 				let incubatorId = String(event.id)
+				uni.showLoading({
+					mask: true
+				});
 				this.$api.put('/api/cooler-box/coolerBoxEndUse', {
 					id: [incubatorId],
 				}).then(res => {
@@ -236,6 +270,9 @@
 						this.loadingMore = true
 						this.getIncubator()
 					}
+					uni.hideLoading();
+				}).catch(() => {
+					uni.hideLoading();
 				})
 			},
 			// 判断冰排是否选择
@@ -584,5 +621,15 @@
 		color: #19be6b;
 		font-size: 30rpx;
 		flex: none;
+		margin-right: 10rpx;
+	}
+
+	.card_precool {
+		font-size: 28rpx;
+		margin-right: 10px;
+
+		span {
+			color: #19be6b;
+		}
 	}
 </style>

+ 8 - 15
pages/order/addIceRaft.vue

@@ -71,20 +71,6 @@
 						required: false,
 						message: '请输入释冷温度',
 						trigger: ['blur', 'change']
-					}, {
-						required: false,
-						validator: (rule, value, callback) => {
-							if (!value && rule.required) {
-								return callback(new Error('请输入释冷温度'));
-							}
-							if (value) {
-								if (!/^(\d+)?(\.\d+)?$/.test(value)) {
-									return callback(new Error('请输入有效的数值'));
-								}
-							}
-							return callback();
-						},
-						trigger: ['blur', 'change']
 					}],
 					forColdTime: [{
 						required: false,
@@ -188,7 +174,7 @@
 						label: this.recipientsModel.label,
 						freezeClaim: this.recipientsModel.freezeClaim,
 						iceColdAddress: this.recipientsModel.iceColdAddress,
-						forColdTime:  Number(this.recipientsModel.forColdTime),
+						forColdTime: Number(this.recipientsModel.forColdTime),
 						suitableForCold: Number(this.recipientsModel.suitableForCold),
 						status: null,
 						sort: Number(this.recipientsModel.sort),
@@ -200,6 +186,9 @@
 					}
 					params.codeList.push(this.recipientsModel.code)
 					this.printLoading = true
+					uni.showLoading({
+						mask: true
+					});
 					if (this.recipientsModel.id) {
 						params.id = this.recipientsModel.id
 						params.code = this.recipientsModel.code
@@ -213,8 +202,10 @@
 								uni.$u.toast(res.msg)
 							}
 							this.printLoading = false
+							uni.hideLoading();
 						}).catch(() => {
 							this.printLoading = false
+							uni.hideLoading();
 						})
 					} else {
 						this.$api.post('/api/ice-raft', params).then(res => {
@@ -226,8 +217,10 @@
 								uni.$u.toast(res.msg)
 							}
 							this.printLoading = false
+							uni.hideLoading();
 						}).catch(() => {
 							this.printLoading = false
+							uni.hideLoading();
 						})
 					}
 				} else {

+ 3 - 1
pages/order/addWaybill.vue

@@ -217,7 +217,9 @@
 							...this.goodsModel,
 						}
 						delete params.drugBarCode
-						uni.showLoading();
+						uni.showLoading({
+							mask: true
+						});
 						this.printLoading = true
 						if (this.type == 1) {
 							// 添加运单

+ 11 - 2
pages/order/delivery.vue

@@ -162,6 +162,9 @@
 				await this.getEntering()
 				if (this.list.length > 0) {
 					this.loading = true
+					uni.showLoading({
+						mask: true
+					});
 					if (this.typeFlag) {
 						// 入库
 						this.$api.post('/api/ice-raft/in-storage', {
@@ -188,6 +191,9 @@
 								});
 							}
 							this.loading = false
+							this.getIncubator()
+						}).catch(() => {
+							uni.hideLoading();
 						})
 					} else {
 						this.loading = false
@@ -202,6 +208,9 @@
 							} else {
 								uni.$u.toast(res.msg)
 							}
+							this.getIncubator()
+						}).catch(() => {
+							uni.hideLoading();
 						})
 					}
 				} else {
@@ -231,11 +240,11 @@
 				this.$api.post('/api/ice-raft/out-storage', {
 					code: this.list,
 					coolerBoxId: this.incubator.id,
-					suitableForCold: Number(this.suitableForCold),
+					// suitableForCold: Number(this.suitableForCold),
 				}).then(res => {
 					if (res.code == 200) {
 						this.list = []
-						this.suitableForCold = null
+						// this.suitableForCold = null
 						this.frequencyCoding = ''
 						this.incubator.id = null
 						this.incubator.name = ''

+ 23 - 4
pages/order/freezer.vue

@@ -11,7 +11,7 @@
 				</view>
 			</view>
 			<view class="card_tab_freezer">
-				<view :style="{width:isIceInfo.isIceReleaseCold ? '260px':'100%'}">
+				<view :style="{width:isIceInfo.isIceReleaseCold ? '70%':'100%'}">
 					<view class="card_subsection">
 						<view :class="item.id == current ? 'activate_subsection' : 'item_subsection'"
 							v-for="(item,index) in iceStateList" :key="index" @click="sectionChange(item)">
@@ -57,8 +57,14 @@
 				<view class="title_itemIce" v-if="item.iceRaftRecord.status != ''">冷冻要求:
 					<span>{{getFreeze(item.iceRaftRecord.freezeClaim)}}</span>
 				</view>
-				<view class="title_itemIce" v-if="item.iceRaftRecord.status != ''">冷冻时间:
-					<span>{{formatMinutes(item.iceRaftRecord.freezeDuration)}}</span>
+				<view style="display: flex;align-items: center;">
+					<view class="title_itemIce" style="margin-right: 10rpx;" v-if="item.iceRaftRecord.status != ''">
+						冷冻时间:
+						<span>{{formatMinutes(item.iceRaftRecord.freezeDuration)}}</span>
+					</view>
+					<view class="title_itemIce" v-if="item.iceRaftRecord.status != ''">释冷时间:
+						<span>{{formatMinutes(item.iceRaftRecord.forColdTimeActual)}}</span>
+					</view>
 				</view>
 				<view class="position-triangle" v-if="item.whetherFlag">
 					<span>已选</span>
@@ -96,6 +102,10 @@
 					bgcolor: '#ff9900',
 					label: '释冷中',
 					value: '5',
+				}, {
+					bgcolor: '#67C23A',
+					label: '释冷完成',
+					value: '6',
 				}],
 				iceState: null,
 				iceStateList: [],
@@ -121,6 +131,9 @@
 				}, {
 					id: 5,
 					title: '释冷中',
+				}, {
+					id: 6,
+					title: '释冷完成',
 				}],
 				current: 0,
 				PageIndex: 1,
@@ -255,6 +268,9 @@
 			// 出库释冷
 			coolingRelease() {
 				if (this.selectedList.length > 0) {
+					uni.showLoading({
+						mask: true
+					});
 					let arrID = this.selectedList.map(item => item.toString())
 					this.$api.post('/api/ice-raft-record/start-for-cold', {
 						id: arrID,
@@ -272,6 +288,9 @@
 						} else {
 							uni.$u.toast(res.msg)
 						}
+						uni.hideLoading();
+					}).catch(() => {
+						uni.hideLoading();
 					})
 				} else {
 					uni.$u.toast('请先选择释冷冰排')
@@ -463,7 +482,7 @@
 
 	.title_itemIce {
 		color: #000000;
-		font-size: 30rpx;
+		font-size: 28rpx;
 		margin-top: 10rpx;
 
 		span {

+ 9 - 4
pages/order/iceRaft.vue

@@ -27,12 +27,17 @@
 						<view style="display: flex;align-items: center;margin-top: 5rpx;">
 							<view class="title_ice1">冷冻要求:{{getFreeze(item.freezeClaim)}}</view>
 						</view>
-						<view class="cooling_release_title" v-if="isIceInfo.isIceReleaseCold">释冷温度:
-							<span>{{item.suitableForCold}}℃</span>
-						</view>
 						<view class="cooling_release_title" v-if="isIceInfo.isIceReleaseCold">释冷地点:
 							{{item.iceColdAddress}}
 						</view>
+						<view style="display: flex;align-items: center;" v-if="isIceInfo.isIceReleaseCold">
+							<view class="cooling_release_title">释冷温度:
+								<span>{{item.suitableForCold}}℃</span>
+							</view>
+							<view class="cooling_release_title">释冷要求:
+								<span>{{item.forColdTime}}h</span>
+							</view>
+						</view>
 					</view>
 				</view>
 				<view class="right_up_down">
@@ -234,7 +239,7 @@
 	}
 
 	.cooling_release_title {
-		font-size: 30rpx;
+		font-size: 28rpx;
 		margin-right: 20rpx;
 
 		span {