Переглянути джерело

冰排新增字段、权限释冷、预冷

unknown 3 днів тому
батько
коміт
58ed52a2ca

+ 3 - 3
.env.js

@@ -2,9 +2,9 @@ const UNI_APP = {
 	// APP_DEV_URL: 'https://colddelivery.coldbaozhida.com/cold_delivery',
 	// APP_PROD_URL: 'https://colddelivery.coldbaozhida.com/cold_delivery',
 	// APP_LINK_URL: 'https://colddelivery.coldbaozhida.com',
-	APP_DEV_URL: 'http://192.168.11.77:6280', //测试
-	APP_PROD_URL: 'http://192.168.11.77:6280', //测试
-	APP_LINK_URL: 'http://192.168.11.77:6280', //测试
+	APP_DEV_URL: 'http://182.43.247.65:6280', //测试
+	APP_PROD_URL: 'http://182.43.247.65:6280', //测试
+	APP_LINK_URL: 'http://182.43.247.65:6280', //测试
 
 	AES_KEY: "675I3123J3Toq10L",
 	AES_IV: "AdC01PoIU3LnSh10",

+ 1 - 1
components/x-form.vue

@@ -121,7 +121,7 @@
 			},
 			// 选择弹窗滚动
 			changeil(value) {
-				if (value.field == "status") {
+				if (value.field == "status" || value.field == "freezeClaim") {
 					this.columns = []
 					this.fieldType = value.field
 					this.show = true

+ 5 - 0
pages.json

@@ -120,6 +120,11 @@
 			"navigationStyle": "custom"
 		}
 	}, {
+		"path": "pages/order/freezer",
+		"style": {
+			"navigationStyle": "custom"
+		}
+	}, {
 		"path": "pages/order/addIceRaft",
 		"style": {
 			"navigationStyle": "custom"

+ 4 - 4
pages/home/IceManagement.vue

@@ -18,7 +18,7 @@
 						{{matchingType(item.iceRaftRecord.status)}}
 					</view>
 				</view>
-				<view class="title_itemIce">冰排备注:冰排1</view>
+				<view class="title_itemIce">冰排备注:{{item.label}}</view>
 				<view class="title_itemIce" v-if="item.iceRaftRecord.inStorageTime">入库时间:
 					{{item.iceRaftRecord.inStorageTime}}
 				</view>
@@ -56,11 +56,11 @@
 			return {
 				list: [],
 				typeList: [{
-					bgcolor: '#909399',
+					bgcolor: '#ff9900',
 					label: '未入库',
 					value: '',
 				}, {
-					bgcolor: '#409EFF',
+					bgcolor: '#fa3534',
 					label: '冷冻中',
 					value: '1',
 				}, {
@@ -68,7 +68,7 @@
 					label: '待使用',
 					value: '2',
 				}, {
-					bgcolor: '#E6A23C',
+					bgcolor: '#409EFF',
 					label: '使用中',
 					value: '3',
 				}, {

+ 9 - 9
pages/homePage.vue

@@ -58,22 +58,22 @@
 			</view>
 			<view class="card_bottom_add" @click="getOperate('iceCold')" v-if="iceColdFlag">
 				<view style="display: flex;align-items: center;">
-					<span class="iconfont icon-bingpaiguanli icon_bottom"></span>
-					<span>冰排释冷</span>
+					<span class="iconfont icon-binggui icon_bottom"></span>
+					<span>冷冻柜管理</span>
 				</view>
 				<u-icon name="arrow-right" size="20"></u-icon>
 			</view>
-			<view class="card_bottom_add" @click="getOperate('iceRaft')">
+			<view class="card_bottom_add" @click="getOperate('incubator')">
 				<view style="display: flex;align-items: center;">
-					<span class="iconfont icon-bingpaiguanli icon_bottom"></span>
-					<span>冰排管理</span>
+					<span class="iconfont icon-incubator icon_bottom"></span>
+					<span>保温箱管理</span>
 				</view>
 				<u-icon name="arrow-right" size="20"></u-icon>
 			</view>
-			<view class="card_bottom_add" @click="getOperate('incubator')">
+			<view class="card_bottom_add" @click="getOperate('iceRaft')">
 				<view style="display: flex;align-items: center;">
-					<span class="iconfont icon-incubator icon_bottom"></span>
-					<span>保温箱管理</span>
+					<span class="iconfont icon-bingpaiguanli icon_bottom"></span>
+					<span>冰排管理</span>
 				</view>
 				<u-icon name="arrow-right" size="20"></u-icon>
 			</view>
@@ -250,7 +250,7 @@
 						});
 					} else if (type == 'iceCold') {
 						uni.navigateTo({
-							url: '/pages/order/iceCold'
+							url: '/pages/order/iceCold?detailsFlag=true'
 						});
 					} else if (type == 'wait') {
 						uni.$u.toast('敬请期待!')

+ 204 - 23
pages/order/Incubator.vue

@@ -7,6 +7,18 @@
 				<u-search :showAction="false" v-model="keyword" @change="searchChange"
 					placeholder="输入关键字快速查找"></u-search>
 			</view>
+			<view class="card_tab_freezer" v-if="detailsFlag && isCoolerInfo.isCoolerReleaseCold">
+				<view class="select_freezer">
+					<view style="display: flex;align-items: center;margin-right: 10rpx;">
+						<view class="title_num blue_color">总数:{{Total}}</view>
+						<view class="title_num green_color">已选:{{selectedList.length}}</view>
+					</view>
+					<view style="display: flex;align-items: center;">
+						<view class="select_title blue_color" @click="checkAll">全选</view>
+						<view class="select_title orange_color" @click="Inverse">反选</view>
+					</view>
+				</view>
+			</view>
 		</u-sticky>
 		<view class="card_incubator" v-if="orderList.length > 0">
 			<view :class="iceColdFlag ? 'item_bator' : 'item_bator_cold'" v-for="(item,index) in orderList" :key="index"
@@ -27,9 +39,9 @@
 							</view>
 							<view style="display: flex;align-items: center;">
 								<view class="title_cryophilic" style="margin-right: 5rpx;">
-									冷温度:<span v-if="item1.iceRaftRecord">{{item1.iceRaftRecord.suitableForCold || 0}}℃
+									冷温度:<span v-if="item1.iceRaftRecord">{{item1.iceRaftRecord.suitableForCold || 0}}℃
 									</span></view>
-								<view class="title_cryophilic">冷时间:<span>≥{{item1.suitableForColdTime}}min</span>
+								<view class="title_cryophilic">冷时间:<span>≥{{item1.suitableForColdTime}}min</span>
 								</view>
 							</view>
 							<view class="title_cryophilic" v-if="item1.iceRaftRecord">
@@ -41,7 +53,10 @@
 				</view>
 				<view class="btn_printil markd10" v-if="item.ice_raft.length > 0 && getIceState(item.ice_raft)"
 					@click.stop="endCooling(item.ice_raft)">
-					<u-button size="small" type="warning" text="结束适冷"></u-button>
+					<u-button size="small" type="warning" text="结束释冷"></u-button>
+				</view>
+				<view class="position-triangle" v-if="item.whetherFlag">
+					<span>已选</span>
 				</view>
 			</view>
 			<view style="width: 100%;">
@@ -51,6 +66,10 @@
 		<view style="margin-top: 20%;" v-else>
 			<u-empty mode="list" text="暂无保温箱"></u-empty>
 		</view>
+		<view style="width: 100%;height: 120rpx;" class="env_padding" v-if="detailsFlag"></view>
+		<view class="card_btn_freezer" v-if="detailsFlag && isCoolerInfo.isCoolerReleaseCold">
+			<u-button style="margin-bottom: 20rpx;" type="primary" @click="coolingRelease">保温箱预冷</u-button>
+		</view>
 	</view>
 </template>
 
@@ -66,19 +85,13 @@
 				incubatorValue: '',
 				orderList: [],
 				detailsFlag: false,
-				iceData: [{
-					label: '冰排1',
-					code: '202409091350938276'
-				}, {
-					label: '冰排1',
-					code: '202409091350938276'
-				}, {
-					label: '冰排1',
-					code: '202409091350938276'
-				}],
 				showFlag: true,
 				// 是否释冷
 				iceColdFlag: true,
+				Total: 0,
+				selectedList: [],
+				isCoolerInfo: {},
+				searchShow: true,
 			}
 		},
 		onReachBottom() {
@@ -90,18 +103,26 @@
 			if (option.detailsFlag) {
 				this.detailsFlag = true
 			}
-			console.log(option, 25)
 		},
 		mounted() {
+			var userInfo = this.$cache.getCache('userInfo')
+			this.isCoolerInfo = userInfo.dept
 			this.getIncubator()
 		},
 		methods: {
 			// 搜索
 			searchChange(value) {
-				this.currentPage = 1
-				this.orderList = []
-				this.loadingMore = true
-				this.getIncubator()
+				var that = this
+				if (that.searchShow) {
+					that.searchShow = false
+					const timer = setTimeout(function() {
+						clearTimeout(timer);
+						that.currentPage = 1
+						that.orderList = []
+						that.loadingMore = true
+						that.getIncubator()
+					}, 300);
+				}
 			},
 			// 获取保温箱
 			getIncubator() {
@@ -115,10 +136,12 @@
 				}).then(res => {
 					if (res.code == 200) {
 						const data = res.data.list
+						this.Total = res.data.count
 						if (this.loadingMore == true && data) {
 							this.orderList = this.orderList.concat(data);
 							// console.log(this.orderList, 245)
 						}
+						this.getRecord()
 						if (data.length < this.pageSize) {
 							this.loadingMore = true
 							this.loading = '没有更多了'
@@ -130,16 +153,71 @@
 							this.currentPage++
 						}
 					}
+					this.searchShow = true
 				})
 			},
-			// 结束适冷
+			// 保温箱预冷
+			coolingRelease() {
+				console.log(this.selectedList, 24)
+				if (this.selectedList.length > 0) {
+					let arrID = this.selectedList.map(item => item.toString())
+					this.$api.post('/api/cooler-box/coolerboxstarttime', {
+						id: arrID,
+					}).then(res => {
+						if (res.code == 200) {
+							uni.$u.toast('操作成功')
+						}
+					})
+				} else {
+					uni.$u.toast('请先选择释冷冰排')
+				}
+			},
+			// 判断冰排是否选择
+			getRecord() {
+				this.orderList.forEach(item => {
+					let index = this.selectedList.findIndex((event) => event === item.id);
+					if (index !== -1) {
+						item.whetherFlag = true
+					} else {
+						item.whetherFlag = false
+					}
+				})
+				this.$forceUpdate()
+			},
+			// 全选
+			checkAll() {
+				this.selectedList = []
+				for (let i = 0; i < this.orderList.length; i++) {
+					this.$set(this.orderList[i], 'whetherFlag', true)
+				}
+				this.orderList.forEach(item => {
+					if (item.whetherFlag) {
+						this.selectedList.push(item.id)
+					}
+				})
+				this.getRecord()
+			},
+			// 反选
+			Inverse() {
+				this.selectedList = []
+				for (let i = 0; i < this.orderList.length; i++) {
+					let flag = this.orderList[i].whetherFlag;
+					this.$set(this.orderList[i], 'whetherFlag', !flag)
+				}
+				this.orderList.forEach(item => {
+					if (item.whetherFlag) {
+						this.selectedList.push(item.id)
+					}
+				})
+				this.getRecord()
+			},
+			// 结束释冷
 			endCooling(event) {
 				let list = event.filter(item => item.iceRaftRecord.isSuitableForCold == 0);
 				const idsString = list.map(item => item.iceRaftRecordId);
 				this.$api.post('/api/ice-raft-record/end-for-cold', {
 					iceRaftRecordId: idsString,
 				}).then(res => {
-					console.log(res, 235)
 					if (res.code == 200) {
 						uni.$u.toast('操作成功')
 						this.currentPage = 1
@@ -151,7 +229,17 @@
 			// 选择保温箱
 			selectIncubator(value) {
 				if (this.detailsFlag) {
-					console.log('详情')
+					// console.log('详情')
+					let index = this.selectedList.findIndex((item) => item === value.id);
+					// 如果有就替换,没有就添加
+					if (index !== -1) {
+						this.selectedList.splice(index, 1);
+					} else {
+						this.selectedList.push(value.id);
+					}
+					if (this.isCoolerInfo.isCoolerReleaseCold) {
+						this.getRecord()
+					}
 				} else {
 					uni.setStorageSync('incubatorValue', value)
 					uni.navigateBack({
@@ -159,11 +247,11 @@
 					});
 				}
 			},
-			// 保温箱下所有冰排冷状态
+			// 保温箱下所有冰排冷状态
 			getIceState(event) {
 				let arrList = event
 				let bol = true
-				// isSuitableForCold 0 未适冷 1 已适
+				// isSuitableForCold 0 未释冷 1 已释
 				for (let i = 0; i < arrList.length; i++) {
 					if (arrList[i].iceRaftRecord.isSuitableForCold == 1) {
 						bol = false
@@ -203,22 +291,97 @@
 		padding: 20rpx;
 	}
 
+	.card_tab_freezer {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0rpx 20rpx 20rpx 20rpx;
+		background-color: #fff;
+	}
+
+	.card_subsection {
+		width: 50%;
+	}
+
+	.select_freezer {
+		display: flex;
+		align-items: flex-end;
+		// flex-direction: column;
+	}
+
+	.title_num {
+		font-size: 26rpx;
+		margin-left: 10rpx;
+	}
+
+	.select_title {
+		font-size: 30rpx;
+		margin-left: 15rpx;
+	}
+
+	.blue_color {
+		color: #2979ff;
+	}
+
+	.green_color {
+		color: #19be6b;
+	}
+
+	.orange_color {
+		color: #ff9900;
+	}
+
 	.item_bator {
+		position: relative;
 		display: flex;
 		flex-direction: column;
 		background-color: #fff;
 		border-radius: 10rpx;
 		padding: 15rpx;
 		margin: 10rpx 20rpx;
+		overflow: hidden;
 	}
 
 	.item_bator_cold {
+		position: relative;
 		display: flex;
 		flex-direction: column;
 		background-color: #fff;
 		border-radius: 10rpx;
 		padding: 30rpx;
 		margin: 10rpx 20rpx;
+		overflow: hidden;
+	}
+
+	.position-triangle {
+		position: absolute;
+		bottom: 0;
+		right: 0;
+		overflow: hidden;
+		height: 35px;
+		width: 35px;
+	}
+
+	.position-triangle span {
+		position: absolute;
+		font-size: 20rpx;
+		bottom: 8rpx;
+		right: 3rpx;
+		z-index: 1;
+		color: #fff;
+		transform: rotate(-45deg);
+	}
+
+	.position-triangle::after {
+		content: "";
+		font-size: 20rpx;
+		position: absolute;
+		width: 70px;
+		height: 70px;
+		background-color: #19be6b;
+		transform: rotate(45deg);
+		transform-origin: center;
+		top: 50%;
 	}
 
 	.imagebwx {
@@ -277,4 +440,22 @@
 			color: #19be6b;
 		}
 	}
+
+	.card_btn_freezer {
+		position: fixed;
+		z-index: 2;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		padding: 20rpx 30rpx 20rpx 30rpx;
+		background-color: #fff;
+		padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
+		padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
+		border-top: 1rpx solid #E4E7ED;
+	}
+
+	.env_padding {
+		padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
+		padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
+	}
 </style>

+ 54 - 30
pages/order/addIceRaft.vue

@@ -5,7 +5,7 @@
 		<x-form ref="recipients" :list="list" :model="recipientsModel" :rules="rules"></x-form>
 		<view style="width: 100%;height: 150rpx;"></view>
 		<view class="btn_print" @click="printWaybill">
-			<u-button type="primary" shape="circle" :text="headline"></u-button>
+			<u-button type="primary" :text="headline"></u-button>
 		</view>
 	</view>
 </template>
@@ -24,8 +24,8 @@
 					label: '',
 					status: '',
 					freezeClaim: '',
-					suitableForColdTime: '',
-					suitableForCold: '',
+					suitableForCold: null,
+					iceColdAddress: '',
 				},
 				rules: {
 					code: {
@@ -48,43 +48,67 @@
 						message: '请输入冷冻要求',
 						trigger: ['blur', 'change']
 					},
-					suitableForColdTime: {
+					iceColdAddress: {
 						required: true,
-						message: '请输入适冷时间',
+						message: '请输入释冷地点',
 						trigger: ['blur', 'change']
 					},
 					suitableForCold: {
 						required: true,
-						message: '请输入冷温度',
+						message: '请输入冷温度',
 						trigger: ['blur', 'change']
 					},
 				},
-				list: iceRaftRulesil(),
-				userInfo: {},
+				list: [],
+				isIceInfo: {},
 				headline: '添加冰排',
 				type: 1,
 			}
 		},
-		onShow() {},
+		onShow() {
+			var userInfo = this.$cache.getCache('userInfo')
+			this.isIceInfo = userInfo.dept
+			console.log(this.isIceInfo.isIceReleaseCold,25)
+			if (this.isIceInfo.isIceReleaseCold) {
+				this.list = iceRaftRulesil()
+			} else {
+				var arrIce = iceRaftRulesil()
+				this.list = removePointById(arrIce, ['suitableForCold', 'iceColdAddress'])
+			}
+
+			function removePointById(arr1, arr2) {
+				for (let i = 0; i < arr2.length; i++) {
+					for (let j = 0; j < arr1.length; j++) {
+						if (arr2[i] == arr1[j].field) {
+							let indexs = arr1.indexOf(arr1[j]);
+							arr1.splice(indexs, 1);
+						}
+					}
+				}
+				return arr1
+			}
+		},
 		onLoad(option) {
-			let arrValue = JSON.parse(option.list)
-			if (arrValue.id) {
-				this.headline = '编辑冰排'
-				this.recipientsModel = arrValue
-				this.recipientsModel.freezeClaim = String(arrValue.freezeClaim)
-				if (arrValue.status == '2') {
-					this.recipientsModel.status = '正常'
+			if (option.list) {
+				let arrValue = JSON.parse(option.list)
+				if (arrValue.id) {
+					this.$nextTick(() => {
+						this.headline = '编辑冰排'
+						this.recipientsModel = arrValue
+						this.recipientsModel.freezeClaim = String(arrValue.freezeClaim)
+						this.recipientsModel.suitableForCold = String(arrValue.suitableForCold)
+						if (arrValue.status == '2') {
+							this.recipientsModel.status = '正常'
+						} else {
+							this.recipientsModel.status = '停用'
+						}
+					})
 				} else {
-					this.recipientsModel.status = '停用'
+					this.headline = '添加冰排'
 				}
-			} else {
-				this.headline = '添加冰排'
 			}
 		},
-		mounted() {
-			var userInfo = this.$cache.getCache('userInfo')
-			this.userInfo = userInfo
-		},
+		mounted() {},
 		methods: {
 			// tianjia运单
 			async printWaybill() {
@@ -94,7 +118,7 @@
 						codeList: [],
 						label: this.recipientsModel.label,
 						freezeClaim: Number(this.recipientsModel.freezeClaim),
-						suitableForColdTime: Number(this.recipientsModel.suitableForColdTime),
+						iceColdAddress: this.recipientsModel.iceColdAddress,
 						suitableForCold: Number(this.recipientsModel.suitableForCold),
 						status: null,
 					}
@@ -110,17 +134,17 @@
 						delete params.codeList
 						this.$api.put('/api/ice-raft', params).then(res => {
 							if (res.code == 200) {
-								uni.redirectTo({
-									url: '/pages/order/iceRaft'
-								})
+								uni.navigateBack({
+									delta: 1
+								});
 							}
 						})
 					} else {
 						this.$api.post('/api/ice-raft', params).then(res => {
 							if (res.code == 200) {
-								uni.redirectTo({
-									url: '/pages/order/iceRaft'
-								})
+								uni.navigateBack({
+									delta: 1
+								});
 							}
 						})
 					}

+ 1 - 1
pages/order/addWaybill.vue

@@ -13,7 +13,7 @@
 		<x-form ref="goods" :list="goodsList" :model="goodsModel" :rules="goodsRules" @selector="selector"></x-form>
 		<view style="width: 100%;height: 150rpx;"></view>
 		<view class="btn_print" @click="printWaybill">
-			<u-button type="primary" shape="circle" :text="headline"></u-button>
+			<u-button type="primary" :text="headline"></u-button>
 		</view>
 		<u-popup :show="courierShow" mode="bottom" closeable :round="10" :closeOnClickOverlay="false" @close="close">
 			<view class="card_courier">

+ 11 - 180
pages/order/delivery.vue

@@ -76,29 +76,6 @@
 				<u-button style="margin-bottom: 20rpx;" type="primary" @click="submit">提交</u-button>
 			</view>
 		</view>
-		<u-popup :show="courierShow" mode="bottom" closeable :round="10" :closeOnClickOverlay="false" @close="close">
-			<view class="card_courier">
-				<view class="headline">{{courierHeadline}}</view>
-				<view class="search_card">
-					<u-search :showAction="false" v-model="keyword" @change="searchChange"
-						placeholder="输入关键字快速查找"></u-search>
-				</view>
-				<scroll-view class="scroll-view" scroll-y="true" @scrolltolower="loadMore">
-					<view class="courier" v-if="courieList.length > 0">
-						<view class="courier_item space_between" v-for="(item,index) in courieList" :key="index"
-							@click="bindingDistributor(item)">
-							<view class="courier_name">
-								<view class="title_name">{{item.name}}</view>
-							</view>
-							<view class="xd_title center_in">选择</view>
-						</view>
-					</view>
-					<view style="margin-top: 30rpx;" v-else>
-						<u-empty mode="list" :text="textEmpty"></u-empty>
-					</view>
-				</scroll-view>
-			</view>
-		</u-popup>
 	</view>
 </template>
 
@@ -115,19 +92,8 @@
 				orderId: '',
 				freezingDuration: '',
 				suitableForCold: null,
-
-				keyword: '',
-				courierHeadline: '选择冷冻柜',
-				textEmpty: '暂无冷冻柜',
-				courieList: [],
-				courierShow: false,
-				iceLockerId: '',
-				freezeClaim: '',
 				typeFlag: true,
 
-				incubatorMore: true,
-				Pagination: 1,
-				pageSize: 10,
 				coldCupboard: {
 					id: null,
 					name: '',
@@ -140,6 +106,7 @@
 		},
 		onUnload() {
 			uni.removeStorageSync('incubatorValue');
+			uni.removeStorageSync('freezerValue');
 		},
 		onLoad(receive) {
 			this.navTitle = receive.title
@@ -153,105 +120,27 @@
 					this.incubator.name = incubator.name
 				}
 			}
+			let freezer = uni.getStorageSync('freezerValue')
+			if (freezer) {
+				if (freezer.id != this.coldCupboard.id) {
+					this.coldCupboard.id = freezer.id
+					this.coldCupboard.name = freezer.name
+				}
+			}
 		},
 		methods: {
 			focus(flag) {
 				this.typeFlag = flag
-				this.courieList = []
-				this.Pagination = 1
-				this.incubatorMore = true
 				if (flag) {
-					this.courierHeadline = '选择冷冻柜'
-					this.textEmpty = '暂无冷冻柜'
-					this.getFreezer()
-					this.courierShow = true
+					uni.navigateTo({
+						url: '/pages/order/iceCold'
+					});
 				} else {
 					uni.navigateTo({
 						url: '/pages/order/Incubator'
 					});
-					// this.courierHeadline = '选择保温箱'
-					// this.textEmpty = '暂无保温箱'
-					// this.getIncubator()
-				}
-			},
-			// 关键字搜索
-			searchChange(value) {
-				this.Pagination = 1
-				this.incubatorMore = true
-				this.courieList = []
-				if (this.typeFlag) {
-					this.getFreezer()
-				} else {
-					this.getIncubator()
 				}
 			},
-			// 获取冷冻柜
-			getFreezer() {
-				this.$api.get('/api/ice-locker', {
-					page: this.Pagination,
-					pageSize: this.pageSize,
-					name: this.keyword,
-					status: '2',
-				}).then(res => {
-					if (res.code == 200) {
-						const data = res.data.list
-						if (this.incubatorMore == true) {
-							this.courieList = this.courieList.concat(data);
-						}
-						if (data.length < this.pageSize) {
-							this.incubatorMore = false
-						} else {
-							this.incubatorMore = true
-						}
-					}
-				})
-			},
-			// 获取保温箱
-			getIncubator() {
-				this.$api.get('/api/cooler-box', {
-					page: this.Pagination,
-					pageSize: this.pageSize,
-					name: this.keyword,
-					status: '2',
-				}).then(res => {
-					if (res.code == 200) {
-						const data = res.data.list
-						if (this.incubatorMore == true) {
-							this.courieList = this.courieList.concat(data);
-						}
-						if (data.length < this.pageSize) {
-							this.incubatorMore = false
-						} else {
-							this.incubatorMore = true
-						}
-					}
-				})
-			},
-			// 选择保温箱.冷冻柜
-			bindingDistributor(value) {
-				if (this.typeFlag) {
-					this.coldCupboard.id = value.id
-					this.coldCupboard.name = value.name
-				} else {
-					this.incubator.id = value.id
-					this.incubator.name = value.name
-				}
-				this.courierShow = false
-			},
-			// 滚动加载更多
-			loadMore() {
-				if (this.incubatorMore) {
-					this.Pagination++
-					if (this.typeFlag) {
-						this.getFreezer()
-					} else {
-						this.getIncubator()
-					}
-				}
-			},
-			close() {
-				this.courierShow = false
-			},
 			leftClick() {
 				uni.$emit('refresh');
 			},
@@ -572,64 +461,6 @@
 		border-style: solid;
 	}
 
-	.card_courier {
-		min-height: 600rpx;
-		padding-bottom: 20rpx;
-	}
-
-	.scroll-view {
-		max-height: 60vh;
-		overflow: hidden;
-	}
-
-	.headline {
-		padding: 30rpx 30rpx 0rpx 30rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		padding-bottom: 30rpx;
-		font-size: 32rpx;
-		font-weight: 600;
-	}
-
-	.search_card {
-		padding: 0rpx 30rpx 10rpx 30rpx;
-	}
-
-	.courier_item {
-		margin: 20rpx 20rpx;
-		width: calc(100% - 80rpx);
-		padding: 20rpx;
-		border-radius: 16rpx;
-		border: 1rpx solid #e7e6e4;
-		// box-shadow: 0 2rpx 10rpx 0 rgba(0, 0, 0, .1);
-	}
-
-	.courier_name {
-		display: flex;
-		flex-direction: column;
-	}
-
-	.title_name {
-		font-weight: 600;
-		font-size: 32rpx;
-		margin-bottom: 10rpx;
-	}
-
-	.title_phone {
-		font-size: 28rpx;
-	}
-
-	.xd_title {
-		width: auto;
-		font-size: 28rpx;
-		font-weight: 500;
-		padding: 15rpx 30rpx;
-		border-radius: 35rpx;
-		// border: 3rpx solid #82848a;
-		background-color: #E4E7ED;
-	}
-
 	.card_search_gray {
 		display: flex;
 		flex-direction: row;

+ 5 - 5
pages/order/dispatching.vue

@@ -50,7 +50,7 @@
 			<x-form ref="goods" :list="goodsList" :model="goodsModel" :rules="goodsRules"></x-form>
 		</view>
 		<view class="btn_confirm_ching center_in">
-			<u-button style="margin: 0rpx 30rpx;" size="small" type="primary" text="确定" @click="confirm()"></u-button>
+			<u-button style="margin: 0rpx 30rpx;" type="primary" text="确定" @click="confirm()"></u-button>
 		</view>
 	</view>
 </template>
@@ -282,7 +282,7 @@
 	.incubator_title {
 		width: 150rpx;
 		margin-right: 10rpx;
-		font-size: 34rpx;
+		font-size: 30rpx;
 
 		span {
 			color: red;
@@ -321,7 +321,7 @@
 	}
 
 	.card_frequency_title {
-		font-size: 32rpx;
+		font-size: 30rpx;
 	}
 
 	.card_bottle {
@@ -403,8 +403,8 @@
 	}
 
 	.title_fake {
-		margin-bottom: 20rpx;
-		font-size: 34rpx;
+		margin-bottom: 10rpx;
+		font-size: 32rpx;
 		font-weight: bold;
 	}
 

+ 443 - 0
pages/order/freezer.vue

@@ -0,0 +1,443 @@
+<template>
+	<!-- 冷冻柜冰排 -->
+	<view>
+		<u-navbar :title="headline" autoBack placeholder></u-navbar>
+		<u-sticky :customNavHeight="navbarHeight()">
+			<view class="search_card">
+				<u-search :showAction="false" v-model="keyword" @change="searchChange"
+					placeholder="请输入冰排编号查找"></u-search>
+				<view style="margin-left: 10rpx;" @click="sweep">
+					<u-icon name="scan" color="#606266" size="35"></u-icon>
+				</view>
+			</view>
+			<view class="card_tab_freezer">
+				<view :style="{width:isIceInfo.isIceReleaseCold ? '50%':'100%'}">
+					<u-subsection :list="iceStateList" :current="current" @change="sectionChange"></u-subsection>
+				</view>
+				<view class="select_freezer" v-if="isIceInfo.isIceReleaseCold">
+					<view style="display: flex;align-items: center;margin-right: 10rpx;">
+						<view class="title_num blue_color">总数:{{Total}}</view>
+						<view class="title_num green_color">已选:{{selectedList.length}}</view>
+					</view>
+					<view style="display: flex;align-items: center;">
+						<view class="select_title blue_color" @click="checkAll">全选</view>
+						<view class="select_title orange_color" @click="Inverse">反选</view>
+					</view>
+				</view>
+			</view>
+		</u-sticky>
+		<view style="display: flex;flex-direction: column;" v-if="list.length > 0">
+			<view class="card_item_iceraft" v-for="(item,index) in list" :key="index" @click="choiceIce(item)">
+				<view class="top_title space_between">
+					<view class="title_Icecode">编号: {{item.code}}</view>
+					<view :style="{color: filterColor(item.iceRaftRecord.status)}">
+						{{matchingType(item.iceRaftRecord.status)}}
+					</view>
+				</view>
+				<view class="title_itemIce">冰排备注:{{item.label}}</view>
+				<view class="title_itemIce" v-if="item.iceRaftRecord.inStorageTime">入库时间:
+					{{item.iceRaftRecord.inStorageTime}}
+				</view>
+				<view class="title_itemIce" v-if="item.iceRaftRecord.outStorageTime">出库时间:
+					{{item.iceRaftRecord.outStorageTime}}
+				</view>
+				<view class="title_itemIce"
+					v-if="item.iceRaftRecord.outStorageTime == '' && item.iceRaftRecord.iceLocker.name">所在位置:
+					{{item.iceRaftRecord.iceLocker.name}}
+				</view>
+				<view class="title_itemIce"
+					v-else-if="item.iceRaftRecord.outStorageTime != '' && item.iceRaftRecord.coolerBox.name">所在位置:
+					{{item.iceRaftRecord.coolerBox.name}}
+				</view>
+				<view class="title_itemIce" v-if="item.iceRaftRecord.status != ''">冷冻要求:
+					<span>≥{{item.iceRaftRecord.freezeClaim}}h</span>
+				</view>
+				<view class="title_itemIce" v-if="item.iceRaftRecord.status != ''">冷冻时间:
+					<span>{{formatMinutes(item.iceRaftRecord.freezeDuration)}}</span>
+				</view>
+				<view class="position-triangle" v-if="item.whetherFlag">
+					<span>已选</span>
+				</view>
+			</view>
+			<view style="width: 100%;">
+				<u-loadmore lineColor="#ffffff" :status="loadStatus" :key="Math.random()" />
+			</view>
+		</view>
+		<view style="margin-top: 20%;" v-else>
+			<u-empty mode="list" text="暂无冰排信息"></u-empty>
+		</view>
+		<view style="width: 100%;height: 120rpx;" class="env_padding" v-if="isIceInfo.isIceReleaseCold"></view>
+		<view class="card_btn_freezer" v-if="isIceInfo.isIceReleaseCold">
+			<u-button style="margin-bottom: 20rpx;" type="primary" @click="coolingRelease">出库释冷</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				headline: '',
+				list: [],
+				typeList: [{
+					bgcolor: '#fa3534',
+					label: '冷冻中',
+					value: '1',
+				}, {
+					bgcolor: '#67C23A',
+					label: '待使用',
+					value: '2',
+				}],
+				iceState: null,
+				iceStateList: ['全部', '冷冻中', '待使用'],
+				current: 0,
+				PageIndex: 1,
+				PageSize: 15,
+				loadStatus: 'loadmore', //loading 、nomore
+				loadingMore: true,
+				keyword: '',
+				freezerId: null,
+				Total: 0,
+				selectedNum: 0,
+				selectedList: [],
+				isIceInfo: {},
+				searchShow: true,
+			}
+		},
+		onReachBottom() {
+			if (!this.loadingMore) {
+				this.getIceraftList()
+			}
+		},
+		onLoad(option) {
+			this.headline = option.name
+			this.freezerId = option.freezerId
+		},
+		mounted() {
+			var userInfo = this.$cache.getCache('userInfo')
+			this.isIceInfo = userInfo.dept
+			this.getIceraftList()
+		},
+		methods: {
+			// 搜索
+			searchChange(value) {
+				var that = this
+				if (that.searchShow) {
+					that.searchShow = false
+					const timer = setTimeout(function() {
+						clearTimeout(timer);
+						that.PageIndex = 1
+						that.list = []
+						that.loadingMore = true
+						that.getIceraftList()
+					}, 300);
+				}
+			},
+			// 获取冰排列表
+			getIceraftList() {
+				this.loadStatus = 'loading'
+				this.loadingMore = true
+				this.$api.get('/api/ice-locker/geticelocker', {
+					page: this.PageIndex,
+					pageSize: this.PageSize,
+					code: this.keyword,
+					status: this.iceState,
+					LockerId: this.freezerId,
+				}).then(res => {
+					if (res.code == 200) {
+						const data = res.data.list
+						this.Total = res.data.count
+						if (this.loadingMore == true && data) {
+							this.list = this.list.concat(data);
+						}
+						this.getRecord()
+						if (data.length < this.PageSize) {
+							this.loadingMore = true
+							this.loadStatus = 'nomore'
+						} else {
+							this.loadStatus = 'loading'
+							this.loadingMore = false
+							this.PageIndex++
+						}
+					}
+					this.searchShow = true
+				})
+			},
+			// 判断冰排是否选择
+			getRecord() {
+				this.list.forEach(item => {
+					let index = this.selectedList.findIndex((event) => event === item.id);
+					if (index !== -1) {
+						item.whetherFlag = true
+					} else {
+						item.whetherFlag = false
+					}
+				})
+				this.$forceUpdate()
+			},
+			// 选择冰排
+			choiceIce(event) {
+				let index = this.selectedList.findIndex((item) => item === event.id);
+				// 如果有就替换,没有就添加
+				if (index !== -1) {
+					this.selectedList.splice(index, 1);
+				} else {
+					this.selectedList.push(event.id);
+				}
+				if (this.isIceInfo.isIceReleaseCold) {
+					this.getRecord()
+				}
+			},
+			// 全选
+			checkAll() {
+				this.selectedList = []
+				for (let i = 0; i < this.list.length; i++) {
+					this.$set(this.list[i], 'whetherFlag', true)
+				}
+				this.list.forEach(item => {
+					if (item.whetherFlag) {
+						this.selectedList.push(item.id)
+					}
+				})
+				this.getRecord()
+			},
+			// 反选
+			Inverse() {
+				this.selectedList = []
+				for (let i = 0; i < this.list.length; i++) {
+					let flag = this.list[i].whetherFlag;
+					this.$set(this.list[i], 'whetherFlag', !flag)
+				}
+				this.list.forEach(item => {
+					if (item.whetherFlag) {
+						this.selectedList.push(item.id)
+					}
+				})
+				this.getRecord()
+			},
+			// 出库释冷
+			coolingRelease() {
+				if (this.selectedList.length > 0) {
+					let arrID = this.selectedList.map(item => item.toString())
+					this.$api.post('/api/ice-raft-record/start-for-cold', {
+						id: arrID,
+					}).then(res => {
+						if (res.code == 200) {
+							uni.$u.toast('操作成功')
+						}
+					})
+				} else {
+					uni.$u.toast('请先选择释冷冰排')
+				}
+			},
+			matchingType(type) {
+				let list = this.typeList
+				let name = ''
+				if (list) {
+					list.forEach(item => {
+						if (type === item.value) {
+							name = item.label
+						}
+					})
+				}
+				return name
+			},
+			// tag颜色获取
+			filterColor(type) {
+				let list = this.typeList
+				let color = ''
+				if (list) {
+					list.forEach(item => {
+						if (type === item.value) {
+							color = item.bgcolor
+						}
+					})
+				}
+				return color
+			},
+			// 总分钟格式化
+			formatMinutes(totalMinutes) {
+				const hours = Math.floor(totalMinutes / 60); // 计算小时
+				const minutes = totalMinutes % 60; // 计算分钟(余数)
+				return `${hours}h${minutes}m`;
+			},
+			// 扫一扫
+			sweep() {
+				// 允许从相机和相册扫码
+				uni.scanCode({
+					scanType: ['barCode'],
+					// scanType: ['qrCode'],
+					autoZoom: false,
+					success: (res) => {
+						// console.log(res);
+						if (res.result) {
+							let url = res.result;
+							this.keyword = url
+						} else {
+							console.log('请重新扫描');
+							return false;
+						}
+					},
+					fail: (res) => {
+						console.log('未识别到二维码');
+					}
+				})
+			},
+			sectionChange(index) {
+				this.current = index
+				if (index == 0) {
+					this.iceState = null
+				} else {
+					this.iceState = String(index)
+				}
+				this.searchChange()
+			},
+			navbarHeight() {
+				let systemInfo = uni.getSystemInfoSync();
+				/* (750 / systemInfo.windowWidth) */
+				/* 在uview navBar组件中有一个默认高度,当这个默认高度加上状态栏高度后就是吸顶的位置,由于这两者相加是px,所以最后还需要转为rpx */
+				let topHeight = 0
+				// #ifdef APP-PLUS
+				topHeight = 44 + systemInfo.statusBarHeight;
+				// #endif
+				// #ifdef MP
+				let height = systemInfo.platform == 'ios' ? 44 : 48;
+				topHeight = height + systemInfo.statusBarHeight
+				// #endif
+				/* 最后一步将px转为rpx */
+				return topHeight * (750 / systemInfo.windowWidth) / 2
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.search_card {
+		display: flex;
+		align-items: center;
+		background-color: #fff;
+		padding: 20rpx;
+	}
+
+	.card_tab_freezer {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0rpx 20rpx 20rpx 20rpx;
+		background-color: #fff;
+	}
+
+	.select_freezer {
+		display: flex;
+		align-items: flex-end;
+		// flex-direction: column;
+	}
+
+	.title_num {
+		font-size: 26rpx;
+		margin-left: 10rpx;
+	}
+
+	.select_title {
+		font-size: 30rpx;
+		margin-left: 15rpx;
+	}
+
+	.blue_color {
+		color: #2979ff;
+	}
+
+	.green_color {
+		color: #19be6b;
+	}
+
+	.orange_color {
+		color: #ff9900;
+	}
+
+	.card_item_iceraft {
+		position: relative;
+		padding: 20rpx;
+		margin: 20rpx;
+		background-color: #fff;
+		border-radius: 10rpx;
+		overflow: hidden;
+	}
+
+	.position-triangle {
+		position: absolute;
+		bottom: 0;
+		right: 0;
+		overflow: hidden;
+		height: 35px;
+		width: 35px;
+	}
+
+	.position-triangle span {
+		position: absolute;
+		font-size: 20rpx;
+		bottom: 8rpx;
+		right: 3rpx;
+		z-index: 1;
+		color: #fff;
+		transform: rotate(-45deg);
+	}
+
+	.position-triangle::after {
+		content: "";
+		font-size: 20rpx;
+		position: absolute;
+		width: 70px;
+		height: 70px;
+		background-color: #19be6b;
+		transform: rotate(45deg);
+		transform-origin: center;
+		top: 50%;
+	}
+
+	.top_title {
+		display: flex;
+	}
+
+	.title_Icecode {
+		color: #000000;
+		font-size: 32rpx;
+	}
+
+	.title_itemIce {
+		color: #000000;
+		font-size: 30rpx;
+		margin-top: 10rpx;
+
+		span {
+			color: #19be6b;
+		}
+	}
+
+	.card_input_fa {
+		margin: 20rpx;
+		padding: 12rpx 20rpx;
+		line-height: 48rpx;
+		border: 1rpx solid #e7e6e4;
+		border-radius: 40rpx;
+		background-color: #fff;
+	}
+
+	.card_btn_freezer {
+		position: fixed;
+		z-index: 2;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		padding: 20rpx 30rpx 20rpx 30rpx;
+		background-color: #fff;
+		padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
+		padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
+		border-top: 1rpx solid #E4E7ED;
+	}
+
+	.env_padding {
+		padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
+		padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
+	}
+</style>

+ 123 - 174
pages/order/iceCold.vue

@@ -1,38 +1,28 @@
 <template>
+	<!-- 冷冻柜管理、 -->
 	<view>
-		<u-navbar title="冰排释冷" autoBack placeholder></u-navbar>
-		<view class="card_order_details">
-			<view class="card_search">
-				<view class="details_title">冰排编号 <span class="line_title">*</span></view>
-				<view class="card_input">
-					<u-input border="surround" v-model="frequencyCoding">
-						<template slot="suffix">
-							<u-icon name="scan" size="24" @click="sweep"></u-icon>
-						</template>
-					</u-input>
-				</view>
-				<view class="add_card center_in" @click="addIce">
-					<u-icon name="plus" size="18"></u-icon>
-				</view>
+		<u-navbar autoBack placeholder></u-navbar>
+		<u-sticky :customNavHeight="navbarHeight()">
+			<view class="search_card">
+				<u-search :showAction="false" v-model="keyword" @change="searchChange"
+					placeholder="输入关键字快速查找"></u-search>
 			</view>
-			<view class="card_frequency">
-				<view class="card_high space_between">
-					<view class="card_frequency_title">已录入冰排编号</view>
-					<view class="card_bottle">已扫<span>{{list.length}}</span></view>
-				</view>
-				<view style="width: 100%;" v-if="list.length > 0">
-					<view class="item_coding" v-for="(item,index) in list" :key="index">
-						<view class="title_coding">{{item}}</view>
-						<u-icon name="close-circle-fill" color="#c0c4cc" size="20"
-							@click="removeWaybill(item)"></u-icon>
-					</view>
+		</u-sticky>
+		<view class="card_incubator" v-if="orderList.length > 0">
+			<view class="item_bator_cold" v-for="(item,index) in orderList" :key="index"
+				@click.stop="selectIncubator(item)">
+				<view style="display: flex;align-items: center;">
+					<span class="iconfont icon-binggui" :class="iceColdFlag ? 'imagebwx' : 'imagebwx_cold'"></span>
+					<view>{{item.name}}</view>
 				</view>
 			</view>
-			<view style="width: 100%;height: 120rpx;"></view>
-			<view class="card_btn">
-				<u-button style="margin-bottom: 20rpx;" type="primary" @click="submit">提交</u-button>
+			<view style="width: 100%;">
+				<u-loadmore lineColor="#ffffff" :status="loadStatus" :key="Math.random()" />
 			</view>
 		</view>
+		<view style="margin-top: 20%;" v-else>
+			<u-empty mode="list" text="暂无保温箱"></u-empty>
+		</view>
 	</view>
 </template>
 
@@ -40,179 +30,138 @@
 	export default {
 		data() {
 			return {
-				frequencyCoding: '',
-				list: [],
+				keyword: '',
+				currentPage: 1,
+				pageSize: 15,
+				loadingMore: true,
+				loadStatus: 'loadmore', //loading 、nomore
+				orderList: [],
+				// 是否释冷
+				iceColdFlag: true,
+				detailsFlag: false,
+			}
+		},
+		onReachBottom() {
+			if (!this.loadingMore) {
+				this.getIncubator()
+			}
+		},
+		onLoad(option) {
+			if (option.detailsFlag) {
+				this.detailsFlag = true
 			}
 		},
+		mounted() {
+			this.getIncubator()
+		},
 		methods: {
-			submit() {
-
+			// 搜索
+			searchChange(value) {
+				this.currentPage = 1
+				this.orderList = []
+				this.loadingMore = true
+				this.getIncubator()
 			},
-			// 扫一扫
-			sweep() {
-				// 允许从相机和相册扫码
-				uni.scanCode({
-					scanType: ['barCode'],
-					// scanType: ['qrCode'],
-					autoZoom: false,
-					success: (res) => {
-						console.log(res);
-						if (res.result) {
-							let url = res.result;
-							this.frequencyCoding = url
-							this.$api.get('/api/ice-raft/code/' + this.frequencyCoding).then(res => {
-								if (res.code == 200) {
-									this.list.push(url)
-
-									function methods1(arr) {
-										return Array.from(new Set(arr));
-									}
-									this.list = methods1(this.list)
-								} else {
-									uni.showToast({
-										icon: 'none',
-										title: res.msg,
-										duration: 3000
-									});
-								}
-							})
+			// 获取保温箱
+			getIncubator() {
+				this.loadStatus = 'loading'
+				this.loadingMore = true
+				this.$api.get('/api/ice-locker', {
+					page: this.currentPage,
+					pageSize: this.pageSize,
+					name: this.keyword,
+					status: '2',
+				}).then(res => {
+					if (res.code == 200) {
+						const data = res.data.list
+						if (this.loadingMore == true && data) {
+							this.orderList = this.orderList.concat(data);
+							// console.log(this.orderList, 245)
+						}
+						if (data.length < this.pageSize) {
+							this.loadingMore = true
+							this.loading = '没有更多了'
+							this.loadStatus = 'nomore'
 						} else {
-							console.log('请重新扫描');
-							return false;
+							this.loading = '加载中'
+							this.loadStatus = 'loading'
+							this.loadingMore = false
+							this.currentPage++
 						}
-					},
-					fail: (res) => {
-						console.log('未识别到条形码');
 					}
 				})
 			},
-			// 添加冰排 
-			addIce() {
-				if (this.frequencyCoding) {
-					this.$api.get('/api/ice-raft/code/' + this.frequencyCoding).then(res => {
-						if (res.code == 200) {
-							this.list.push(this.frequencyCoding)
-							this.list = this.uniqueArray(this.list)
-							this.frequencyCoding = ''
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: res.msg,
-								duration: 3000
-							});
-						}
-					})
+			// 选择保温箱
+			selectIncubator(value) {
+				if (this.detailsFlag) {
+					uni.navigateTo({
+						url: '/pages/order/freezer?name=' + value.name + '&freezerId=' + value.id
+					});
+				} else {
+					uni.setStorageSync('freezerValue', value)
+					uni.navigateBack({
+						delta: 1
+					});
 				}
 			},
-			// 去重
-			uniqueArray(arr) {
-				return [...new Set(arr)];
-			},
-			// 移除错误运单号
-			removeWaybill(value) {
-				if (this.frequencyCoding == value) {
-					this.frequencyCoding = ''
-				}
-				const arr = deleteElementById(this.list, value)
-				this.list = arr
-
-				function deleteElementById(arr, key) {
-					return arr.filter((item) => item !== key);
-				}
+			navbarHeight() {
+				let systemInfo = uni.getSystemInfoSync();
+				/* (750 / systemInfo.windowWidth) */
+				/* 在uview navBar组件中有一个默认高度,当这个默认高度加上状态栏高度后就是吸顶的位置,由于这两者相加是px,所以最后还需要转为rpx */
+				let topHeight = 0
+				// #ifdef APP-PLUS
+				topHeight = 44 + systemInfo.statusBarHeight;
+				// #endif
+				// #ifdef MP
+				let height = systemInfo.platform == 'ios' ? 44 : 48;
+				topHeight = height + systemInfo.statusBarHeight
+				// #endif
+				/* 最后一步将px转为rpx */
+				return topHeight * (750 / systemInfo.windowWidth) / 2
 			},
-		}
+		},
 	}
 </script>
 
-<style lang="scss">
-	page {
-		background-color: #fff !important;
-	}
-
-	.card_order_details {
-		margin: 10rpx 30rpx 30rpx 30rpx;
-	}
-
-	.card_search {
+<style lang="scss" scoped>
+	.card_incubator {
 		display: flex;
-		align-items: center;
-		margin: 20rpx 0rpx;
-	}
-
-	.details_title {
-		width: 150rpx;
-		flex: none;
-		color: #333;
-		font-size: 32rpx;
-		font-weight: 500;
-		margin-bottom: 10rpx;
-		// margin-right: 15rpx;
-	}
-
-	.line_title {
-		color: red;
-	}
-
-	.card_input {
-		width: 100%;
-		margin-left: 30rpx;
-	}
-
-	.add_card {
-		margin-left: 10rpx;
-		width: 50rpx;
-		height: 46rpx;
-		border-radius: 8rpx;
-		padding: 6px 9px;
-		border: 1px solid #dadbde;
+		flex-direction: column;
+		margin-top: 10rpx;
 	}
 
-	.card_high {
-		margin-top: 20rpx;
+	.search_card {
+		background-color: #fff;
+		padding: 20rpx;
 	}
 
-	.card_frequency {
+	.item_bator {
 		display: flex;
-		flex-wrap: wrap;
-	}
-
-	.card_frequency_title {
-		font-size: 32rpx;
-	}
-
-	.card_bottle {
-		font-size: 30rpx;
-
-		span {
-			color: red;
-		}
+		flex-direction: column;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 15rpx;
+		margin: 10rpx 20rpx;
 	}
 
-	.item_coding {
+	.item_bator_cold {
 		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		width: 100%;
-		margin-top: 10px;
-		padding: 25rpx 0rpx;
-		border-bottom: 2rpx solid #dfdfdf;
+		flex-direction: column;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 30rpx;
+		margin: 10rpx 20rpx;
 	}
 
-	.title_coding {
-		font-size: 30rpx;
+	.imagebwx {
+		color: #2b85e4;
+		font-size: 60rpx;
+		margin-right: 20rpx;
 	}
 
-	.card_btn {
-		position: fixed;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		padding-left: 30rpx;
-		padding-right: 30rpx;
-		padding-top: 20rpx;
-		background-color: #fff;
-		padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
-		padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
-		border-top: 1rpx solid #E4E7ED;
+	.imagebwx_cold {
+		color: #2b85e4;
+		font-size: 70rpx;
+		margin-right: 20rpx;
 	}
 </style>

+ 59 - 13
pages/order/iceRaft.vue

@@ -15,19 +15,32 @@
 		</u-sticky>
 		<view class="card_incubator" v-if="orderList.length > 0">
 			<view class="item_bator" v-for="(item,index) in orderList" :key="index">
-				<span class="iconfont imagebwx icon-bingpaiguanli"></span>
-				<view style="width: 100%;">
-					<view class="space_between">
-						<view class="title_ice">{{item.code}}</view>
-						<view :style="{color:geticeColor(item.status)}">{{geticeState(item.status)}}</view>
+				<view style="height: 100%;">
+					<view style="display: flex;align-items: center;">
+						<span class="iconfont imagebwx icon-bingpaiguanli"></span>
+						<view>
+							<view class="title_ice">{{item.code}}</view>
+							<view class="title_ice">{{item.label}}</view>
+						</view>
 					</view>
-					<view class="space_between">
-						<view class="title_ice1">冷冻要求:{{item.freezeClaim}}</view>
-						<view class="card_btn_emit center_in" @click="selectIncubator(item)">
-							编辑<u-icon name="edit-pen" size="26"></u-icon>
+					<view class="card_Cooling_release" style="display: flex;flex-direction: column;">
+						<view style="display: flex;align-items: center;margin-top: 5rpx;">
+							<view class="title_ice1">冷冻要求:≥{{item.freezeClaim}}h</view>
+							<view class="cooling_release_title" v-if="isIceInfo.isIceReleaseCold">释冷温度:
+								<span>{{item.suitableForCold}}℃</span>
+							</view>
+						</view>
+						<view class="cooling_release_title" v-if="isIceInfo.isIceReleaseCold">释冷地点:
+							{{item.iceColdAddress}}
 						</view>
 					</view>
 				</view>
+				<view class="right_up_down">
+					<view :style="{color:geticeColor(item.status)}">{{geticeState(item.status)}}</view>
+					<view class="card_btn_emit center_in" @click="selectIncubator(item)">
+						编辑<u-icon name="edit-pen" size="26"></u-icon>
+					</view>
+				</view>
 			</view>
 			<view style="width: 100%;">
 				<u-loadmore lineColor="#ffffff" :status="loadStatus" :key="Math.random()" />
@@ -51,6 +64,7 @@
 				incubatorValue: '',
 				orderList: [],
 				detailsFlag: false,
+				isIceInfo: {},
 			}
 		},
 		onReachBottom() {
@@ -58,9 +72,12 @@
 				this.getIncubator()
 			}
 		},
-		mounted() {
-			this.getIncubator()
+		onShow() {
+			var userInfo = this.$cache.getCache('userInfo')
+			this.isIceInfo = userInfo.dept
+			this.searchChange()
 		},
+		mounted() {},
 		methods: {
 			rightClick() {
 				uni.navigateTo({
@@ -106,8 +123,11 @@
 				let arr = {
 					id: value.id,
 					code: value.code,
+					label: value.label,
 					status: value.status,
 					freezeClaim: value.freezeClaim,
+					suitableForCold: value.suitableForCold,
+					iceColdAddress: value.iceColdAddress,
 				}
 				uni.navigateTo({
 					url: '/pages/order/addIceRaft?list=' + JSON.stringify(arr)
@@ -165,13 +185,39 @@
 
 	.item_bator {
 		display: flex;
-		align-items: center;
+		justify-content: space-between;
 		background-color: #fff;
 		border-radius: 10rpx;
 		padding: 30rpx;
 		margin: 10rpx 20rpx;
 	}
 
+	.item_bator_item {
+		width: 100%;
+		display: flex;
+	}
+
+	.card_Cooling_release {
+		width: 100%;
+		margin-top: 5rpx;
+	}
+
+	.right_up_down {
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		align-items: flex-end;
+	}
+
+	.cooling_release_title {
+		font-size: 30rpx;
+		margin-right: 20rpx;
+
+		span {
+			color: #19be6b;
+		}
+	}
+
 	.imagebwx {
 		color: #19be6b;
 		font-size: 80rpx;
@@ -183,6 +229,7 @@
 	}
 
 	.title_ice1 {
+		margin-right: 30rpx;
 		font-size: 30rpx;
 	}
 
@@ -207,7 +254,6 @@
 		margin-top: 4rpx;
 		display: flex;
 		justify-content: flex-end;
-		width: 150rpx;
 		color: #606266;
 		font-size: 30rpx;
 		border-radius: 40rpx;

+ 17 - 7
pages/order/waybill.js

@@ -82,18 +82,28 @@ export const iceRaftRulesil = () => {
 		field: 'freezeClaim',
 		label: '冷冻要求',
 		placeholder: '请输入冷冻时间',
-		type: 'input',
+		type: 'selectiveSearch',
 		required: true,
+		options: [{
+			label: '48小时',
+			value: 48,
+		}, {
+			label: '24小时',
+			value: 24,
+		}, {
+			label: '12小时',
+			value: 12,
+		}]
 	}, {
-		field: 'suitableForColdTime',
-		label: '适冷时间',
-		placeholder: '请输入适冷时间',
+		field: 'suitableForCold',
+		label: '释冷温度',
+		placeholder: '请输入释冷温度',
 		type: 'input',
 		required: true,
 	}, {
-		field: 'suitableForCold',
-		label: '适冷温度',
-		placeholder: '请输入适冷温度',
+		field: 'iceColdAddress',
+		label: '释冷地点',
+		placeholder: '请输入释冷地点',
 		type: 'input',
 		required: true,
 	}]