新增点位管理、呼叫搬运页
This commit is contained in:
@@ -19,3 +19,6 @@ npm run build --report
|
||||
```
|
||||
|
||||
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
|
||||
|
||||
## 注意事项
|
||||
+ 接口线上地址: https://apifox.com/apidoc/shared-0bf1a292-c892-44d6-8e28-970c207af9e2
|
||||
|
||||
@@ -169,3 +169,23 @@ export const createTask = (scode, ecode) => post('api/pda/createTask', {
|
||||
start_point_code: scode,
|
||||
end_point_code: ecode
|
||||
})
|
||||
|
||||
/**
|
||||
* 点位管理
|
||||
*/
|
||||
export const getAllPointList = () => post('api/pda/getAllPointList', {})
|
||||
|
||||
/**
|
||||
* 呼叫搬运
|
||||
*/
|
||||
// 获取区域下拉框
|
||||
export const getAllRegionList = () => post('api/pda/getAllRegionList', {})
|
||||
// 根据区域获取点位列表
|
||||
export const getPointListByRegion = (code) => post('api/pda/getPointListByRegion', {
|
||||
region_code: code
|
||||
})
|
||||
// 呼叫搬运
|
||||
export const createP2PTask = (scode, ecode) => post('api/pda/createP2PTask', {
|
||||
start_point_code: scode,
|
||||
end_point_code: ecode
|
||||
})
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
<!-- <li @click="goInner('/CallDefective')">呼叫次品料</li> -->
|
||||
<!-- <li @click="goInner('/CreateChargingTask')">AGV充电</li> -->
|
||||
<li @click="goInner('/ManualUnstack')">人工拆垛</li>
|
||||
<li @click="goInner('/PointManage')">点位管理</li>
|
||||
<li @click="goInner('/CallCarry')">呼叫搬运</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
344
src/pages/proj/CallCarry.vue
Normal file
344
src/pages/proj/CallCarry.vue
Normal file
@@ -0,0 +1,344 @@
|
||||
<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 class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">终点区域</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="optionNew3"
|
||||
:active="active3"
|
||||
:open="open3"
|
||||
:inputed="true"
|
||||
v-model="val3"
|
||||
@handleBlur="handleBlur3"
|
||||
@handleChange="handleChange3"
|
||||
@toggleItem="toggleItem3"
|
||||
@dropdownMenu="dropdownMenu3">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">终点点位</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="optionNew4"
|
||||
:active="active4"
|
||||
:open="open4"
|
||||
:inputed="true"
|
||||
v-model="val4"
|
||||
@handleBlur="handleBlur4"
|
||||
@handleChange="handleChange4"
|
||||
@toggleItem="toggleItem4"
|
||||
@dropdownMenu="dropdownMenu4">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val2 === '' || val4 === ''}" :disabled="disabled1" @click="_createP2PTask">确定</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 {getAllRegionList, getPointListByRegion, createP2PTask} from '@config/getData2'
|
||||
export default {
|
||||
name: 'BindPalletPoint',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
option3: [],
|
||||
optionNew3: [],
|
||||
active3: '',
|
||||
open3: false,
|
||||
val3: '',
|
||||
option4: [],
|
||||
optionNew4: [],
|
||||
active4: '',
|
||||
open4: false,
|
||||
val4: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._getAllRegionList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _getAllRegionList () {
|
||||
let res = await getAllRegionList()
|
||||
if (res.code === '1') {
|
||||
this.option1 = [...res.result]
|
||||
this.option1.map(el => {
|
||||
this.$set(el, 'value', el.region_code)
|
||||
this.$set(el, 'label', el.region_name)
|
||||
})
|
||||
this.option3 = [...this.option1]
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 模糊匹配 */
|
||||
selectMatchItem (type, lists, keyWord) {
|
||||
let resArr = []
|
||||
lists.filter((item) => {
|
||||
if (type === '1' && item.region_name.indexOf(keyWord) > -1) {
|
||||
resArr.push(item)
|
||||
}
|
||||
if (type === '2' && item.point_name.indexOf(keyWord) > -1) {
|
||||
resArr.push(item)
|
||||
}
|
||||
})
|
||||
return resArr
|
||||
},
|
||||
handleChange1 (e) {
|
||||
if (!e) {
|
||||
this.active1 = ''
|
||||
}
|
||||
this.optionNew1 = []
|
||||
this.optionNew1 = this.selectMatchItem('1', 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
|
||||
this.val2 = ''
|
||||
this.active2 = ''
|
||||
this._getPointListByRegion(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** ---- */
|
||||
handleChange3 (e) {
|
||||
if (!e) {
|
||||
this.active3 = ''
|
||||
}
|
||||
this.optionNew3 = []
|
||||
this.optionNew3 = this.selectMatchItem('1', this.option3, e)
|
||||
this.open3 = true
|
||||
},
|
||||
handleBlur3 () {
|
||||
this.open3 = false
|
||||
this.val3 = ''
|
||||
},
|
||||
toggleItem3 () {
|
||||
if (!this.open3) {
|
||||
this.optionNew3 = this.option3
|
||||
this.active3 = ''
|
||||
this.optionNew3.map((e, i) => {
|
||||
if (e.label === this.val3) {
|
||||
this.active3 = i + ''
|
||||
}
|
||||
})
|
||||
this.open3 = true
|
||||
} else {
|
||||
this.open3 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu3 (i) {
|
||||
this.active3 = i + ''
|
||||
this.open3 = false
|
||||
if (this.optionNew3.length > 0) {
|
||||
this.val3 = this.optionNew3[i].label
|
||||
this.val4 = ''
|
||||
this.active4 = ''
|
||||
this._getPointListByRegion(this.optionNew3[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _getPointListByRegion (code) {
|
||||
let res = await getPointListByRegion(code)
|
||||
if (res.code === '1') {
|
||||
this.option2 = [...res.result]
|
||||
this.option2.map(el => {
|
||||
this.$set(el, 'value', el.point_code)
|
||||
this.$set(el, 'label', el.point_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
handleChange2 (e) {
|
||||
if (!e) {
|
||||
this.active2 = ''
|
||||
}
|
||||
this.optionNew2 = []
|
||||
this.optionNew2 = this.selectMatchItem('2', 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
|
||||
}
|
||||
},
|
||||
/** ----- */
|
||||
handleChange4 (e) {
|
||||
if (!e) {
|
||||
this.active4 = ''
|
||||
}
|
||||
this.optionNew4 = []
|
||||
this.optionNew4 = this.selectMatchItem('2', this.option4, e)
|
||||
this.open4 = true
|
||||
},
|
||||
handleBlur4 () {
|
||||
this.open4 = false
|
||||
this.val4 = ''
|
||||
},
|
||||
toggleItem4 () {
|
||||
if (!this.open4) {
|
||||
this.optionNew4 = this.option4
|
||||
this.active4 = ''
|
||||
this.optionNew4.map((e, i) => {
|
||||
if (e.label === this.val4) {
|
||||
this.active4 = i + ''
|
||||
}
|
||||
})
|
||||
this.open4 = true
|
||||
} else {
|
||||
this.open4 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu4 (i) {
|
||||
this.active4 = i + ''
|
||||
this.open4 = false
|
||||
if (this.optionNew4.length > 0) {
|
||||
this.val4 = this.optionNew4[i].label
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _createP2PTask () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '' || this.val4 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let scode = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
scode = el.point_code
|
||||
}
|
||||
})
|
||||
let ecode = ''
|
||||
this.option4.map(el => {
|
||||
if (el.point_name === this.val4) {
|
||||
ecode = el.point_code
|
||||
}
|
||||
})
|
||||
let res = await createP2PTask(scode, ecode)
|
||||
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.val3 = ''
|
||||
this.val4 = ''
|
||||
this.active1 = ''
|
||||
this.active2 = ''
|
||||
this.active3 = ''
|
||||
this.active4 = ''
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
74
src/pages/proj/PointManage.vue
Normal file
74
src/pages/proj/PointManage.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="点位管理"></nav-bar>
|
||||
<section class="content mgt15 grid-wraper">
|
||||
<div class="left_fixed">
|
||||
<table class="layout-t left_layout_t">
|
||||
<tr>
|
||||
<th>载具号</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>载具类型</th>
|
||||
<th>区域</th>
|
||||
<th>点位</th>
|
||||
<th>物料名称</th>
|
||||
<th>点位状态</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.vehicle_type}}</td>
|
||||
<td>{{e.region_name}}</td>
|
||||
<td>{{e.point_name}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.point_status}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {getAllPointList} from '@config/getData2'
|
||||
export default {
|
||||
name: 'PointManage',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this._getAllPointList()
|
||||
},
|
||||
methods: {
|
||||
async _getAllPointList () {
|
||||
try {
|
||||
let res = await getAllPointList()
|
||||
if (res.code === '1') {
|
||||
this.dataList = [...res.result]
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
} catch (err) {
|
||||
this.Dialog(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
.left_fixed
|
||||
flex 0 0 .5rem
|
||||
.left_layout_t
|
||||
min-width 1.5rem
|
||||
</style>
|
||||
@@ -19,6 +19,8 @@ const VehicleUnbind = r => require.ensure([], () => r(require('../pages/proj/Veh
|
||||
const CallDefective = r => require.ensure([], () => r(require('../pages/proj/CallDefective')), 'CallDefective')
|
||||
const CreateChargingTask = r => require.ensure([], () => r(require('../pages/proj/CreateChargingTask')), 'CreateChargingTask')
|
||||
const ManualUnstack = r => require.ensure([], () => r(require('../pages/proj/ManualUnstack')), 'ManualUnstack')
|
||||
const PointManage = r => require.ensure([], () => r(require('../pages/proj/PointManage')), 'PointManage')
|
||||
const CallCarry = r => require.ensure([], () => r(require('../pages/proj/CallCarry')), 'CallCarry')
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
@@ -102,6 +104,14 @@ export default new Router({
|
||||
{
|
||||
path: '/ManualUnstack', // 人工拆垛
|
||||
component: ManualUnstack
|
||||
},
|
||||
{
|
||||
path: '/PointManage', // 点位管理
|
||||
component: PointManage
|
||||
},
|
||||
{
|
||||
path: '/CallCarry', // 呼叫搬运
|
||||
component: CallCarry
|
||||
}
|
||||
],
|
||||
scrollBehavior (to, from, savedPosition) {
|
||||
|
||||
Reference in New Issue
Block a user