add:回传增加EAS库存校验

This commit is contained in:
zhangzq
2026-07-21 19:05:06 +08:00
parent 3c674b2737
commit 5d7393fa16
8 changed files with 193 additions and 41 deletions

View File

@@ -122,12 +122,26 @@
<el-table-column prop="qty" label="数量" min-width="100" />
<el-table-column prop="baseqty" label="基础数量" min-width="100" />
<el-table-column prop="warehouseno" label="仓库编号" min-width="120" />
<el-table-column prop="easQty" label="eas库存" min-width="120" />
<el-table-column prop="updateTime" label="更新时间" min-width="120" />
<el-table-column prop="remark" label="说明" min-width="120" />
<el-table-column prop="srcbillno" label="源单据编号" min-width="140" />
<el-table-column prop="srcbillno" label="源单据编号" min-width="140" />
<el-table-column prop="lotnumber" label="批号" min-width="100" />
<el-table-column prop="tracknumber" label="追踪号" min-width="120" />
<!-- 新增操作列 -->
<el-table-column label="操作" width="140" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
@click="handleSyncEasStock(scope.row)"
>
EAS库存
</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer"><el-button type="primary" @click="viewShow = false">关闭</el-button></div>
</el-dialog>
@@ -211,6 +225,28 @@ export default {
this.query.endTime = ''
}
},
handleSyncEasStock(row) {
// 检查必要参数
if (!row.materialno) {
this.$message.warning('物料编号不能为空')
return
}
if (!row.warehouseno) {
this.$message.warning('仓库编号不能为空')
return
}
crudReceiveOutReturn.easStock({ 'warehouseno': row.warehouseno, 'materialno': row.materialno }).then(res => {
if (res.code === 200) {
// 显示同步结果
const qty = res.data.qty
this.$message.success(`EAS库存同步成功当前库存数量${qty}`)
// 可选:在行中显示查询到的库存数量
this.$set(row, 'easQty', qty)
} else {
this.$message.error(res.message || 'EAS库存同步失败')
}
})
},
upload() {
const rows = this.crud.selections || []
if (rows.length < 1) {

View File

@@ -30,5 +30,12 @@ export function get(id) {
method: 'get'
})
}
export function easStock(param) {
return request({
url: '/api/receiveOutReturn/easStock',
method: 'get',
params: param
})
}
export default { add, edit, del, get }
export default { add, edit, del, get, easStock }