Compare commits
3 Commits
7e4524ae42
...
0c3e57f5b5
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c3e57f5b5 | |||
| 2ff0f92f94 | |||
| 57a6ab38d1 |
@ -1123,7 +1123,7 @@ def export_stocktake():
|
||||
borrow_rows = db.session.query(
|
||||
TransBorrow.source_table,
|
||||
TransBorrow.stock_id,
|
||||
func.sum(func.coalesce(TransBorrow.quantity, 0) - func.coalesce(TransBorrow.returned_quantity, 0)).label('pending')
|
||||
db.func.sum(db.func.coalesce(TransBorrow.quantity, 0) - db.func.coalesce(TransBorrow.returned_quantity, 0)).label('pending')
|
||||
).filter(
|
||||
TransBorrow.is_returned == False
|
||||
).group_by(
|
||||
|
||||
@ -37,8 +37,10 @@ server {
|
||||
}
|
||||
|
||||
# 3. 后端 API 接口代理
|
||||
# ★ 使用容器名 inventory_api_prod 而非服务名 backend,
|
||||
# 避免与其他 compose 项目的 backend 服务 DNS 冲突(track_backend_prod)
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_pass http://inventory_api_prod:8000;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
@ -105,8 +105,8 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="80" align="center" fixed="right">
|
||||
<template #default="{ $index }">
|
||||
<el-button v-if="!isBulkMode && userStore.hasPermission('outbound_selection:operation')" type="danger" link @click="removeRow($index)">移除</el-button>
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="!isBulkMode && userStore.hasPermission('outbound_selection:operation')" type="danger" link @click="removeRow(row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -884,8 +884,12 @@ const batchRemove = () => {
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
const removeRow = (index: number) => {
|
||||
selectedItems.value.splice(index, 1)
|
||||
const removeRow = (row: any) => {
|
||||
// ★ 按 uniqueKey 精确定位删除,避免排序后索引错位导致删错
|
||||
const idx = selectedItems.value.findIndex(item => item.uniqueKey === row.uniqueKey)
|
||||
if (idx > -1) {
|
||||
selectedItems.value.splice(idx, 1)
|
||||
}
|
||||
}
|
||||
|
||||
const handlePreview = () => {
|
||||
|
||||
Reference in New Issue
Block a user