入库出库记录汇总
This commit is contained in:
1 parent
43854f5a99
commit
4d10c86446
3 files changed
+211
No files matched your search
@@ -8,3 +8,12 @@ export function getInventoryPage(params?: object) {
|
|||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分页获取出入库汇总 orderType: 1入库 2出库
|
||||||
|
export function getInventoryPageSum(params?: object) {
|
||||||
|
return request({
|
||||||
|
url: "/supermarket/smErpInventoryRecords/inventoryTypeSum/page",
|
||||||
|
method: "get",
|
||||||
|
params,
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
<el-row v-show="showSearch">
|
||||||
|
<el-form :model="state.queryForm" :inline="true" ref="queryRef" @keyup.enter="getDataList">
|
||||||
|
<el-form-item label="关键字" prop="key">
|
||||||
|
<el-input placeholder="请输入关键字" v-model.trim="state.queryForm.key" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据日期" prop="inventoryDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-modeltrim="state.queryForm.inventoryDate"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
placeholder="请输入单据日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
:export="''"
|
||||||
|
@exportExcel="exportExcel"
|
||||||
|
class="ml10 mr20"
|
||||||
|
style="float: right"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<el-table
|
||||||
|
:data="state.dataList"
|
||||||
|
v-loading="state.loading"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="40" align="center" fixed="left" />
|
||||||
|
<el-table-column type="index" label="#" width="50" fixed="left" />
|
||||||
|
<el-table-column prop="productName" label="商品名" show-overflow-tooltip min-width="160" />
|
||||||
|
<el-table-column prop="unit" label="单位" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="spec" label="规格" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="stock" label="库存" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="warnType" label="预警类型" show-overflow-tooltip min-width="100" />
|
||||||
|
<el-table-column prop="barcode" label="条码" show-overflow-tooltip min-width="120" />
|
||||||
|
<el-table-column prop="categoryId" label="分类" show-overflow-tooltip min-width="100" />
|
||||||
|
<el-table-column prop="inventoryLowerLimit" label="库存下限" show-overflow-tooltip min-width="90" />
|
||||||
|
<el-table-column prop="inventoryUpperLimit" label="库存上限" show-overflow-tooltip min-width="90" />
|
||||||
|
<el-table-column prop="packageNum" label="内装数量" show-overflow-tooltip min-width="90" />
|
||||||
|
<el-table-column prop="picUrl" label="商品图" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<preview-image :src="scope.row.picUrl" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="productCode" label="货号" show-overflow-tooltip min-width="120" /> -->
|
||||||
|
</el-table>
|
||||||
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||||
|
import { getInventoryPageSum } from "/@/api/supermarketerp/report"
|
||||||
|
|
||||||
|
const queryRef = ref()
|
||||||
|
const showSearch = ref(true)
|
||||||
|
const selectObjs = ref([]) as any
|
||||||
|
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {
|
||||||
|
orderType: 2,
|
||||||
|
},
|
||||||
|
pageList: getInventoryPageSum,
|
||||||
|
})
|
||||||
|
|
||||||
|
const { getDataList, currentChangeHandle, sizeChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
|
|
||||||
|
// 清空搜索条件
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields()
|
||||||
|
getDataList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 多选事件
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出excel
|
||||||
|
const exportExcel = () => {
|
||||||
|
downBlobFile("/supermarketerp/smErpInventoryWarning/export", Object.assign(state.queryForm, { ids: selectObjs }), "出库汇总.xlsx")
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
<el-row v-show="showSearch">
|
||||||
|
<el-form :model="state.queryForm" :inline="true" ref="queryRef" @keyup.enter="getDataList">
|
||||||
|
<el-form-item label="关键字" prop="key">
|
||||||
|
<el-input placeholder="请输入关键字" v-model.trim="state.queryForm.key" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据日期" prop="inventoryDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-modeltrim="state.queryForm.inventoryDate"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
type="date"
|
||||||
|
placeholder="请输入单据日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
:export="''"
|
||||||
|
@exportExcel="exportExcel"
|
||||||
|
class="ml10 mr20"
|
||||||
|
style="float: right"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<el-table
|
||||||
|
:data="state.dataList"
|
||||||
|
v-loading="state.loading"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="40" align="center" fixed="left" />
|
||||||
|
<el-table-column type="index" label="#" width="50" fixed="left" />
|
||||||
|
<el-table-column prop="productName" label="商品名" show-overflow-tooltip min-width="160" />
|
||||||
|
<el-table-column prop="unit" label="单位" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="spec" label="规格" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="stock" label="库存" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="warnType" label="预警类型" show-overflow-tooltip min-width="100" />
|
||||||
|
<el-table-column prop="barcode" label="条码" show-overflow-tooltip min-width="120" />
|
||||||
|
<el-table-column prop="categoryId" label="分类" show-overflow-tooltip min-width="100" />
|
||||||
|
<el-table-column prop="inventoryLowerLimit" label="库存下限" show-overflow-tooltip min-width="90" />
|
||||||
|
<el-table-column prop="inventoryUpperLimit" label="库存上限" show-overflow-tooltip min-width="90" />
|
||||||
|
<el-table-column prop="packageNum" label="内装数量" show-overflow-tooltip min-width="90" />
|
||||||
|
<el-table-column prop="picUrl" label="商品图" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<preview-image :src="scope.row.picUrl" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="productCode" label="货号" show-overflow-tooltip min-width="120" /> -->
|
||||||
|
</el-table>
|
||||||
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||||
|
import { getInventoryPageSum } from "/@/api/supermarketerp/report"
|
||||||
|
|
||||||
|
const queryRef = ref()
|
||||||
|
const showSearch = ref(true)
|
||||||
|
const selectObjs = ref([]) as any
|
||||||
|
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {
|
||||||
|
orderType: 1,
|
||||||
|
},
|
||||||
|
pageList: getInventoryPageSum,
|
||||||
|
})
|
||||||
|
|
||||||
|
const { getDataList, currentChangeHandle, sizeChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
|
|
||||||
|
// 清空搜索条件
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields()
|
||||||
|
getDataList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 多选事件
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出excel
|
||||||
|
const exportExcel = () => {
|
||||||
|
downBlobFile("/supermarketerp/smErpInventoryWarning/export", Object.assign(state.queryForm, { ids: selectObjs }), "入库汇总.xlsx")
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in new issue
Block a user