空盘解绑
This commit is contained in:
@@ -222,3 +222,14 @@ export const updateQty = (code, weight, qty) => post('api/pda/manual/updateInfo/
|
|||||||
current_weight: weight,
|
current_weight: weight,
|
||||||
current_qty: qty
|
current_qty: qty
|
||||||
})
|
})
|
||||||
|
/**
|
||||||
|
* 空盘解绑
|
||||||
|
*/
|
||||||
|
export const checkHaveMaterial = (code, type) => post('api/pda/manual/unbindVehicle/checkHaveMaterial', {
|
||||||
|
vehicle_code: code,
|
||||||
|
vehicle_type: type
|
||||||
|
})
|
||||||
|
export const doUnbindVehicle = (code, type) => post('api/pda/manual/unbindVehicle/doUnbindVehicle', {
|
||||||
|
vehicle_code: code,
|
||||||
|
vehicle_type: type
|
||||||
|
})
|
||||||
|
|||||||
@@ -170,3 +170,11 @@ export const updateQty = () => {
|
|||||||
let res = {code: '1', desc: 'ok'}
|
let res = {code: '1', desc: 'ok'}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
export const checkHaveMaterial = () => {
|
||||||
|
let res = {"result":{"message":"该托盘系统中无组盘信息!"},"code":"1","desc":"操作成功!"}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
export const doUnbindVehicle = () => {
|
||||||
|
let res = {code: '1', desc: 'ok'}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|||||||
109
src/pages/manual/UnbindVehicle.vue
Normal file
109
src/pages/manual/UnbindVehicle.vue
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<section>
|
||||||
|
<nav-bar title="空盘解绑"></nav-bar>
|
||||||
|
<section class="content mgt86 mgb110">
|
||||||
|
<div class="filter-wraper">
|
||||||
|
<search-box
|
||||||
|
label="载具"
|
||||||
|
v-model="val1"
|
||||||
|
:seaShow="false"
|
||||||
|
></search-box>
|
||||||
|
<div class="bottom-filter-tip">
|
||||||
|
<div class="filter-label">载具类型</div>
|
||||||
|
<div class="fxcol mgl20 visible" >
|
||||||
|
<el-select v-model="val2" filterable clearable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.text"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-show="JSON.stringify(result) !== '{}'" class="note">{{ result.message }}</div>
|
||||||
|
</section>
|
||||||
|
<section class="submit-bar">
|
||||||
|
<button class="btn submit-button" @click="clearUp">清空</button>
|
||||||
|
<button class="btn submit-button" @click="_checkHaveMaterial">查询</button>
|
||||||
|
<button class="btn submit-button" :class="{'btn-disabled' : !val1 || !val2}" @click="toSure">确认</button>
|
||||||
|
</section>
|
||||||
|
<modal :mdShow="show" @closeModalCallback="show = false" @comfirmCallback="comfirmCallback">
|
||||||
|
<div class="msg_txt">是否解绑组盘信息?</div>
|
||||||
|
</modal>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@components/NavBar.vue'
|
||||||
|
import SearchBox from '@components/SearchBox.vue'
|
||||||
|
import Modal from '@components/Modal.vue'
|
||||||
|
import {checkHaveMaterial, doUnbindVehicle} from '@config/getData2'
|
||||||
|
export default {
|
||||||
|
name: 'BindPalletPoint',
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox,
|
||||||
|
Modal
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
val1: '',
|
||||||
|
options: [{value: '1', text: '料盅'}, {value: '2', text: '钢托盘'}],
|
||||||
|
val2: '',
|
||||||
|
result: {},
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _checkHaveMaterial () {
|
||||||
|
let res = await checkHaveMaterial(this.val1, this.val2)
|
||||||
|
if (res.code === '1') {
|
||||||
|
this.result = res.result
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearUp () {
|
||||||
|
this.val1 = ''
|
||||||
|
this.val2 = ''
|
||||||
|
this.result = {}
|
||||||
|
},
|
||||||
|
toSure () {
|
||||||
|
if (!this.val1 || !this.val2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.show = true
|
||||||
|
},
|
||||||
|
/** 确认 */
|
||||||
|
comfirmCallback () {
|
||||||
|
this._doUnbindVehicle()
|
||||||
|
},
|
||||||
|
async _doUnbindVehicle () {
|
||||||
|
try {
|
||||||
|
let res = await doUnbindVehicle(this.val1, this.val2)
|
||||||
|
if (res.code === '1') {
|
||||||
|
this.toast(res.desc)
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
} catch (e) {
|
||||||
|
this.show = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.note
|
||||||
|
padding .3rem
|
||||||
|
background-color rgba(255, 141, 28, .1)
|
||||||
|
border 1px solid #ff8720
|
||||||
|
border-radius .1rem
|
||||||
|
font-size .3rem
|
||||||
|
line-height .34rem
|
||||||
|
margin-top .3rem
|
||||||
|
</style>
|
||||||
@@ -396,6 +396,7 @@ header
|
|||||||
.bottom-filter-tip
|
.bottom-filter-tip
|
||||||
_fj(space-between)
|
_fj(space-between)
|
||||||
padding 0 .2rem
|
padding 0 .2rem
|
||||||
|
font-size .26rem
|
||||||
border-bottom .02rem solid #f0edf1
|
border-bottom .02rem solid #f0edf1
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom none
|
border-bottom none
|
||||||
|
|||||||
Reference in New Issue
Block a user