add补空框
This commit is contained in:
@@ -40,7 +40,8 @@
|
||||
{title: '路线锁定', icon: 'RF06', path: '/pages/manage/route-lock'},
|
||||
{title: '呼叫空框', icon: 'RF01', path: '/pages/manage/fill-tray'},
|
||||
{title: '修改订单工序', icon: 'RF07', path: '/pages/manage/modify-process'},
|
||||
{title: '呼叫物料', icon: 'RF09', path: '/pages/manage/call-mater'}
|
||||
{title: '呼叫物料', icon: 'RF09', path: '/pages/manage/call-mater'},
|
||||
{title: '补空框', icon: 'RF10', path: '/pages/manage/fill-empty'}
|
||||
],
|
||||
show: false,
|
||||
secM: []
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
<view class="setup-label">服务器地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||
</view>
|
||||
<view class="setup-item">
|
||||
<!-- <view class="setup-item">
|
||||
<view class="setup-label">ACS地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入ACS地址" v-model="acsip">
|
||||
</view>
|
||||
<view class="setup-item">
|
||||
</view> -->
|
||||
<!-- <view class="setup-item">
|
||||
<view class="setup-label">打印地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入打印地址" v-model="printip">
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="setup-item">
|
||||
<view class="setup-label">刷新时间(s)</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||
@@ -55,20 +55,20 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.acsip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写ACS地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.printip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写打印地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (this.acsip === '') {
|
||||
// uni.showToast({
|
||||
// title: '请填写ACS地址',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// if (this.printip === '') {
|
||||
// uni.showToast({
|
||||
// title: '请填写打印地址',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// if (this.setTime === '') {
|
||||
// uni.showToast({
|
||||
// title: '请填写刷新时间',
|
||||
|
||||
129
pages/manage/fill-empty.vue
Normal file
129
pages/manage/fill-empty.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row line_item">
|
||||
<view class="zd-col-20 zd-row jcflexstart">
|
||||
<button class="point_item" v-for="e in pointInfo.S04" :key="e.point_code" :class="['bg_gray', 'bg_green'][Number(e.point_status)]" :disabled="disabled" @tap="toCheck(e)"></button>
|
||||
</view>
|
||||
<view class="zd-col-4 font-size-1">S04</view>
|
||||
</view>
|
||||
<view class="zd-row line_item">
|
||||
<view class="zd-col-20 zd-row jcflexstart">
|
||||
<button class="point_item" v-for="e in pointInfo.S06" :key="e.point_code" :class="['bg_gray', 'bg_green'][Number(e.point_status)]" :disabled="disabled" @tap="toCheck(e)"></button>
|
||||
</view>
|
||||
<view class="zd-col-4 font-size-1">S06</view>
|
||||
</view>
|
||||
<view class="zd-row line_item">
|
||||
<view class="zd-col-20 zd-row jcflexstart">
|
||||
<button class="point_item" v-for="e in pointInfo.R01" :key="e.point_code" :class="['bg_gray', 'bg_green'][Number(e.point_status)]" :disabled="disabled" @tap="toCheck(e)"></button>
|
||||
</view>
|
||||
<view class="zd-col-4 font-size-1">R01</view>
|
||||
</view>
|
||||
<view class="zd-row line_item">
|
||||
<view class="zd-col-20 zd-row jcflexstart">
|
||||
<button class="point_item" v-for="e in pointInfo.R02" :key="e.point_code" :class="['bg_gray', 'bg_green'][Number(e.point_status)]" :disabled="disabled" @tap="toCheck(e)"></button>
|
||||
</view>
|
||||
<view class="zd-col-4 font-size-1">R02</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-22 button-primary" @tap="_getLlddw">刷新</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {getLlddw, fillUpEmpty} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
pointInfo: {S04: [], S06: [], R01: [], R02: []},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._getLlddw()
|
||||
},
|
||||
methods: {
|
||||
async _getLlddw () {
|
||||
let res = await getLlddw()
|
||||
if (res) {
|
||||
this.pointInfo.S04 = [...res].slice(0, 4)
|
||||
this.pointInfo.S04.reverse()
|
||||
this.pointInfo.S06 = [...res].slice(4, 8)
|
||||
this.pointInfo.S06.reverse()
|
||||
this.pointInfo.R01 = [...res].slice(8, 11)
|
||||
this.pointInfo.R01.reverse()
|
||||
this.pointInfo.R02 = [...res].slice(11, 14)
|
||||
this.pointInfo.R02.reverse()
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.disabled = true
|
||||
if (e.point_status === '1') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
content: `请确认当前点位${e.point_code}补空框?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._fillUpEmpty(e)
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async _fillUpEmpty (e) {
|
||||
try {
|
||||
let res = await fillUpEmpty(e)
|
||||
if (res) {
|
||||
this.disabled = false
|
||||
this._getLlddw()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.line_item
|
||||
padding 20rpx 20rpx
|
||||
background-color #f3f3f3
|
||||
margin-bottom 20rpx
|
||||
.point_item
|
||||
width 23%
|
||||
height 100rpx
|
||||
padding 0
|
||||
margin-left 0
|
||||
margin-right 2%
|
||||
border-radius 4px
|
||||
.bg_gray
|
||||
background #c9c9c9 !important
|
||||
.bg_green
|
||||
background #6CBE8B !important
|
||||
.font-size-1
|
||||
font-size 40rpx
|
||||
text-align right
|
||||
</style>
|
||||
Reference in New Issue
Block a user