add设备操控
This commit is contained in:
@@ -190,6 +190,14 @@
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/entry/change-mode",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
// "pageOrientation": "landscape",
|
||||
|
||||
140
pages/entry/change-mode.vue
Normal file
140
pages/entry/change-mode.vue
Normal file
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 设备操控 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">扫码点位</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">操作命令</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-3 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_switchInOut">切换<br/>出入库模式</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pinkStartStop">拣选工位<br/>启停模式</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !index || !val2}" :disabled="disabled" @tap="_toCommandTP">下发输送线<br/>运动命令</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {switchInOut, pinkStartStop, toCommandTP} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
||||
index: '',
|
||||
val2: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
async _switchInOut () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await switchInOut(this.val1, this.index)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _pinkStartStop () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pinkStartStop(this.val1, this.index)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _toCommandTP () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await toCommandTP(this.val1, this.index, this.val2)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.button-primary, .button-default
|
||||
_fj(center)
|
||||
font-size 26rpx
|
||||
height 88rpx
|
||||
line-height 30rpx
|
||||
</style>
|
||||
@@ -41,7 +41,7 @@
|
||||
return {
|
||||
userName: '',
|
||||
menuList: [
|
||||
{title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘入库', path: '/pages/entry/mater-group-to-store'}, {title: '组盘入库', path: '/pages/entry/group-to-store'}, {title: '空托盘入库', path: '/pages/entry/empty-tray-to-store'}]},
|
||||
{title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘入库', path: '/pages/entry/mater-group-to-store'}, {title: '设备操控', path: '/pages/entry/change-mode'}, {title: '组盘入库', path: '/pages/entry/group-to-store'}, {title: '空托盘入库', path: '/pages/entry/empty-tray-to-store'}]},
|
||||
{title: '出库管理', path: 'RF02', sonTree: [{title: '托盘出库', path: '/pages/outbound/tray-out-store'}, {title: '出库确认', path: '/pages/outbound/out-store-confirm'}]},
|
||||
{title: '在库管理', path: 'RF03', sonTree: [{title: '库存信息', path: '/pages/in/store-info'}]},
|
||||
{title: '拣选管理', path: 'RF04', sonTree: [{title: '拣选作业', path: '/pages/pick/pick-task'}]},
|
||||
|
||||
@@ -32,6 +32,21 @@ export const groupMaterIn = (code, item) => request({
|
||||
url:'api/groupMater/in',
|
||||
data: {stor_code: code, item: item}
|
||||
})
|
||||
/**
|
||||
* 设备操控
|
||||
*/
|
||||
export const switchInOut = (code, mode) => request({
|
||||
url:'api/deviceManage/changeMode/switchInOut',
|
||||
data: {device_code: code, mode: mode}
|
||||
})
|
||||
export const pinkStartStop = (code, mode) => request({
|
||||
url:'api/deviceManage/changeMode/pinkStartStop',
|
||||
data: {device_code: code, mode: mode}
|
||||
})
|
||||
export const toCommandTP = (code, mode, vcode) => request({
|
||||
url:'api/deviceManage/changeMode/toCommandTP',
|
||||
data: {device_code: code, mode: mode, vehicle_code: vcode}
|
||||
})
|
||||
/**
|
||||
* 组盘入库
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user