接口
This commit is contained in:
@@ -28,43 +28,47 @@ export const taskOperation = (uuid, type) => post2('api/hand/taskoperation', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 送料
|
// 送料
|
||||||
// 1.1查询工序设备点位
|
// 1.1查询区域点位
|
||||||
export const sendMaterialqueryPoint = () => post('api/pda/sendMaterial/queryPoint', {})
|
export const sendMaterialqueryPoint = () => post('api/pda/sendMaterial/queryPoint', {})
|
||||||
// 1.2压制叫料确定
|
// 1.2送料确定
|
||||||
export const sendMaterialconfirm = (wid, did, pid, pcode, qty, vcode, isfull) => post('api/pda/sendMaterial/confirm', {
|
export const sendMaterialconfirm = (rid, pid, pcode, qty) => post('api/pda/sendMaterial/confirm', {
|
||||||
workprocedure_id: wid,
|
region_id: rid,
|
||||||
device_id: did,
|
|
||||||
point_id: pid,
|
point_id: pid,
|
||||||
point_code: pcode,
|
point_code: pcode,
|
||||||
qty: qty,
|
qty: qty
|
||||||
vehicle_code: vcode,
|
|
||||||
is_full: isfull
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 压制叫料
|
// 叫料
|
||||||
// 1.1查询点位
|
// 1.1查询区域点位
|
||||||
export const callMaterialqueryPoint = () => post('api/pda/callMaterial/queryPoint', {})
|
export const callMaterialqueryPoint = () => post('api/pda/callMaterial/queryPoint', {})
|
||||||
// 1.2压制叫料确定
|
// 1.2叫料确定
|
||||||
export const callMaterialconfirm = (pid, pcode, pname, isfull) => post('api/pda/callMaterial/confirm', {
|
export const callMaterialconfirm = (rid, pid, pcode) => post('api/pda/callMaterial/confirm', {
|
||||||
|
region_id: rid,
|
||||||
point_id: pid,
|
point_id: pid,
|
||||||
point_code: pcode,
|
point_code: pcode
|
||||||
point_name: pname,
|
|
||||||
is_full: isfull
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 送空托盘
|
// 送空托盘
|
||||||
// 1.1查询区域
|
// 1.1查询区域点位
|
||||||
export const sendEmptyqueryArea = () => post('api/pda/sendEmpty/queryArea', {})
|
export const sendEmptyqueryPoint = () => post('api/pda/sendEmpty/queryPoint', {})
|
||||||
// 1.2根据区域查询点位
|
// 1.2送托盘确认
|
||||||
export const sendEmptyqueryPointByArea = (acode) => post('api/pda/sendEmpty/queryPointByArea', {
|
export const sendEmptyconfirm = (rid, pid, pcode, vcode, qty) => post('api/pda/sendEmpty/confirm', {
|
||||||
area_code: acode
|
region_id: rid,
|
||||||
})
|
|
||||||
// 1.3 送空托盘确定
|
|
||||||
export const sendEmptyconfirm = (pid, pcode, pname, vcode) => post('api/pda/sendEmpty/confirm', {
|
|
||||||
point_id: pid,
|
point_id: pid,
|
||||||
point_code: pcode,
|
point_code: pcode,
|
||||||
point_name: pname,
|
vehicle_code: vcode,
|
||||||
vehicle_code: vcode
|
qty: qty
|
||||||
|
})
|
||||||
|
|
||||||
|
// 呼叫空托盘
|
||||||
|
// 1.1查询区域点位
|
||||||
|
export const callEmptyqueryPoint = () => post('api/pda/callEmpty/queryPoint', {})
|
||||||
|
// 1.2送料确定
|
||||||
|
export const callEmptyconfirm = (rid, pid, pcode, qty) => post('api/pda/callEmpty/confirm', {
|
||||||
|
region_id: rid,
|
||||||
|
point_id: pid,
|
||||||
|
point_code: pcode,
|
||||||
|
qty: qty
|
||||||
})
|
})
|
||||||
|
|
||||||
// 组盘-托盘数量绑定
|
// 组盘-托盘数量绑定
|
||||||
|
|||||||
@@ -1,22 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<section>
|
<section>
|
||||||
<nav-bar title="呼叫空托盘"></nav-bar>
|
<nav-bar title="呼叫空托盘"></nav-bar>
|
||||||
<section class="content mgt186 mgb110">
|
<section class="content mgt186">
|
||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">区域</div>
|
<div class="filter-label txtjustify">区域</div>
|
||||||
<div class="fxcol mgl20 visible" >
|
|
||||||
<dropdown-menu
|
|
||||||
:option="option1"
|
|
||||||
:active="active1"
|
|
||||||
:open="open1"
|
|
||||||
@toggleItem="toggleItem1"
|
|
||||||
@dropdownMenu="dropdownMenu1">
|
|
||||||
</dropdown-menu>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bottom-filter-tip">
|
|
||||||
<div class="filter-label txtjustify">点位</div>
|
|
||||||
<div class="fxcol mgl20 visible" >
|
<div class="fxcol mgl20 visible" >
|
||||||
<dropdown-menu
|
<dropdown-menu
|
||||||
:option="option2"
|
:option="option2"
|
||||||
@@ -27,10 +15,28 @@
|
|||||||
</dropdown-menu>
|
</dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
</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 class="bottom-filter-tip">
|
||||||
|
<div class="filter-label txtjustify">数量</div>
|
||||||
|
<div class="fxcol mgl20">
|
||||||
|
<input type="number" class="filter-input filter-scan-input" v-model="val2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<section class="submit-bar">
|
||||||
<button class="btn submit-button" :class="{'btn-disabled' : active1 === '' || active2 === ''}" :disabled="disabled1" @click="_callEmptyConfirm">确定</button>
|
<button class="btn submit-button" :class="{'btn-disabled' :val2 === '' || active2 === '' || active3 === ''}" :disabled="disabled1" @click="_callEmptyconfirm">确定</button>
|
||||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -39,7 +45,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
import {queryArea, queryPointByArea, callEmptyConfirm} from '@config/getData2.js'
|
import {callEmptyqueryPoint, callEmptyconfirm} from '@config/getData1'
|
||||||
export default {
|
export default {
|
||||||
name: 'CallEmptyPallet',
|
name: 'CallEmptyPallet',
|
||||||
components: {
|
components: {
|
||||||
@@ -48,79 +54,60 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
option1: [],
|
val2: '',
|
||||||
active1: '',
|
|
||||||
open1: false,
|
|
||||||
option2: [],
|
option2: [],
|
||||||
active2: '',
|
active2: '',
|
||||||
open2: false,
|
open2: false,
|
||||||
|
option3: [],
|
||||||
|
active3: '',
|
||||||
|
open3: false,
|
||||||
disabled1: false
|
disabled1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._queryArea()
|
this._callEmptyqueryPoint()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询区域 */
|
/** 查询点位 */
|
||||||
async _queryArea () {
|
async _callEmptyqueryPoint () {
|
||||||
let res = await queryArea()
|
let res = await callEmptyqueryPoint()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.option1 = [...res.result]
|
this.option2 = [...res.result.regionja]
|
||||||
this.option1.map(el => {
|
|
||||||
this.$set(el, 'value', el.area_code)
|
|
||||||
this.$set(el, 'label', el.area_name)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.Dialog(res.desc)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 根据区域查询点位 */
|
|
||||||
async _queryPointByArea (code) {
|
|
||||||
let res = await queryPointByArea(code)
|
|
||||||
if (res.code === '1') {
|
|
||||||
this.option2 = [...res.result]
|
|
||||||
this.option2.map(el => {
|
this.option2.map(el => {
|
||||||
this.$set(el, 'value', el.point_id)
|
this.$set(el, 'value', el.region_id)
|
||||||
this.$set(el, 'label', el.point_name)
|
this.$set(el, 'label', el.region_name)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 确定 */
|
/** 确认 */
|
||||||
async _callEmptyConfirm () {
|
async _callEmptyconfirm () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.active1 === '' || this.active2 === '') {
|
if (this.val2 === '' || this.active2 === '' || this.active3 === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let res = await callEmptyConfirm(this.option2[this.active2].point_id, this.option2[this.active2].point_code, this.option2[this.active2].point_name, this.option1[this.active1].area_code)
|
try {
|
||||||
|
let res = await callEmptyconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val2)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
|
this.toCancle()
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
|
this.disabled1 = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled1 = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** 取消 */
|
/** 取消 */
|
||||||
toCancle () {
|
toCancle () {
|
||||||
this.active1 = ''
|
this.val2 = ''
|
||||||
this.option2 = []
|
|
||||||
this.active2 = ''
|
this.active2 = ''
|
||||||
|
this.active3 = ''
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
},
|
},
|
||||||
toggleItem1 () {
|
|
||||||
if (!this.open1) {
|
|
||||||
this.open1 = true
|
|
||||||
} else {
|
|
||||||
this.open1 = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dropdownMenu1 (i) {
|
|
||||||
this.active1 = i + ''
|
|
||||||
this.open1 = false
|
|
||||||
this._queryPointByArea(this.option1[this.active1].area_code)
|
|
||||||
this.active2 = ''
|
|
||||||
},
|
|
||||||
toggleItem2 () {
|
toggleItem2 () {
|
||||||
if (!this.open2) {
|
if (!this.open2) {
|
||||||
this.open2 = true
|
this.open2 = true
|
||||||
@@ -131,6 +118,22 @@ export default {
|
|||||||
dropdownMenu2 (i) {
|
dropdownMenu2 (i) {
|
||||||
this.active2 = i + ''
|
this.active2 = i + ''
|
||||||
this.open2 = false
|
this.open2 = false
|
||||||
|
this.option3 = this.option2[this.active2].pointArr
|
||||||
|
this.option3.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_id)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toggleItem3 () {
|
||||||
|
if (!this.open3) {
|
||||||
|
this.open3 = true
|
||||||
|
} else {
|
||||||
|
this.open3 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropdownMenu3 (i) {
|
||||||
|
this.active3 = i + ''
|
||||||
|
this.open3 = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<section>
|
<section>
|
||||||
<nav-bar title="设备叫料"></nav-bar>
|
<nav-bar title="叫料"></nav-bar>
|
||||||
<section class="content mgt186">
|
<section class="content mgt186">
|
||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">点位</div>
|
<div class="filter-label txtjustify">区域</div>
|
||||||
<div class="fxcol mgl20 visible" >
|
|
||||||
<dropdown-menu
|
|
||||||
:option="option1"
|
|
||||||
:active="active1"
|
|
||||||
:open="open1"
|
|
||||||
@toggleItem="toggleItem1"
|
|
||||||
@dropdownMenu="dropdownMenu1">
|
|
||||||
</dropdown-menu>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bottom-filter-tip">
|
|
||||||
<div class="filter-label txtjustify">是否满托</div>
|
|
||||||
<div class="fxcol mgl20 visible" >
|
<div class="fxcol mgl20 visible" >
|
||||||
<dropdown-menu
|
<dropdown-menu
|
||||||
:option="option2"
|
:option="option2"
|
||||||
@@ -27,10 +15,22 @@
|
|||||||
</dropdown-menu>
|
</dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<section class="submit-bar">
|
||||||
<button class="btn submit-button" :class="{'btn-disabled' : active1 === '' || active2 === ''}" :disabled="disabled1" @click="_callMaterialconfirm">确定</button>
|
<button class="btn submit-button" :class="{'btn-disabled':active2 === '' || active3 === ''}" :disabled="disabled1" @click="_callMaterialconfirm">确定</button>
|
||||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -41,19 +41,19 @@ import NavBar from '@components/NavBar.vue'
|
|||||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
import {callMaterialqueryPoint, callMaterialconfirm} from '@config/getData1'
|
import {callMaterialqueryPoint, callMaterialconfirm} from '@config/getData1'
|
||||||
export default {
|
export default {
|
||||||
name: 'PressCallMater',
|
name: 'EquipCallMater',
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
DropdownMenu
|
DropdownMenu
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
option1: [],
|
option2: [],
|
||||||
active1: '',
|
|
||||||
open1: false,
|
|
||||||
option2: [{value: '1', label: '是'}, {value: '2', label: '否'}],
|
|
||||||
active2: '',
|
active2: '',
|
||||||
open2: false,
|
open2: false,
|
||||||
|
option3: [],
|
||||||
|
active3: '',
|
||||||
|
open3: false,
|
||||||
disabled1: false
|
disabled1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -61,28 +61,28 @@ export default {
|
|||||||
this._callMaterialqueryPoint()
|
this._callMaterialqueryPoint()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 1.1查询点位 */
|
/** 查询点位 */
|
||||||
async _callMaterialqueryPoint () {
|
async _callMaterialqueryPoint () {
|
||||||
let res = await callMaterialqueryPoint()
|
let res = await callMaterialqueryPoint()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.option1 = [...res.result]
|
this.option2 = [...res.result.regionja]
|
||||||
this.option1.map(el => {
|
this.option2.map(el => {
|
||||||
this.$set(el, 'value', el.point_code)
|
this.$set(el, 'value', el.region_id)
|
||||||
this.$set(el, 'label', el.point_name)
|
this.$set(el, 'label', el.region_name)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 确定 */
|
/** 确认 */
|
||||||
async _callMaterialconfirm () {
|
async _callMaterialconfirm () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.active1 === '' || this.active2 === '') {
|
if (this.active2 === '' || this.active3 === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await callMaterialconfirm(this.option1[this.active1].point_id, this.option1[this.active1].point_code, this.option1[this.active1].point_name, this.option2[this.active2].value)
|
let res = await callMaterialconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
this.toCancle()
|
this.toCancle()
|
||||||
@@ -96,21 +96,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 取消 */
|
/** 取消 */
|
||||||
toCancle () {
|
toCancle () {
|
||||||
this.active1 = ''
|
|
||||||
this.active2 = ''
|
this.active2 = ''
|
||||||
|
this.active3 = ''
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
},
|
},
|
||||||
toggleItem1 () {
|
|
||||||
if (!this.open1) {
|
|
||||||
this.open1 = true
|
|
||||||
} else {
|
|
||||||
this.open1 = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dropdownMenu1 (i) {
|
|
||||||
this.active1 = i + ''
|
|
||||||
this.open1 = false
|
|
||||||
},
|
|
||||||
toggleItem2 () {
|
toggleItem2 () {
|
||||||
if (!this.open2) {
|
if (!this.open2) {
|
||||||
this.open2 = true
|
this.open2 = true
|
||||||
@@ -121,6 +110,22 @@ export default {
|
|||||||
dropdownMenu2 (i) {
|
dropdownMenu2 (i) {
|
||||||
this.active2 = i + ''
|
this.active2 = i + ''
|
||||||
this.open2 = false
|
this.open2 = false
|
||||||
|
this.option3 = this.option2[this.active2].pointArr
|
||||||
|
this.option3.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_id)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toggleItem3 () {
|
||||||
|
if (!this.open3) {
|
||||||
|
this.open3 = true
|
||||||
|
} else {
|
||||||
|
this.open3 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropdownMenu3 (i) {
|
||||||
|
this.active3 = i + ''
|
||||||
|
this.open3 = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,18 +5,6 @@
|
|||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">区域</div>
|
<div class="filter-label txtjustify">区域</div>
|
||||||
<div class="fxcol mgl20 visible" >
|
|
||||||
<dropdown-menu
|
|
||||||
:option="option1"
|
|
||||||
:active="active1"
|
|
||||||
:open="open1"
|
|
||||||
@toggleItem="toggleItem1"
|
|
||||||
@dropdownMenu="dropdownMenu1">
|
|
||||||
</dropdown-menu>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bottom-filter-tip">
|
|
||||||
<div class="filter-label txtjustify">点位</div>
|
|
||||||
<div class="fxcol mgl20 visible" >
|
<div class="fxcol mgl20 visible" >
|
||||||
<dropdown-menu
|
<dropdown-menu
|
||||||
:option="option2"
|
:option="option2"
|
||||||
@@ -27,15 +15,34 @@
|
|||||||
</dropdown-menu>
|
</dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
<search-box
|
<search-box
|
||||||
label="托盘"
|
label="托盘"
|
||||||
v-model="val1"
|
v-model="val1"
|
||||||
:seaShow="false"
|
:seaShow="false"
|
||||||
|
:disabled="option2[this.active2].region_code === 'SSX01'"
|
||||||
></search-box>
|
></search-box>
|
||||||
|
<div class="bottom-filter-tip">
|
||||||
|
<div class="filter-label txtjustify">数量</div>
|
||||||
|
<div class="fxcol mgl20">
|
||||||
|
<input type="number" class="filter-input filter-scan-input" v-model="val2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<section class="submit-bar">
|
||||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === '' || active1 === '' || active2 === ''}" :disabled="disabled1" @click="_sendEmptyconfirm">确定</button>
|
<button class="btn submit-button" :class="{'btn-disabled' :val2 === '' || active2 === '' || active3 === ''}" :disabled="disabled1" @click="_sendEmptyconfirm">确定</button>
|
||||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -43,54 +50,45 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
|
||||||
import SearchBox from '@components/SearchBox.vue'
|
import SearchBox from '@components/SearchBox.vue'
|
||||||
import {sendEmptyqueryArea, sendEmptyqueryPointByArea, sendEmptyconfirm} from '@config/getData1'
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
|
import {sendEmptyqueryPoint, sendEmptyconfirm} from '@config/getData1'
|
||||||
export default {
|
export default {
|
||||||
name: 'SendEmptyPallet',
|
name: 'SendEmptyPallet',
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
DropdownMenu,
|
SearchBox,
|
||||||
SearchBox
|
DropdownMenu
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
val1: '',
|
val1: '',
|
||||||
option1: [],
|
val2: '',
|
||||||
active1: '',
|
|
||||||
open1: false,
|
|
||||||
option2: [],
|
option2: [],
|
||||||
active2: '',
|
active2: '',
|
||||||
open2: false,
|
open2: false,
|
||||||
|
option3: [],
|
||||||
|
active3: '',
|
||||||
|
open3: false,
|
||||||
disabled1: false
|
disabled1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._sendEmptyqueryArea()
|
this._sendEmptyqueryPoint()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询区域 */
|
|
||||||
async _sendEmptyqueryArea () {
|
|
||||||
let res = await sendEmptyqueryArea()
|
|
||||||
if (res.code === '1') {
|
|
||||||
this.option1 = [...res.result]
|
|
||||||
this.option1.map(el => {
|
|
||||||
this.$set(el, 'value', el.area_code)
|
|
||||||
this.$set(el, 'label', el.area_name)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.Dialog(res.desc)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 查询点位 */
|
/** 查询点位 */
|
||||||
async _sendEmptyqueryPointByArea (a) {
|
async _sendEmptyqueryPoint () {
|
||||||
let res = await sendEmptyqueryPointByArea(a)
|
let res = await sendEmptyqueryPoint()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.option2 = [...res.result]
|
this.option2 = [...res.result.regionja]
|
||||||
this.option2.map(el => {
|
this.option2.map(el => {
|
||||||
this.$set(el, 'value', el.point_id)
|
this.$set(el, 'value', el.region_id)
|
||||||
this.$set(el, 'label', el.point_name)
|
this.$set(el, 'label', el.region_name)
|
||||||
})
|
})
|
||||||
|
if (this.option2[this.active2].region_code === 'SSX01') {
|
||||||
|
this.val1 = ''
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
@@ -98,12 +96,12 @@ export default {
|
|||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _sendEmptyconfirm () {
|
async _sendEmptyconfirm () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.val1 === '' || this.active1 === '') {
|
if (this.val2 === '' || this.active2 === '' || this.active3 === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await sendEmptyconfirm(this.option2[this.active2].point_id, this.option2[this.active2].point_code, this.option2[this.active2].point_name, this.val1)
|
let res = await sendEmptyconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val1, this.val2)
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.toast(res.desc)
|
this.toast(res.desc)
|
||||||
this.toCancle()
|
this.toCancle()
|
||||||
@@ -117,23 +115,11 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 取消 */
|
/** 取消 */
|
||||||
toCancle () {
|
toCancle () {
|
||||||
this.val1 = ''
|
this.val2 = ''
|
||||||
this.active1 = ''
|
|
||||||
this.active2 = ''
|
this.active2 = ''
|
||||||
|
this.active3 = ''
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
},
|
},
|
||||||
toggleItem1 () {
|
|
||||||
if (!this.open1) {
|
|
||||||
this.open1 = true
|
|
||||||
} else {
|
|
||||||
this.open1 = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dropdownMenu1 (i) {
|
|
||||||
this.active1 = i + ''
|
|
||||||
this.open1 = false
|
|
||||||
this._sendEmptyqueryPointByArea(this.option1[this.active1].area_code)
|
|
||||||
},
|
|
||||||
toggleItem2 () {
|
toggleItem2 () {
|
||||||
if (!this.open2) {
|
if (!this.open2) {
|
||||||
this.open2 = true
|
this.open2 = true
|
||||||
@@ -144,6 +130,22 @@ export default {
|
|||||||
dropdownMenu2 (i) {
|
dropdownMenu2 (i) {
|
||||||
this.active2 = i + ''
|
this.active2 = i + ''
|
||||||
this.open2 = false
|
this.open2 = false
|
||||||
|
this.option3 = this.option2[this.active2].pointArr
|
||||||
|
this.option3.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_id)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toggleItem3 () {
|
||||||
|
if (!this.open3) {
|
||||||
|
this.open3 = true
|
||||||
|
} else {
|
||||||
|
this.open3 = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropdownMenu3 (i) {
|
||||||
|
this.active3 = i + ''
|
||||||
|
this.open3 = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<section class="content mgt186">
|
<section class="content mgt186">
|
||||||
<div class="filter-wraper">
|
<div class="filter-wraper">
|
||||||
<div class="bottom-filter-tip">
|
<div class="bottom-filter-tip">
|
||||||
<div class="filter-label txtjustify">设备</div>
|
<div class="filter-label txtjustify">区域</div>
|
||||||
<div class="fxcol mgl20 visible" >
|
<div class="fxcol mgl20 visible" >
|
||||||
<dropdown-menu
|
<dropdown-menu
|
||||||
:option="option2"
|
:option="option2"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="submit-bar">
|
<section class="submit-bar">
|
||||||
<button class="btn submit-button" :class="{'btn-disabled' :val2 === '' || active1 === '' || active2 === '' || active3 === '' || active4 === ''}" :disabled="disabled1" @click="_sendMaterialconfirm">确定</button>
|
<button class="btn submit-button" :class="{'btn-disabled' :val2 === '' || active2 === '' || active3 === ''}" :disabled="disabled1" @click="_sendMaterialconfirm">确定</button>
|
||||||
<button class="btn submit-button" @click="toCancle">取消</button>
|
<button class="btn submit-button" @click="toCancle">取消</button>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -44,14 +44,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import SearchBox from '@components/SearchBox.vue'
|
|
||||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
import {sendMaterialqueryPoint, sendMaterialconfirm} from '@config/getData1'
|
import {sendMaterialqueryPoint, sendMaterialconfirm} from '@config/getData1'
|
||||||
export default {
|
export default {
|
||||||
name: 'BindPalletPoint',
|
name: 'SendMater',
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox,
|
|
||||||
DropdownMenu
|
DropdownMenu
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@@ -79,10 +77,10 @@ export default {
|
|||||||
// this.$set(el, 'value', el.workprocedure_id)
|
// this.$set(el, 'value', el.workprocedure_id)
|
||||||
// this.$set(el, 'label', el.workprocedure_name)
|
// this.$set(el, 'label', el.workprocedure_name)
|
||||||
// })
|
// })
|
||||||
this.option2 = [...res.result.workprocedureja.deviceja]
|
this.option2 = [...res.result.regionja]
|
||||||
this.option2.map(el => {
|
this.option2.map(el => {
|
||||||
this.$set(el, 'value', el.device_id)
|
this.$set(el, 'value', el.region_id)
|
||||||
this.$set(el, 'label', el.device_name)
|
this.$set(el, 'label', el.region_name)
|
||||||
})
|
})
|
||||||
// this.option3 = [...res.result.workprocedureja.deviceja.pointArr]
|
// this.option3 = [...res.result.workprocedureja.deviceja.pointArr]
|
||||||
// this.option3.map(el => {
|
// this.option3.map(el => {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export default new Router({
|
|||||||
component: SendMater
|
component: SendMater
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/EquipCallMater', // 设备叫料
|
path: '/EquipCallMater', // 叫料
|
||||||
component: EquipCallMater
|
component: EquipCallMater
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user