人工拆垛
This commit is contained in:
@@ -154,3 +154,15 @@ export const vehicleUnbind = (code) => post('api/pda/vehicleUnbind', {
|
|||||||
export const callDefective = (code) => post('api/pda/callDefective', {
|
export const callDefective = (code) => post('api/pda/callDefective', {
|
||||||
device_code: code
|
device_code: code
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人工拆垛
|
||||||
|
*/
|
||||||
|
// 查询人工拆垛起点终点
|
||||||
|
export const fjPoint = () => post('api/pda/fjPoint', {})
|
||||||
|
|
||||||
|
// 人工拆垛创建任务
|
||||||
|
export const createTask = (scode, ecode) => post('api/pda/createTask', {
|
||||||
|
start_point_code: scode,
|
||||||
|
end_point_code: ecode
|
||||||
|
})
|
||||||
|
|||||||
@@ -16,19 +16,20 @@
|
|||||||
<div class="con">
|
<div class="con">
|
||||||
<ul>
|
<ul>
|
||||||
<!-- <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li> -->
|
<!-- <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li> -->
|
||||||
<li @click="goInner('/zlmanage')">指令管理</li>
|
|
||||||
<li @click="goInner('/taskmanage')">任务管理</li>
|
<li @click="goInner('/taskmanage')">任务管理</li>
|
||||||
<li @click="goInner('/belowgradereport')">不合格品上报</li>
|
<li @click="goInner('/zlmanage')">指令管理</li>
|
||||||
|
<!-- <li @click="goInner('/belowgradereport')">不合格品上报</li> -->
|
||||||
<li @click="goInner('/sendmater')">送料</li>
|
<li @click="goInner('/sendmater')">送料</li>
|
||||||
<li @click="goInner('/callmater')">叫料</li>
|
<li @click="goInner('/callmater')">叫料</li>
|
||||||
<li @click="goInner('/sendempty')">送空</li>
|
<li @click="goInner('/sendempty')">送空</li>
|
||||||
<li @click="goInner('/callempty')">叫空</li>
|
<li @click="goInner('/callempty')">叫空</li>
|
||||||
<li @click="goInner('/KunliaoManage')">困料管理</li>
|
<li @click="goInner('/KunliaoManage')">困料管理</li>
|
||||||
<li @click="goInner('/RuyaoManage')">入窑管理</li>
|
<!-- <li @click="goInner('/RuyaoManage')">入窑管理</li> -->
|
||||||
<li @click="goInner('/VehicleBind')">载具绑定</li>
|
<li @click="goInner('/VehicleBind')">载具绑定</li>
|
||||||
<li @click="goInner('/VehicleUnbind')">载具解绑</li>
|
<li @click="goInner('/VehicleUnbind')">载具解绑</li>
|
||||||
<li @click="goInner('/CallDefective')">呼叫次品料</li>
|
<!-- <li @click="goInner('/CallDefective')">呼叫次品料</li> -->
|
||||||
<li @click="goInner('/CreateChargingTask')">AGV充电</li>
|
<!-- <li @click="goInner('/CreateChargingTask')">AGV充电</li> -->
|
||||||
|
<li @click="goInner('/ManualUnstack')">人工拆垛</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
212
src/pages/proj/ManualUnstack.vue
Normal file
212
src/pages/proj/ManualUnstack.vue
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
<template>
|
||||||
|
<section>
|
||||||
|
<nav-bar title="人工拆垛"></nav-bar>
|
||||||
|
<section class="content mgt186">
|
||||||
|
<div class="filter-wraper">
|
||||||
|
<div class="bottom-filter-tip">
|
||||||
|
<div class="filter-label txtjustify">起点</div>
|
||||||
|
<div class="fxcol mgl20 visible" >
|
||||||
|
<dropdown-menu
|
||||||
|
:option="optionNew1"
|
||||||
|
:active="active1"
|
||||||
|
:open="open1"
|
||||||
|
:inputed="true"
|
||||||
|
v-model="val1"
|
||||||
|
@handleBlur="handleBlur1"
|
||||||
|
@handleChange="handleChange1"
|
||||||
|
@toggleItem="toggleItem1"
|
||||||
|
@dropdownMenu="dropdownMenu1">
|
||||||
|
</dropdown-menu>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-filter-tip">
|
||||||
|
<div class="filter-label txtjustify">终点</div>
|
||||||
|
<div class="fxcol mgl20 visible" >
|
||||||
|
<dropdown-menu
|
||||||
|
:option="optionNew2"
|
||||||
|
:active="active2"
|
||||||
|
:open="open2"
|
||||||
|
:inputed="true"
|
||||||
|
v-model="val2"
|
||||||
|
@handleBlur="handleBlur2"
|
||||||
|
@handleChange="handleChange2"
|
||||||
|
@toggleItem="toggleItem2"
|
||||||
|
@dropdownMenu="dropdownMenu2">
|
||||||
|
</dropdown-menu>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="submit-bar">
|
||||||
|
<button class="btn submit-button" :class="{'btn-disabled' : val1 === '' || val2 === ''}" :disabled="disabled1" @click="_createTask">确定</button>
|
||||||
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@components/NavBar.vue'
|
||||||
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
|
import {fjPoint, createTask} from '@config/getData2'
|
||||||
|
export default {
|
||||||
|
name: 'ManualUnstack',
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
DropdownMenu
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
option1: [],
|
||||||
|
optionNew1: [],
|
||||||
|
active1: '',
|
||||||
|
open1: false,
|
||||||
|
val1: '',
|
||||||
|
option2: [],
|
||||||
|
optionNew2: [],
|
||||||
|
active2: '',
|
||||||
|
open2: false,
|
||||||
|
val2: '',
|
||||||
|
disabled1: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this._fjPoint()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询点位 */
|
||||||
|
async _fjPoint () {
|
||||||
|
let res = await fjPoint()
|
||||||
|
if (res.code === '1') {
|
||||||
|
this.option1 = [...res.result.start]
|
||||||
|
this.option1.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_code)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
this.option2 = [...res.result.end]
|
||||||
|
this.option2.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_code)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 模糊匹配 */
|
||||||
|
selectMatchItem (lists, keyWord) {
|
||||||
|
let resArr = []
|
||||||
|
lists.filter((item) => {
|
||||||
|
if (item.point_name.indexOf(keyWord) > -1) {
|
||||||
|
resArr.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return resArr
|
||||||
|
},
|
||||||
|
handleChange1 (e) {
|
||||||
|
if (!e) {
|
||||||
|
this.active1 = ''
|
||||||
|
}
|
||||||
|
this.optionNew1 = []
|
||||||
|
this.optionNew1 = this.selectMatchItem(this.option1, e)
|
||||||
|
this.open1 = true
|
||||||
|
},
|
||||||
|
handleBlur1 () {
|
||||||
|
this.open1 = false
|
||||||
|
this.val1 = ''
|
||||||
|
},
|
||||||
|
toggleItem1 () {
|
||||||
|
if (!this.open1) {
|
||||||
|
this.optionNew1 = this.option1
|
||||||
|
this.active1 = ''
|
||||||
|
this.optionNew1.map((e, i) => {
|
||||||
|
if (e.label === this.val1) {
|
||||||
|
this.active1 = i + ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.open1 = true
|
||||||
|
} else {
|
||||||
|
this.open1 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropdownMenu1 (i) {
|
||||||
|
this.active1 = i + ''
|
||||||
|
this.open1 = false
|
||||||
|
if (this.optionNew1.length > 0) {
|
||||||
|
this.val1 = this.optionNew1[i].label
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleChange2 (e) {
|
||||||
|
if (!e) {
|
||||||
|
this.active2 = ''
|
||||||
|
}
|
||||||
|
this.optionNew2 = []
|
||||||
|
this.optionNew2 = this.selectMatchItem(this.option2, e)
|
||||||
|
this.open2 = true
|
||||||
|
},
|
||||||
|
handleBlur2 () {
|
||||||
|
this.open2 = false
|
||||||
|
this.val2 = ''
|
||||||
|
},
|
||||||
|
toggleItem2 () {
|
||||||
|
if (!this.open2) {
|
||||||
|
this.optionNew2 = this.option2
|
||||||
|
this.active2 = ''
|
||||||
|
this.optionNew2.map((e, i) => {
|
||||||
|
if (e.label === this.val2) {
|
||||||
|
this.active2 = i + ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.open2 = true
|
||||||
|
} else {
|
||||||
|
this.open2 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropdownMenu2 (i) {
|
||||||
|
this.active2 = i + ''
|
||||||
|
this.open2 = false
|
||||||
|
if (this.optionNew2.length > 0) {
|
||||||
|
this.val2 = this.optionNew2[i].label
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 确认 */
|
||||||
|
async _createTask () {
|
||||||
|
this.disabled1 = true
|
||||||
|
if (this.val1 === '' || this.val2 === '') {
|
||||||
|
this.disabled1 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let code1 = ''
|
||||||
|
this.option1.map(el => {
|
||||||
|
if (el.point_name === this.val1) {
|
||||||
|
code1 = el.point_code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let code2 = ''
|
||||||
|
this.option2.map(el => {
|
||||||
|
if (el.point_name === this.val2) {
|
||||||
|
code2 = el.point_code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let res = await createTask(code1, code2)
|
||||||
|
if (res.code === '1') {
|
||||||
|
this.toast(res.desc)
|
||||||
|
this.toCancle()
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
}
|
||||||
|
this.disabled1 = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled1 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 取消 */
|
||||||
|
toCancle () {
|
||||||
|
this.val1 = ''
|
||||||
|
this.val2 = ''
|
||||||
|
this.active1 = ''
|
||||||
|
this.active2 = ''
|
||||||
|
this.disabled1 = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -18,6 +18,7 @@ const VehicleBind = r => require.ensure([], () => r(require('../pages/proj/Vehic
|
|||||||
const VehicleUnbind = r => require.ensure([], () => r(require('../pages/proj/VehicleUnbind')), 'VehicleUnbind')
|
const VehicleUnbind = r => require.ensure([], () => r(require('../pages/proj/VehicleUnbind')), 'VehicleUnbind')
|
||||||
const CallDefective = r => require.ensure([], () => r(require('../pages/proj/CallDefective')), 'CallDefective')
|
const CallDefective = r => require.ensure([], () => r(require('../pages/proj/CallDefective')), 'CallDefective')
|
||||||
const CreateChargingTask = r => require.ensure([], () => r(require('../pages/proj/CreateChargingTask')), 'CreateChargingTask')
|
const CreateChargingTask = r => require.ensure([], () => r(require('../pages/proj/CreateChargingTask')), 'CreateChargingTask')
|
||||||
|
const ManualUnstack = r => require.ensure([], () => r(require('../pages/proj/ManualUnstack')), 'ManualUnstack')
|
||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
@@ -97,6 +98,10 @@ export default new Router({
|
|||||||
{
|
{
|
||||||
path: '/CreateChargingTask', // AGV充电
|
path: '/CreateChargingTask', // AGV充电
|
||||||
component: CreateChargingTask
|
component: CreateChargingTask
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/ManualUnstack', // 人工拆垛
|
||||||
|
component: ManualUnstack
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
scrollBehavior (to, from, savedPosition) {
|
scrollBehavior (to, from, savedPosition) {
|
||||||
|
|||||||
Reference in New Issue
Block a user