|
@@ -26,9 +26,14 @@
|
|
|
<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"
|
|
|
@click.stop="selectIncubator(item)">
|
|
|
- <view style="display: flex;align-items: center;margin-bottom: 10rpx;">
|
|
|
- <span class="iconfont icon-incubator" :class="iceColdFlag ? 'imagebwx' : 'imagebwx_cold'"></span>
|
|
|
- <view>{{item.name}}</view>
|
|
|
+ <view class="space_between">
|
|
|
+ <view style="display: flex;align-items: center;margin-bottom: 10rpx;">
|
|
|
+ <span class="iconfont icon-incubator"
|
|
|
+ :class="iceColdFlag ? 'imagebwx' : 'imagebwx_cold'"></span>
|
|
|
+ <view>{{item.name}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="card_precooling" :style="{color: filterColor(item.useStatus)}">
|
|
|
+ {{matchingType(item.useStatus)}}</view>
|
|
|
</view>
|
|
|
<view class="floe_card" v-if="item.ice_raft.length > 0 && iceColdFlag">
|
|
|
<view class="card_ice_list">
|
|
@@ -55,14 +60,13 @@
|
|
|
</view>
|
|
|
<view class="card_ice_list"></view>
|
|
|
</view>
|
|
|
- <view class="btn_printil markd10">
|
|
|
+ <view class="btn_printil markd10" v-if="detailsFlag">
|
|
|
<view style="flex: 1;margin-right: 10rpx;"
|
|
|
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>
|
|
|
</view>
|
|
|
- <view style="flex: 1;" v-if="item.useStatus && item.useStatus == '1'"
|
|
|
- @click.stop="endOfUseil(item)">
|
|
|
+ <view style="flex: 1;" v-if="item.useStatus && item.useStatus == 2" @click.stop="endOfUseil(item)">
|
|
|
<u-button size="small" type="error" text="结束使用"></u-button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -106,6 +110,15 @@
|
|
|
selectedList: [],
|
|
|
isCoolerInfo: {},
|
|
|
searchShow: true,
|
|
|
+ usageStatus: [{
|
|
|
+ bgcolor: '#2979ff',
|
|
|
+ label: '预冷中',
|
|
|
+ value: 1,
|
|
|
+ }, {
|
|
|
+ bgcolor: '#67C23A',
|
|
|
+ label: '使用中',
|
|
|
+ value: 2,
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
onReachBottom() {
|
|
@@ -120,7 +133,6 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
var userInfo = this.$cache.getCache('userInfo')
|
|
|
- console.log(userInfo, 356)
|
|
|
this.isCoolerInfo = userInfo.dept
|
|
|
this.getIncubator()
|
|
|
},
|
|
@@ -154,7 +166,6 @@
|
|
|
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) {
|
|
@@ -173,7 +184,6 @@
|
|
|
},
|
|
|
// 保温箱预冷
|
|
|
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', {
|
|
@@ -181,6 +191,13 @@
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
uni.$u.toast('操作成功')
|
|
|
+ this.searchChange()
|
|
|
+ this.orderList.forEach(item => {
|
|
|
+ item.whetherFlag = false
|
|
|
+ })
|
|
|
+ this.selectedList = []
|
|
|
+ } else {
|
|
|
+ uni.$u.toast(res.msg)
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -319,6 +336,31 @@
|
|
|
return ''
|
|
|
}
|
|
|
},
|
|
|
+ matchingType(type) {
|
|
|
+ let list = this.usageStatus
|
|
|
+ let name = ''
|
|
|
+ if (list) {
|
|
|
+ list.forEach(item => {
|
|
|
+ if (type === item.value) {
|
|
|
+ name = item.label
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return name
|
|
|
+ },
|
|
|
+ // tag颜色获取
|
|
|
+ filterColor(type) {
|
|
|
+ let list = this.usageStatus
|
|
|
+ let color = ''
|
|
|
+ if (list) {
|
|
|
+ list.forEach(item => {
|
|
|
+ if (type === item.value) {
|
|
|
+ color = item.bgcolor
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return color
|
|
|
+ },
|
|
|
navbarHeight() {
|
|
|
let systemInfo = uni.getSystemInfoSync();
|
|
|
/* (750 / systemInfo.windowWidth) */
|
|
@@ -537,4 +579,10 @@
|
|
|
padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
|
|
|
padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
|
|
|
}
|
|
|
+
|
|
|
+ .card_precooling {
|
|
|
+ color: #19be6b;
|
|
|
+ font-size: 30rpx;
|
|
|
+ flex: none;
|
|
|
+ }
|
|
|
</style>
|