|
|
|
|
@ -160,11 +160,11 @@
|
|
|
|
|
{{ formatStockCount(row.totalBaseCount) }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column :label="t('ErpStock.Stock.count')" align="center" sortable prop="count" min-width="120">
|
|
|
|
|
<!-- <el-table-column :label="t('ErpStock.Stock.count')" align="center" sortable prop="count" min-width="120">
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
{{ formatStockCount(row.count) }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column :label="t('ErpStock.Stock.unit')" align="center" prop="unitName" min-width="90" sortable />
|
|
|
|
|
<el-table-column :label="t('ErpStock.Stock.latestInTime')" align="center" min-width="180">
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
@ -286,6 +286,15 @@ const buildQueryParams = () => {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getProductList = async () => {
|
|
|
|
|
productList.value = await ProductApi.getProductSimpleList(
|
|
|
|
|
queryParams.categoryType !== undefined ? { categoryType: queryParams.categoryType } : undefined
|
|
|
|
|
)
|
|
|
|
|
if (queryParams.productId && !productList.value.some((item) => item.id === queryParams.productId)) {
|
|
|
|
|
queryParams.productId = undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 查询列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true
|
|
|
|
|
@ -305,17 +314,19 @@ const handleQuery = () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
const resetQuery = () => {
|
|
|
|
|
const resetQuery = async () => {
|
|
|
|
|
queryFormRef.value.resetFields()
|
|
|
|
|
activeName.value = ''
|
|
|
|
|
queryParams.categoryType = undefined
|
|
|
|
|
await getProductList()
|
|
|
|
|
handleQuery()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleTabClick = (tab: any) => {
|
|
|
|
|
const handleTabClick = async (tab: any) => {
|
|
|
|
|
const value = String(tab.paneName || '')
|
|
|
|
|
activeName.value = value
|
|
|
|
|
queryParams.categoryType = value ? Number(value) : undefined
|
|
|
|
|
await getProductList()
|
|
|
|
|
handleQuery()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -369,7 +380,7 @@ onMounted(async () => {
|
|
|
|
|
await dictStore.setDictMap()
|
|
|
|
|
await getList()
|
|
|
|
|
// 加载产品、仓库列表
|
|
|
|
|
productList.value = await ProductApi.getProductSimpleList()
|
|
|
|
|
await getProductList()
|
|
|
|
|
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|