盘点
This commit is contained in:
@@ -68,3 +68,16 @@ export function Node_patch_search(query) {
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改实际库存数量
|
||||
* @param {*} query
|
||||
* @returns
|
||||
*/
|
||||
export function updateactualInventoryQuantity(query) {
|
||||
return request({
|
||||
url: '/mes/wm/WmGoodsNowProduction/modifyInventoryQuantity',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
@@ -24,11 +24,12 @@
|
||||
|
||||
<vxe-table
|
||||
resizable
|
||||
keep-source
|
||||
border="inner"
|
||||
ref="xTable"
|
||||
:tree-config="{expandAll: true, transform: true, rowField: 'packageCodeClient_son', parentField: 'packageCodeClient_short_parent' }"
|
||||
:tree-config="{ expandAll: true, transform: true, rowField: 'packageCodeClient_son', parentField: 'packageCodeClient_short_parent' }"
|
||||
:edit-config="{ trigger: 'manual', mode: 'row' }"
|
||||
:data="dataList"
|
||||
|
||||
>
|
||||
<vxe-column field="partnumber" title="零件号"></vxe-column>
|
||||
<vxe-column field="description" title="描述"></vxe-column>
|
||||
@@ -36,7 +37,23 @@
|
||||
<vxe-column field="locationCode" title="库位编码"></vxe-column>
|
||||
<vxe-column field="pack_num" title="箱数"></vxe-column>
|
||||
<vxe-column field="goodsNumLogic" title="理论库存"></vxe-column>
|
||||
<vxe-column field="goodsNumAction" title="实际库存"></vxe-column>
|
||||
<!-- <vxe-column field="goodsNumAction" title="实际库存"></vxe-column> -->
|
||||
<vxe-column field="goodsNumAction" title="实际库存" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.goodsNumAction" type="text"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="160" >
|
||||
<template #default="{ row }">
|
||||
<template v-if="$refs.xTable.isActiveByRow(row)">
|
||||
<vxe-button @click="saveRowEvent(row)">保存</vxe-button>
|
||||
<vxe-button @click="cancelRowEvent(row)">取消</vxe-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<vxe-button @click="editRowEvent(row)">编辑</vxe-button>
|
||||
</template>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="entryWarehouseTime" title="入库时间"></vxe-column>
|
||||
<vxe-column field="remark" title="备注"></vxe-column>
|
||||
</vxe-table>
|
||||
@@ -45,7 +62,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Node_patch_search } from '@/api/wmsManagement/wmGoodsNowProduction.js'
|
||||
import { Node_patch_search,updateactualInventoryQuantity } from '@/api/wmsManagement/wmGoodsNowProduction.js'
|
||||
export default {
|
||||
name: 'WmpatchSearch',
|
||||
data() {
|
||||
@@ -72,7 +89,7 @@ export default {
|
||||
sortType: undefined,
|
||||
},
|
||||
dataList: [],
|
||||
total:0,
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -99,6 +116,36 @@ export default {
|
||||
this.queryParams.partnumber = ''
|
||||
this.queryParams.packageCodeClient_short = ''
|
||||
},
|
||||
//todo 修改库存
|
||||
editRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.setActiveRow(row)
|
||||
},
|
||||
saveRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table
|
||||
.clearActived()
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
//提交修改
|
||||
const query = { id: row.id, stack_num: row.goodsNumAction }
|
||||
return updateactualInventoryQuantity(query)
|
||||
})
|
||||
.then((res) => {
|
||||
if(res.code==200&&res.data>0){
|
||||
this.$notify.success("修改成功");
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
cancelRowEvent(row) {
|
||||
const $table = this.$refs.xTable
|
||||
$table.clearActived().then(() => {
|
||||
// 还原行数据
|
||||
$table.revertData(row)
|
||||
//this.getList()
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user