修改数量

This commit is contained in:
蔡玲
2024-12-09 15:35:10 +08:00
parent 9c290a3fb8
commit bbb59559fb
3 changed files with 24 additions and 2 deletions

View File

@@ -7,3 +7,8 @@ export const pickingInfo = (code) => post('api/board/pickingInfo', {
})
// 仓储看板
export const synthesizeInfo = () => post('api/board/synthesizeInfo', {})
// 修改重量
export const updateMaterialInfo = (code, w) => post('api/bmMaterial/updateMaterialInfo', {
material_id: code,
single_weight: w
})

View File

@@ -509,3 +509,8 @@ export const synthesizeInfo = () => {
}
return res
}
export const updateMaterialInfo = (code, w) => {
let res = {code: '200'}
return res
}

View File

@@ -83,7 +83,7 @@
<div class="info_item info_item_2">
<div class="box zd-row jccenter info_item_i">
<div class="item_label">单重:</div>
<input type="number" class="item_value_input" v-model="itemData[0].single_weight">
<input type="number" class="item_value_input" v-model="itemData[0].single_weight" @keyup.enter="changeWeight" @blur="changeWeight">
<div class="item_unit">g</div>
</div>
</div>
@@ -152,7 +152,7 @@
<script>
import THeader from '@components/header.vue'
import { queryPickingPoint, pickingInfo } from '@js/getData2.js'
import { queryPickingPoint, pickingInfo, updateMaterialInfo } from '@js/getData2.js'
export default {
components: {
THeader
@@ -200,6 +200,18 @@ export default {
}
this.refresh()
}
},
changeWeight (event) {
this._updateMaterialInfo(event.target.value)
},
async _updateMaterialInfo (e) {
let res = await updateMaterialInfo('1', e)
if (res.code === '200') {
this.$message({
message: '操作成功',
type: 'success'
})
}
}
}
}