修改托盘数量

This commit is contained in:
2024-07-02 15:40:57 +08:00
parent 32d7a6f38b
commit a0d0a65c08
4 changed files with 136 additions and 6 deletions

View File

@@ -216,9 +216,9 @@ export const updateWeight = (code, weight) => post('api/pda/manual/updateInfo/up
vehicle_type: '1',
current_weight: weight
})
export const updateQty = (code, qty, weight) => post('api/pda/manual/updateInfo/updateQty', {
export const updateQty = (code, weight, qty) => post('api/pda/manual/updateInfo/updateQty', {
vehicle_code: code,
vehicle_type: '1',
current_qty: qty,
current_weight: weight
current_weight: weight,
current_qty: qty
})

View File

@@ -166,3 +166,7 @@ export const updateWeight = () => {
let res = {code: '1', desc: 'ok'}
return res
}
export const updateQty = () => {
let res = {code: '1', desc: 'ok'}
return res
}

View File

@@ -0,0 +1,127 @@
<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 filter-disabled">
<div class="filter-label">砖块名称</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="result.material_code" disabled>
</div>
</div>
<div class="bottom-filter-tip filter-disabled">
<div class="filter-label">砖块类型</div>
<div class="fxcol mgl20">
<input type="text" class="filter-input filter-scan-input" v-model="result.material_brick_type" disabled>
</div>
</div>
<div class="bottom-filter-tip filter-disabled">
<div class="filter-label">砖块单重</div>
<div class="fxcol mgl20">
<input type="number" class="filter-input filter-scan-input" v-model="result.single_weight" disabled>
</div>
</div>
<div class="bottom-filter-tip filter-disabled">
<div class="filter-label">砖块总重</div>
<div class="fxcol mgl20">
<input type="number" class="filter-input filter-scan-input" v-model="result.weight" disabled>
</div>
</div>
<div class="bottom-filter-tip filter-disabled">
<div class="filter-label">砖块数量</div>
<div class="fxcol mgl20">
<input type="number" class="filter-input filter-scan-input" v-model="result.qty" disabled>
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label">修改单重</div>
<div class="fxcol mgl20">
<input type="number" class="filter-input filter-scan-input" v-model="val2">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label">修改数量</div>
<div class="fxcol mgl20">
<input type="number" class="filter-input filter-scan-input" v-model="val3">
</div>
</div>
</div>
</section>
<section class="submit-bar">
<button class="btn submit-button" @click="clearUp">清空</button>
<button class="btn submit-button" @click="_updateInfo">查询</button>
<button class="btn submit-button" :class="{'btn-disabled' : !val1 || !val2 || !val3}" @click="toSure">确认</button>
</section>
<modal :mdShow="show" @closeModalCallback="show = false" @comfirmCallback="comfirmCallback">
<div class="msg_txt">是否确认将托盘[{{result.material_code}}]的单重修改为[{{val2}}]块数修改为[{{val3}}]</div>
</modal>
</section>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
import Modal from '@components/Modal.vue'
import {updateInfo, updateQty} from '@config/getData2'
export default {
name: 'BindPalletPoint',
components: {
NavBar,
SearchBox,
Modal
},
data () {
return {
val1: '',
val2: '',
val3: '',
result: {},
show: false
}
},
methods: {
async _updateInfo () {
let res = await updateInfo(this.val1)
if (res.code === '1') {
this.result = res.result
} else {
this.Dialog(res.desc)
}
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.result = {}
},
toSure () {
if (!this.val1 || !this.val2 || !this.val3) {
return
}
this.show = true
},
/** 确认 */
comfirmCallback () {
this._updateQty()
},
async _updateQty () {
try {
let res = await updateQty(this.val1, this.val2, this.val3)
if (res.code === '1') {
this.toast(res.desc)
} else {
this.Dialog(res.desc)
}
this.show = false
} catch (e) {
this.show = false
}
}
}
}
</script>

View File

@@ -422,11 +422,10 @@ header
background-color #fff
// box-sizing border-box
&:disabled
color #c0c4cc
background-color #f5f7fa
background-color #dcdfe6
cursor not-allowed
.filter-disabled
background-color #f5f7fa
background-color #dcdfe6
.bottom-input
width 100%
_font(.28rem,.6rem,#929292,,center)