解盘组盘
This commit is contained in:
@@ -1,154 +0,0 @@
|
||||
<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">
|
||||
<input class="filter-input filter-scan-input" v-model="val2" @input="val2 = val2.replace(/[^\d]/g,'')">
|
||||
</div>
|
||||
<div class="filter-unit">块</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === '' || val2 === ''}" :disabled="disabled1" @click="_pdaReport">确定</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 {pdaDevice, pdaReport} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'BelowGradeReport',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaDevice()
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备 */
|
||||
async _pdaDevice () {
|
||||
let res = await pdaDevice('unqualified_report')
|
||||
if (res.code === '1') {
|
||||
this.option1 = [...res.result]
|
||||
this.option1.map(el => {
|
||||
this.$set(el, 'value', el.device_code)
|
||||
this.$set(el, 'label', el.device_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _pdaReport () {
|
||||
this.disabled1 = true
|
||||
if (this.val1 === '' || this.val2 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
let code = ''
|
||||
this.option1.map(el => {
|
||||
if (el.device_name === this.val1) {
|
||||
code = el.device_code
|
||||
}
|
||||
})
|
||||
try {
|
||||
let res = await pdaReport(code, this.val2)
|
||||
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.val2 = ''
|
||||
this.active1 = ''
|
||||
this.val1 = ''
|
||||
this.disabled1 = false
|
||||
},
|
||||
/** 模糊匹配 */
|
||||
selectMatchItem (lists, keyWord) {
|
||||
let resArr = []
|
||||
lists.filter((item) => {
|
||||
if (item.device_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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,145 +0,0 @@
|
||||
<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>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === ''}" :disabled="disabled1" @click="_callDefective">确定</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 {pdaDevice, callDefective} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'CallDefective',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaDevice()
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备 */
|
||||
async _pdaDevice () {
|
||||
let res = await pdaDevice('call_defective')
|
||||
if (res.code === '1') {
|
||||
this.option1 = [...res.result]
|
||||
this.option1.map(el => {
|
||||
this.$set(el, 'value', el.device_code)
|
||||
this.$set(el, 'label', el.device_name)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _callDefective () {
|
||||
this.disabled1 = true
|
||||
if (this.val1 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
let code = ''
|
||||
this.option1.map(el => {
|
||||
if (el.device_name === this.val1) {
|
||||
code = el.device_code
|
||||
}
|
||||
})
|
||||
try {
|
||||
let res = await callDefective(code)
|
||||
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.active1 = ''
|
||||
this.val1 = ''
|
||||
this.disabled1 = false
|
||||
},
|
||||
/** 模糊匹配 */
|
||||
selectMatchItem (lists, keyWord) {
|
||||
let resArr = []
|
||||
lists.filter((item) => {
|
||||
if (item.device_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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,220 +0,0 @@
|
||||
<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' : val2 === ''}" :disabled="disabled1" @click="_callEmpty">确定</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 {pdaRegion, pdaPoint, callEmpty} from '@config/getData2'
|
||||
export default {
|
||||
name: 'CallEmpty',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _pdaRegion () {
|
||||
let res = await pdaRegion('call_empty')
|
||||
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)
|
||||
})
|
||||
} 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._pdaPoint(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _pdaPoint (code) {
|
||||
let res = await pdaPoint('call_empty', 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
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _callEmpty () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
code = el.point_code
|
||||
}
|
||||
})
|
||||
let res = await callEmpty(code)
|
||||
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>
|
||||
@@ -1,220 +0,0 @@
|
||||
<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' : val2 === ''}" :disabled="disabled1" @click="_callMaterial">确定</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 {pdaRegion, pdaPoint, callMaterial} from '@config/getData2'
|
||||
export default {
|
||||
name: 'BindPalletPoint',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _pdaRegion () {
|
||||
let res = await pdaRegion('call_material')
|
||||
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)
|
||||
})
|
||||
} 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._pdaPoint(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _pdaPoint (code) {
|
||||
let res = await pdaPoint('call_material', 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
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _callMaterial () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
code = el.point_code
|
||||
}
|
||||
})
|
||||
let res = await callMaterial(code)
|
||||
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>
|
||||
@@ -1,51 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="困料管理"></nav-bar>
|
||||
<section class="content mgt186">
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :disabled="disabled1" @click="_createChargingTask('1')">1号车充电</button>
|
||||
<button class="btn submit-button" :disabled="disabled1" @click="_createChargingTask('2')">2号车充电</button>
|
||||
<button class="btn submit-button" @click="toQuit">退出</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {createChargingTask} from '@config/getData1'
|
||||
export default {
|
||||
name: 'CreateChargingTask',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
/** 确认 */
|
||||
async _createChargingTask (type) {
|
||||
this.disabled1 = true
|
||||
try {
|
||||
let res = await createChargingTask(type)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this.toCancle()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
toQuit () {
|
||||
this.$router.push('/home')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
155
src/pages/proj/GroupDisk.vue
Normal file
155
src/pages/proj/GroupDisk.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="组盘"></nav-bar>
|
||||
<section class="content">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="托盘码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<search-box
|
||||
label="物料条码"
|
||||
:focused="true"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="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.BillID}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>库存数量</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.MatCode}}</td>
|
||||
<td>{{e.MatName}}</td>
|
||||
<td>{{e.BatchNumber}}</td>
|
||||
<td>{{e.MatNum}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : !val1 || !val2}" :disabled="disabled" @click="_rfTrayPackage">组盘</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {rfReadTrayStatePackage, rfReadTrayStoragePackage, rfReadMatBarCodeStatePackage, rfTrayPackage} from '@config/getData2'
|
||||
export default {
|
||||
name: 'GroupDisk',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 读取托盘码 */
|
||||
async _rfReadTrayStatePackage (val) {
|
||||
try {
|
||||
let res = await rfReadTrayStatePackage(val)
|
||||
if (res.ErrNO === '1') {
|
||||
this._rfReadTrayStoragePackage()
|
||||
} else {
|
||||
this.toast(res.ErrMsg)
|
||||
this.val1 = ''
|
||||
}
|
||||
} catch (e) {
|
||||
this.val1 = ''
|
||||
}
|
||||
},
|
||||
/** 托盘库存信息 */
|
||||
async _rfReadTrayStoragePackage () {
|
||||
let res = await rfReadTrayStoragePackage(this.val1)
|
||||
if (res.ErrNO === '1') {
|
||||
this.dataList = [...res.StorageList]
|
||||
} else {
|
||||
this.toast(res.ErrMsg)
|
||||
}
|
||||
},
|
||||
/** 读取物料条码 */
|
||||
async _rfReadMatBarCodeStatePackage (val) {
|
||||
try {
|
||||
let res = await rfReadMatBarCodeStatePackage(val)
|
||||
if (res.ErrNO === '1') {
|
||||
this.toast(res.ErrMsg)
|
||||
} else {
|
||||
this.toast(res.ErrMsg)
|
||||
this.val2 = ''
|
||||
}
|
||||
} catch (e) {
|
||||
this.val2 = ''
|
||||
}
|
||||
},
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._rfReadTrayStatePackage(e)
|
||||
}
|
||||
},
|
||||
handleChange2 (e, type) {
|
||||
if (type) {
|
||||
this._rfReadMatBarCodeStatePackage(e)
|
||||
}
|
||||
},
|
||||
/** 组盘 */
|
||||
async _rfTrayPackage () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let uid = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).UserPID : ''
|
||||
let res = await rfTrayPackage(this.val1, this.val2, '', uid)
|
||||
if (res.ErrNO === '1') {
|
||||
this.toast(res.ErrMsg)
|
||||
} else {
|
||||
this.Dialog(res.ErrMsg)
|
||||
}
|
||||
this.toCancle()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
/** 取消 */
|
||||
toCancle () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.grid-wraper
|
||||
height calc(100% - 2.15rem)
|
||||
</style>
|
||||
@@ -1,67 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="困料管理"></nav-bar>
|
||||
<section class="content mgt186">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="载具"
|
||||
v-model="val1"
|
||||
:seaShow="false"
|
||||
></search-box>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === ''}" :disabled="disabled1" @click="_standStatus('1')">强制完成</button>
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === ''}" :disabled="disabled1" @click="_standStatus('2')">强制超时</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {standStatus} from '@config/getData2'
|
||||
export default {
|
||||
name: 'KunliaoManage',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
disabled1: false,
|
||||
val1: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
/** 确认 */
|
||||
async _standStatus (type) {
|
||||
this.disabled1 = true
|
||||
if (this.val1 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await standStatus(this.val1, type)
|
||||
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.disabled1 = false
|
||||
this.val1 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
128
src/pages/proj/OpenDisk.vue
Normal file
128
src/pages/proj/OpenDisk.vue
Normal file
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="解盘"></nav-bar>
|
||||
<section class="content">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="托盘码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
</div>
|
||||
<div class="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.BillID}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>批次</th>
|
||||
<th>数量</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.MatCode}}</td>
|
||||
<td>{{e.MatName}}</td>
|
||||
<td>{{e.BatchNumber}}</td>
|
||||
<td>{{e.MatNum}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : !val1}" :disabled="disabled" @click="_rfTrayUnPackage">解盘</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {rfReadTrayStateUnPackage, rfReadTrayStorageUnPackage, rfTrayUnPackage} from '@config/getData2'
|
||||
export default {
|
||||
name: 'GroupDisk',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 读取托盘码 */
|
||||
async _rfReadTrayStateUnPackage (val) {
|
||||
try {
|
||||
let res = await rfReadTrayStateUnPackage(val)
|
||||
if (res.ErrNO === '1') {
|
||||
this._rfReadTrayStorageUnPackage()
|
||||
} else {
|
||||
this.toast(res.ErrMsg)
|
||||
this.val1 = ''
|
||||
}
|
||||
} catch (e) {
|
||||
this.val1 = ''
|
||||
}
|
||||
},
|
||||
/** 托盘库存信息 */
|
||||
async _rfReadTrayStorageUnPackage () {
|
||||
let res = await rfReadTrayStorageUnPackage(this.val1)
|
||||
if (res.ErrNO === '1') {
|
||||
this.dataList = [...res.StorageList]
|
||||
} else {
|
||||
this.toast(res.ErrMsg)
|
||||
}
|
||||
},
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._rfReadTrayStateUnPackage(e)
|
||||
}
|
||||
},
|
||||
/** 解盘 */
|
||||
async _rfTrayUnPackage () {
|
||||
this.disabled = true
|
||||
if (!this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let uid = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).UserPID : ''
|
||||
let res = await rfTrayUnPackage(this.val1, uid)
|
||||
if (res.ErrNO === '1') {
|
||||
this.toast(res.ErrMsg)
|
||||
} else {
|
||||
this.Dialog(res.ErrMsg)
|
||||
}
|
||||
this.toCancle()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
/** 取消 */
|
||||
toCancle () {
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.grid-wraper
|
||||
height calc(100% - 1.15rem)
|
||||
</style>
|
||||
@@ -1,67 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="入窑管理"></nav-bar>
|
||||
<section class="content mgt186">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="载具"
|
||||
v-model="val1"
|
||||
:seaShow="false"
|
||||
></search-box>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === ''}" :disabled="disabled1" @click="_inKiln('1')">可入窑</button>
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === ''}" :disabled="disabled1" @click="_inKiln('2')">不可入窑</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import {inKiln} from '@config/getData2'
|
||||
export default {
|
||||
name: 'RuyaoManage',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
disabled1: false,
|
||||
val1: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
/** 确认 */
|
||||
async _inKiln (type) {
|
||||
this.disabled1 = true
|
||||
if (this.val1 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await inKiln(this.val1, type)
|
||||
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.disabled1 = false
|
||||
this.val1 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,229 +0,0 @@
|
||||
<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>
|
||||
<search-box
|
||||
label="载具"
|
||||
v-model="val3"
|
||||
:seaShow="false"
|
||||
></search-box>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val2 === '' || val3 === ''}" :disabled="disabled1" @click="_sendEmpty">确定</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {pdaRegion, pdaPoint, sendEmpty} from '@config/getData2'
|
||||
export default {
|
||||
name: 'SendEmpty',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
disabled1: false,
|
||||
val3: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _pdaRegion () {
|
||||
let res = await pdaRegion('send_empty')
|
||||
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)
|
||||
})
|
||||
} 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._pdaPoint(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _pdaPoint (code) {
|
||||
let res = await pdaPoint('send_empty', 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
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _sendEmpty () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '' || this.val3 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
code = el.point_code
|
||||
}
|
||||
})
|
||||
let res = await sendEmpty(code, this.val3)
|
||||
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
|
||||
this.val3 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,274 +0,0 @@
|
||||
<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>
|
||||
<search-box
|
||||
label="载具"
|
||||
v-model="val3"
|
||||
:seaShow="false"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">数量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input class="filter-input filter-scan-input" v-model="val4" @input="val4 = val4.replace(/[^\d]/g,'')">
|
||||
</div>
|
||||
<div class="filter-unit">块</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">重量</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input class="filter-input filter-scan-input" v-model="val5" @input="val5 = val5.replace(/[^\d]/g,'')">
|
||||
</div>
|
||||
<div class="filter-unit">块</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">是否满托</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option3"
|
||||
:active="active3"
|
||||
:open="open3"
|
||||
@toggleItem="toggleItem3"
|
||||
@dropdownMenu="dropdownMenu3">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val2 === '' || val3 === '' || val4 === '' || val5 === '' || active3 === ''}" :disabled="disabled1" @click="_sendMaterial">确定</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {pdaRegion, pdaPoint, sendMaterial} from '@config/getData2'
|
||||
export default {
|
||||
name: 'BindPalletPoint',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
option3: [{value: '0', label: '否'}, {value: '1', label: '是'}],
|
||||
active3: '1',
|
||||
open3: false,
|
||||
val3: '',
|
||||
val4: '',
|
||||
val5: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _pdaRegion () {
|
||||
let res = await pdaRegion('send_material')
|
||||
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)
|
||||
})
|
||||
} 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._pdaPoint(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _pdaPoint (code) {
|
||||
let res = await pdaPoint('send_material', 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
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _sendMaterial () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '' || this.val3 === '' || this.val4 === '' || this.val5 === '' || this.active3 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
code = el.point_code
|
||||
}
|
||||
})
|
||||
let res = await sendMaterial(code, this.val3, this.val4, this.val5, this.option3[this.active3].value)
|
||||
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.active3 = ''
|
||||
this.val3 = ''
|
||||
this.val4 = ''
|
||||
this.val5 = ''
|
||||
this.disabled1 = false
|
||||
},
|
||||
toggleItem3 () {
|
||||
if (!this.open3) {
|
||||
this.open3 = true
|
||||
} else {
|
||||
this.open3 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu3 (i) {
|
||||
this.active3 = i + ''
|
||||
this.open3 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,132 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="任务管理"></nav-bar>
|
||||
<section class="content mgt15 mgb110 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" @click="toCheck(e)" :class="{'checked': e.task_uuid === pkId}">
|
||||
<td>{{e.task_no}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>起点</th>
|
||||
<th>终点</th>
|
||||
<th>状态</th>
|
||||
<th>托盘号</th>
|
||||
<th>物料类型</th>
|
||||
<th>优先级</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_uuid === pkId}">
|
||||
<td>{{e.start_devicecode}}</td>
|
||||
<td>{{e.next_devicecode}}</td>
|
||||
<td>{{e.task_status_name}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_type_name}}</td>
|
||||
<td>{{e.priority}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn btn-disabled submit-button" :class="{'bgred' : btnred}" :disabled="disabled" @click="toSure('1')">重新生成</button>
|
||||
<button class="btn btn-disabled submit-button" :class="{'bgred' : btnred}" :disabled="disabled" @click="toSure('2')">强制完成</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {queryTask, taskOperation} from '@config/getData1'
|
||||
export default {
|
||||
name: 'TaskManage',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
keyword: '',
|
||||
startPoint: '',
|
||||
endPoint: '',
|
||||
btnred: false,
|
||||
disabled: false,
|
||||
dataList: [],
|
||||
// dataList: [
|
||||
// {
|
||||
// task_uuid: '1',
|
||||
// task_no: '87511',
|
||||
// start_devicecode: 'A12',
|
||||
// next_devicecode: 'F99',
|
||||
// inst_status: '放货完成',
|
||||
// agv_no: 'A01'
|
||||
// }
|
||||
// ],
|
||||
pkId: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.queryTask(this.keyword, this.startPoint, this.endPoint)
|
||||
},
|
||||
methods: {
|
||||
async queryTask () {
|
||||
try {
|
||||
let res = await queryTask(this.keyword, this.startPoint, this.endPoint)
|
||||
if (res.code === '1') {
|
||||
this.dataList = res.result
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
} catch (err) {
|
||||
this.Dialog(err)
|
||||
}
|
||||
},
|
||||
async taskOperation (type) {
|
||||
try {
|
||||
let res = await taskOperation(this.pkId, type)
|
||||
if (res.code === '1') {
|
||||
this.toast('操作成功')
|
||||
this.disabled = false
|
||||
this.pkId = ''
|
||||
this.btnred = false
|
||||
this.dataList = []
|
||||
this.queryTask()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
toSure (type) {
|
||||
if (this.pkId) {
|
||||
this.disabled = true
|
||||
this.taskOperation(type)
|
||||
} else {
|
||||
// this.toast('请选择')
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
|
||||
if (this.pkId) {
|
||||
this.btnred = true
|
||||
} else {
|
||||
this.btnred = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
.left_fixed
|
||||
flex 0 0 .5rem
|
||||
.left_layout_t
|
||||
min-width 1.5rem
|
||||
</style>
|
||||
@@ -1,308 +0,0 @@
|
||||
<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>
|
||||
<search-box
|
||||
label="载具"
|
||||
v-model="val4"
|
||||
:seaShow="false"
|
||||
></search-box>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val2 === '' || val3 === '' || val4 === ''}" :disabled="disabled1" @click="_vehicleBind">确定</button>
|
||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {pdaRegion, pdaPoint, pdavehicleType, vehicleBind} from '@config/getData2'
|
||||
export default {
|
||||
name: 'VehicleBind',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu,
|
||||
SearchBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
option3: [],
|
||||
optionNew3: [],
|
||||
active3: '',
|
||||
open3: false,
|
||||
val3: '',
|
||||
disabled1: false,
|
||||
val4: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
this._pdavehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 查询载具类型 */
|
||||
async _pdavehicleType () {
|
||||
let res = await pdavehicleType('vehicle_bind')
|
||||
if (res.code === '1') {
|
||||
this.option3 = [...res.result]
|
||||
this.option3.map(el => {
|
||||
this.$set(el, 'value', el.value)
|
||||
this.$set(el, 'label', el.label)
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询区域 */
|
||||
async _pdaRegion () {
|
||||
let res = await pdaRegion('vehicle_bind')
|
||||
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)
|
||||
})
|
||||
} 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)
|
||||
}
|
||||
if (type === '3' && item.label.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._pdaPoint(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _pdaPoint (code) {
|
||||
let res = await pdaPoint('vehicle_bind', 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
|
||||
}
|
||||
},
|
||||
handleChange3 (e) {
|
||||
if (!e) {
|
||||
this.active3 = ''
|
||||
}
|
||||
this.optionNew3 = []
|
||||
this.optionNew3 = this.selectMatchItem(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
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _vehicleBind () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '' || this.val3 === '' || this.val4 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
code = el.point_code
|
||||
}
|
||||
})
|
||||
let code3 = ''
|
||||
this.option3.map(el => {
|
||||
if (el.label === this.val3) {
|
||||
code3 = el.value
|
||||
}
|
||||
})
|
||||
let res = await vehicleBind(code, code3, this.val4)
|
||||
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.active1 = ''
|
||||
this.active2 = ''
|
||||
this.active3 = ''
|
||||
this.disabled1 = false
|
||||
this.val4 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,220 +0,0 @@
|
||||
<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' : val2 === ''}" :disabled="disabled1" @click="_vehicleUnbind">确定</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 {pdaRegion, pdaPoint, vehicleUnbind} from '@config/getData2'
|
||||
export default {
|
||||
name: 'VehicleUnbind',
|
||||
components: {
|
||||
NavBar,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
option1: [],
|
||||
optionNew1: [],
|
||||
active1: '',
|
||||
open1: false,
|
||||
val1: '',
|
||||
option2: [],
|
||||
optionNew2: [],
|
||||
active2: '',
|
||||
open2: false,
|
||||
val2: '',
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
},
|
||||
methods: {
|
||||
/** 查询区域 */
|
||||
async _pdaRegion () {
|
||||
let res = await pdaRegion('vehicle_unbind')
|
||||
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)
|
||||
})
|
||||
} 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._pdaPoint(this.optionNew1[i].value)
|
||||
}
|
||||
},
|
||||
/** 查询点位 */
|
||||
async _pdaPoint (code) {
|
||||
let res = await pdaPoint('vehicle_unbind', 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
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _vehicleUnbind () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let code = ''
|
||||
this.option2.map(el => {
|
||||
if (el.point_name === this.val2) {
|
||||
code = el.point_code
|
||||
}
|
||||
})
|
||||
let res = await vehicleUnbind(code)
|
||||
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>
|
||||
@@ -1,138 +0,0 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="指令管理"></nav-bar>
|
||||
<section class="content mgt15 mgb110 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" @click="toCheck(e)" :class="{'checked': e.inst_uuid === pkId}">
|
||||
<td>{{e.task_no}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="slide">
|
||||
<table class="layout-t">
|
||||
<tr>
|
||||
<th>指令号</th>
|
||||
<th>起点</th>
|
||||
<th>终点</th>
|
||||
<th>状态</th>
|
||||
<th>托盘号</th>
|
||||
<th>agv车号</th>
|
||||
<th>物料类型</th>
|
||||
<th>优先级</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.inst_uuid === pkId}">
|
||||
<td>{{e.inst_no}}</td>
|
||||
<td>{{e.start_devicecode}}</td>
|
||||
<td>{{e.next_devicecode}}</td>
|
||||
<td>{{e.inst_status_name}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.carno}}</td>
|
||||
<td>{{e.material_type_name}}</td>
|
||||
<td>{{e.priority}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn btn-disabled submit-button" :class="{'bgred' : btnred}" :disabled="disabled" @click="toSure('1')">指令撤销</button>
|
||||
<button class="btn btn-disabled submit-button" :class="{'bgred' : btnred}" :disabled="disabled" @click="toSure('2')">重新下发</button>
|
||||
<button class="btn btn-disabled submit-button" :class="{'bgred' : btnred}" :disabled="disabled" @click="toSure('3')">强制完成</button>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import {queryInstraction, instOperation} from '@config/getData1'
|
||||
export default {
|
||||
name: 'ZlManage',
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
keyword: '',
|
||||
startPoint: '',
|
||||
endPoint: '',
|
||||
btnred: false,
|
||||
disabled: false,
|
||||
dataList: [],
|
||||
// dataList: [
|
||||
// {
|
||||
// inst_uuid: '1',
|
||||
// task_no: '87511',
|
||||
// start_devicecode: 'A12',
|
||||
// next_devicecode: 'F99',
|
||||
// inst_status: '放货完成',
|
||||
// priority: '高',
|
||||
// create_time: '12:00:00'
|
||||
// }
|
||||
// ],
|
||||
pkId: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.queryInstraction(this.keyword, this.startPoint, this.endPoint)
|
||||
},
|
||||
methods: {
|
||||
async queryInstraction () {
|
||||
try {
|
||||
let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint)
|
||||
if (res.code === '1') {
|
||||
this.dataList = res.result
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
} catch (err) {
|
||||
this.Dialog(err)
|
||||
}
|
||||
},
|
||||
async instOperation (type) {
|
||||
try {
|
||||
let res = await instOperation(this.pkId, type)
|
||||
if (res.code === '1') {
|
||||
this.toast('操作成功')
|
||||
this.disabled = false
|
||||
this.pkId = ''
|
||||
this.btnred = false
|
||||
this.dataList = []
|
||||
this.queryInstraction()
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
toSure (type) {
|
||||
if (this.pkId) {
|
||||
this.disabled = true
|
||||
this.instOperation(type)
|
||||
} else {
|
||||
// this.toast('请选择')
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid
|
||||
if (this.pkId) {
|
||||
this.btnred = true
|
||||
} else {
|
||||
this.btnred = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
.left_fixed
|
||||
flex 0 0 .5rem
|
||||
.left_layout_t
|
||||
min-width 1.5rem
|
||||
</style>
|
||||
Reference in New Issue
Block a user