New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-taskType'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: formatMessage('db.view_in_out.ymd', '日期'), |
| | | dataIndex: 'ymd', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('ymd'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_in_out.inQty', '入库次数'), |
| | | dataIndex: 'inQty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('inQty'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_in_out.outQty', '出库次数'), |
| | | dataIndex: 'outQty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('outQty'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_in_out.mat_id', '入出总数'), |
| | | dataIndex: 'totalQty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('totalQty'), |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/viewInOut/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewInOut/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '日入出库次数统计' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-taskType'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: formatMessage('db.man_loc_detl.stayTime', '滞留天数'), |
| | | dataIndex: 'stayTime', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('stayTime'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.loc_id', '库位'), |
| | | dataIndex: 'locId$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('locId$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.loc_no', '库位号'), |
| | | dataIndex: 'locNo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('locNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.mat_id', '商品'), |
| | | dataIndex: 'matId$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('matId$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.matnr', '商品编号'), |
| | | dataIndex: 'matnr', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('matnr'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.order_no', '订单号'), |
| | | dataIndex: 'orderNo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('orderNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.batch', '批号'), |
| | | dataIndex: 'batch', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('batch'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.anfme', '数量'), |
| | | dataIndex: 'anfme', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('anfme'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.status', '状态'), |
| | | dataIndex: 'status$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('status$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.create_time', '添加时间'), |
| | | dataIndex: 'createTime$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createTime$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.create_by', '添加人员'), |
| | | dataIndex: 'createBy$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createBy$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.memo', '备注'), |
| | | dataIndex: 'memo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('memo'), |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/viewStayTime/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewStayTime/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '库存在库时间统计' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-taskType'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: formatMessage('db.view_work_count_in.oneday', '入库日期'), |
| | | dataIndex: 'oneday', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('oneday'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_count_in.matnr', '商品编号'), |
| | | dataIndex: 'matnr', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('matnr'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_count_in.maktx', '商品名称'), |
| | | dataIndex: 'maktx', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('maktx'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_count_in.anfme', '数量'), |
| | | dataIndex: 'anfme', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('anfme'), |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/viewWorkCountIn/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkCountIn/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '日入库汇总查询' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-taskType'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: formatMessage('db.view_work_count_out.oneday', '出库日期'), |
| | | dataIndex: 'oneday', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('oneday'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_count_out.matnr', '商品编号'), |
| | | dataIndex: 'matnr', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('matnr'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_count_out.maktx', '商品名称'), |
| | | dataIndex: 'maktx', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('maktx'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_count_out.anfme', '数量'), |
| | | dataIndex: 'anfme', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('anfme'), |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/viewWorkCountOut/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkCountOut/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '日出库汇总查询' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-viewWorkIn'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | columns: [], |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | state.columns = [ |
| | | { |
| | | title: formatMessage('db.view_work_in.create_time', '入库日期'), |
| | | dataIndex: 'createTime$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createTime$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.locNo', '库位号'), |
| | | dataIndex: ['task$', 'targetLoc'], |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('locNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.matnr', '商品编号'), |
| | | dataIndex: ['mat$', 'matnr'], |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('matnr'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.maktx', '商品名称'), |
| | | dataIndex: ['mat$', 'maktx'], |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('maktx'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.batch', '批号'), |
| | | dataIndex: 'batch', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('batch'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.anfme', '数量'), |
| | | dataIndex: 'anfme', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('anfme'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.barcode', '托盘码'), |
| | | dataIndex: 'barcode', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('barcode'), |
| | | } |
| | | ]; |
| | | |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/viewWorkIn/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getColumns(); |
| | | //加载扩展字段 |
| | | async function getColumns() { |
| | | let fieldResp = await post('/api/matField/list', { |
| | | unique: 1, |
| | | }) |
| | | let fieldResult = fieldResp.data; |
| | | let tmp = state.columns; |
| | | if (fieldResult.code == 200) { |
| | | let data = fieldResult.data; |
| | | |
| | | data.forEach((item) => { |
| | | tmp.push({ |
| | | title: formatMessage(item.language, item.describe), |
| | | name: item.name, |
| | | dataIndex: item.name, |
| | | key: item.name, |
| | | width: 140, |
| | | }) |
| | | }) |
| | | state.columns = tmp; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkIn/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '日入库明细查询' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-viewWorkIn'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | columns: [], |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | state.columns = [ |
| | | { |
| | | title: formatMessage('db.view_work_in.create_time', '入库日期'), |
| | | dataIndex: 'createTime$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createTime$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.locNo', '库位号'), |
| | | dataIndex: ['task$', 'originLoc'], |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('locNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.matnr', '商品编号'), |
| | | dataIndex: ['mat$', 'matnr'], |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('matnr'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.maktx', '商品名称'), |
| | | dataIndex: ['mat$', 'maktx'], |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('maktx'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.batch', '批号'), |
| | | dataIndex: 'batch', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('batch'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.anfme', '数量'), |
| | | dataIndex: 'anfme', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('anfme'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.view_work_in.barcode', '托盘码'), |
| | | dataIndex: 'barcode', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('barcode'), |
| | | } |
| | | ]; |
| | | |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/viewWorkOut/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getColumns(); |
| | | //加载扩展字段 |
| | | async function getColumns() { |
| | | let fieldResp = await post('/api/matField/list', { |
| | | unique: 1, |
| | | }) |
| | | let fieldResult = fieldResp.data; |
| | | let tmp = state.columns; |
| | | if (fieldResult.code == 200) { |
| | | let data = fieldResult.data; |
| | | |
| | | data.forEach((item) => { |
| | | tmp.push({ |
| | | title: formatMessage(item.language, item.describe), |
| | | name: item.name, |
| | | dataIndex: item.name, |
| | | key: item.name, |
| | | width: 140, |
| | | }) |
| | | }) |
| | | state.columns = tmp; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkOut/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '日出库明细查询' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.controller.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewInOut; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewInOutMapper; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class ViewInOutController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ViewInOutMapper viewInOutMapper; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewInOut:list')") |
| | | @PostMapping("/viewInOut/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewInOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewInOut.class); |
| | | QueryWrapper<ViewInOut> queryWrapper = pageParam.buildWrapper(true); |
| | | PageParam<ViewInOut, BaseParam> page = viewInOutMapper.selectPage(pageParam, queryWrapper); |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewInOut:list')") |
| | | @PostMapping("/viewInOut/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewInOut> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewInOutMapper.selectList(wrapper), ViewInOut.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.controller.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewStayTime; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewStayTimeMapper; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class ViewStayTimeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ViewStayTimeMapper viewStayTimeMapper; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewStayTime:list')") |
| | | @PostMapping("/viewStayTime/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewStayTime, BaseParam> pageParam = new PageParam<>(baseParam, ViewStayTime.class); |
| | | QueryWrapper<ViewStayTime> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("stay_time")); |
| | | PageParam<ViewStayTime, BaseParam> page = viewStayTimeMapper.selectPage(pageParam, queryWrapper); |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewStayTime:list')") |
| | | @PostMapping("/viewStayTime/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewStayTime> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewStayTimeMapper.selectList(wrapper), ViewStayTime.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.controller.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountIn; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountInMapper; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class ViewWorkCountInController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ViewWorkCountInMapper viewWorkCountInMapper; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkCountIn:list')") |
| | | @PostMapping("/viewWorkCountIn/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkCountIn, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountIn.class); |
| | | QueryWrapper<ViewWorkCountIn> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); |
| | | PageParam<ViewWorkCountIn, BaseParam> page = viewWorkCountInMapper.selectPage(pageParam, queryWrapper); |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkCountIn:list')") |
| | | @PostMapping("/viewWorkCountIn/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkCountIn> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkCountInMapper.selectList(wrapper), ViewWorkCountIn.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.controller.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountIn; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountOut; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountInMapper; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountOutMapper; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class ViewWorkCountOutController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ViewWorkCountOutMapper viewWorkCountOutMapper; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") |
| | | @PostMapping("/viewWorkCountOut/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkCountOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountOut.class); |
| | | QueryWrapper<ViewWorkCountOut> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); |
| | | PageParam<ViewWorkCountOut, BaseParam> page = viewWorkCountOutMapper.selectPage(pageParam, queryWrapper); |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") |
| | | @PostMapping("/viewWorkCountOut/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkCountOut> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkCountOutMapper.selectList(wrapper), ViewWorkCountOut.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.controller.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlFieldLog; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkIn; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkInMapper; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlFieldLogService; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class ViewWorkInController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ViewWorkInMapper viewWorkInMapper; |
| | | @Autowired |
| | | private TaskDetlFieldLogService taskDetlFieldLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkIn:list')") |
| | | @PostMapping("/viewWorkIn/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkIn, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkIn.class); |
| | | QueryWrapper<ViewWorkIn> queryWrapper = pageParam.buildWrapper(true); |
| | | PageParam<ViewWorkIn, BaseParam> page = viewWorkInMapper.selectPage(pageParam, queryWrapper); |
| | | List<ViewWorkIn> records = page.getRecords(); |
| | | for (ViewWorkIn record : records) { |
| | | List<TaskDetlFieldLog> list = taskDetlFieldLogService.list(new LambdaQueryWrapper<TaskDetlFieldLog>().eq(TaskDetlFieldLog::getDetlId, record.getId())); |
| | | record.syncField(list); |
| | | } |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkIn:list')") |
| | | @PostMapping("/viewWorkIn/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkIn> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkInMapper.selectList(wrapper), ViewWorkIn.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.controller.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlFieldLog; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkOut; |
| | | import com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkOutMapper; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlFieldLogService; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class ViewWorkOutController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ViewWorkOutMapper viewWorkOutMapper; |
| | | @Autowired |
| | | private TaskDetlFieldLogService taskDetlFieldLogService; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkOut:list')") |
| | | @PostMapping("/viewWorkOut/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkOut.class); |
| | | QueryWrapper<ViewWorkOut> queryWrapper = pageParam.buildWrapper(true); |
| | | PageParam<ViewWorkOut, BaseParam> page = viewWorkOutMapper.selectPage(pageParam, queryWrapper); |
| | | List<ViewWorkOut> records = page.getRecords(); |
| | | for (ViewWorkOut record : records) { |
| | | List<TaskDetlFieldLog> list = taskDetlFieldLogService.list(new LambdaQueryWrapper<TaskDetlFieldLog>().eq(TaskDetlFieldLog::getDetlId, record.getId())); |
| | | record.syncField(list); |
| | | } |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkOut:list')") |
| | | @PostMapping("/viewWorkOut/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkOut> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkOutMapper.selectList(wrapper), ViewWorkOut.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | public TaskLog getTask$(){ |
| | | TaskLogService service = SpringUtils.getBean(TaskLogService.class); |
| | | TaskLog taskLog = service.getById(this.getTaskId()); |
| | | if (!Cools.isEmpty(taskLog)){ |
| | | return taskLog; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getHostId$(){ |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.getById(this.hostId); |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("view_in_out") |
| | | public class ViewInOut { |
| | | |
| | | @ApiModelProperty("日期") |
| | | private String ymd; |
| | | |
| | | @ApiModelProperty("入库次数") |
| | | private Long inQty; |
| | | |
| | | @ApiModelProperty("出库次数") |
| | | private Long outQty; |
| | | |
| | | @ApiModelProperty("入出总数") |
| | | private Long totalQty; |
| | | |
| | | private Long hostId; |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zy.asrs.wms.asrs.entity.LocDetl; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @TableName("view_stay_time") |
| | | public class ViewStayTime extends LocDetl { |
| | | |
| | | @ApiModelProperty(value= "当前时间") |
| | | private Date today; |
| | | |
| | | @ApiModelProperty(value= "滞留天数") |
| | | private Integer stayTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("view_work_count_in") |
| | | public class ViewWorkCountIn { |
| | | |
| | | @ApiModelProperty("入库日期") |
| | | private String oneday; |
| | | |
| | | @ApiModelProperty("商品编号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty("商品名称") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty("数量") |
| | | private Double anfme; |
| | | |
| | | private Long hostId; |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("view_work_count_out") |
| | | public class ViewWorkCountOut { |
| | | |
| | | @ApiModelProperty("出库日期") |
| | | private String oneday; |
| | | |
| | | @ApiModelProperty("商品编号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty("商品名称") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty("数量") |
| | | private Double anfme; |
| | | |
| | | private Long hostId; |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlLog; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @TableName("view_work_in") |
| | | public class ViewWorkIn extends TaskDetlLog { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlLog; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @TableName("view_work_out") |
| | | public class ViewWorkOut extends TaskDetlLog { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewInOut; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ViewInOutMapper extends BaseMapper<ViewInOut> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewStayTime; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ViewStayTimeMapper extends BaseMapper<ViewStayTime> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountIn; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ViewWorkCountInMapper extends BaseMapper<ViewWorkCountIn> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountIn; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkCountOut; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ViewWorkCountOutMapper extends BaseMapper<ViewWorkCountOut> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewInOut; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkIn; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ViewWorkInMapper extends BaseMapper<ViewWorkIn> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper.statistics; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkIn; |
| | | import com.zy.asrs.wms.asrs.entity.statistics.ViewWorkOut; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface ViewWorkOutMapper extends BaseMapper<ViewWorkOut> { |
| | | |
| | | } |
| | |
| | | |
| | | List<Long> getTaskIdsByDetlId(Long detlId); |
| | | |
| | | List<TaskDetlLog> parseDetl(List<TaskDetlLog> list); |
| | | |
| | | } |
| | |
| | | |
| | | List<Long> getTaskIdsByDetlId(Long detlId); |
| | | |
| | | List<TaskDetl> parseDetl(List<TaskDetl> list); |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.wms.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetl; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlField; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlFieldLog; |
| | | import com.zy.asrs.wms.asrs.entity.*; |
| | | import com.zy.asrs.wms.asrs.mapper.TaskDetlLogMapper; |
| | | import com.zy.asrs.wms.asrs.entity.TaskDetlLog; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlFieldLogService; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlFieldService; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlLogService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public List<Long> getTaskIdsByDetlId(Long detlId) { |
| | | return this.baseMapper.getTaskIdsByDetlId(detlId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TaskDetlLog> parseDetl(List<TaskDetlLog> list) { |
| | | for (TaskDetlLog taskDetlLog : list) { |
| | | List<TaskDetlFieldLog> taskDetlFieldLogList = taskDetlFieldLogService.list(new LambdaQueryWrapper<TaskDetlFieldLog>().eq(TaskDetlFieldLog::getDetlId, taskDetlLog.getId())); |
| | | taskDetlLog.syncField(taskDetlFieldLogList); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | @Service("taskDetlService") |
| | |
| | | public List<Long> getTaskIdsByDetlId(Long detlId) { |
| | | return this.baseMapper.getTaskIdsByDetlId(detlId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TaskDetl> parseDetl(List<TaskDetl> list) { |
| | | for (TaskDetl taskDetl : list) { |
| | | List<TaskDetlField> taskDetlFieldList = taskDetlFieldService.list(new LambdaQueryWrapper<TaskDetlField>().eq(TaskDetlField::getDetlId, taskDetl.getId())); |
| | | taskDetl.syncField(taskDetlFieldList); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="man_wave_detl"; |
| | | generator.tableName="波次明细管理"; |
| | | generator.table="view_work_count_in"; |
| | | generator.tableName="日入库汇总查询"; |
| | | generator.rootPackagePath="com.zy.asrs.wms"; |
| | | generator.packagePath="com.zy.asrs.wms.asrs"; |
| | | |
New file |
| | |
| | | -- save workCountIn record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `host_id`, `status`) values ( '日出库汇总查询', '1065', '/log/viewWorkCountOut', '/log/viewWorkCountOut', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '查询数据', '', '1', 'asrs:viewWorkCountOut:list', '0', '1', '1'); |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.statistics.ViewInOutMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.statistics.ViewStayTimeMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountInMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkCountInMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkInMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.statistics.ViewWorkOutMapper"> |
| | | |
| | | </mapper> |