修改托盘状态
This commit is contained in:
@@ -102,3 +102,14 @@ export const queryInfoBycode = (code) => post('api/pda/outStruct/queryInfoBycode
|
||||
})
|
||||
// 1.2确定
|
||||
export const outStructConfirm = (obj) => post('api/pda/outStruct/confirm', obj)
|
||||
|
||||
/** 修改托盘状态 */
|
||||
// 1.1根据托盘编码查询信息
|
||||
export const queryInfoBycode1 = (code) => post('api/pda/vehicleStatus/queryInfoBycode', {
|
||||
vehicle_code: code
|
||||
})
|
||||
// 1.2确定
|
||||
export const vehicleStatusConfirm = (code, is) => post('api/pda/vehicleStatus/confirm', {
|
||||
vehicle_code: code,
|
||||
is_full: is
|
||||
})
|
||||
|
||||
112
src/pages/proj/PalletStatus.vue
Normal file
112
src/pages/proj/PalletStatus.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<section>
|
||||
<nav-bar title="修改托盘状态"></nav-bar>
|
||||
<section class="content mgt186">
|
||||
<div class="filter-wraper">
|
||||
<search-box
|
||||
label="托盘条码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<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>
|
||||
</section>
|
||||
<section class="submit-bar">
|
||||
<button class="btn submit-button" :class="{'btn-disabled' : val1 === ''|| active1 === ''}" :disabled="disabled1" @click="_vehicleStatusConfirm">确定</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 {queryInfoBycode1, vehicleStatusConfirm} from '@config/getData2'
|
||||
export default {
|
||||
name: 'PalletStatus',
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
DropdownMenu
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val1: '',
|
||||
option1: [{value: '0', label: '否'}, {value: '1', label: '是'}],
|
||||
active1: '',
|
||||
open1: false,
|
||||
disabled1: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e, type) {
|
||||
if (type) {
|
||||
this._queryInfoBycode1(e)
|
||||
}
|
||||
},
|
||||
/** 查询托盘条码 */
|
||||
async _queryInfoBycode1 (e) {
|
||||
let res = await queryInfoBycode1(e)
|
||||
if (res.code === '1') {
|
||||
this.val1 = res.result.vehicle_code
|
||||
this.option1.map((el, i) => {
|
||||
if (el.value === res.result.is_full) {
|
||||
this.active1 = `${i}`
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 确认 */
|
||||
async _vehicleStatusConfirm () {
|
||||
this.disabled1 = true
|
||||
if (this.val1 === '' || this.active1 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await vehicleStatusConfirm(this.val1, this.option1[this.active1].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.active1 = ''
|
||||
this.disabled1 = false
|
||||
},
|
||||
toggleItem1 () {
|
||||
if (!this.open1) {
|
||||
this.open1 = true
|
||||
} else {
|
||||
this.open1 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu1 (i) {
|
||||
this.active1 = i + ''
|
||||
this.open1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -20,6 +20,7 @@ const SearchMater = r => require.ensure([], () => r(require('../pages/proj/Searc
|
||||
const ConveyorLine = r => require.ensure([], () => r(require('../pages/proj/ConveyorLine')), 'ConveyorLine')
|
||||
const BindMaterPoint = r => require.ensure([], () => r(require('../pages/proj/BindMaterPoint')), 'BindMaterPoint')
|
||||
const CYoutstore = r => require.ensure([], () => r(require('../pages/proj/CYoutstore')), 'CYoutstore')
|
||||
const PalletStatus = r => require.ensure([], () => r(require('../pages/proj/PalletStatus')), 'PalletStatus')
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
@@ -103,6 +104,10 @@ export default new Router({
|
||||
{
|
||||
path: '/CYoutstore', // 出窑货架人工出库
|
||||
component: CYoutstore
|
||||
},
|
||||
{
|
||||
path: '/PalletStatus', // 修改托盘状态
|
||||
component: PalletStatus
|
||||
}
|
||||
],
|
||||
scrollBehavior (to, from, savedPosition) {
|
||||
|
||||
Reference in New Issue
Block a user