点位放货确认修改
This commit is contained in:
@@ -19,6 +19,10 @@
|
||||
<div class="color_icon orange"></div>
|
||||
<div class="font_icon">有任务</div>
|
||||
</div>
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon red"></div>
|
||||
<div class="font_icon">需人工解锁</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="locate_block" v-for="e in areaArr" :key="e.region_id">
|
||||
<div class="locate_name" @click="getPonit (e)">
|
||||
@@ -26,7 +30,7 @@
|
||||
<div class="iconfont open_icon" :class="{'is_reverse': e.checked === true}"></div>
|
||||
</div>
|
||||
<div v-show="e.checked === true" class="site_block clear" ref="liCon">
|
||||
<div class="site_item fl" v-for="(el, i) in e.pointArr" :key="i" :class="['gray', 'blue', 'green', 'orange'][Number(el.status)]" @click="setInfo(el)">
|
||||
<div class="site_item fl" v-for="(el, i) in e.pointArr" :key="i" :class="['gray', 'blue', 'green', 'orange', 'red'][Number(el.status)]" @click="setInfo(el)">
|
||||
<div class="site_item_box clear">
|
||||
<h3 class="fl">站点</h3>
|
||||
<p class="fl">{{el.device_name}}</p>
|
||||
@@ -198,7 +202,7 @@ export default {
|
||||
margin-bottom .12rem
|
||||
.item_icon
|
||||
_fj()
|
||||
margin-right .2rem
|
||||
margin-right .1rem
|
||||
.color_icon
|
||||
_wh(15px,15px)
|
||||
border-radius 50%
|
||||
@@ -263,6 +267,8 @@ export default {
|
||||
background-color $green
|
||||
.orange
|
||||
background-color orange
|
||||
.red
|
||||
background-color red
|
||||
.submit-bar
|
||||
height 1.6rem
|
||||
padding .1rem
|
||||
|
||||
@@ -4,11 +4,24 @@
|
||||
<section class="content mgt15">
|
||||
<div class="clear icons">
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon blue"></div>
|
||||
<div class="font_icon">等待确认</div>
|
||||
<div class="color_icon gray"></div>
|
||||
<div class="font_icon">空</div>
|
||||
</div>
|
||||
<div class="fr item_icon item_icon_1">
|
||||
<button class="msg_btn msg_btn_1" @click="toFresh">刷新</button>
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon blue"></div>
|
||||
<div class="font_icon">空载具</div>
|
||||
</div>
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon green"></div>
|
||||
<div class="font_icon">有货有载具</div>
|
||||
</div>
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon orange"></div>
|
||||
<div class="font_icon">有任务</div>
|
||||
</div>
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon red"></div>
|
||||
<div class="font_icon">需人工解锁</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="locate_block" v-for="e in areaArr" :key="e.region_id">
|
||||
@@ -17,13 +30,7 @@
|
||||
<div class="iconfont open_icon" :class="{'is_reverse': e.checked === true}"></div>
|
||||
</div>
|
||||
<div v-show="e.checked === true" class="site_block clear" ref="liCon">
|
||||
<div class="site_item fl" v-for="el in e.pointArr1" :key="el.device_code" :class="el.status === '4' ? 'green' : 'orange'" @click="setInfo(el)">
|
||||
<div class="site_item_box clear">
|
||||
<h3 class="fl">站点</h3>
|
||||
<p class="fl">{{el.device_name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site_item fl" v-for="el in e.pointArr2" :key="el.device_code" :class="el.status === '4' ? 'green' : 'orange'" @click="setInfo(el)">
|
||||
<div class="site_item fl" v-for="(el, i) in e.pointArr" :key="i" :class="['gray', 'blue', 'green', 'orange', 'red'][Number(el.status)]" @click="setInfo(el)">
|
||||
<div class="site_item_box clear">
|
||||
<h3 class="fl">站点</h3>
|
||||
<p class="fl">{{el.device_name}}</p>
|
||||
@@ -62,15 +69,17 @@ export default {
|
||||
liConHeight: 0, // 折叠面板内容初始高度
|
||||
areaArr: [],
|
||||
pointArr: [],
|
||||
reg: '',
|
||||
regobj: {},
|
||||
active: false,
|
||||
obj: {},
|
||||
disabled: false
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
document.body.removeAttribute('class', 'login-bg')
|
||||
this.initArea()
|
||||
this.initHandMatrial()
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
@@ -81,22 +90,13 @@ export default {
|
||||
this.initPonit(e)
|
||||
}, this.interTime)
|
||||
},
|
||||
toFresh () {
|
||||
clearInterval(this.timer)
|
||||
this.initPonit(this.reg)
|
||||
this.refresh(this.reg)
|
||||
this.obj = {}
|
||||
this.active = false
|
||||
this.disabled = false
|
||||
},
|
||||
async initArea () {
|
||||
let res = await handArea('0')
|
||||
let res = await handArea('1')
|
||||
if (res.code === '1') {
|
||||
this.areaArr = [...res.result]
|
||||
this.areaArr.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'pointArr1', [])
|
||||
this.$set(el, 'pointArr2', [])
|
||||
this.$set(el, 'pointArr', [])
|
||||
})
|
||||
if (this.areaArr.length > 0) {
|
||||
this.getPonit(this.areaArr[0])
|
||||
@@ -109,20 +109,9 @@ export default {
|
||||
let res = await handPoint(e.region_id)
|
||||
if (res.code === '1') {
|
||||
this.regobj = e
|
||||
let arr1 = []
|
||||
let arr2 = []
|
||||
res.result.map(el => {
|
||||
if (Number(el.seq_num) <= 10) {
|
||||
arr1.push(el)
|
||||
}
|
||||
if (Number(el.seq_num) > 10 && Number(el.seq_num) <= 20) {
|
||||
arr2.push(el)
|
||||
}
|
||||
})
|
||||
this.areaArr.map(el => {
|
||||
if (el.region_id === e.region_id) {
|
||||
this.$set(el, 'pointArr1', [...arr1])
|
||||
this.$set(el, 'pointArr2', [...arr2])
|
||||
this.$set(el, 'pointArr', [...res.result])
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -198,13 +187,13 @@ export default {
|
||||
margin-bottom .12rem
|
||||
.item_icon
|
||||
_fj()
|
||||
margin-right .2rem
|
||||
margin-right .1rem
|
||||
.color_icon
|
||||
_wh(15px,15px)
|
||||
border-radius 50%
|
||||
margin-right .1rem
|
||||
.font_icon
|
||||
_font(.32rem, .48rem, #000)
|
||||
_font(16px, 24px, #000)
|
||||
.locate_block
|
||||
width 100%
|
||||
background-color #fff
|
||||
@@ -220,11 +209,8 @@ export default {
|
||||
_wh(100%,auto)
|
||||
overflow hidden
|
||||
transition height .3s
|
||||
ul
|
||||
width 100%
|
||||
clear both
|
||||
.site_item
|
||||
_wh(32%,.8rem)
|
||||
_wh(32%,50px)
|
||||
padding 0 .1rem
|
||||
margin-top .12rem
|
||||
background-color #e5e5e5
|
||||
@@ -234,17 +220,17 @@ export default {
|
||||
&:nth-child(3n)
|
||||
margin-right 0
|
||||
.site_item_box
|
||||
_wh(100%, .6rem)
|
||||
margin .1rem 0
|
||||
_wh(100%, 40px)
|
||||
margin 5px 0
|
||||
overflow hidden
|
||||
h3
|
||||
display block
|
||||
width .32rem
|
||||
_font(.24rem,.3rem,#000,500)
|
||||
width 18px
|
||||
_font(14px,20px,#000,500)
|
||||
p
|
||||
display block
|
||||
_wh(calc(100% - .32rem), .6rem)
|
||||
_font(.28rem,.6rem,#999,,center)
|
||||
width calc(100% - 18px)
|
||||
_font(14px,20px,#999)
|
||||
background-color #fff
|
||||
border-radius 3px
|
||||
padding 0 .05rem
|
||||
@@ -266,10 +252,6 @@ export default {
|
||||
background-color $green
|
||||
.orange
|
||||
background-color orange
|
||||
.item_icon_1
|
||||
_fj(flex-end)
|
||||
height .4rem
|
||||
.msg_btn_1
|
||||
_wh(1rem, .48rem)
|
||||
_font(.26rem, .48rem,#fff,,center)
|
||||
.red
|
||||
background-color red
|
||||
</style>
|
||||
|
||||
275
src/pages/proj/PointRelease2.vue
Normal file
275
src/pages/proj/PointRelease2.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="点位放货确认"></nav-bar>
|
||||
<section class="content mgt15">
|
||||
<div class="clear icons">
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon blue"></div>
|
||||
<div class="font_icon">等待确认</div>
|
||||
</div>
|
||||
<div class="fr item_icon item_icon_1">
|
||||
<button class="msg_btn msg_btn_1" @click="toFresh">刷新</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="locate_block" v-for="e in areaArr" :key="e.region_id">
|
||||
<div class="locate_name" @click="getPonit (e)">
|
||||
<h2>{{e.region_name}}</h2>
|
||||
<div class="iconfont open_icon" :class="{'is_reverse': e.checked === true}"></div>
|
||||
</div>
|
||||
<div v-show="e.checked === true" class="site_block clear" ref="liCon">
|
||||
<div class="site_item fl" v-for="el in e.pointArr1" :key="el.device_code" :class="el.status === '4' ? 'green' : 'orange'" @click="setInfo(el)">
|
||||
<div class="site_item_box clear">
|
||||
<h3 class="fl">站点</h3>
|
||||
<p class="fl">{{el.device_name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site_item fl" v-for="el in e.pointArr2" :key="el.device_code" :class="el.status === '4' ? 'green' : 'orange'" @click="setInfo(el)">
|
||||
<div class="site_item_box clear">
|
||||
<h3 class="fl">站点</h3>
|
||||
<p class="fl">{{el.device_name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div v-if="active" class="msg_wrapper">
|
||||
<div class="msg_box">
|
||||
<div class="msg_item">
|
||||
<p>请确认是否放货完成?</p>
|
||||
</div>
|
||||
<div class="msg_btns">
|
||||
<button class="msg_btn" :disabled="disabled" @click="toSure">确认</button>
|
||||
<button class="msg_btn" @click="cancle">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="active" class="mask"></div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {handArea, handPoint, handpointPut} from '@config/getData2'
|
||||
export default {
|
||||
name: 'PointRelease',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
interTime: this.$store.getters.setTime,
|
||||
timer: null,
|
||||
liConHeight: 0, // 折叠面板内容初始高度
|
||||
areaArr: [],
|
||||
pointArr: [],
|
||||
reg: '',
|
||||
active: false,
|
||||
obj: {},
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
document.body.removeAttribute('class', 'login-bg')
|
||||
this.initArea()
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
refresh (e) {
|
||||
this.timer = setInterval(() => {
|
||||
this.initPonit(e)
|
||||
}, this.interTime)
|
||||
},
|
||||
toFresh () {
|
||||
clearInterval(this.timer)
|
||||
this.initPonit(this.reg)
|
||||
this.refresh(this.reg)
|
||||
this.obj = {}
|
||||
this.active = false
|
||||
this.disabled = false
|
||||
},
|
||||
async initArea () {
|
||||
let res = await handArea('0')
|
||||
if (res.code === '1') {
|
||||
this.areaArr = [...res.result]
|
||||
this.areaArr.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'pointArr1', [])
|
||||
this.$set(el, 'pointArr2', [])
|
||||
})
|
||||
if (this.areaArr.length > 0) {
|
||||
this.getPonit(this.areaArr[0])
|
||||
}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
async initPonit (e) {
|
||||
let res = await handPoint(e.region_id)
|
||||
if (res.code === '1') {
|
||||
this.regobj = e
|
||||
let arr1 = []
|
||||
let arr2 = []
|
||||
res.result.map(el => {
|
||||
if (Number(el.seq_num) <= 10) {
|
||||
arr1.push(el)
|
||||
}
|
||||
if (Number(el.seq_num) > 10 && Number(el.seq_num) <= 20) {
|
||||
arr2.push(el)
|
||||
}
|
||||
})
|
||||
this.areaArr.map(el => {
|
||||
if (el.region_id === e.region_id) {
|
||||
this.$set(el, 'pointArr1', [...arr1])
|
||||
this.$set(el, 'pointArr2', [...arr2])
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
getPonit (e) {
|
||||
clearInterval(this.timer)
|
||||
this.areaArr.map(el => {
|
||||
if (el.region_id !== e.region_id) {
|
||||
el.checked = false
|
||||
}
|
||||
if (el.region_id === e.region_id) {
|
||||
e.checked = !e.checked
|
||||
}
|
||||
})
|
||||
if (e.checked) {
|
||||
this.initPonit(e)
|
||||
this.refresh(e)
|
||||
}
|
||||
},
|
||||
toOpen (i) {
|
||||
const liCon = this.$refs.liCon[i]
|
||||
let height = liCon.offsetHeight
|
||||
if (height === this.liConHeight) { // 展开
|
||||
liCon.style.height = 'auto'
|
||||
height = liCon.offsetHeight
|
||||
liCon.style.height = this.liConHeight + 'px'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let f = document.body.offsetHeight // 必加
|
||||
liCon.style.height = height + 'px'
|
||||
} else { // 收缩
|
||||
liCon.style.height = this.liConHeight + 'px'
|
||||
}
|
||||
},
|
||||
setInfo (e) {
|
||||
if (e.status === '4') {
|
||||
this.active = true
|
||||
this.obj = e
|
||||
}
|
||||
},
|
||||
cancle () {
|
||||
this.active = false
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await handpointPut(this.obj.device_code, '1')
|
||||
if (res.code === '1') {
|
||||
clearInterval(this.timer)
|
||||
this.toast(res.desc)
|
||||
this.initPonit(this.reg)
|
||||
this.refresh(this.reg)
|
||||
this.obj = {}
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.active = false
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.active = false
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.icons
|
||||
height 24px
|
||||
margin-bottom .12rem
|
||||
.item_icon
|
||||
_fj()
|
||||
margin-right .2rem
|
||||
.color_icon
|
||||
_wh(15px,15px)
|
||||
border-radius 50%
|
||||
margin-right .1rem
|
||||
.font_icon
|
||||
_font(.32rem, .48rem, #000)
|
||||
.locate_block
|
||||
width 100%
|
||||
background-color #fff
|
||||
border-radius 5px
|
||||
padding .1rem
|
||||
margin-bottom .12rem
|
||||
.locate_name
|
||||
position relative
|
||||
_wh(100%,24px)
|
||||
h2
|
||||
_font(16px,24px,#000,500)
|
||||
.site_block
|
||||
_wh(100%,auto)
|
||||
overflow hidden
|
||||
transition height .3s
|
||||
ul
|
||||
width 100%
|
||||
clear both
|
||||
.site_item
|
||||
_wh(32%,.8rem)
|
||||
padding 0 .1rem
|
||||
margin-top .12rem
|
||||
background-color #e5e5e5
|
||||
border-radius 5px
|
||||
margin-right 2%
|
||||
overflow hidden
|
||||
&:nth-child(3n)
|
||||
margin-right 0
|
||||
.site_item_box
|
||||
_wh(100%, .6rem)
|
||||
margin .1rem 0
|
||||
overflow hidden
|
||||
h3
|
||||
display block
|
||||
width .32rem
|
||||
_font(.24rem,.3rem,#000,500)
|
||||
p
|
||||
display block
|
||||
_wh(calc(100% - .32rem), .6rem)
|
||||
_font(.28rem,.6rem,#999,,center)
|
||||
background-color #fff
|
||||
border-radius 3px
|
||||
padding 0 .05rem
|
||||
.open_icon
|
||||
position absolute
|
||||
right 0
|
||||
top 0
|
||||
_wh(24px,24px)
|
||||
_font(20px,24px,$red,,right)
|
||||
transition all .3s
|
||||
transform rotateZ(180deg)
|
||||
.is_reverse
|
||||
transform rotateZ(0)
|
||||
.gray
|
||||
background-color #e5e5e5
|
||||
.blue
|
||||
background-color $blue
|
||||
.green
|
||||
background-color $green
|
||||
.orange
|
||||
background-color orange
|
||||
.item_icon_1
|
||||
_fj(flex-end)
|
||||
height .4rem
|
||||
.msg_btn_1
|
||||
_wh(1rem, .48rem)
|
||||
_font(.26rem, .48rem,#fff,,center)
|
||||
</style>
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="fl item_icon">
|
||||
<div class="color_icon red"></div>
|
||||
<div class="font_icon">需要人工解锁</div>
|
||||
<div class="font_icon">需人工解锁</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="locate_block" v-for="e in areaArr" :key="e.region_id">
|
||||
@@ -244,7 +244,7 @@ export default {
|
||||
margin-bottom .12rem
|
||||
.item_icon
|
||||
_fj()
|
||||
margin-right .2rem
|
||||
margin-right .1rem
|
||||
.color_icon
|
||||
_wh(15px,15px)
|
||||
border-radius 50%
|
||||
|
||||
Reference in New Issue
Block a user