陈薪名
8 months ago
4 changed files with 636 additions and 10 deletions
@ -0,0 +1,83 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PackageoverRetrospectVO { |
|||
id: number |
|||
number: string |
|||
jobNumber: string |
|||
warehouseCode: string |
|||
areaCode: string |
|||
locationGroupCode: string |
|||
locationCode: string |
|||
itemCode: string |
|||
itemName: string |
|||
itemDesc1: string |
|||
itemDesc2: string |
|||
projectCode: string |
|||
qty: number |
|||
uom: string |
|||
requestTime: Date |
|||
dueTime: Date |
|||
fromPackingNumber: string |
|||
toPackingNumber: string |
|||
fromBatch: string |
|||
toBatch: string |
|||
fromPackUnit: string |
|||
toPackUnit: string |
|||
fromPackQty: number |
|||
toPackQty: number |
|||
fromInventoryStatus: string |
|||
toInventoryStatus: string |
|||
fromContainerNumber: string |
|||
toContainerNumber: string |
|||
businessType: string |
|||
departmentCode: string |
|||
outTransactionType: string |
|||
inTransactionType: string |
|||
executeTime: Date |
|||
activeDate: Date |
|||
fromOwnerCode: string |
|||
toOwnerCode: string |
|||
remark: string |
|||
available: string |
|||
} |
|||
|
|||
// 查询翻包记录主列表
|
|||
export const getPackageoverRetrospectPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/wms/packageover-retrospect/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/wms/packageover-retrospect/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询翻包记录主详情
|
|||
export const getPackageoverRetrospect = async (id: number) => { |
|||
return await request.get({ url: `/wms/packageover-retrospect/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增翻包记录主
|
|||
export const createPackageoverRetrospect = async (data: PackageoverRetrospectVO) => { |
|||
return await request.post({ url: `/wms/packageover-retrospect/create`, data }) |
|||
} |
|||
|
|||
// 修改翻包记录主
|
|||
export const updatePackageoverRetrospect = async (data: PackageoverRetrospectVO) => { |
|||
return await request.put({ url: `/wms/packageover-retrospect/update`, data }) |
|||
} |
|||
|
|||
// 删除翻包记录主
|
|||
export const deletePackageoverRetrospect = async (id: number) => { |
|||
return await request.delete({ url: `/wms/packageover-retrospect/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出翻包记录主 Excel
|
|||
export const exportPackageoverRetrospect = async (params) => { |
|||
return await request.download({ url: `/wms/packageover-retrospect/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/wms/packageover-retrospect/get-import-template' }) |
|||
} |
@ -0,0 +1,129 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PackageoverRetrospect.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PackageoverRetrospect.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="PackageoverRetrospect.allSchemas" /> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PackageoverRetrospect } from './packageoverRetrospect.data' |
|||
import * as PackageoverRetrospectApi from '@/api/wms/packageoverRetrospect' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'PackageoverRetrospect' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PackageoverRetrospect.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PackageoverRetrospectApi.getPackageoverRetrospectPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'wms:packageoverRetrospect:create'}), // 新增 |
|||
defaultButtons.defaultImportBtn({hasPermi:'wms:packageoverRetrospect:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:packageoverRetrospect:export'}), // 导出 |
|||
defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicPackageoverRetrospect') |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await PackageoverRetrospectApi.exportPackageoverRetrospect(tableObject.params) |
|||
download.excel(data, '翻包记录主.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,409 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const PackageoverRetrospectRules = reactive({ |
|||
}) |
|||
|
|||
export const PackageoverRetrospect = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '任务单据号', |
|||
field: 'jobNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '仓库代码', |
|||
field: 'warehouseCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 120 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库区代码', |
|||
field: 'areaCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位组代码', |
|||
field: 'locationGroupCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '库位代码', |
|||
field: 'locationCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品描述1', |
|||
field: 'itemDesc1', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '物品描述2', |
|||
field: 'itemDesc2', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '项目代码', |
|||
field: 'projectCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 200 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table: { |
|||
width: 200 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从包装规格', |
|||
field: 'fromPackUnit', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到包装规格', |
|||
field: 'toPackUnit', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从标包数量', |
|||
field: 'fromPackQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到标包数量', |
|||
field: 'toPackQty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '从库存状态', |
|||
field: 'fromInventoryStatus', |
|||
dictType: DICT_TYPE.INVENTORY_STATUS, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '到库存状态', |
|||
field: 'toInventoryStatus', |
|||
dictType: DICT_TYPE.INVENTORY_STATUS, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
|
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '出库事务类型', |
|||
field: 'outTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '入库事务类型', |
|||
field: 'inTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '执行时间', |
|||
field: 'executeTime', |
|||
sort: 'custom', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '生效日期', |
|||
field: 'activeDate', |
|||
sort: 'custom', |
|||
formatter: dateFormatter2, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD' |
|||
}, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
isForm: false |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
isTable:false |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Switch', |
|||
value: 'TRUE', |
|||
componentProps: { |
|||
inactiveValue: 'FALSE', |
|||
activeValue: 'TRUE' |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建者', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '最后更新者', |
|||
field: 'update', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '最后更新时间', |
|||
field: 'updateTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
} |
|||
])) |
Loading…
Reference in new issue