呼叫次品料
This commit is contained in:
@@ -132,6 +132,12 @@ export const standStatus = (vcode, type) => post('api/pda/standStatus', {
|
|||||||
type: type
|
type: type
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 入窑管理
|
||||||
|
export const inKiln = (vcode, type) => post('api/pda/inKiln', {
|
||||||
|
vehicle_code: vcode,
|
||||||
|
type: type
|
||||||
|
})
|
||||||
|
|
||||||
// 载具绑定
|
// 载具绑定
|
||||||
export const vehicleBind = (code, vtype, vcode) => post('api/pda/vehicleBind', {
|
export const vehicleBind = (code, vtype, vcode) => post('api/pda/vehicleBind', {
|
||||||
point_code: code,
|
point_code: code,
|
||||||
@@ -143,3 +149,8 @@ export const vehicleBind = (code, vtype, vcode) => post('api/pda/vehicleBind', {
|
|||||||
export const vehicleUnbind = (code) => post('api/pda/vehicleUnbind', {
|
export const vehicleUnbind = (code) => post('api/pda/vehicleUnbind', {
|
||||||
point_code: code
|
point_code: code
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 呼叫次品料
|
||||||
|
export const callDefective = (code) => post('api/pda/callDefective', {
|
||||||
|
device_code: code
|
||||||
|
})
|
||||||
|
|||||||
145
src/pages/proj/CallDefective.vue
Normal file
145
src/pages/proj/CallDefective.vue
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<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>
|
||||||
@@ -16,6 +16,7 @@ const KunliaoManage = r => require.ensure([], () => r(require('../pages/proj/Kun
|
|||||||
const RuyaoManage = r => require.ensure([], () => r(require('../pages/proj/RuyaoManage')), 'RuyaoManage')
|
const RuyaoManage = r => require.ensure([], () => r(require('../pages/proj/RuyaoManage')), 'RuyaoManage')
|
||||||
const VehicleBind = r => require.ensure([], () => r(require('../pages/proj/VehicleBind')), 'VehicleBind')
|
const VehicleBind = r => require.ensure([], () => r(require('../pages/proj/VehicleBind')), 'VehicleBind')
|
||||||
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')
|
||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
@@ -87,6 +88,10 @@ export default new Router({
|
|||||||
{
|
{
|
||||||
path: '/VehicleUnbind', // 载具解绑
|
path: '/VehicleUnbind', // 载具解绑
|
||||||
component: VehicleUnbind
|
component: VehicleUnbind
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/CallDefective', // 呼叫次品料
|
||||||
|
component: CallDefective
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
scrollBehavior (to, from, savedPosition) {
|
scrollBehavior (to, from, savedPosition) {
|
||||||
|
|||||||
Reference in New Issue
Block a user